New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@datocms/cma-client

Package Overview
Dependencies
Maintainers
6
Versions
114
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@datocms/cma-client - npm Package Compare versions

Comparing version 1.3.5 to 1.3.6-alpha.0

2

dist/cjs/generated/Client.js

@@ -130,3 +130,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 v1.3.5', 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 v1.3.6-alpha.0', baseUrl: this.baseUrl, preCallStack: new Error().stack, extraHeaders: __assign(__assign(__assign({}, (this.config.extraHeaders || {})), (this.config.environment
? { 'X-Environment': this.config.environment }

@@ -133,0 +133,0 @@ : {})), { 'X-API-Version': '3' }), fetchJobResult: function (jobId) {

@@ -421,2 +421,33 @@ "use strict";

/**
* Retrieve information regarding changes between current and published versions of the record
*
* Read more: https://www.datocms.com/docs/content-management-api/resources/item/current_vs_published_state
*
* @throws {ApiError}
* @throws {TimeoutError}
*
* @deprecated This API call is to be considered private and might change without notice
*/
Item.prototype.currentVsPublishedState = function (itemId) {
return this.rawCurrentVsPublishedState(Utils.toId(itemId)).then(function (body) {
return Utils.deserializeResponseBody(body);
});
};
/**
* Retrieve information regarding changes between current and published versions of the record
*
* Read more: https://www.datocms.com/docs/content-management-api/resources/item/current_vs_published_state
*
* @throws {ApiError}
* @throws {TimeoutError}
*
* @deprecated This API call is to be considered private and might change without notice
*/
Item.prototype.rawCurrentVsPublishedState = function (itemId) {
return this.client.request({
method: 'GET',
url: "/items/".concat(itemId, "/current-vs-published-state"),
});
};
/**
* Delete a record

@@ -552,4 +583,11 @@ *

*/
Item.prototype.publish = function (itemId, queryParams) {
return this.rawPublish(Utils.toId(itemId), queryParams).then(function (body) {
Item.prototype.publish = function (itemId, body, queryParams) {
return this.rawPublish(Utils.toId(itemId), body
? Utils.serializeRequestBody(body, {
id: Utils.toId(itemId),
type: 'selective_publish_operation',
attributes: ['content_in_locales', 'non_localized_content'],
relationships: [],
})
: null, queryParams).then(function (body) {
return Utils.deserializeResponseBody(body);

@@ -566,6 +604,7 @@ });

*/
Item.prototype.rawPublish = function (itemId, queryParams) {
Item.prototype.rawPublish = function (itemId, body, queryParams) {
return this.client.request({
method: 'PUT',
url: "/items/".concat(itemId, "/publish"),
body: body,
queryParams: queryParams,

@@ -582,4 +621,11 @@ });

*/
Item.prototype.unpublish = function (itemId, queryParams) {
return this.rawUnpublish(Utils.toId(itemId), queryParams).then(function (body) {
Item.prototype.unpublish = function (itemId, body, queryParams) {
return this.rawUnpublish(Utils.toId(itemId), body
? Utils.serializeRequestBody(body, {
id: Utils.toId(itemId),
type: 'selective_unpublish_operation',
attributes: ['content_in_locales'],
relationships: [],
})
: null, queryParams).then(function (body) {
return Utils.deserializeResponseBody(body);

@@ -596,6 +642,7 @@ });

*/
Item.prototype.rawUnpublish = function (itemId, queryParams) {
Item.prototype.rawUnpublish = function (itemId, body, queryParams) {
return this.client.request({
method: 'PUT',
url: "/items/".concat(itemId, "/unpublish"),
body: body,
queryParams: queryParams,

@@ -602,0 +649,0 @@ });

@@ -161,3 +161,3 @@ "use strict";

/**
* Retrieve a plugins
* Retrieve a plugin
*

@@ -175,3 +175,3 @@ * Read more: https://www.datocms.com/docs/content-management-api/resources/plugin/self

/**
* Retrieve a plugins
* Retrieve a plugin
*

@@ -178,0 +178,0 @@ * Read more: https://www.datocms.com/docs/content-management-api/resources/plugin/self

@@ -62,3 +62,3 @@ "use strict";

type: 'scheduled_publication',
attributes: ['publication_scheduled_at'],
attributes: ['publication_scheduled_at', 'selective_publication'],
relationships: [],

@@ -65,0 +65,0 @@ })).then(function (body) {

@@ -62,3 +62,3 @@ "use strict";

type: 'scheduled_unpublishing',
attributes: ['unpublishing_scheduled_at'],
attributes: ['unpublishing_scheduled_at', 'content_in_locales'],
relationships: [],

@@ -65,0 +65,0 @@ })).then(function (body) {

@@ -104,3 +104,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 v1.3.5', 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 v1.3.6-alpha.0', baseUrl: this.baseUrl, preCallStack: new Error().stack, extraHeaders: __assign(__assign(__assign({}, (this.config.extraHeaders || {})), (this.config.environment
? { 'X-Environment': this.config.environment }

@@ -107,0 +107,0 @@ : {})), { 'X-API-Version': '3' }), fetchJobResult: function (jobId) {

@@ -178,2 +178,24 @@ import * as Utils from '@datocms/rest-client-utils';

/**
* Retrieve information regarding changes between current and published versions of the record
*
* Read more: https://www.datocms.com/docs/content-management-api/resources/item/current_vs_published_state
*
* @throws {ApiError}
* @throws {TimeoutError}
*
* @deprecated This API call is to be considered private and might change without notice
*/
currentVsPublishedState(itemId: string | SimpleSchemaTypes.ItemData): Promise<SimpleSchemaTypes.ItemCurrentVsPublishedState>;
/**
* Retrieve information regarding changes between current and published versions of the record
*
* Read more: https://www.datocms.com/docs/content-management-api/resources/item/current_vs_published_state
*
* @throws {ApiError}
* @throws {TimeoutError}
*
* @deprecated This API call is to be considered private and might change without notice
*/
rawCurrentVsPublishedState(itemId: string): Promise<SchemaTypes.ItemCurrentVsPublishedStateTargetSchema>;
/**
* Delete a record

@@ -270,3 +292,3 @@ *

*/
publish(itemId: string | SimpleSchemaTypes.ItemData, queryParams?: SimpleSchemaTypes.ItemPublishHrefSchema): Promise<SimpleSchemaTypes.Item>;
publish(itemId: string | SimpleSchemaTypes.ItemData, body?: SimpleSchemaTypes.ItemPublishSchema, queryParams?: SimpleSchemaTypes.ItemPublishHrefSchema): Promise<SimpleSchemaTypes.Item>;
/**

@@ -280,3 +302,3 @@ * Publish a record

*/
rawPublish(itemId: string, queryParams?: SchemaTypes.ItemPublishHrefSchema): Promise<SchemaTypes.ItemPublishTargetSchema>;
rawPublish(itemId: string, body?: SchemaTypes.ItemPublishSchema, queryParams?: SchemaTypes.ItemPublishHrefSchema): Promise<SchemaTypes.ItemPublishTargetSchema>;
/**

@@ -290,3 +312,3 @@ * Unpublish a record

*/
unpublish(itemId: string | SimpleSchemaTypes.ItemData, queryParams?: SimpleSchemaTypes.ItemUnpublishHrefSchema): Promise<SimpleSchemaTypes.Item>;
unpublish(itemId: string | SimpleSchemaTypes.ItemData, body?: SimpleSchemaTypes.ItemUnpublishSchema, queryParams?: SimpleSchemaTypes.ItemUnpublishHrefSchema): Promise<SimpleSchemaTypes.Item>;
/**

@@ -300,3 +322,3 @@ * Unpublish a record

*/
rawUnpublish(itemId: string, queryParams?: SchemaTypes.ItemUnpublishHrefSchema): Promise<SchemaTypes.ItemUnpublishTargetSchema>;
rawUnpublish(itemId: string, body?: SchemaTypes.ItemUnpublishSchema, queryParams?: SchemaTypes.ItemUnpublishHrefSchema): Promise<SchemaTypes.ItemUnpublishTargetSchema>;
/**

@@ -303,0 +325,0 @@ * Publish items in bulk

@@ -393,2 +393,33 @@ var __extends = (this && this.__extends) || (function () {

/**
* Retrieve information regarding changes between current and published versions of the record
*
* Read more: https://www.datocms.com/docs/content-management-api/resources/item/current_vs_published_state
*
* @throws {ApiError}
* @throws {TimeoutError}
*
* @deprecated This API call is to be considered private and might change without notice
*/
Item.prototype.currentVsPublishedState = function (itemId) {
return this.rawCurrentVsPublishedState(Utils.toId(itemId)).then(function (body) {
return Utils.deserializeResponseBody(body);
});
};
/**
* Retrieve information regarding changes between current and published versions of the record
*
* Read more: https://www.datocms.com/docs/content-management-api/resources/item/current_vs_published_state
*
* @throws {ApiError}
* @throws {TimeoutError}
*
* @deprecated This API call is to be considered private and might change without notice
*/
Item.prototype.rawCurrentVsPublishedState = function (itemId) {
return this.client.request({
method: 'GET',
url: "/items/".concat(itemId, "/current-vs-published-state"),
});
};
/**
* Delete a record

@@ -524,4 +555,11 @@ *

*/
Item.prototype.publish = function (itemId, queryParams) {
return this.rawPublish(Utils.toId(itemId), queryParams).then(function (body) {
Item.prototype.publish = function (itemId, body, queryParams) {
return this.rawPublish(Utils.toId(itemId), body
? Utils.serializeRequestBody(body, {
id: Utils.toId(itemId),
type: 'selective_publish_operation',
attributes: ['content_in_locales', 'non_localized_content'],
relationships: [],
})
: null, queryParams).then(function (body) {
return Utils.deserializeResponseBody(body);

@@ -538,6 +576,7 @@ });

*/
Item.prototype.rawPublish = function (itemId, queryParams) {
Item.prototype.rawPublish = function (itemId, body, queryParams) {
return this.client.request({
method: 'PUT',
url: "/items/".concat(itemId, "/publish"),
body: body,
queryParams: queryParams,

@@ -554,4 +593,11 @@ });

*/
Item.prototype.unpublish = function (itemId, queryParams) {
return this.rawUnpublish(Utils.toId(itemId), queryParams).then(function (body) {
Item.prototype.unpublish = function (itemId, body, queryParams) {
return this.rawUnpublish(Utils.toId(itemId), body
? Utils.serializeRequestBody(body, {
id: Utils.toId(itemId),
type: 'selective_unpublish_operation',
attributes: ['content_in_locales'],
relationships: [],
})
: null, queryParams).then(function (body) {
return Utils.deserializeResponseBody(body);

@@ -568,6 +614,7 @@ });

*/
Item.prototype.rawUnpublish = function (itemId, queryParams) {
Item.prototype.rawUnpublish = function (itemId, body, queryParams) {
return this.client.request({
method: 'PUT',
url: "/items/".concat(itemId, "/unpublish"),
body: body,
queryParams: queryParams,

@@ -574,0 +621,0 @@ });

@@ -61,3 +61,3 @@ import * as SchemaTypes from '../SchemaTypes';

/**
* Retrieve a plugins
* Retrieve a plugin
*

@@ -71,3 +71,3 @@ * Read more: https://www.datocms.com/docs/content-management-api/resources/plugin/self

/**
* Retrieve a plugins
* Retrieve a plugin
*

@@ -74,0 +74,0 @@ * Read more: https://www.datocms.com/docs/content-management-api/resources/plugin/self

@@ -133,3 +133,3 @@ var __extends = (this && this.__extends) || (function () {

/**
* Retrieve a plugins
* Retrieve a plugin
*

@@ -147,3 +147,3 @@ * Read more: https://www.datocms.com/docs/content-management-api/resources/plugin/self

/**
* Retrieve a plugins
* Retrieve a plugin
*

@@ -150,0 +150,0 @@ * Read more: https://www.datocms.com/docs/content-management-api/resources/plugin/self

@@ -34,3 +34,3 @@ var __extends = (this && this.__extends) || (function () {

type: 'scheduled_publication',
attributes: ['publication_scheduled_at'],
attributes: ['publication_scheduled_at', 'selective_publication'],
relationships: [],

@@ -37,0 +37,0 @@ })).then(function (body) {

@@ -34,3 +34,3 @@ var __extends = (this && this.__extends) || (function () {

type: 'scheduled_unpublishing',
attributes: ['unpublishing_scheduled_at'],
attributes: ['unpublishing_scheduled_at', 'content_in_locales'],
relationships: [],

@@ -37,0 +37,0 @@ })).then(function (body) {

@@ -178,2 +178,24 @@ import * as Utils from '@datocms/rest-client-utils';

/**
* Retrieve information regarding changes between current and published versions of the record
*
* Read more: https://www.datocms.com/docs/content-management-api/resources/item/current_vs_published_state
*
* @throws {ApiError}
* @throws {TimeoutError}
*
* @deprecated This API call is to be considered private and might change without notice
*/
currentVsPublishedState(itemId: string | SimpleSchemaTypes.ItemData): Promise<SimpleSchemaTypes.ItemCurrentVsPublishedState>;
/**
* Retrieve information regarding changes between current and published versions of the record
*
* Read more: https://www.datocms.com/docs/content-management-api/resources/item/current_vs_published_state
*
* @throws {ApiError}
* @throws {TimeoutError}
*
* @deprecated This API call is to be considered private and might change without notice
*/
rawCurrentVsPublishedState(itemId: string): Promise<SchemaTypes.ItemCurrentVsPublishedStateTargetSchema>;
/**
* Delete a record

@@ -270,3 +292,3 @@ *

*/
publish(itemId: string | SimpleSchemaTypes.ItemData, queryParams?: SimpleSchemaTypes.ItemPublishHrefSchema): Promise<SimpleSchemaTypes.Item>;
publish(itemId: string | SimpleSchemaTypes.ItemData, body?: SimpleSchemaTypes.ItemPublishSchema, queryParams?: SimpleSchemaTypes.ItemPublishHrefSchema): Promise<SimpleSchemaTypes.Item>;
/**

@@ -280,3 +302,3 @@ * Publish a record

*/
rawPublish(itemId: string, queryParams?: SchemaTypes.ItemPublishHrefSchema): Promise<SchemaTypes.ItemPublishTargetSchema>;
rawPublish(itemId: string, body?: SchemaTypes.ItemPublishSchema, queryParams?: SchemaTypes.ItemPublishHrefSchema): Promise<SchemaTypes.ItemPublishTargetSchema>;
/**

@@ -290,3 +312,3 @@ * Unpublish a record

*/
unpublish(itemId: string | SimpleSchemaTypes.ItemData, queryParams?: SimpleSchemaTypes.ItemUnpublishHrefSchema): Promise<SimpleSchemaTypes.Item>;
unpublish(itemId: string | SimpleSchemaTypes.ItemData, body?: SimpleSchemaTypes.ItemUnpublishSchema, queryParams?: SimpleSchemaTypes.ItemUnpublishHrefSchema): Promise<SimpleSchemaTypes.Item>;
/**

@@ -300,3 +322,3 @@ * Unpublish a record

*/
rawUnpublish(itemId: string, queryParams?: SchemaTypes.ItemUnpublishHrefSchema): Promise<SchemaTypes.ItemUnpublishTargetSchema>;
rawUnpublish(itemId: string, body?: SchemaTypes.ItemUnpublishSchema, queryParams?: SchemaTypes.ItemUnpublishHrefSchema): Promise<SchemaTypes.ItemUnpublishTargetSchema>;
/**

@@ -303,0 +325,0 @@ * Publish items in bulk

@@ -61,3 +61,3 @@ import * as SchemaTypes from '../SchemaTypes';

/**
* Retrieve a plugins
* Retrieve a plugin
*

@@ -71,3 +71,3 @@ * Read more: https://www.datocms.com/docs/content-management-api/resources/plugin/self

/**
* Retrieve a plugins
* Retrieve a plugin
*

@@ -74,0 +74,0 @@ * Read more: https://www.datocms.com/docs/content-management-api/resources/plugin/self

{
"name": "@datocms/cma-client",
"version": "1.3.5",
"version": "1.3.6-alpha.0",
"description": "JS client for DatoCMS REST Content Management API",

@@ -43,5 +43,5 @@ "keywords": [

"devDependencies": {
"@datocms/dashboard-client": "^1.3.5"
"@datocms/dashboard-client": "^1.3.6-alpha.0"
},
"gitHead": "ea4d9d6459be054429a77f676a76228854932175"
"gitHead": "6d4e65c250eef462e5bd7cf995d66d5fb377570b"
}

@@ -136,3 +136,3 @@ import * as Resources from './resources';

logFn: this.config.logFn || console.log,
userAgent: '@datocms/cma-client v1.3.5',
userAgent: '@datocms/cma-client v1.3.6-alpha.0',
baseUrl: this.baseUrl,

@@ -139,0 +139,0 @@ preCallStack: new Error().stack,

@@ -368,2 +368,41 @@ import * as Utils from '@datocms/rest-client-utils';

/**
* Retrieve information regarding changes between current and published versions of the record
*
* Read more: https://www.datocms.com/docs/content-management-api/resources/item/current_vs_published_state
*
* @throws {ApiError}
* @throws {TimeoutError}
*
* @deprecated This API call is to be considered private and might change without notice
*/
currentVsPublishedState(itemId: string | SimpleSchemaTypes.ItemData) {
return this.rawCurrentVsPublishedState(Utils.toId(itemId)).then((body) =>
Utils.deserializeResponseBody<SimpleSchemaTypes.ItemCurrentVsPublishedStateTargetSchema>(
body,
),
);
}
/**
* Retrieve information regarding changes between current and published versions of the record
*
* Read more: https://www.datocms.com/docs/content-management-api/resources/item/current_vs_published_state
*
* @throws {ApiError}
* @throws {TimeoutError}
*
* @deprecated This API call is to be considered private and might change without notice
*/
rawCurrentVsPublishedState(
itemId: string,
): Promise<SchemaTypes.ItemCurrentVsPublishedStateTargetSchema> {
return this.client.request<SchemaTypes.ItemCurrentVsPublishedStateTargetSchema>(
{
method: 'GET',
url: `/items/${itemId}/current-vs-published-state`,
},
);
}
/**
* Delete a record

@@ -523,5 +562,17 @@ *

itemId: string | SimpleSchemaTypes.ItemData,
body?: SimpleSchemaTypes.ItemPublishSchema,
queryParams?: SimpleSchemaTypes.ItemPublishHrefSchema,
) {
return this.rawPublish(Utils.toId(itemId), queryParams).then((body) =>
return this.rawPublish(
Utils.toId(itemId),
body
? Utils.serializeRequestBody<SchemaTypes.ItemPublishSchema>(body, {
id: Utils.toId(itemId),
type: 'selective_publish_operation',
attributes: ['content_in_locales', 'non_localized_content'],
relationships: [],
})
: null,
queryParams,
).then((body) =>
Utils.deserializeResponseBody<SimpleSchemaTypes.ItemPublishTargetSchema>(

@@ -543,2 +594,3 @@ body,

itemId: string,
body?: SchemaTypes.ItemPublishSchema,
queryParams?: SchemaTypes.ItemPublishHrefSchema,

@@ -549,2 +601,3 @@ ): Promise<SchemaTypes.ItemPublishTargetSchema> {

url: `/items/${itemId}/publish`,
body,
queryParams,

@@ -564,5 +617,17 @@ });

itemId: string | SimpleSchemaTypes.ItemData,
body?: SimpleSchemaTypes.ItemUnpublishSchema,
queryParams?: SimpleSchemaTypes.ItemUnpublishHrefSchema,
) {
return this.rawUnpublish(Utils.toId(itemId), queryParams).then((body) =>
return this.rawUnpublish(
Utils.toId(itemId),
body
? Utils.serializeRequestBody<SchemaTypes.ItemUnpublishSchema>(body, {
id: Utils.toId(itemId),
type: 'selective_unpublish_operation',
attributes: ['content_in_locales'],
relationships: [],
})
: null,
queryParams,
).then((body) =>
Utils.deserializeResponseBody<SimpleSchemaTypes.ItemUnpublishTargetSchema>(

@@ -584,2 +649,3 @@ body,

itemId: string,
body?: SchemaTypes.ItemUnpublishSchema,
queryParams?: SchemaTypes.ItemUnpublishHrefSchema,

@@ -590,2 +656,3 @@ ): Promise<SchemaTypes.ItemUnpublishTargetSchema> {

url: `/items/${itemId}/unpublish`,
body,
queryParams,

@@ -592,0 +659,0 @@ });

@@ -144,3 +144,3 @@ import * as Utils from '@datocms/rest-client-utils';

/**
* Retrieve a plugins
* Retrieve a plugin
*

@@ -161,3 +161,3 @@ * Read more: https://www.datocms.com/docs/content-management-api/resources/plugin/self

/**
* Retrieve a plugins
* Retrieve a plugin
*

@@ -164,0 +164,0 @@ * Read more: https://www.datocms.com/docs/content-management-api/resources/plugin/self

@@ -27,3 +27,3 @@ import * as Utils from '@datocms/rest-client-utils';

type: 'scheduled_publication',
attributes: ['publication_scheduled_at'],
attributes: ['publication_scheduled_at', 'selective_publication'],
relationships: [],

@@ -30,0 +30,0 @@ },

@@ -27,3 +27,3 @@ import * as Utils from '@datocms/rest-client-utils';

type: 'scheduled_unpublishing',
attributes: ['unpublishing_scheduled_at'],
attributes: ['unpublishing_scheduled_at', 'content_in_locales'],
relationships: [],

@@ -30,0 +30,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 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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc