@verdocs/js-sdk 2.0.23 → 2.0.25

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.
@@ -16,7 +16,7 @@ export declare const editPage: (endpoint: VerdocsEndpoint, templateId: string, s
16
16
  /**
17
17
  * Get a page from a template.
18
18
  */
19
- export declare const getPage: (endpoint: VerdocsEndpoint, templateId: string, sequence: string) => Promise<any>;
19
+ export declare const getPage: (endpoint: VerdocsEndpoint, templateId: string, sequence: number, thumbnail?: boolean) => Promise<any>;
20
20
  /**
21
21
  * Delete a page from a template
22
22
  */
@@ -17,9 +17,10 @@ export var editPage = function (endpoint, templateId, sequence) {
17
17
  /**
18
18
  * Get a page from a template.
19
19
  */
20
- export var getPage = function (endpoint, templateId, sequence) {
20
+ export var getPage = function (endpoint, templateId, sequence, thumbnail) {
21
+ if (thumbnail === void 0) { thumbnail = false; }
21
22
  return endpoint.api //
22
- .get("/templates/".concat(templateId, "/pages/").concat(sequence))
23
+ .get("/templates/".concat(templateId, "/pages/").concat(sequence).concat(thumbnail ? '?thumbnail=true' : ''))
23
24
  .then(function (r) { return r.data; });
24
25
  };
25
26
  /**
@@ -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.23",
3
+ "version": "2.0.25",
4
4
  "private": false,
5
5
  "homepage": "https://github.com/Verdocs/js-sdk",
6
6
  "description": "Verdocs JS SDK",