{"version":3,"file":"environments.cjs","names":["createEnvironment","propertyId","environment","post","data","deleteEnvironment","environmentId","delete","getEnvironment","get","getHostForEnvironment","getHostRelationshipForEnvironment","getLibraryForEnvironment","getPropertyForEnvironment","listBuildsForEnvironment","queryParams","listEnvironmentsForProperty","updateEnvironment","environmentPatch","patch","id"],"sources":["../../src/environments.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// Environments\n// https://developer.adobelaunch.com/api/environments\n\n// Create an Environment\n// https://developer.adobelaunch.com/api/environments/create/\nexport function createEnvironment(propertyId, environment) {\n  return this.post(`/properties/${propertyId}/environments`, {\n    data: environment\n  });\n}\n\n// Delete an Environment\n// https://developer.adobelaunch.com/api/environments/delete/\nexport function deleteEnvironment(environmentId) {\n  return this.delete(`/environments/${environmentId}`);\n}\n\n// Get an Environment\n// https://developer.adobelaunch.com/api/environments/fetch/\nexport function getEnvironment(environmentId) {\n  return this.get(`/environments/${environmentId}`);\n}\n\n// Get the Host\n// https://developer.adobelaunch.com/api/environments/host/\nexport function getHostForEnvironment(environmentId) {\n  return this.get(`/environments/${environmentId}/host`);\n}\n\n// Get the Host relationship\n// https://developer.adobelaunch.com/api/environments/host_relationship/\nexport function getHostRelationshipForEnvironment(environmentId) {\n  return this.get(`/environments/${environmentId}/relationships/host`);\n}\n\n// Get the Library\n// https://developer.adobelaunch.com/api/environments/fetch_library/\nexport function getLibraryForEnvironment(environmentId) {\n  return this.get(`/environments/${environmentId}/library`);\n}\n\n// Get the Property\n// https://developer.adobelaunch.com/api/environments/property/\nexport function getPropertyForEnvironment(environmentId) {\n  return this.get(`/environments/${environmentId}/property`);\n}\n\n// List Builds\n// https://developer.adobelaunch.com/api/environments/builds/\nexport function listBuildsForEnvironment(environmentId, queryParams) {\n  return this.get(`/environments/${environmentId}/builds`, queryParams);\n}\n\n// List Environments for a Property\n// https://developer.adobelaunch.com/api/environments/list/\nexport function listEnvironmentsForProperty(propertyId, queryParams) {\n  return this.get(`/properties/${propertyId}/environments`, queryParams);\n}\n\n// Update an Environment\n// https://developer.adobelaunch.com/api/environments/update/\nexport function updateEnvironment(environmentPatch) {\n  return this.patch(`/environments/${environmentPatch.id}`, {\n    data: environmentPatch\n  });\n}\n"],"mappings":";;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACO,SAASA,iBAAiBA,CAACC,UAAU,EAAEC,WAAW,EAAE;EACzD,OAAO,IAAI,CAACC,IAAI,CAAC,eAAeF,UAAU,eAAe,EAAE;IACzDG,IAAI,EAAEF;EACR,CAAC,CAAC;AACJ;;AAEA;AACA;AACO,SAASG,iBAAiBA,CAACC,aAAa,EAAE;EAC/C,OAAO,IAAI,CAACC,MAAM,CAAC,iBAAiBD,aAAa,EAAE,CAAC;AACtD;;AAEA;AACA;AACO,SAASE,cAAcA,CAACF,aAAa,EAAE;EAC5C,OAAO,IAAI,CAACG,GAAG,CAAC,iBAAiBH,aAAa,EAAE,CAAC;AACnD;;AAEA;AACA;AACO,SAASI,qBAAqBA,CAACJ,aAAa,EAAE;EACnD,OAAO,IAAI,CAACG,GAAG,CAAC,iBAAiBH,aAAa,OAAO,CAAC;AACxD;;AAEA;AACA;AACO,SAASK,iCAAiCA,CAACL,aAAa,EAAE;EAC/D,OAAO,IAAI,CAACG,GAAG,CAAC,iBAAiBH,aAAa,qBAAqB,CAAC;AACtE;;AAEA;AACA;AACO,SAASM,wBAAwBA,CAACN,aAAa,EAAE;EACtD,OAAO,IAAI,CAACG,GAAG,CAAC,iBAAiB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