@adobe/reactor-sdk
Version:
JavaScript SDK for the Reactor API
65 lines (52 loc) • 2.27 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.createCallback = createCallback;
exports.deleteCallback = deleteCallback;
exports.getCallback = getCallback;
exports.getPropertyForCallback = getPropertyForCallback;
exports.listCallbacksForProperty = listCallbacksForProperty;
exports.updateCallback = updateCallback;
/*
Copyright 2019 Adobe. All rights reserved.
This file is licensed to you under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. You may obtain a copy
of the License at http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
OF ANY KIND, either express or implied. See the License for the specific language
governing permissions and limitations under the License.
*/
// Callbacks
// https://developer.adobelaunch.com/api/callbacks
// Create a Callback
// https://developer.adobelaunch.com/api/callbacks/create/
function createCallback(propertyId, callback) {
return this.post("/properties/".concat(propertyId, "/callbacks"), {
data: callback
});
} // Delete a Callback
// https://developer.adobelaunch.com/api/callbacks/delete/
function deleteCallback(callbackId) {
return this.delete("/callbacks/".concat(callbackId));
} // Get a Callback
// https://developer.adobelaunch.com/api/callbacks/fetch/
function getCallback(callbackId) {
return this.get("/callbacks/".concat(callbackId));
} // Get the Property
// https://developer.adobelaunch.com/api/callbacks/property/
function getPropertyForCallback(callbackId) {
return this.get("/callbacks/".concat(callbackId, "/property"));
} // List Callbacks for a Property
// https://developer.adobelaunch.com/api/callbacks/list/
function listCallbacksForProperty(propertyId, queryParams) {
return this.get("/properties/".concat(propertyId, "/callbacks"), queryParams);
} // Update a Callback
// https://developer.adobelaunch.com/api/callbacks/update/
function updateCallback(callbackPatch) {
return this.patch("/callbacks/".concat(callbackPatch.id), {
data: callbackPatch
});
}
//# sourceMappingURL=callbacks.js.map