UNPKG

@datocms/cma-client

Version:
285 lines (284 loc) 11.4 kB
import BaseResource from '../../BaseResource'; import type * as ApiTypes from '../ApiTypes'; import type * as RawApiTypes from '../RawApiTypes'; export default class Site extends BaseResource { static readonly TYPE: "site"; /** * Retrieve the site * * Read more: https://www.datocms.com/docs/content-management-api/resources/site/self * * @throws {ApiError} * @throws {TimeoutError} */ find(queryParams?: ApiTypes.SiteSelfHrefSchema): Promise<ApiTypes.Site>; /** * Retrieve the site * * Read more: https://www.datocms.com/docs/content-management-api/resources/site/self * * @throws {ApiError} * @throws {TimeoutError} */ rawFind(queryParams?: RawApiTypes.SiteSelfHrefSchema): Promise<RawApiTypes.SiteSelfTargetSchema>; /** * Update the site's settings * * Read more: https://www.datocms.com/docs/content-management-api/resources/site/update * * @throws {ApiError} * @throws {TimeoutError} */ update(body: ApiTypes.SiteUpdateSchema): Promise<ApiTypes.Site>; /** * Update the site's settings * * Read more: https://www.datocms.com/docs/content-management-api/resources/site/update * * @throws {ApiError} * @throws {TimeoutError} */ rawUpdate(body: RawApiTypes.SiteUpdateSchema): Promise<RawApiTypes.SiteUpdateJobSchema>; /** * Activate improved timezone management * * Read more: https://www.datocms.com/docs/content-management-api/resources/site/activate_improved_timezone_management * * @throws {ApiError} * @throws {TimeoutError} * * @deprecated This API call is to be considered private and might change without notice */ activateImprovedTimezoneManagement(): Promise<ApiTypes.Site>; /** * Activate improved timezone management * * Read more: https://www.datocms.com/docs/content-management-api/resources/site/activate_improved_timezone_management * * @throws {ApiError} * @throws {TimeoutError} * * @deprecated This API call is to be considered private and might change without notice */ rawActivateImprovedTimezoneManagement(): Promise<RawApiTypes.SiteActivateImprovedTimezoneManagementJobSchema>; /** * Activate improved hex management * * Read more: https://www.datocms.com/docs/content-management-api/resources/site/activate_improved_hex_management * * @throws {ApiError} * @throws {TimeoutError} * * @deprecated This API call is to be considered private and might change without notice */ activateImprovedHexManagement(): Promise<ApiTypes.Site>; /** * Activate improved hex management * * Read more: https://www.datocms.com/docs/content-management-api/resources/site/activate_improved_hex_management * * @throws {ApiError} * @throws {TimeoutError} * * @deprecated This API call is to be considered private and might change without notice */ rawActivateImprovedHexManagement(): Promise<RawApiTypes.SiteActivateImprovedHexManagementTargetSchema>; /** * Activate improved GraphQL multi-locale fields option * * Read more: https://www.datocms.com/docs/content-management-api/resources/site/activate_improved_gql_multilocale_fields * * @throws {ApiError} * @throws {TimeoutError} * * @deprecated This API call is to be considered private and might change without notice */ activateImprovedGqlMultilocaleFields(): Promise<ApiTypes.Site>; /** * Activate improved GraphQL multi-locale fields option * * Read more: https://www.datocms.com/docs/content-management-api/resources/site/activate_improved_gql_multilocale_fields * * @throws {ApiError} * @throws {TimeoutError} * * @deprecated This API call is to be considered private and might change without notice */ rawActivateImprovedGqlMultilocaleFields(): Promise<RawApiTypes.SiteActivateImprovedGqlMultilocaleFieldsTargetSchema>; /** * Activate improved GraphQL visibility control option * * Read more: https://www.datocms.com/docs/content-management-api/resources/site/activate_improved_gql_visibility_control * * @throws {ApiError} * @throws {TimeoutError} * * @deprecated This API call is to be considered private and might change without notice */ activateImprovedGqlVisibilityControl(): Promise<ApiTypes.Site>; /** * Activate improved GraphQL visibility control option * * Read more: https://www.datocms.com/docs/content-management-api/resources/site/activate_improved_gql_visibility_control * * @throws {ApiError} * @throws {TimeoutError} * * @deprecated This API call is to be considered private and might change without notice */ rawActivateImprovedGqlVisibilityControl(): Promise<RawApiTypes.SiteActivateImprovedGqlVisibilityControlTargetSchema>; /** * Activate improved Boolean fields option * * Read more: https://www.datocms.com/docs/content-management-api/resources/site/activate_improved_boolean_fields * * @throws {ApiError} * @throws {TimeoutError} * * @deprecated This API call is to be considered private and might change without notice */ activateImprovedBooleanFields(): Promise<ApiTypes.Site>; /** * Activate improved Boolean fields option * * Read more: https://www.datocms.com/docs/content-management-api/resources/site/activate_improved_boolean_fields * * @throws {ApiError} * @throws {TimeoutError} * * @deprecated This API call is to be considered private and might change without notice */ rawActivateImprovedBooleanFields(): Promise<RawApiTypes.SiteActivateImprovedBooleanFieldsTargetSchema>; /** * Set draft mode default to true for all environment's models * * Read more: https://www.datocms.com/docs/content-management-api/resources/site/activate_draft_mode_as_default * * @throws {ApiError} * @throws {TimeoutError} * * @deprecated This API call is to be considered private and might change without notice */ activateDraftModeAsDefault(): Promise<ApiTypes.Site>; /** * Set draft mode default to true for all environment's models * * Read more: https://www.datocms.com/docs/content-management-api/resources/site/activate_draft_mode_as_default * * @throws {ApiError} * @throws {TimeoutError} * * @deprecated This API call is to be considered private and might change without notice */ rawActivateDraftModeAsDefault(): Promise<RawApiTypes.SiteActivateDraftModeAsDefaultTargetSchema>; /** * Activate improved validation at publishing option * * Read more: https://www.datocms.com/docs/content-management-api/resources/site/activate_improved_validation_at_publishing * * @throws {ApiError} * @throws {TimeoutError} * * @deprecated This API call is to be considered private and might change without notice */ activateImprovedValidationAtPublishing(): Promise<ApiTypes.Site>; /** * Activate improved validation at publishing option * * Read more: https://www.datocms.com/docs/content-management-api/resources/site/activate_improved_validation_at_publishing * * @throws {ApiError} * @throws {TimeoutError} * * @deprecated This API call is to be considered private and might change without notice */ rawActivateImprovedValidationAtPublishing(): Promise<RawApiTypes.SiteActivateImprovedValidationAtPublishingTargetSchema>; /** * Activate having two different GraphQL fields for regular blocks and inline blocks * * Read more: https://www.datocms.com/docs/content-management-api/resources/site/activate_improved_exposure_of_inline_blocks_in_cda * * @throws {ApiError} * @throws {TimeoutError} * * @deprecated This API call is to be considered private and might change without notice */ activateImprovedExposureOfInlineBlocksInCda(): Promise<ApiTypes.Site>; /** * Activate having two different GraphQL fields for regular blocks and inline blocks * * Read more: https://www.datocms.com/docs/content-management-api/resources/site/activate_improved_exposure_of_inline_blocks_in_cda * * @throws {ApiError} * @throws {TimeoutError} * * @deprecated This API call is to be considered private and might change without notice */ rawActivateImprovedExposureOfInlineBlocksInCda(): Promise<RawApiTypes.SiteActivateImprovedExposureOfInlineBlocksInCdaTargetSchema>; /** * Activate improved items listing * * Read more: https://www.datocms.com/docs/content-management-api/resources/site/activate_improved_items_listing * * @throws {ApiError} * @throws {TimeoutError} * * @deprecated This API call is to be considered private and might change without notice */ activateImprovedItemsListing(): Promise<ApiTypes.Site>; /** * Activate improved items listing * * Read more: https://www.datocms.com/docs/content-management-api/resources/site/activate_improved_items_listing * * @throws {ApiError} * @throws {TimeoutError} * * @deprecated This API call is to be considered private and might change without notice */ rawActivateImprovedItemsListing(): Promise<RawApiTypes.SiteActivateImprovedItemsListingTargetSchema>; /** * Activate milliseconds in datetime * * Read more: https://www.datocms.com/docs/content-management-api/resources/site/activate_milliseconds_in_datetime * * @throws {ApiError} * @throws {TimeoutError} * * @deprecated This API call is to be considered private and might change without notice */ activateMillisecondsInDatetime(): Promise<ApiTypes.Site>; /** * Activate milliseconds in datetime * * Read more: https://www.datocms.com/docs/content-management-api/resources/site/activate_milliseconds_in_datetime * * @throws {ApiError} * @throws {TimeoutError} * * @deprecated This API call is to be considered private and might change without notice */ rawActivateMillisecondsInDatetime(): Promise<RawApiTypes.SiteActivateMillisecondsInDatetimeTargetSchema>; /** * Update CDN settings default assets * * Read more: https://www.datocms.com/docs/content-management-api/resources/site/update_assets_cdn_default_settings * * @throws {ApiError} * @throws {TimeoutError} * * @deprecated This API call is to be considered private and might change without notice */ updateAssetsCdnDefaultSettings(body: ApiTypes.SiteUpdateAssetsCdnDefaultSettingsSchema): Promise<ApiTypes.Site>; /** * Update CDN settings default assets * * Read more: https://www.datocms.com/docs/content-management-api/resources/site/update_assets_cdn_default_settings * * @throws {ApiError} * @throws {TimeoutError} * * @deprecated This API call is to be considered private and might change without notice */ rawUpdateAssetsCdnDefaultSettings(body: RawApiTypes.SiteUpdateAssetsCdnDefaultSettingsSchema): Promise<RawApiTypes.SiteUpdateAssetsCdnDefaultSettingsTargetSchema>; }