UNPKG

@adobe/reactor-sdk

Version:
94 lines (81 loc) 3.47 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.createEnvironment = createEnvironment; exports.deleteEnvironment = deleteEnvironment; exports.getEnvironment = getEnvironment; exports.getHostForEnvironment = getHostForEnvironment; exports.getHostRelationshipForEnvironment = getHostRelationshipForEnvironment; exports.getLibraryForEnvironment = getLibraryForEnvironment; exports.getPropertyForEnvironment = getPropertyForEnvironment; exports.listBuildsForEnvironment = listBuildsForEnvironment; exports.listEnvironmentsForProperty = listEnvironmentsForProperty; exports.updateEnvironment = updateEnvironment; /* 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. */ // Environments // https://developer.adobelaunch.com/api/environments // Create an Environment // https://developer.adobelaunch.com/api/environments/create/ function createEnvironment(propertyId, environment) { return this.post(`/properties/${propertyId}/environments`, { data: environment }); } // Delete an Environment // https://developer.adobelaunch.com/api/environments/delete/ function deleteEnvironment(environmentId) { return this.delete(`/environments/${environmentId}`); } // Get an Environment // https://developer.adobelaunch.com/api/environments/fetch/ function getEnvironment(environmentId) { return this.get(`/environments/${environmentId}`); } // Get the Host // https://developer.adobelaunch.com/api/environments/host/ function getHostForEnvironment(environmentId) { return this.get(`/environments/${environmentId}/host`); } // Get the Host relationship // https://developer.adobelaunch.com/api/environments/host_relationship/ function getHostRelationshipForEnvironment(environmentId) { return this.get(`/environments/${environmentId}/relationships/host`); } // Get the Library // https://developer.adobelaunch.com/api/environments/fetch_library/ function getLibraryForEnvironment(environmentId) { return this.get(`/environments/${environmentId}/library`); } // Get the Property // https://developer.adobelaunch.com/api/environments/property/ function getPropertyForEnvironment(environmentId) { return this.get(`/environments/${environmentId}/property`); } // List Builds // https://developer.adobelaunch.com/api/environments/builds/ function listBuildsForEnvironment(environmentId, queryParams) { return this.get(`/environments/${environmentId}/builds`, queryParams); } // List Environments for a Property // https://developer.adobelaunch.com/api/environments/list/ function listEnvironmentsForProperty(propertyId, queryParams) { return this.get(`/properties/${propertyId}/environments`, queryParams); } // Update an Environment // https://developer.adobelaunch.com/api/environments/update/ function updateEnvironment(environmentPatch) { return this.patch(`/environments/${environmentPatch.id}`, { data: environmentPatch }); } //# sourceMappingURL=environments.cjs.map