@verdocs/js-sdk 2.0.25 → 2.1.0

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.
@@ -17,6 +17,13 @@ export declare const editPage: (endpoint: VerdocsEndpoint, templateId: string, s
17
17
  * Get a page from a template.
18
18
  */
19
19
  export declare const getPage: (endpoint: VerdocsEndpoint, templateId: string, sequence: number, thumbnail?: boolean) => Promise<any>;
20
+ export interface IPageImageResponse {
21
+ url: string;
22
+ }
23
+ /**
24
+ * Get a page image (PNG format) from a template.
25
+ */
26
+ export declare const getPageImage: (endpoint: VerdocsEndpoint, templateId: string, sequence: number) => Promise<IPageImageResponse>;
20
27
  /**
21
28
  * Delete a page from a template
22
29
  */
@@ -23,6 +23,14 @@ export var getPage = function (endpoint, templateId, sequence, thumbnail) {
23
23
  .get("/templates/".concat(templateId, "/pages/").concat(sequence).concat(thumbnail ? '?thumbnail=true' : ''))
24
24
  .then(function (r) { return r.data; });
25
25
  };
26
+ /**
27
+ * Get a page image (PNG format) from a template.
28
+ */
29
+ export var getPageImage = function (endpoint, templateId, sequence) {
30
+ return endpoint.api //
31
+ .get("/templates/".concat(templateId, "/pages/").concat(sequence, "/image"))
32
+ .then(function (r) { return r.data; });
33
+ };
26
34
  /**
27
35
  * Delete a page from a template
28
36
  */
@@ -174,10 +174,11 @@ export interface ITemplateFieldSetting {
174
174
  export interface IPage {
175
175
  template_id: string;
176
176
  document_id: string;
177
- template_document?: ITemplateDocument;
178
177
  sequence: number;
179
178
  page_number: number;
180
179
  thumbnail_url: string;
180
+ image_uri?: string | null;
181
+ template_document?: ITemplateDocument;
181
182
  fields?: ITemplateField[];
182
183
  }
183
184
  export interface IReminder {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verdocs/js-sdk",
3
- "version": "2.0.25",
3
+ "version": "2.1.0",
4
4
  "private": false,
5
5
  "homepage": "https://github.com/Verdocs/js-sdk",
6
6
  "description": "Verdocs JS SDK",