@datocms/cma-client
Advanced tools
Comparing version 1.1.7 to 1.1.8
@@ -247,4 +247,4 @@ "use strict"; | ||
*/ | ||
ItemType.prototype.destroy = function (itemTypeId) { | ||
return this.rawDestroy(Utils.toId(itemTypeId)).then(function (body) { | ||
ItemType.prototype.destroy = function (itemTypeId, queryParams) { | ||
return this.rawDestroy(Utils.toId(itemTypeId), queryParams).then(function (body) { | ||
return Utils.deserializeResponseBody(body); | ||
@@ -261,6 +261,7 @@ }); | ||
*/ | ||
ItemType.prototype.rawDestroy = function (itemTypeId) { | ||
ItemType.prototype.rawDestroy = function (itemTypeId, queryParams) { | ||
return this.client.request({ | ||
method: 'DELETE', | ||
url: "/item-types/".concat(itemTypeId), | ||
queryParams: queryParams, | ||
}); | ||
@@ -267,0 +268,0 @@ }; |
@@ -104,3 +104,3 @@ import * as SchemaTypes from '../SchemaTypes'; | ||
*/ | ||
destroy(itemTypeId: string | SimpleSchemaTypes.ItemTypeData): Promise<SimpleSchemaTypes.ItemType>; | ||
destroy(itemTypeId: string | SimpleSchemaTypes.ItemTypeData, queryParams?: SimpleSchemaTypes.ItemTypeDestroyHrefSchema): Promise<SimpleSchemaTypes.ItemType>; | ||
/** | ||
@@ -114,3 +114,3 @@ * Delete a model | ||
*/ | ||
rawDestroy(itemTypeId: string): Promise<SchemaTypes.ItemTypeDestroyJobSchema>; | ||
rawDestroy(itemTypeId: string, queryParams?: SchemaTypes.ItemTypeDestroyHrefSchema): Promise<SchemaTypes.ItemTypeDestroyJobSchema>; | ||
} |
@@ -219,4 +219,4 @@ var __extends = (this && this.__extends) || (function () { | ||
*/ | ||
ItemType.prototype.destroy = function (itemTypeId) { | ||
return this.rawDestroy(Utils.toId(itemTypeId)).then(function (body) { | ||
ItemType.prototype.destroy = function (itemTypeId, queryParams) { | ||
return this.rawDestroy(Utils.toId(itemTypeId), queryParams).then(function (body) { | ||
return Utils.deserializeResponseBody(body); | ||
@@ -233,6 +233,7 @@ }); | ||
*/ | ||
ItemType.prototype.rawDestroy = function (itemTypeId) { | ||
ItemType.prototype.rawDestroy = function (itemTypeId, queryParams) { | ||
return this.client.request({ | ||
method: 'DELETE', | ||
url: "/item-types/".concat(itemTypeId), | ||
queryParams: queryParams, | ||
}); | ||
@@ -239,0 +240,0 @@ }; |
@@ -104,3 +104,3 @@ import * as SchemaTypes from '../SchemaTypes'; | ||
*/ | ||
destroy(itemTypeId: string | SimpleSchemaTypes.ItemTypeData): Promise<SimpleSchemaTypes.ItemType>; | ||
destroy(itemTypeId: string | SimpleSchemaTypes.ItemTypeData, queryParams?: SimpleSchemaTypes.ItemTypeDestroyHrefSchema): Promise<SimpleSchemaTypes.ItemType>; | ||
/** | ||
@@ -114,3 +114,3 @@ * Delete a model | ||
*/ | ||
rawDestroy(itemTypeId: string): Promise<SchemaTypes.ItemTypeDestroyJobSchema>; | ||
rawDestroy(itemTypeId: string, queryParams?: SchemaTypes.ItemTypeDestroyHrefSchema): Promise<SchemaTypes.ItemTypeDestroyJobSchema>; | ||
} |
{ | ||
"name": "@datocms/cma-client", | ||
"version": "1.1.7", | ||
"version": "1.1.8", | ||
"description": "JS client for DatoCMS REST Content Management API", | ||
@@ -45,3 +45,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "73df11fe0f485d81d8a081d944f43eb55dac00a7" | ||
"gitHead": "0dc8369244a7251f162353e286e45acc69c41c56" | ||
} |
@@ -245,4 +245,7 @@ import * as Utils from '@datocms/rest-client-utils'; | ||
*/ | ||
destroy(itemTypeId: string | SimpleSchemaTypes.ItemTypeData) { | ||
return this.rawDestroy(Utils.toId(itemTypeId)).then((body) => | ||
destroy( | ||
itemTypeId: string | SimpleSchemaTypes.ItemTypeData, | ||
queryParams?: SimpleSchemaTypes.ItemTypeDestroyHrefSchema, | ||
) { | ||
return this.rawDestroy(Utils.toId(itemTypeId), queryParams).then((body) => | ||
Utils.deserializeResponseBody<SimpleSchemaTypes.ItemTypeDestroyJobSchema>( | ||
@@ -264,2 +267,3 @@ body, | ||
itemTypeId: string, | ||
queryParams?: SchemaTypes.ItemTypeDestroyHrefSchema, | ||
): Promise<SchemaTypes.ItemTypeDestroyJobSchema> { | ||
@@ -269,4 +273,5 @@ return this.client.request<SchemaTypes.ItemTypeDestroyJobSchema>({ | ||
url: `/item-types/${itemTypeId}`, | ||
queryParams, | ||
}); | ||
} | ||
} |
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
3028214
91203