@datocms/cma-client
Advanced tools
Comparing version 3.4.0 to 3.4.1
@@ -134,3 +134,3 @@ "use strict"; | ||
var _this = this; | ||
return (0, rest_client_utils_1.request)(__assign(__assign(__assign({}, this.config), options), { logFn: this.config.logFn || console.log, userAgent: '@datocms/cma-client v3.4.0', baseUrl: this.baseUrl, preCallStack: new Error().stack, extraHeaders: __assign(__assign(__assign({}, (this.config.extraHeaders || {})), (this.config.environment | ||
return (0, rest_client_utils_1.request)(__assign(__assign(__assign({}, this.config), options), { logFn: this.config.logFn || console.log, userAgent: '@datocms/cma-client v3.4.1', baseUrl: this.baseUrl, preCallStack: new Error().stack, extraHeaders: __assign(__assign(__assign({}, (this.config.extraHeaders || {})), (this.config.environment | ||
? { 'X-Environment': this.config.environment } | ||
@@ -137,0 +137,0 @@ : {})), { 'X-API-Version': '3' }), fetchJobResult: function (jobId) { |
@@ -251,2 +251,29 @@ "use strict"; | ||
}; | ||
/** | ||
* Duplicate a role | ||
* | ||
* Read more: https://www.datocms.com/docs/content-management-api/resources/role/duplicate | ||
* | ||
* @throws {ApiError} | ||
* @throws {TimeoutError} | ||
*/ | ||
Role.prototype.duplicate = function (roleId) { | ||
return this.rawDuplicate(Utils.toId(roleId)).then(function (body) { | ||
return Utils.deserializeResponseBody(body); | ||
}); | ||
}; | ||
/** | ||
* Duplicate a role | ||
* | ||
* Read more: https://www.datocms.com/docs/content-management-api/resources/role/duplicate | ||
* | ||
* @throws {ApiError} | ||
* @throws {TimeoutError} | ||
*/ | ||
Role.prototype.rawDuplicate = function (roleId) { | ||
return this.client.request({ | ||
method: 'POST', | ||
url: "/roles/".concat(roleId, "/duplicate"), | ||
}); | ||
}; | ||
Role.TYPE = 'role'; | ||
@@ -253,0 +280,0 @@ return Role; |
@@ -278,2 +278,64 @@ "use strict"; | ||
/** | ||
* 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 | ||
*/ | ||
Site.prototype.activateDraftModeAsDefault = function () { | ||
return this.rawActivateDraftModeAsDefault().then(function (body) { | ||
return Utils.deserializeResponseBody(body); | ||
}); | ||
}; | ||
/** | ||
* 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 | ||
*/ | ||
Site.prototype.rawActivateDraftModeAsDefault = function () { | ||
return this.client.request({ | ||
method: 'PUT', | ||
url: '/site/activate-draft-mode-as-default', | ||
}); | ||
}; | ||
/** | ||
* 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 | ||
*/ | ||
Site.prototype.activateImprovedValidationAtPublishing = function () { | ||
return this.rawActivateImprovedValidationAtPublishing().then(function (body) { | ||
return Utils.deserializeResponseBody(body); | ||
}); | ||
}; | ||
/** | ||
* 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 | ||
*/ | ||
Site.prototype.rawActivateImprovedValidationAtPublishing = function () { | ||
return this.client.request({ | ||
method: 'PUT', | ||
url: '/site/activate-improved-validation-at-publishing', | ||
}); | ||
}; | ||
/** | ||
* Update CDN settings default assets | ||
@@ -280,0 +342,0 @@ * |
@@ -108,3 +108,3 @@ var __assign = (this && this.__assign) || function () { | ||
var _this = this; | ||
return request(__assign(__assign(__assign({}, this.config), options), { logFn: this.config.logFn || console.log, userAgent: '@datocms/cma-client v3.4.0', baseUrl: this.baseUrl, preCallStack: new Error().stack, extraHeaders: __assign(__assign(__assign({}, (this.config.extraHeaders || {})), (this.config.environment | ||
return request(__assign(__assign(__assign({}, this.config), options), { logFn: this.config.logFn || console.log, userAgent: '@datocms/cma-client v3.4.1', baseUrl: this.baseUrl, preCallStack: new Error().stack, extraHeaders: __assign(__assign(__assign({}, (this.config.extraHeaders || {})), (this.config.environment | ||
? { 'X-Environment': this.config.environment } | ||
@@ -111,0 +111,0 @@ : {})), { 'X-API-Version': '3' }), fetchJobResult: function (jobId) { |
@@ -96,2 +96,20 @@ import BaseResource from '../../BaseResource'; | ||
rawDestroy(roleId: string): Promise<SchemaTypes.RoleDestroyTargetSchema>; | ||
/** | ||
* Duplicate a role | ||
* | ||
* Read more: https://www.datocms.com/docs/content-management-api/resources/role/duplicate | ||
* | ||
* @throws {ApiError} | ||
* @throws {TimeoutError} | ||
*/ | ||
duplicate(roleId: string | SimpleSchemaTypes.RoleData): Promise<SimpleSchemaTypes.Role>; | ||
/** | ||
* Duplicate a role | ||
* | ||
* Read more: https://www.datocms.com/docs/content-management-api/resources/role/duplicate | ||
* | ||
* @throws {ApiError} | ||
* @throws {TimeoutError} | ||
*/ | ||
rawDuplicate(roleId: string): Promise<SchemaTypes.RoleDuplicateTargetSchema>; | ||
} |
@@ -223,2 +223,29 @@ var __extends = (this && this.__extends) || (function () { | ||
}; | ||
/** | ||
* Duplicate a role | ||
* | ||
* Read more: https://www.datocms.com/docs/content-management-api/resources/role/duplicate | ||
* | ||
* @throws {ApiError} | ||
* @throws {TimeoutError} | ||
*/ | ||
Role.prototype.duplicate = function (roleId) { | ||
return this.rawDuplicate(Utils.toId(roleId)).then(function (body) { | ||
return Utils.deserializeResponseBody(body); | ||
}); | ||
}; | ||
/** | ||
* Duplicate a role | ||
* | ||
* Read more: https://www.datocms.com/docs/content-management-api/resources/role/duplicate | ||
* | ||
* @throws {ApiError} | ||
* @throws {TimeoutError} | ||
*/ | ||
Role.prototype.rawDuplicate = function (roleId) { | ||
return this.client.request({ | ||
method: 'POST', | ||
url: "/roles/".concat(roleId, "/duplicate"), | ||
}); | ||
}; | ||
Role.TYPE = 'role'; | ||
@@ -225,0 +252,0 @@ return Role; |
@@ -153,2 +153,46 @@ import BaseResource from '../../BaseResource'; | ||
/** | ||
* 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<SimpleSchemaTypes.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<SchemaTypes.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<SimpleSchemaTypes.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<SchemaTypes.SiteActivateImprovedValidationAtPublishingTargetSchema>; | ||
/** | ||
* Update CDN settings default assets | ||
@@ -155,0 +199,0 @@ * |
@@ -250,2 +250,64 @@ var __extends = (this && this.__extends) || (function () { | ||
/** | ||
* 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 | ||
*/ | ||
Site.prototype.activateDraftModeAsDefault = function () { | ||
return this.rawActivateDraftModeAsDefault().then(function (body) { | ||
return Utils.deserializeResponseBody(body); | ||
}); | ||
}; | ||
/** | ||
* 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 | ||
*/ | ||
Site.prototype.rawActivateDraftModeAsDefault = function () { | ||
return this.client.request({ | ||
method: 'PUT', | ||
url: '/site/activate-draft-mode-as-default', | ||
}); | ||
}; | ||
/** | ||
* 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 | ||
*/ | ||
Site.prototype.activateImprovedValidationAtPublishing = function () { | ||
return this.rawActivateImprovedValidationAtPublishing().then(function (body) { | ||
return Utils.deserializeResponseBody(body); | ||
}); | ||
}; | ||
/** | ||
* 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 | ||
*/ | ||
Site.prototype.rawActivateImprovedValidationAtPublishing = function () { | ||
return this.client.request({ | ||
method: 'PUT', | ||
url: '/site/activate-improved-validation-at-publishing', | ||
}); | ||
}; | ||
/** | ||
* Update CDN settings default assets | ||
@@ -252,0 +314,0 @@ * |
@@ -96,2 +96,20 @@ import BaseResource from '../../BaseResource'; | ||
rawDestroy(roleId: string): Promise<SchemaTypes.RoleDestroyTargetSchema>; | ||
/** | ||
* Duplicate a role | ||
* | ||
* Read more: https://www.datocms.com/docs/content-management-api/resources/role/duplicate | ||
* | ||
* @throws {ApiError} | ||
* @throws {TimeoutError} | ||
*/ | ||
duplicate(roleId: string | SimpleSchemaTypes.RoleData): Promise<SimpleSchemaTypes.Role>; | ||
/** | ||
* Duplicate a role | ||
* | ||
* Read more: https://www.datocms.com/docs/content-management-api/resources/role/duplicate | ||
* | ||
* @throws {ApiError} | ||
* @throws {TimeoutError} | ||
*/ | ||
rawDuplicate(roleId: string): Promise<SchemaTypes.RoleDuplicateTargetSchema>; | ||
} |
@@ -153,2 +153,46 @@ import BaseResource from '../../BaseResource'; | ||
/** | ||
* 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<SimpleSchemaTypes.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<SchemaTypes.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<SimpleSchemaTypes.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<SchemaTypes.SiteActivateImprovedValidationAtPublishingTargetSchema>; | ||
/** | ||
* Update CDN settings default assets | ||
@@ -155,0 +199,0 @@ * |
{ | ||
"name": "@datocms/cma-client", | ||
"version": "3.4.0", | ||
"version": "3.4.1", | ||
"description": "JS client for DatoCMS REST Content Management API", | ||
@@ -47,3 +47,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "46976a74ff3d8d1272d3e5ed6b3cbc7b333609d6" | ||
"gitHead": "983cc9f3bc0078c621a32bab979c6a5813933bc6" | ||
} |
@@ -150,3 +150,3 @@ import { | ||
logFn: this.config.logFn || console.log, | ||
userAgent: '@datocms/cma-client v3.4.0', | ||
userAgent: '@datocms/cma-client v3.4.1', | ||
baseUrl: this.baseUrl, | ||
@@ -153,0 +153,0 @@ preCallStack: new Error().stack, |
@@ -241,2 +241,33 @@ import * as Utils from '@datocms/rest-client-utils'; | ||
} | ||
/** | ||
* Duplicate a role | ||
* | ||
* Read more: https://www.datocms.com/docs/content-management-api/resources/role/duplicate | ||
* | ||
* @throws {ApiError} | ||
* @throws {TimeoutError} | ||
*/ | ||
duplicate(roleId: string | SimpleSchemaTypes.RoleData) { | ||
return this.rawDuplicate(Utils.toId(roleId)).then((body) => | ||
Utils.deserializeResponseBody<SimpleSchemaTypes.RoleDuplicateTargetSchema>( | ||
body, | ||
), | ||
); | ||
} | ||
/** | ||
* Duplicate a role | ||
* | ||
* Read more: https://www.datocms.com/docs/content-management-api/resources/role/duplicate | ||
* | ||
* @throws {ApiError} | ||
* @throws {TimeoutError} | ||
*/ | ||
rawDuplicate(roleId: string): Promise<SchemaTypes.RoleDuplicateTargetSchema> { | ||
return this.client.request<SchemaTypes.RoleDuplicateTargetSchema>({ | ||
method: 'POST', | ||
url: `/roles/${roleId}/duplicate`, | ||
}); | ||
} | ||
} |
@@ -280,2 +280,76 @@ import * as Utils from '@datocms/rest-client-utils'; | ||
/** | ||
* 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() { | ||
return this.rawActivateDraftModeAsDefault().then((body) => | ||
Utils.deserializeResponseBody<SimpleSchemaTypes.SiteActivateDraftModeAsDefaultTargetSchema>( | ||
body, | ||
), | ||
); | ||
} | ||
/** | ||
* 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<SchemaTypes.SiteActivateDraftModeAsDefaultTargetSchema> { | ||
return this.client.request<SchemaTypes.SiteActivateDraftModeAsDefaultTargetSchema>( | ||
{ | ||
method: 'PUT', | ||
url: '/site/activate-draft-mode-as-default', | ||
}, | ||
); | ||
} | ||
/** | ||
* 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() { | ||
return this.rawActivateImprovedValidationAtPublishing().then((body) => | ||
Utils.deserializeResponseBody<SimpleSchemaTypes.SiteActivateImprovedValidationAtPublishingTargetSchema>( | ||
body, | ||
), | ||
); | ||
} | ||
/** | ||
* 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<SchemaTypes.SiteActivateImprovedValidationAtPublishingTargetSchema> { | ||
return this.client.request<SchemaTypes.SiteActivateImprovedValidationAtPublishingTargetSchema>( | ||
{ | ||
method: 'PUT', | ||
url: '/site/activate-improved-validation-at-publishing', | ||
}, | ||
); | ||
} | ||
/** | ||
* Update CDN settings default assets | ||
@@ -282,0 +356,0 @@ * |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
3650972
107890