@verdocs/js-sdk 3.0.6 → 3.0.7
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/Envelopes/Envelopes.d.ts +5 -0
- package/Envelopes/Envelopes.js +11 -0
- package/Templates/Types.d.ts +74 -3
- package/package.json +1 -1
package/Envelopes/Envelopes.d.ts
CHANGED
|
@@ -115,3 +115,8 @@ export declare const updateEnvelopeField: (endpoint: VerdocsEndpoint, envelopeId
|
|
|
115
115
|
* signature for a Recipient, then call `Documents.updateDocumentFieldSignature()` to attach it to a field.
|
|
116
116
|
*/
|
|
117
117
|
export declare const updateEnvelopeFieldSignature: (endpoint: VerdocsEndpoint, envelopeId: string, fieldName: string, signatureId: string) => Promise<IDocumentFieldSettings>;
|
|
118
|
+
/**
|
|
119
|
+
* Update a Document signature field. Signature fields are ID-driven. Call `Document.createSignature()` first to create a
|
|
120
|
+
* signature for a Recipient, then call `Documents.updateDocumentFieldSignature()` to attach it to a field.
|
|
121
|
+
*/
|
|
122
|
+
export declare const updateEnvelopeFieldInitials: (endpoint: VerdocsEndpoint, envelopeId: string, fieldName: string, initialId: string) => Promise<IDocumentFieldSettings>;
|
package/Envelopes/Envelopes.js
CHANGED
|
@@ -218,3 +218,14 @@ export var updateEnvelopeFieldSignature = function (endpoint, envelopeId, fieldN
|
|
|
218
218
|
.then(function (r) { return r.data; })];
|
|
219
219
|
});
|
|
220
220
|
}); };
|
|
221
|
+
/**
|
|
222
|
+
* Update a Document signature field. Signature fields are ID-driven. Call `Document.createSignature()` first to create a
|
|
223
|
+
* signature for a Recipient, then call `Documents.updateDocumentFieldSignature()` to attach it to a field.
|
|
224
|
+
*/
|
|
225
|
+
export var updateEnvelopeFieldInitials = function (endpoint, envelopeId, fieldName, initialId) { return __awaiter(void 0, void 0, void 0, function () {
|
|
226
|
+
return __generator(this, function (_a) {
|
|
227
|
+
return [2 /*return*/, endpoint.api //
|
|
228
|
+
.put("/envelopes/".concat(envelopeId, "/fields/").concat(fieldName, "/initial/").concat(initialId))
|
|
229
|
+
.then(function (r) { return r.data; })];
|
|
230
|
+
});
|
|
231
|
+
}); };
|
package/Templates/Types.d.ts
CHANGED
|
@@ -4,27 +4,94 @@ import { IOrganization } from '../Organizations/Types';
|
|
|
4
4
|
* Documents to sign.
|
|
5
5
|
*/
|
|
6
6
|
export interface ITemplate {
|
|
7
|
+
/**
|
|
8
|
+
* The unique ID of the template.
|
|
9
|
+
*/
|
|
7
10
|
id: string;
|
|
8
11
|
name: string;
|
|
12
|
+
/**
|
|
13
|
+
* Optional description for the template.
|
|
14
|
+
*/
|
|
9
15
|
description?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Who may create new documents from the template.
|
|
18
|
+
*/
|
|
10
19
|
sender: TTemplateSender;
|
|
20
|
+
/**
|
|
21
|
+
* The template's owner/creator.
|
|
22
|
+
*/
|
|
11
23
|
profile_id: string;
|
|
24
|
+
/**
|
|
25
|
+
* Organization the template lives in.
|
|
26
|
+
*/
|
|
12
27
|
organization_id: string;
|
|
28
|
+
/**
|
|
29
|
+
* Number of times the template has been used.
|
|
30
|
+
*/
|
|
13
31
|
counter: number;
|
|
32
|
+
/**
|
|
33
|
+
* Number of times the template has been "starred".
|
|
34
|
+
*/
|
|
14
35
|
star_counter: number;
|
|
36
|
+
/**
|
|
37
|
+
* If true, the template is only visible to the creator. If false, the template will also be visible to the user's
|
|
38
|
+
* organization, if any.
|
|
39
|
+
*/
|
|
15
40
|
is_personal: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* If true, the template is visible publicly. Note that this does not necessarily mean it is also visible to the
|
|
43
|
+
* user's organization. It may be desirable to create documents that are public but that do not appear in the
|
|
44
|
+
* organization's shared templates list. To achieve this, set both `is_personal` and `is_public` to TRUE.
|
|
45
|
+
*/
|
|
16
46
|
is_public: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Creation date/time.
|
|
49
|
+
*/
|
|
17
50
|
created_at: string;
|
|
51
|
+
/**
|
|
52
|
+
* Last-update date/time.
|
|
53
|
+
*/
|
|
18
54
|
updated_at: string;
|
|
55
|
+
/**
|
|
56
|
+
* Last-used date/time (when the template was used to create a document).
|
|
57
|
+
*/
|
|
19
58
|
last_used_at: string;
|
|
59
|
+
/**
|
|
60
|
+
* Secret token associated with the document. Note that this field is marked optional because it is only visible to
|
|
61
|
+
* the creator. This token is used in some operations such as creating shareable links to the template.
|
|
62
|
+
*/
|
|
20
63
|
token?: string;
|
|
64
|
+
/**
|
|
65
|
+
* If set, the template has reminders enabled.
|
|
66
|
+
*/
|
|
21
67
|
reminder_id?: string;
|
|
68
|
+
/**
|
|
69
|
+
* If reminders are enabled, the reminder configuration.
|
|
70
|
+
*/
|
|
22
71
|
reminder?: IReminder;
|
|
72
|
+
/**
|
|
73
|
+
* If set, the template has been post-processed (rendered server-side for display in Web and Mobile clients).
|
|
74
|
+
*/
|
|
23
75
|
processed?: boolean;
|
|
76
|
+
/**
|
|
77
|
+
* If the template was created within an organization, details about that organization.
|
|
78
|
+
*/
|
|
24
79
|
organization?: IOrganization;
|
|
80
|
+
/**
|
|
81
|
+
* Roles (recipients) attached to the template. (Note that roles are uniquely identified by name rather than ID.)
|
|
82
|
+
*/
|
|
25
83
|
roles?: IRole[];
|
|
84
|
+
/**
|
|
85
|
+
* Pages attached to the template. Note that this is all of the pages for all document attachments in sequential order.
|
|
86
|
+
*/
|
|
26
87
|
pages?: IPage[];
|
|
88
|
+
/**
|
|
89
|
+
* @deprecated. New code should use `template_documents`.
|
|
90
|
+
*/
|
|
27
91
|
template_document?: ITemplateDocument;
|
|
92
|
+
/**
|
|
93
|
+
* File attachments for this template.
|
|
94
|
+
*/
|
|
28
95
|
template_documents?: ITemplateDocument[];
|
|
29
96
|
}
|
|
30
97
|
/**
|
|
@@ -191,9 +258,13 @@ export interface ITemplateFieldSetting {
|
|
|
191
258
|
export interface IPage {
|
|
192
259
|
template_id: string;
|
|
193
260
|
document_id: string;
|
|
194
|
-
/**
|
|
261
|
+
/**
|
|
262
|
+
* Note: Page numbers are 1-based
|
|
263
|
+
*/
|
|
195
264
|
sequence: number;
|
|
196
|
-
/**
|
|
265
|
+
/**
|
|
266
|
+
* @deprecated. New code should use `sequence`
|
|
267
|
+
*/
|
|
197
268
|
page_number: number;
|
|
198
269
|
thumbnail_url: string;
|
|
199
270
|
/**
|
|
@@ -203,7 +274,7 @@ export interface IPage {
|
|
|
203
274
|
image_uri?: string | null;
|
|
204
275
|
/**
|
|
205
276
|
* If the page was rendered server-side and the caller has access to view it, this will contain the signed URI
|
|
206
|
-
* to access it.
|
|
277
|
+
* to access it. NOTE: These URIs include short expirations and should never be cached or shared.
|
|
207
278
|
*/
|
|
208
279
|
display_uri?: string | null;
|
|
209
280
|
template_document?: ITemplateDocument;
|