UNPKG

contentful-management

Version:
15 lines 834 B
import * as raw from './raw'; const getBaseUrl = params => `/spaces/${params.spaceId}/environments/${params.environmentId}/automation_executions`; const getAutomationExecutionUrl = params => `${getBaseUrl(params)}/${params.automationExecutionId}`; const getExecutionsByDefinitionUrl = params => `/spaces/${params.spaceId}/environments/${params.environmentId}/automation_definitions/${params.automationDefinitionId}/automation_executions`; export const get = (http, params, headers) => raw.get(http, getAutomationExecutionUrl(params), { headers }); export const getMany = (http, params, headers) => raw.get(http, getBaseUrl(params), { headers, params: params.query }); export const getForAutomationDefinition = (http, params, headers) => raw.get(http, getExecutionsByDefinitionUrl(params), { headers, params: params.query });