@datocms/cma-client 1.1.7 → 1.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/generated/resources/ItemType.js +4 -3
- package/dist/cjs/generated/resources/ItemType.js.map +1 -1
- package/dist/esm/generated/SchemaTypes.d.ts +11 -0
- package/dist/esm/generated/SimpleSchemaTypes.d.ts +11 -0
- package/dist/esm/generated/resources/ItemType.d.ts +2 -2
- package/dist/esm/generated/resources/ItemType.js +4 -3
- package/dist/esm/generated/resources/ItemType.js.map +1 -1
- package/dist/types/generated/SchemaTypes.d.ts +11 -0
- package/dist/types/generated/SimpleSchemaTypes.d.ts +11 -0
- package/dist/types/generated/resources/ItemType.d.ts +2 -2
- package/package.json +4 -4
- package/resources.json +1 -0
- package/src/generated/Client.ts +1 -1
- package/src/generated/SchemaTypes.ts +11 -0
- package/src/generated/SimpleSchemaTypes.ts +11 -0
- package/src/generated/resources/ItemType.ts +7 -2
|
@@ -244,8 +244,8 @@ var ItemType = /** @class */ (function (_super) {
|
|
|
244
244
|
* @throws {ApiError}
|
|
245
245
|
* @throws {TimeoutError}
|
|
246
246
|
*/
|
|
247
|
-
ItemType.prototype.destroy = function (itemTypeId) {
|
|
248
|
-
return this.rawDestroy(Utils.toId(itemTypeId)).then(function (body) {
|
|
247
|
+
ItemType.prototype.destroy = function (itemTypeId, queryParams) {
|
|
248
|
+
return this.rawDestroy(Utils.toId(itemTypeId), queryParams).then(function (body) {
|
|
249
249
|
return Utils.deserializeResponseBody(body);
|
|
250
250
|
});
|
|
251
251
|
};
|
|
@@ -257,10 +257,11 @@ var ItemType = /** @class */ (function (_super) {
|
|
|
257
257
|
* @throws {ApiError}
|
|
258
258
|
* @throws {TimeoutError}
|
|
259
259
|
*/
|
|
260
|
-
ItemType.prototype.rawDestroy = function (itemTypeId) {
|
|
260
|
+
ItemType.prototype.rawDestroy = function (itemTypeId, queryParams) {
|
|
261
261
|
return this.client.request({
|
|
262
262
|
method: 'DELETE',
|
|
263
263
|
url: "/item-types/".concat(itemTypeId),
|
|
264
|
+
queryParams: queryParams,
|
|
264
265
|
});
|
|
265
266
|
};
|
|
266
267
|
ItemType.TYPE = 'item_type';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ItemType.js","sourceRoot":"","sources":["../../../../src/generated/resources/ItemType.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gEAAoD;AAGpD,oEAA8C;AAE9C;IAAsC,4BAAY;IAAlD;;
|
|
1
|
+
{"version":3,"file":"ItemType.js","sourceRoot":"","sources":["../../../../src/generated/resources/ItemType.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gEAAoD;AAGpD,oEAA8C;AAE9C;IAAsC,4BAAY;IAAlD;;IA4QA,CAAC;IAzQC;;;;;;;OAOG;IACH,yBAAM,GAAN,UACE,IAA4C,EAC5C,WAAwD;QAExD,OAAO,IAAI,CAAC,SAAS,CACnB,KAAK,CAAC,oBAAoB,CAAmC,IAAI,EAAE;YACjE,IAAI,EAAE,WAAW;YACjB,UAAU,EAAE;gBACV,MAAM;gBACN,SAAS;gBACT,WAAW;gBACX,sBAAsB;gBACtB,UAAU;gBACV,eAAe;gBACf,mBAAmB;gBACnB,MAAM;gBACN,oBAAoB;gBACpB,eAAe;gBACf,wBAAwB;gBACxB,uBAAuB;gBACvB,MAAM;aACP;YACD,aAAa,EAAE;gBACb,gBAAgB;gBAChB,aAAa;gBACb,qBAAqB;gBACrB,eAAe;gBACf,UAAU;aACX;SACF,CAAC,EACF,WAAW,CACZ,CAAC,IAAI,CAAC,UAAC,IAAI;YACV,OAAA,KAAK,CAAC,uBAAuB,CAC3B,IAAI,CACL;QAFD,CAEC,CACF,CAAC;IACJ,CAAC;IAED;;;;;;;OAOG;IACH,4BAAS,GAAT,UACE,IAAsC,EACtC,WAAkD;QAElD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I;YACpE,OAAA,KAAK,CAAC,uBAAuB,CAC3B,IAAI,CACL;QAFD,CAEC,CACF,CAAC;IACJ,CAAC;IAED;;;;;;;OAOG;IACH,6BAAU,GAAV,UACE,UAAkB,EAClB,WAAmD;QAEnD,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAuC;YAC/D,MAAM,EAAE,QAAQ;YAChB,GAAG,EAAE,sBAAe,UAAU,CAAE;YAChC,WAAW,aAAA;SACZ,CAAC,CAAC;IACL,CAAC;IA1Qe,aAAI,GAAgB,WAAW,CAAC;IA2QlD,eAAC;CAAA,AA5QD,CAAsC,sBAAY,GA4QjD;kBA5QoB,QAAQ"}
|
|
@@ -383,6 +383,17 @@ export declare type JobType = 'job';
|
|
|
383
383
|
* via the `definition` "id".
|
|
384
384
|
*/
|
|
385
385
|
export declare type JobIdentity = string;
|
|
386
|
+
/**
|
|
387
|
+
* This interface was referenced by `ItemType`'s JSON-Schema
|
|
388
|
+
* via the `destroy.hrefSchema` link.
|
|
389
|
+
*/
|
|
390
|
+
export declare type ItemTypeDestroyHrefSchema = {
|
|
391
|
+
/**
|
|
392
|
+
* Skip the deletion of the menu items linked to the model
|
|
393
|
+
*/
|
|
394
|
+
skip_menu_items_deletion?: string;
|
|
395
|
+
[k: string]: unknown;
|
|
396
|
+
};
|
|
386
397
|
/**
|
|
387
398
|
* JSON API type field
|
|
388
399
|
*
|
|
@@ -428,6 +428,17 @@ export declare type JobType = 'job';
|
|
|
428
428
|
* via the `instances.targetSchema` link.
|
|
429
429
|
*/
|
|
430
430
|
export declare type ItemTypeInstancesTargetSchema = ItemType[];
|
|
431
|
+
/**
|
|
432
|
+
* This interface was referenced by `ItemType`'s JSON-Schema
|
|
433
|
+
* via the `destroy.hrefSchema` link.
|
|
434
|
+
*/
|
|
435
|
+
export declare type ItemTypeDestroyHrefSchema = {
|
|
436
|
+
/**
|
|
437
|
+
* Skip the deletion of the menu items linked to the model
|
|
438
|
+
*/
|
|
439
|
+
skip_menu_items_deletion?: string;
|
|
440
|
+
[k: string]: unknown;
|
|
441
|
+
};
|
|
431
442
|
/**
|
|
432
443
|
* This interface was referenced by `Field`'s JSON-Schema
|
|
433
444
|
* via the `instances.targetSchema` link.
|
|
@@ -101,7 +101,7 @@ export default class ItemType extends BaseResource {
|
|
|
101
101
|
* @throws {ApiError}
|
|
102
102
|
* @throws {TimeoutError}
|
|
103
103
|
*/
|
|
104
|
-
destroy(itemTypeId: string | SimpleSchemaTypes.ItemTypeData): Promise<SimpleSchemaTypes.ItemType>;
|
|
104
|
+
destroy(itemTypeId: string | SimpleSchemaTypes.ItemTypeData, queryParams?: SimpleSchemaTypes.ItemTypeDestroyHrefSchema): Promise<SimpleSchemaTypes.ItemType>;
|
|
105
105
|
/**
|
|
106
106
|
* Delete a model
|
|
107
107
|
*
|
|
@@ -110,5 +110,5 @@ export default class ItemType extends BaseResource {
|
|
|
110
110
|
* @throws {ApiError}
|
|
111
111
|
* @throws {TimeoutError}
|
|
112
112
|
*/
|
|
113
|
-
rawDestroy(itemTypeId: string): Promise<SchemaTypes.ItemTypeDestroyJobSchema>;
|
|
113
|
+
rawDestroy(itemTypeId: string, queryParams?: SchemaTypes.ItemTypeDestroyHrefSchema): Promise<SchemaTypes.ItemTypeDestroyJobSchema>;
|
|
114
114
|
}
|
|
@@ -216,8 +216,8 @@ var ItemType = /** @class */ (function (_super) {
|
|
|
216
216
|
* @throws {ApiError}
|
|
217
217
|
* @throws {TimeoutError}
|
|
218
218
|
*/
|
|
219
|
-
ItemType.prototype.destroy = function (itemTypeId) {
|
|
220
|
-
return this.rawDestroy(Utils.toId(itemTypeId)).then(function (body) {
|
|
219
|
+
ItemType.prototype.destroy = function (itemTypeId, queryParams) {
|
|
220
|
+
return this.rawDestroy(Utils.toId(itemTypeId), queryParams).then(function (body) {
|
|
221
221
|
return Utils.deserializeResponseBody(body);
|
|
222
222
|
});
|
|
223
223
|
};
|
|
@@ -229,10 +229,11 @@ var ItemType = /** @class */ (function (_super) {
|
|
|
229
229
|
* @throws {ApiError}
|
|
230
230
|
* @throws {TimeoutError}
|
|
231
231
|
*/
|
|
232
|
-
ItemType.prototype.rawDestroy = function (itemTypeId) {
|
|
232
|
+
ItemType.prototype.rawDestroy = function (itemTypeId, queryParams) {
|
|
233
233
|
return this.client.request({
|
|
234
234
|
method: 'DELETE',
|
|
235
235
|
url: "/item-types/".concat(itemTypeId),
|
|
236
|
+
queryParams: queryParams,
|
|
236
237
|
});
|
|
237
238
|
};
|
|
238
239
|
ItemType.TYPE = 'item_type';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ItemType.js","sourceRoot":"","sources":["../../../../src/generated/resources/ItemType.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,OAAO,KAAK,KAAK,MAAM,4BAA4B,CAAC;AAGpD,OAAO,YAAY,MAAM,oBAAoB,CAAC;AAE9C;IAAsC,4BAAY;IAAlD;;
|
|
1
|
+
{"version":3,"file":"ItemType.js","sourceRoot":"","sources":["../../../../src/generated/resources/ItemType.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,OAAO,KAAK,KAAK,MAAM,4BAA4B,CAAC;AAGpD,OAAO,YAAY,MAAM,oBAAoB,CAAC;AAE9C;IAAsC,4BAAY;IAAlD;;IA4QA,CAAC;IAzQC;;;;;;;OAOG;IACH,yBAAM,GAAN,UACE,IAA4C,EAC5C,WAAwD;QAExD,OAAO,IAAI,CAAC,SAAS,CACnB,KAAK,CAAC,oBAAoB,CAAmC,IAAI,EAAE;YACjE,IAAI,EAAE,WAAW;YACjB,UAAU,EAAE;gBACV,MAAM;gBACN,SAAS;gBACT,WAAW;gBACX,sBAAsB;gBACtB,UAAU;gBACV,eAAe;gBACf,mBAAmB;gBACnB,MAAM;gBACN,oBAAoB;gBACpB,eAAe;gBACf,wBAAwB;gBACxB,uBAAuB;gBACvB,MAAM;aACP;YACD,aAAa,EAAE;gBACb,gBAAgB;gBAChB,aAAa;gBACb,qBAAqB;gBACrB,eA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BAAe,UAAU,eAAY;SAC3C,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;OAOG;IACH,0BAAO,GAAP,UACE,UAAmD,EACnD,WAAyD;QAEzD,OAAO,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,WAAW,CAAC,CAAC,IAAI,CAAC,UAAC,IAAI;YACpE,OAAA,KAAK,CAAC,uBAAuB,CAC3B,IAAI,CACL;QAFD,CAEC,CACF,CAAC;IACJ,CAAC;IAED;;;;;;;OAOG;IACH,6BAAU,GAAV,UACE,UAAkB,EAClB,WAAmD;QAEnD,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAuC;YAC/D,MAAM,EAAE,QAAQ;YAChB,GAAG,EAAE,sBAAe,UAAU,CAAE;YAChC,WAAW,aAAA;SACZ,CAAC,CAAC;IACL,CAAC;IA1Qe,aAAI,GAAgB,WAAW,CAAC;IA2QlD,eAAC;CAAA,AA5QD,CAAsC,YAAY,GA4QjD;eA5QoB,QAAQ"}
|
|
@@ -383,6 +383,17 @@ export declare type JobType = 'job';
|
|
|
383
383
|
* via the `definition` "id".
|
|
384
384
|
*/
|
|
385
385
|
export declare type JobIdentity = string;
|
|
386
|
+
/**
|
|
387
|
+
* This interface was referenced by `ItemType`'s JSON-Schema
|
|
388
|
+
* via the `destroy.hrefSchema` link.
|
|
389
|
+
*/
|
|
390
|
+
export declare type ItemTypeDestroyHrefSchema = {
|
|
391
|
+
/**
|
|
392
|
+
* Skip the deletion of the menu items linked to the model
|
|
393
|
+
*/
|
|
394
|
+
skip_menu_items_deletion?: string;
|
|
395
|
+
[k: string]: unknown;
|
|
396
|
+
};
|
|
386
397
|
/**
|
|
387
398
|
* JSON API type field
|
|
388
399
|
*
|
|
@@ -428,6 +428,17 @@ export declare type JobType = 'job';
|
|
|
428
428
|
* via the `instances.targetSchema` link.
|
|
429
429
|
*/
|
|
430
430
|
export declare type ItemTypeInstancesTargetSchema = ItemType[];
|
|
431
|
+
/**
|
|
432
|
+
* This interface was referenced by `ItemType`'s JSON-Schema
|
|
433
|
+
* via the `destroy.hrefSchema` link.
|
|
434
|
+
*/
|
|
435
|
+
export declare type ItemTypeDestroyHrefSchema = {
|
|
436
|
+
/**
|
|
437
|
+
* Skip the deletion of the menu items linked to the model
|
|
438
|
+
*/
|
|
439
|
+
skip_menu_items_deletion?: string;
|
|
440
|
+
[k: string]: unknown;
|
|
441
|
+
};
|
|
431
442
|
/**
|
|
432
443
|
* This interface was referenced by `Field`'s JSON-Schema
|
|
433
444
|
* via the `instances.targetSchema` link.
|
|
@@ -101,7 +101,7 @@ export default class ItemType extends BaseResource {
|
|
|
101
101
|
* @throws {ApiError}
|
|
102
102
|
* @throws {TimeoutError}
|
|
103
103
|
*/
|
|
104
|
-
destroy(itemTypeId: string | SimpleSchemaTypes.ItemTypeData): Promise<SimpleSchemaTypes.ItemType>;
|
|
104
|
+
destroy(itemTypeId: string | SimpleSchemaTypes.ItemTypeData, queryParams?: SimpleSchemaTypes.ItemTypeDestroyHrefSchema): Promise<SimpleSchemaTypes.ItemType>;
|
|
105
105
|
/**
|
|
106
106
|
* Delete a model
|
|
107
107
|
*
|
|
@@ -110,5 +110,5 @@ export default class ItemType extends BaseResource {
|
|
|
110
110
|
* @throws {ApiError}
|
|
111
111
|
* @throws {TimeoutError}
|
|
112
112
|
*/
|
|
113
|
-
rawDestroy(itemTypeId: string): Promise<SchemaTypes.ItemTypeDestroyJobSchema>;
|
|
113
|
+
rawDestroy(itemTypeId: string, queryParams?: SchemaTypes.ItemTypeDestroyHrefSchema): Promise<SchemaTypes.ItemTypeDestroyJobSchema>;
|
|
114
114
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datocms/cma-client",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.9",
|
|
4
4
|
"description": "JS client for DatoCMS REST Content Management API",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"datocms",
|
|
@@ -37,10 +37,10 @@
|
|
|
37
37
|
"url": "https://github.com/datocms/js-rest-api-clients/issues"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@datocms/rest-client-utils": "^1.1.
|
|
40
|
+
"@datocms/rest-client-utils": "^1.1.9"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@datocms/dashboard-client": "^1.1.
|
|
43
|
+
"@datocms/dashboard-client": "^1.1.9"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "648422318aab7a714e33cd62722763e646a792ea"
|
|
46
46
|
}
|
package/resources.json
CHANGED
package/src/generated/Client.ts
CHANGED
|
@@ -133,7 +133,7 @@ export class Client {
|
|
|
133
133
|
...this.config,
|
|
134
134
|
...options,
|
|
135
135
|
logFn: this.config.logFn || console.log,
|
|
136
|
-
userAgent: `@datocms/cma-client`,
|
|
136
|
+
userAgent: `@datocms/cma-client v1.1.9`,
|
|
137
137
|
baseUrl: this.baseUrl,
|
|
138
138
|
preCallStack: new Error().stack,
|
|
139
139
|
extraHeaders: {
|
|
@@ -387,6 +387,17 @@ export type JobType = 'job';
|
|
|
387
387
|
* via the `definition` "id".
|
|
388
388
|
*/
|
|
389
389
|
export type JobIdentity = string;
|
|
390
|
+
/**
|
|
391
|
+
* This interface was referenced by `ItemType`'s JSON-Schema
|
|
392
|
+
* via the `destroy.hrefSchema` link.
|
|
393
|
+
*/
|
|
394
|
+
export type ItemTypeDestroyHrefSchema = {
|
|
395
|
+
/**
|
|
396
|
+
* Skip the deletion of the menu items linked to the model
|
|
397
|
+
*/
|
|
398
|
+
skip_menu_items_deletion?: string;
|
|
399
|
+
[k: string]: unknown;
|
|
400
|
+
};
|
|
390
401
|
/**
|
|
391
402
|
* JSON API type field
|
|
392
403
|
*
|
|
@@ -432,6 +432,17 @@ export type JobType = 'job';
|
|
|
432
432
|
* via the `instances.targetSchema` link.
|
|
433
433
|
*/
|
|
434
434
|
export type ItemTypeInstancesTargetSchema = ItemType[];
|
|
435
|
+
/**
|
|
436
|
+
* This interface was referenced by `ItemType`'s JSON-Schema
|
|
437
|
+
* via the `destroy.hrefSchema` link.
|
|
438
|
+
*/
|
|
439
|
+
export type ItemTypeDestroyHrefSchema = {
|
|
440
|
+
/**
|
|
441
|
+
* Skip the deletion of the menu items linked to the model
|
|
442
|
+
*/
|
|
443
|
+
skip_menu_items_deletion?: string;
|
|
444
|
+
[k: string]: unknown;
|
|
445
|
+
};
|
|
435
446
|
/**
|
|
436
447
|
* This interface was referenced by `Field`'s JSON-Schema
|
|
437
448
|
* via the `instances.targetSchema` link.
|
|
@@ -242,8 +242,11 @@ export default class ItemType extends BaseResource {
|
|
|
242
242
|
* @throws {ApiError}
|
|
243
243
|
* @throws {TimeoutError}
|
|
244
244
|
*/
|
|
245
|
-
destroy(
|
|
246
|
-
|
|
245
|
+
destroy(
|
|
246
|
+
itemTypeId: string | SimpleSchemaTypes.ItemTypeData,
|
|
247
|
+
queryParams?: SimpleSchemaTypes.ItemTypeDestroyHrefSchema,
|
|
248
|
+
) {
|
|
249
|
+
return this.rawDestroy(Utils.toId(itemTypeId), queryParams).then((body) =>
|
|
247
250
|
Utils.deserializeResponseBody<SimpleSchemaTypes.ItemTypeDestroyJobSchema>(
|
|
248
251
|
body,
|
|
249
252
|
),
|
|
@@ -260,10 +263,12 @@ export default class ItemType extends BaseResource {
|
|
|
260
263
|
*/
|
|
261
264
|
rawDestroy(
|
|
262
265
|
itemTypeId: string,
|
|
266
|
+
queryParams?: SchemaTypes.ItemTypeDestroyHrefSchema,
|
|
263
267
|
): Promise<SchemaTypes.ItemTypeDestroyJobSchema> {
|
|
264
268
|
return this.client.request<SchemaTypes.ItemTypeDestroyJobSchema>({
|
|
265
269
|
method: 'DELETE',
|
|
266
270
|
url: `/item-types/${itemTypeId}`,
|
|
271
|
+
queryParams,
|
|
267
272
|
});
|
|
268
273
|
}
|
|
269
274
|
}
|