@adobe/reactor-sdk
Version:
JavaScript SDK for the Reactor API
1 lines • 3.08 kB
Source Map (JSON)
{"version":3,"file":"callbacks.cjs","names":["createCallback","propertyId","callback","post","data","deleteCallback","callbackId","delete","getCallback","get","getPropertyForCallback","listCallbacksForProperty","queryParams","updateCallback","callbackPatch","patch","id"],"sources":["../../src/callbacks.js"],"sourcesContent":["/*\nCopyright 2019 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\n// Callbacks\n// https://developer.adobelaunch.com/api/callbacks\n\n// Create a Callback\n// https://developer.adobelaunch.com/api/callbacks/create/\nexport function createCallback(propertyId, callback) {\n return this.post(`/properties/${propertyId}/callbacks`, { data: callback });\n}\n\n// Delete a Callback\n// https://developer.adobelaunch.com/api/callbacks/delete/\nexport function deleteCallback(callbackId) {\n return this.delete(`/callbacks/${callbackId}`);\n}\n\n// Get a Callback\n// https://developer.adobelaunch.com/api/callbacks/fetch/\nexport function getCallback(callbackId) {\n return this.get(`/callbacks/${callbackId}`);\n}\n\n// Get the Property\n// https://developer.adobelaunch.com/api/callbacks/property/\nexport function getPropertyForCallback(callbackId) {\n return this.get(`/callbacks/${callbackId}/property`);\n}\n\n// List Callbacks for a Property\n// https://developer.adobelaunch.com/api/callbacks/list/\nexport function listCallbacksForProperty(propertyId, queryParams) {\n return this.get(`/properties/${propertyId}/callbacks`, queryParams);\n}\n\n// Update a Callback\n// https://developer.adobelaunch.com/api/callbacks/update/\nexport function updateCallback(callbackPatch) {\n return this.patch(`/callbacks/${callbackPatch.id}`, { data: callbackPatch });\n}\n"],"mappings":";;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACO,SAASA,cAAcA,CAACC,UAAU,EAAEC,QAAQ,EAAE;EACnD,OAAO,IAAI,CAACC,IAAI,CAAC,eAAeF,UAAU,YAAY,EAAE;IAAEG,IAAI,EAAEF;EAAS,CAAC,CAAC;AAC7E;;AAEA;AACA;AACO,SAASG,cAAcA,CAACC,UAAU,EAAE;EACzC,OAAO,IAAI,CAACC,MAAM,CAAC,cAAcD,UAAU,EAAE,CAAC;AAChD;;AAEA;AACA;AACO,SAASE,WAAWA,CAACF,UAAU,EAAE;EACtC,OAAO,IAAI,CAACG,GAAG,CAAC,cAAcH,UAAU,EAAE,CAAC;AAC7C;;AAEA;AACA;AACO,SAASI,sBAAsBA,CAACJ,UAAU,EAAE;EACjD,OAAO,IAAI,CAACG,GAAG,CAAC,cAAcH,UAAU,WAAW,CAAC;AACtD;;AAEA;AACA;AACO,SAASK,wBAAwBA,CAACV,UAAU,EAAEW,WAAW,EAAE;EAChE,OAAO,IAAI,CAACH,GAAG,CAAC,eAAeR,UAAU,YAAY,EAAEW,WAAW,CAAC;AACrE;;AAEA;AACA;AACO,SAASC,cAAcA,CAACC,aAAa,EAAE;EAC5C,OAAO,IAAI,CAACC,KAAK,CAAC,cAAcD,aAAa,CAACE,EAAE,EAAE,EAAE;IAAEZ,IAAI,EAAEU;EAAc,CAAC,CAAC;AAC9E","ignoreList":[]}