UNPKG

@adobe/reactor-sdk

Version:
1 lines 5.6 kB
{"version":3,"file":"extensions.cjs","names":["createExtension","propertyId","extension","post","data","deleteExtension","extensionId","delete","getExtension","get","getExtensionPackageForExtension","getOriginForExtension","getPropertyForExtension","listExtensionsForProperty","queryParams","listLibrariesForExtension","listRevisionsForExtension","reviseExtension","patch","createReviseBody","updateExtension","extensionPatch","createNoteForExtension","note"],"sources":["../../src/extensions.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// Extensions\n// https://developer.adobelaunch.com/api/reference/1.0/extensions/\n\n// Create Extension\n// https://developer.adobelaunch.com/api/reference/1.0/extensions/create/\nexport function createExtension(propertyId, extension) {\n return this.post(`/properties/${propertyId}/extensions`, {\n data: extension\n });\n}\n\n// Delete Extension\n// https://developer.adobelaunch.com/api/reference/1.0/extensions/delete/\nexport function deleteExtension(extensionId) {\n return this.delete(`/extensions/${extensionId}`);\n}\n\n// Get Extension\n// https://developer.adobelaunch.com/api/reference/1.0/extensions/fetch/\nexport function getExtension(extensionId) {\n return this.get(`/extensions/${extensionId}`);\n}\n\n// Get Extension's ExtensionPackage\n// https://developer.adobelaunch.com/api/reference/1.0/extensions/extension_package/\nexport function getExtensionPackageForExtension(extensionId) {\n return this.get(`/extensions/${extensionId}/extension_package`);\n}\n\n// Get Extension's origin\n// https://developer.adobelaunch.com/api/reference/1.0/extensions/origin/\nexport function getOriginForExtension(extensionId) {\n return this.get(`/extensions/${extensionId}/origin`);\n}\n\n// Get Extension's Property\n// https://developer.adobelaunch.com/api/reference/1.0/extensions/property/\nexport function getPropertyForExtension(extensionId) {\n return this.get(`/extensions/${extensionId}/property`);\n}\n\n// List Extensions\n// https://developer.adobelaunch.com/api/reference/1.0/extensions/list/\nexport function listExtensionsForProperty(propertyId, queryParams) {\n return this.get(`/properties/${propertyId}/extensions`, queryParams);\n}\n\n// List Extension's Libraries\n// https://developer.adobelaunch.com/api/reference/1.0/extensions/libraries/\nexport function listLibrariesForExtension(extensionId) {\n return this.get(`/extensions/${extensionId}/libraries`);\n}\n\n// List Extension's revisions\n// https://developer.adobelaunch.com/api/reference/1.0/extensions/revisions/\nexport function listRevisionsForExtension(extensionId) {\n return this.get(`/extensions/${extensionId}/revisions`);\n}\n\n// Revise Extension\n// https://developer.adobelaunch.com/api/reference/1.0/extensions/revise/\nexport function reviseExtension(extensionId) {\n return this.patch(\n `/extensions/${extensionId}`,\n this.createReviseBody('extensions', extensionId)\n );\n}\n\n// Update Extension\n// https://developer.adobelaunch.com/api/reference/1.0/extensions/update/\nexport function updateExtension(extensionId, extensionPatch) {\n return this.patch(`/extensions/${extensionId}`, {\n data: extensionPatch\n });\n}\n\n// Create a note for Extension\n// https://developer.adobelaunch.com/api/extensions/:extension_id/notes\nexport function createNoteForExtension(extensionId, note) {\n return this.post(`/extensions/${extensionId}/notes`, {\n data: note\n });\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACO,SAASA,eAAeA,CAACC,UAAU,EAAEC,SAAS,EAAE;EACrD,OAAO,IAAI,CAACC,IAAI,CAAC,eAAeF,UAAU,aAAa,EAAE;IACvDG,IAAI,EAAEF;EACR,CAAC,CAAC;AACJ;;AAEA;AACA;AACO,SAASG,eAAeA,CAACC,WAAW,EAAE;EAC3C,OAAO,IAAI,CAACC,MAAM,CAAC,eAAeD,WAAW,EAAE,CAAC;AAClD;;AAEA;AACA;AACO,SAASE,YAAYA,CAACF,WAAW,EAAE;EACxC,OAAO,IAA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