@@ -2,7 +2,7 @@ import cloneDeep from 'lodash/cloneDeep'
22import error from '../core/contentstackError'
33import { UserCollection } from '../user/index'
44import { Role } from './roles/index'
5- import { create , query , update , fetch } from '../entity'
5+ import { create , query , update , fetch , deleteEntity } from '../entity'
66import { ContentType } from './contentType/index'
77import { GlobalField } from './globalField/index'
88import { DeliveryToken } from './deliveryToken/index'
@@ -259,7 +259,7 @@ export function Stack (http, data) {
259259 }
260260
261261 /**
262- * @description Management Tokens are tokens that provide you with read-write access to the content of your stack.
262+ * @description Management Tokens are tokens that provide you with read-write access to the content of your stack.
263263 * @param {String } managementTokenUid The UID of the Management Token field you want to get details.
264264 * @returns {ManagementToken } Instance of ManagementToken.
265265 * @example
@@ -730,6 +730,21 @@ export function Stack (http, data) {
730730 }
731731 return new Taxonomy ( http , data )
732732 }
733+
734+ /**
735+ * @description The delete stack call lets you delete the stack.
736+ * @memberof Stack
737+ * @func delete
738+ * @returns {Promise<Stack.Stack> } Promise for Stack instance
739+ * @example
740+ * import * as contentstack from '@contentstack/management'
741+ * const client = contentstack.client()
742+ *
743+ * client.stack({ api_key: 'api_key'}).delete()
744+ * .then((stack) => console.log(stack))
745+ *
746+ */
747+ this . delete = deleteEntity ( http )
733748 } else {
734749 /**
735750 * @description The Create stack call creates a new stack in your Contentstack account.
0 commit comments