@adobe/reactor-sdk
Version:
JavaScript SDK for the Reactor API
1 lines • 2.91 kB
Source Map (JSON)
{"version":3,"file":"hosts.cjs","names":["createHost","propertyId","hostSpec","post","data","deleteHost","hostId","delete","getHost","get","getPropertyForHost","listHostsForProperty","queryParams","updateHost","hostPatch","patch","id"],"sources":["../../src/hosts.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// Hosts\n// https://developer.adobelaunch.com/api/hosts/\n\n// Create a Host\n// https://developer.adobelaunch.com/api/hosts/create/\nexport function createHost(propertyId, hostSpec) {\n return this.post(`/properties/${propertyId}/hosts`, { data: hostSpec });\n}\n\n// Delete a Host\n// https://developer.adobelaunch.com/api/hosts/delete/\nexport function deleteHost(hostId) {\n return this.delete(`/hosts/${hostId}`);\n}\n\n// Get a Host\n// https://developer.adobelaunch.com/api/hosts/fetch/\nexport function getHost(hostId) {\n return this.get(`/hosts/${hostId}`);\n}\n\n// Get the Property for a Host\n// https://developer.adobelaunch.com/api/hosts/property/\nexport function getPropertyForHost(hostId) {\n return this.get(`/hosts/${hostId}/property`);\n}\n\n// List Hosts for a Property\n// https://developer.adobelaunch.com/api/hosts/list/\nexport function listHostsForProperty(propertyId, queryParams) {\n return this.get(`/properties/${propertyId}/hosts`, queryParams);\n}\n\n// Update a Host\n// https://developer.adobelaunch.com/api/hosts/update/\nexport function updateHost(hostPatch) {\n return this.patch(`/hosts/${hostPatch.id}`, { data: hostPatch });\n}\n"],"mappings":";;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACO,SAASA,UAAUA,CAACC,UAAU,EAAEC,QAAQ,EAAE;EAC/C,OAAO,IAAI,CAACC,IAAI,CAAC,eAAeF,UAAU,QAAQ,EAAE;IAAEG,IAAI,EAAEF;EAAS,CAAC,CAAC;AACzE;;AAEA;AACA;AACO,SAASG,UAAUA,CAACC,MAAM,EAAE;EACjC,OAAO,IAAI,CAACC,MAAM,CAAC,UAAUD,MAAM,EAAE,CAAC;AACxC;;AAEA;AACA;AACO,SAASE,OAAOA,CAACF,MAAM,EAAE;EAC9B,OAAO,IAAI,CAACG,GAAG,CAAC,UAAUH,MAAM,EAAE,CAAC;AACrC;;AAEA;AACA;AACO,SAASI,kBAAkBA,CAACJ,MAAM,EAAE;EACzC,OAAO,IAAI,CAACG,GAAG,CAAC,UAAUH,MAAM,WAAW,CAAC;AAC9C;;AAEA;AACA;AACO,SAASK,oBAAoBA,CAACV,UAAU,EAAEW,WAAW,EAAE;EAC5D,OAAO,IAAI,CAACH,GAAG,CAAC,eAAeR,UAAU,QAAQ,EAAEW,WAAW,CAAC;AACjE;;AAEA;AACA;AACO,SAASC,UAAUA,CAACC,SAAS,EAAE;EACpC,OAAO,IAAI,CAACC,KAAK,CAAC,UAAUD,SAAS,CAACE,EAAE,EAAE,EAAE;IAAEZ,IAAI,EAAEU;EAAU,CAAC,CAAC;AAClE","ignoreList":[]}