import type { AxiosInstance } from 'contentful-sdk-core' ; import { GetReleaseParams , GetSpaceEnvironmentParams } from '../../../common-types' ; import { ReleasePayload , ReleaseQueryOptions , ReleaseValidatePayload , } from '../../../entities/release' ; import { RestEndpoint } from '../types' ; import * as raw from './raw' ; export const get = ( http , params ) => { return raw . get ( http , `/spaces/${ params . spaceId }/environments/${ params . environmentId }/releases/${ params . releaseId }` ) ; } ; export const query = ( http , params ) => { return raw . get ( http , `/spaces/${ params . spaceId }/environments/${ params . environmentId }/releases` , { params : params . query , } ) ; } ; export const create = ( http , params , payload ) => { return raw . post ( http , `/spaces/${ params . spaceId }/environments/${ params . environmentId }/releases` , payload ) ; } ; export const update = ( http , params , payload , headers ? ) => { return raw . put ( http , `/spaces/${ params . spaceId }/environments/${ params . environmentId }/releases/${ params . releaseId }` , payload , { headers : { 'X-Contentful-Version' : params . version , ... headers , } , } ) ; } ; export const del = ( http , params ) => { return raw . del ( http , `/spaces/${ params . spaceId }/environments/${ params . environmentId }/releases/${ params . releaseId }` ) ; } ; export const publish = ( http , params , headers ? ) => { return raw . put ( http , `/spaces/${ params . spaceId }/environments/${ params . environmentId }/releases/${ params . releaseId }/published` , null , { headers : { 'X-Contentful-Version' : params . version , ... headers , } , } ) ; } ; export const unpublish = ( http , params , headers ? ) => { return raw . del ( http , `/spaces/${ params . spaceId }/environments/${ params . environmentId }/releases/${ params . releaseId }/published` , { headers : { 'X-Contentful-Version' : params . version , ... headers , } , } ) ; } ; export const validate = ( http , params , payload ? ) => { return raw . post ( http , `/spaces/${ params . spaceId }/environments/${ params . environmentId }/releases/${ params . releaseId }/validate` , payload ) ; } ;