@verdocs/js-sdk 3.0.0 → 3.0.1
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/Types.d.ts +51 -0
- package/Organizations/Types.d.ts +19 -0
- package/Sessions/Types.d.ts +2 -0
- package/Users/Types.d.ts +2 -0
- package/package.json +1 -1
package/Envelopes/Types.d.ts
CHANGED
|
@@ -38,6 +38,7 @@ export interface IEnvelopesSearchResultEntry {
|
|
|
38
38
|
id: string;
|
|
39
39
|
canceled_at: string;
|
|
40
40
|
certificate_document_id: string;
|
|
41
|
+
/** @deprecated. New envelopes may have more than one document attached. */
|
|
41
42
|
envelope_document_id: string;
|
|
42
43
|
created_at: string;
|
|
43
44
|
histories: IHistory[];
|
|
@@ -98,6 +99,12 @@ export interface IRecipient {
|
|
|
98
99
|
phone: string | null;
|
|
99
100
|
profile_id: string;
|
|
100
101
|
role_name: string;
|
|
102
|
+
/**
|
|
103
|
+
* The sequence number indicates the order in which recipients act. Note that it is the workflow "level" not the
|
|
104
|
+
* recipient's individual index in the list. There may be multiple recipients with the same sequence. Recipients
|
|
105
|
+
* with the same sequence number may act independently, in parallel to each other (co-signers), as long as all
|
|
106
|
+
* Recipients with an earlier sequence number have completed their tasks.
|
|
107
|
+
*/
|
|
101
108
|
sequence: number;
|
|
102
109
|
status: TRecipientStatus;
|
|
103
110
|
type: TRecipientType;
|
|
@@ -114,11 +121,17 @@ export interface IEnvelopeDocument {
|
|
|
114
121
|
url: string;
|
|
115
122
|
}
|
|
116
123
|
export interface IDocumentFieldOptions {
|
|
124
|
+
/** The unique ID of the field */
|
|
117
125
|
id: string;
|
|
126
|
+
/** The X position of the field on the page. Self-placed fields will have an X value of 0. */
|
|
118
127
|
x: number;
|
|
128
|
+
/** The Y position of the field on the page. Self-placed fields will have an X value of 0. */
|
|
119
129
|
y: number;
|
|
130
|
+
/** For checkboxes, whether it is currently checked */
|
|
120
131
|
checked?: boolean;
|
|
132
|
+
/** For radio buttons, whether it is currently selected */
|
|
121
133
|
selected?: boolean;
|
|
134
|
+
/** The visible label for the field e.g. 'Not Applicable' */
|
|
122
135
|
value: string;
|
|
123
136
|
}
|
|
124
137
|
export interface IDocumentFieldSettings {
|
|
@@ -128,31 +141,47 @@ export interface IDocumentFieldSettings {
|
|
|
128
141
|
width?: number;
|
|
129
142
|
height?: number;
|
|
130
143
|
value?: number | string;
|
|
144
|
+
/** If the field has been filled in, this contains the current value */
|
|
131
145
|
result?: any;
|
|
146
|
+
/** Text field settings */
|
|
132
147
|
leading?: number;
|
|
133
148
|
alignment?: number;
|
|
134
149
|
upperCase?: boolean;
|
|
150
|
+
/** Dropdowns, checkboxes, radio groups */
|
|
135
151
|
options?: IDocumentFieldOptions[];
|
|
152
|
+
/** Signatures and Initials, result will be "signed" */
|
|
136
153
|
base64?: string;
|
|
137
154
|
hash?: string;
|
|
138
155
|
ip_address?: string;
|
|
139
156
|
signature_id?: string;
|
|
140
157
|
signed_at?: string;
|
|
158
|
+
/** Checkbox settings */
|
|
141
159
|
minimum_checked?: number;
|
|
142
160
|
maximum_checked?: number;
|
|
143
161
|
[key: string]: any;
|
|
144
162
|
}
|
|
145
163
|
export declare type TDocumentFieldType = 'signature' | 'initial' | 'checkbox_group' | 'radio_button_group' | 'textbox' | 'timestamp' | 'date' | 'dropdown' | 'textarea' | 'attachment' | 'payment';
|
|
146
164
|
export interface IDocumentField {
|
|
165
|
+
/**
|
|
166
|
+
* The ID of the document the field is for. For historical reasons, this is called `envelope_id` because documents
|
|
167
|
+
* were previously called envelopes.
|
|
168
|
+
*/
|
|
147
169
|
envelope_id: string;
|
|
170
|
+
/** The machine name of the field, e.g. `checkbox_groupP1-18` */
|
|
148
171
|
name: string;
|
|
172
|
+
/** If set, the placeholder/label for the field. */
|
|
149
173
|
label: string | null;
|
|
174
|
+
/** The 1-based page number the field is displayed on. "Self-placed" fields that the user must apply will be on page 0. */
|
|
150
175
|
page: number;
|
|
176
|
+
/** The ID of the role in the recipients list, e.g. `Recipient 2` */
|
|
151
177
|
recipient_role: string;
|
|
178
|
+
/** The type of the field */
|
|
152
179
|
type: TDocumentFieldType;
|
|
180
|
+
/** If true, the field will be required */
|
|
153
181
|
required: boolean;
|
|
154
182
|
settings?: IDocumentFieldSettings;
|
|
155
183
|
validator: string | null;
|
|
184
|
+
/** Not sent by the server. Used in the UI to identify prepared fields. */
|
|
156
185
|
prepared?: boolean;
|
|
157
186
|
}
|
|
158
187
|
/**
|
|
@@ -171,13 +200,16 @@ export interface IEnvelope {
|
|
|
171
200
|
updated_at: string;
|
|
172
201
|
canceled_at: string;
|
|
173
202
|
reminder_id: string | null;
|
|
203
|
+
/** @deprecated. New envelopes will support more than one document attachment so new code should no longer refer to this field. */
|
|
174
204
|
envelope_document_id: string;
|
|
175
205
|
certificate_document_id: string | null;
|
|
176
206
|
histories: IHistory[];
|
|
177
207
|
recipients: IRecipient[];
|
|
178
208
|
profile?: IProfile | null;
|
|
179
209
|
certificate?: IEnvelopeDocument | null;
|
|
210
|
+
/** @deprecated. New code should use `documents[]`. */
|
|
180
211
|
document?: IEnvelopeDocument | null;
|
|
212
|
+
/** Documents attached to this envelope */
|
|
181
213
|
documents?: IEnvelopeDocument[] | null;
|
|
182
214
|
fields?: IDocumentField[];
|
|
183
215
|
}
|
|
@@ -221,12 +253,31 @@ export interface IDocumentSearchOptions {
|
|
|
221
253
|
export declare type THistoryEvent = 'recipient:invited' | 'recipient:opened' | 'recipient:agreed' | 'recipient:signed' | 'recipient:submitted';
|
|
222
254
|
export declare type TEventDetail = 'in_app' | 'mail' | 'signer' | '';
|
|
223
255
|
export interface ICreateEnvelopeRole {
|
|
256
|
+
/** The type of role to create. Most participants in standard flows will be "signer" recipients. */
|
|
224
257
|
type: TRecipientType;
|
|
258
|
+
/**
|
|
259
|
+
* The Role name of the recipient. Please note this is not the person's name. It is the ID of the role, e.g.
|
|
260
|
+
* 'Recipient 1', 'Seller', etc. This must match one of the pre-defined roles in the template's Recipients list.
|
|
261
|
+
*/
|
|
225
262
|
name: string;
|
|
263
|
+
/** The full name of the recipient as it will be displayed in reports and queries, e.g. 'Paige Turner'. */
|
|
226
264
|
full_name: string;
|
|
265
|
+
/** The email address of the recipient. One of `email` or `phone` must be provided. */
|
|
227
266
|
email?: string;
|
|
267
|
+
/**
|
|
268
|
+
* The phone number of the recipient. One of `email` or `phone` must be provided. If `phone` is included, the
|
|
269
|
+
* recipient will receive an SMS notification for the document.
|
|
270
|
+
*/
|
|
228
271
|
phone?: string;
|
|
272
|
+
/**
|
|
273
|
+
* The 1-based sequence number for the recipient. This can be used to override the template's workflow. Recipients
|
|
274
|
+
* are processed in parallel for each matching sequence number (e.g. all recipients at level "1" may act in parallel)
|
|
275
|
+
* and in series between sequence numbers (e.g. all recipients at level "1" must complete their tasks before
|
|
276
|
+
* recipients at level "2" may act).
|
|
277
|
+
*/
|
|
229
278
|
sequence: number;
|
|
279
|
+
/** Whether the recipient may delegate their tasks to others. Should be false for most standard workflows. */
|
|
230
280
|
delegator: boolean;
|
|
281
|
+
/** A custom message to include in the email or SMS invitation. May be left blank for a default message. */
|
|
231
282
|
message: string;
|
|
232
283
|
}
|
package/Organizations/Types.d.ts
CHANGED
|
@@ -11,9 +11,28 @@ export interface IOrganization {
|
|
|
11
11
|
is_business: boolean;
|
|
12
12
|
/** If the organization is a business, its name. Note that a business name can be different from an organization name. */
|
|
13
13
|
business_name: string | null;
|
|
14
|
+
/** @deprecated. The organization primary contact email address. */
|
|
14
15
|
contact_email: string | null;
|
|
16
|
+
/** @deprecated. The organization's primary time zone. */
|
|
15
17
|
timezone: string | null;
|
|
18
|
+
/**
|
|
19
|
+
* If a Template published by the Organization is configured to be usable to create new Envelopes by users outside that
|
|
20
|
+
* Organization (`sender: 'everyone_as_creator'`), and that action would trigger a billing event, this field controls
|
|
21
|
+
* who is reponsible for that cost. If set to TRUE, the Organization that owns the template will be billed for its use.
|
|
22
|
+
* If set to FALSE, the requestor pays.
|
|
23
|
+
*
|
|
24
|
+
* This is deprecated in favor of a future per-template approach. Please contact support@verdocs.com to discuss your
|
|
25
|
+
* application requirements if you plan to use this functionality for an immediate integration.
|
|
26
|
+
*
|
|
27
|
+
* @deprecated
|
|
28
|
+
*/
|
|
16
29
|
envelope_responsible: boolean;
|
|
30
|
+
/** Web site URL */
|
|
31
|
+
url: string | null;
|
|
32
|
+
/** Creation date/time. */
|
|
33
|
+
created_at: string;
|
|
34
|
+
/** Last-update date/time. */
|
|
35
|
+
updated_at: string;
|
|
17
36
|
}
|
|
18
37
|
export interface ICreateApiKeyRequest {
|
|
19
38
|
name: string;
|
package/Sessions/Types.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export interface ISigningSessionRequest {
|
|
|
4
4
|
roleId: string;
|
|
5
5
|
inviteCode: string;
|
|
6
6
|
}
|
|
7
|
+
/** A Signing Session connects a caller to a role within an envelope, and can be used only for calls related to signing that envelope. */
|
|
7
8
|
export interface ISigningSession {
|
|
8
9
|
profile_id: string;
|
|
9
10
|
envelope_id: string;
|
|
@@ -19,6 +20,7 @@ export interface ISigningSession {
|
|
|
19
20
|
iat: number;
|
|
20
21
|
[key: string]: any;
|
|
21
22
|
}
|
|
23
|
+
/** A User Session connects a caller to a Verdocs profile, and can be used for any operations that profile may perform. */
|
|
22
24
|
export interface IUserSession {
|
|
23
25
|
sub: string;
|
|
24
26
|
email: string;
|
package/Users/Types.d.ts
CHANGED
|
@@ -29,6 +29,8 @@ export interface IProfile {
|
|
|
29
29
|
phone: string | null;
|
|
30
30
|
/** If true, this is the caller's "currently selected" profile. All operations will performed "as" this profile. */
|
|
31
31
|
current: boolean;
|
|
32
|
+
created_at: string;
|
|
33
|
+
updated_at: string;
|
|
32
34
|
/** The organization */
|
|
33
35
|
organization?: IOrganization;
|
|
34
36
|
/** The permissions assigned to the profilel _NOTE: Only present in the "current" profile._ */
|