@datocms/cma-client
Version:
JS client for DatoCMS REST Content Management API
169 lines (168 loc) • 6 kB
TypeScript
import BaseResource from '../../BaseResource';
import type * as SchemaTypes from '../SchemaTypes';
import type * as SimpleSchemaTypes from '../SimpleSchemaTypes';
export default class BuildTrigger extends BaseResource {
static readonly TYPE: "build_trigger";
/**
* List all build triggers for a site
*
* Read more: https://www.datocms.com/docs/content-management-api/resources/build-trigger/instances
*
* @throws {ApiError}
* @throws {TimeoutError}
*/
list(): Promise<SimpleSchemaTypes.BuildTriggerInstancesTargetSchema>;
/**
* List all build triggers for a site
*
* Read more: https://www.datocms.com/docs/content-management-api/resources/build-trigger/instances
*
* @throws {ApiError}
* @throws {TimeoutError}
*/
rawList(): Promise<SchemaTypes.BuildTriggerInstancesTargetSchema>;
/**
* Retrieve a build trigger
*
* Read more: https://www.datocms.com/docs/content-management-api/resources/build-trigger/self
*
* @throws {ApiError}
* @throws {TimeoutError}
*/
find(buildTriggerId: string | SimpleSchemaTypes.BuildTriggerData): Promise<SimpleSchemaTypes.BuildTrigger>;
/**
* Retrieve a build trigger
*
* Read more: https://www.datocms.com/docs/content-management-api/resources/build-trigger/self
*
* @throws {ApiError}
* @throws {TimeoutError}
*/
rawFind(buildTriggerId: string): Promise<SchemaTypes.BuildTriggerSelfTargetSchema>;
/**
* Create build trigger
*
* Read more: https://www.datocms.com/docs/content-management-api/resources/build-trigger/create
*
* @throws {ApiError}
* @throws {TimeoutError}
*/
create(body: SimpleSchemaTypes.BuildTriggerCreateSchema): Promise<SimpleSchemaTypes.BuildTrigger>;
/**
* Create build trigger
*
* Read more: https://www.datocms.com/docs/content-management-api/resources/build-trigger/create
*
* @throws {ApiError}
* @throws {TimeoutError}
*/
rawCreate(body: SchemaTypes.BuildTriggerCreateSchema): Promise<SchemaTypes.BuildTriggerCreateTargetSchema>;
/**
* Update build trigger
*
* Read more: https://www.datocms.com/docs/content-management-api/resources/build-trigger/update
*
* @throws {ApiError}
* @throws {TimeoutError}
*/
update(buildTriggerId: string | SimpleSchemaTypes.BuildTriggerData, body: SimpleSchemaTypes.BuildTriggerUpdateSchema): Promise<SimpleSchemaTypes.BuildTrigger>;
/**
* Update build trigger
*
* Read more: https://www.datocms.com/docs/content-management-api/resources/build-trigger/update
*
* @throws {ApiError}
* @throws {TimeoutError}
*/
rawUpdate(buildTriggerId: string, body: SchemaTypes.BuildTriggerUpdateSchema): Promise<SchemaTypes.BuildTriggerUpdateTargetSchema>;
/**
* Trigger a deploy
*
* Read more: https://www.datocms.com/docs/content-management-api/resources/build-trigger/trigger
*
* @throws {ApiError}
* @throws {TimeoutError}
*/
trigger(buildTriggerId: string | SimpleSchemaTypes.BuildTriggerData): Promise<void>;
/**
* Trigger a deploy
*
* Read more: https://www.datocms.com/docs/content-management-api/resources/build-trigger/trigger
*
* @throws {ApiError}
* @throws {TimeoutError}
*/
rawTrigger(buildTriggerId: string): Promise<void>;
/**
* Abort a deploy and mark it as failed
*
* Read more: https://www.datocms.com/docs/content-management-api/resources/build-trigger/abort
*
* @throws {ApiError}
* @throws {TimeoutError}
*/
abort(buildTriggerId: string | SimpleSchemaTypes.BuildTriggerData): Promise<void>;
/**
* Abort a deploy and mark it as failed
*
* Read more: https://www.datocms.com/docs/content-management-api/resources/build-trigger/abort
*
* @throws {ApiError}
* @throws {TimeoutError}
*/
rawAbort(buildTriggerId: string): Promise<void>;
/**
* Abort a site search spidering and mark it as failed
*
* Read more: https://www.datocms.com/docs/content-management-api/resources/build-trigger/abort_indexing
*
* @throws {ApiError}
* @throws {TimeoutError}
*/
abortIndexing(buildTriggerId: string | SimpleSchemaTypes.BuildTriggerData): Promise<void>;
/**
* Abort a site search spidering and mark it as failed
*
* Read more: https://www.datocms.com/docs/content-management-api/resources/build-trigger/abort_indexing
*
* @throws {ApiError}
* @throws {TimeoutError}
*/
rawAbortIndexing(buildTriggerId: string): Promise<void>;
/**
* Trigger a new site search spidering of the website
*
* Read more: https://www.datocms.com/docs/content-management-api/resources/build-trigger/reindex
*
* @throws {ApiError}
* @throws {TimeoutError}
*/
reindex(buildTriggerId: string | SimpleSchemaTypes.BuildTriggerData): Promise<void>;
/**
* Trigger a new site search spidering of the website
*
* Read more: https://www.datocms.com/docs/content-management-api/resources/build-trigger/reindex
*
* @throws {ApiError}
* @throws {TimeoutError}
*/
rawReindex(buildTriggerId: string): Promise<void>;
/**
* Delete a build trigger
*
* Read more: https://www.datocms.com/docs/content-management-api/resources/build-trigger/destroy
*
* @throws {ApiError}
* @throws {TimeoutError}
*/
destroy(buildTriggerId: string | SimpleSchemaTypes.BuildTriggerData): Promise<SimpleSchemaTypes.BuildTrigger>;
/**
* Delete a build trigger
*
* Read more: https://www.datocms.com/docs/content-management-api/resources/build-trigger/destroy
*
* @throws {ApiError}
* @throws {TimeoutError}
*/
rawDestroy(buildTriggerId: string): Promise<SchemaTypes.BuildTriggerDestroyTargetSchema>;
}