@verdocs/js-sdk 2.0.22 → 2.0.24

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.
@@ -8,7 +8,7 @@ export interface ICreatePageParams {
8
8
  /**
9
9
  * Add a page to a template.
10
10
  */
11
- export declare const createPage: (endpoint: VerdocsEndpoint, templateId: string, params: IPage) => Promise<IPage>;
11
+ export declare const createPage: (endpoint: VerdocsEndpoint, templateId: string, params: ICreatePageParams) => Promise<IPage>;
12
12
  /**
13
13
  * Update a template page.
14
14
  */
@@ -71,6 +71,16 @@ export declare const createTemplate: (endpoint: VerdocsEndpoint, params: ITempla
71
71
  * ```
72
72
  */
73
73
  export declare const updateTemplate: (endpoint: VerdocsEndpoint, templateId: string, params: Partial<ITemplateCreateParams>) => Promise<ITemplate>;
74
+ /**
75
+ * Delete a template.
76
+ *
77
+ * ```typescript
78
+ * import {Templates} from '@verdocs/js-sdk/Templates';
79
+ *
80
+ * await Templates.deleteTemplate((VerdocsEndpoint.getDefault(), '83da3d70-7857-4392-b876-c4592a304bc9');
81
+ * ```
82
+ */
83
+ export declare const deleteTemplate: (endpoint: VerdocsEndpoint, templateId: string) => Promise<any>;
74
84
  /**
75
85
  * Search for templates matching various criteria.
76
86
  *
@@ -113,6 +113,20 @@ export var updateTemplate = function (endpoint, templateId, params) {
113
113
  .put("/templates/".concat(templateId), params)
114
114
  .then(function (r) { return r.data; });
115
115
  };
116
+ /**
117
+ * Delete a template.
118
+ *
119
+ * ```typescript
120
+ * import {Templates} from '@verdocs/js-sdk/Templates';
121
+ *
122
+ * await Templates.deleteTemplate((VerdocsEndpoint.getDefault(), '83da3d70-7857-4392-b876-c4592a304bc9');
123
+ * ```
124
+ */
125
+ export var deleteTemplate = function (endpoint, templateId) {
126
+ return endpoint.api //
127
+ .delete("/templates/".concat(templateId))
128
+ .then(function (r) { return r.data; });
129
+ };
116
130
  /**
117
131
  * Search for templates matching various criteria.
118
132
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verdocs/js-sdk",
3
- "version": "2.0.22",
3
+ "version": "2.0.24",
4
4
  "private": false,
5
5
  "homepage": "https://github.com/Verdocs/js-sdk",
6
6
  "description": "Verdocs JS SDK",