contentful-management
Version:
Client for Contentful's Content Management API
22 lines (19 loc) • 1.03 kB
JavaScript
import { get } from './raw.mjs';
const apiPath = (organizationId, ...pathSegments) => `/organizations/${organizationId}/environment_templates/` + pathSegments.join('/');
const getMany = (http, { organizationId, environmentTemplateId, spaceId, environmentId, ...otherProps }, headers) => get(http, apiPath(organizationId, environmentTemplateId, 'template_installations'), {
params: {
...otherProps,
...(environmentId && { 'environment.sys.id': environmentId }),
...(spaceId && { 'space.sys.id': spaceId }),
},
headers,
});
const getForEnvironment = (http, { spaceId, environmentId, environmentTemplateId, installationId, ...paginationProps }, headers) => get(http, `/spaces/${spaceId}/environments/${environmentId}/template_installations/${environmentTemplateId}`, {
params: {
...(installationId && { 'sys.id': installationId }),
...paginationProps,
},
headers,
});
export { getForEnvironment, getMany };
//# sourceMappingURL=environment-template-installation.mjs.map