@verdocs/js-sdk 2.0.25 → 2.1.2
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.
- package/Templates/Pages.d.ts +7 -0
- package/Templates/Pages.js +8 -0
- package/Templates/Types.d.ts +33 -16
- package/package.json +1 -1
package/Templates/Pages.d.ts
CHANGED
|
@@ -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
|
*/
|
package/Templates/Pages.js
CHANGED
|
@@ -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
|
*/
|
package/Templates/Types.d.ts
CHANGED
|
@@ -1,26 +1,35 @@
|
|
|
1
1
|
import { IOrganization } from '../Organizations/Types';
|
|
2
|
+
/**
|
|
3
|
+
* A reusable template for creating signable instruments. Templates are used to create Envelopes which contain
|
|
4
|
+
* Documents to sign.
|
|
5
|
+
*/
|
|
2
6
|
export interface ITemplate {
|
|
3
|
-
template_document?: ITemplateDocument;
|
|
4
|
-
pages?: IPage[];
|
|
5
|
-
roles?: IRole[];
|
|
6
|
-
counter?: number;
|
|
7
|
-
star_counter?: number;
|
|
8
|
-
name: string;
|
|
9
7
|
id: string;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
name: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
sender: TTemplateSender;
|
|
11
|
+
profile_id: string;
|
|
12
|
+
organization_id: string;
|
|
13
|
+
counter: number;
|
|
14
|
+
star_counter: number;
|
|
15
|
+
is_personal: boolean;
|
|
16
|
+
is_public: boolean;
|
|
17
|
+
created_at: string;
|
|
18
|
+
updated_at: string;
|
|
19
|
+
last_used_at: string;
|
|
14
20
|
token?: string;
|
|
15
21
|
reminder_id?: string;
|
|
16
22
|
reminder?: IReminder;
|
|
17
|
-
|
|
18
|
-
is_personal?: boolean;
|
|
19
|
-
is_public?: boolean;
|
|
20
|
-
sender?: TTemplateSender;
|
|
21
|
-
description?: string;
|
|
23
|
+
processed?: boolean;
|
|
22
24
|
organization?: IOrganization;
|
|
25
|
+
roles?: IRole[];
|
|
26
|
+
pages?: IPage[];
|
|
27
|
+
template_document?: ITemplateDocument;
|
|
28
|
+
template_documents?: ITemplateDocument[];
|
|
23
29
|
}
|
|
30
|
+
/**
|
|
31
|
+
* Some template search and list endpoints return only a partial set of fields for each entry via this structure.
|
|
32
|
+
*/
|
|
24
33
|
export interface ITemplateSummaryEntry {
|
|
25
34
|
id: string;
|
|
26
35
|
name: string;
|
|
@@ -124,6 +133,9 @@ export interface IStar {
|
|
|
124
133
|
template_id: string;
|
|
125
134
|
profile_id: string;
|
|
126
135
|
}
|
|
136
|
+
/**
|
|
137
|
+
* An individual recipient, CC, or other party in a signing flow.
|
|
138
|
+
*/
|
|
127
139
|
export interface IRole {
|
|
128
140
|
template_id: string;
|
|
129
141
|
name: string;
|
|
@@ -137,6 +149,9 @@ export interface IRole {
|
|
|
137
149
|
phone?: string;
|
|
138
150
|
rgba?: string;
|
|
139
151
|
}
|
|
152
|
+
/**
|
|
153
|
+
* A file attached to the template for display/signing.
|
|
154
|
+
*/
|
|
140
155
|
export interface ITemplateDocument {
|
|
141
156
|
url: string;
|
|
142
157
|
name: string;
|
|
@@ -174,10 +189,12 @@ export interface ITemplateFieldSetting {
|
|
|
174
189
|
export interface IPage {
|
|
175
190
|
template_id: string;
|
|
176
191
|
document_id: string;
|
|
177
|
-
template_document?: ITemplateDocument;
|
|
178
192
|
sequence: number;
|
|
179
193
|
page_number: number;
|
|
180
194
|
thumbnail_url: string;
|
|
195
|
+
image_uri?: string | null;
|
|
196
|
+
display_uri?: string | null;
|
|
197
|
+
template_document?: ITemplateDocument;
|
|
181
198
|
fields?: ITemplateField[];
|
|
182
199
|
}
|
|
183
200
|
export interface IReminder {
|