@verdocs/js-sdk 3.0.0 → 3.0.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.
@@ -1,4 +1,5 @@
1
1
  import { IProfile } from '../Users/Types';
2
+ import { IPage } from '../Templates/Types';
2
3
  export declare type TRecipientAction = 'submit' | 'decline' | 'prepare' | 'update';
3
4
  export interface ISigningSessionRequest {
4
5
  envelopeId: string;
@@ -34,10 +35,15 @@ export interface IInPersonAccessKey {
34
35
  export declare type TEnvelopeStatus = 'complete' | 'pending' | 'in progress' | 'declined' | 'canceled';
35
36
  export declare type TRecipientStatus = 'invited' | 'opened' | 'signed' | 'submitted' | 'canceled' | 'pending' | 'declined';
36
37
  export declare type TRecipientType = 'signer' | 'cc' | 'approver';
38
+ /**
39
+ * One entry in an envelope search result.
40
+ * NOTE: Many of the fields here are undefined unless "summary=true" is included in the search terms
41
+ */
37
42
  export interface IEnvelopesSearchResultEntry {
38
43
  id: string;
39
44
  canceled_at: string;
40
45
  certificate_document_id: string;
46
+ /** @deprecated. New envelopes may have more than one document attached. */
41
47
  envelope_document_id: string;
42
48
  created_at: string;
43
49
  histories: IHistory[];
@@ -98,6 +104,12 @@ export interface IRecipient {
98
104
  phone: string | null;
99
105
  profile_id: string;
100
106
  role_name: string;
107
+ /**
108
+ * The sequence number indicates the order in which recipients act. Note that it is the workflow "level" not the
109
+ * recipient's individual index in the list. There may be multiple recipients with the same sequence. Recipients
110
+ * with the same sequence number may act independently, in parallel to each other (co-signers), as long as all
111
+ * Recipients with an earlier sequence number have completed their tasks.
112
+ */
101
113
  sequence: number;
102
114
  status: TRecipientStatus;
103
115
  type: TRecipientType;
@@ -112,13 +124,20 @@ export interface IEnvelopeDocument {
112
124
  page_numbers: number;
113
125
  updated_at: string;
114
126
  url: string;
127
+ pages?: IPage[];
115
128
  }
116
129
  export interface IDocumentFieldOptions {
130
+ /** The unique ID of the field */
117
131
  id: string;
132
+ /** The X position of the field on the page. Self-placed fields will have an X value of 0. */
118
133
  x: number;
134
+ /** The Y position of the field on the page. Self-placed fields will have an X value of 0. */
119
135
  y: number;
136
+ /** For checkboxes, whether it is currently checked */
120
137
  checked?: boolean;
138
+ /** For radio buttons, whether it is currently selected */
121
139
  selected?: boolean;
140
+ /** The visible label for the field e.g. 'Not Applicable' */
122
141
  value: string;
123
142
  }
124
143
  export interface IDocumentFieldSettings {
@@ -128,31 +147,47 @@ export interface IDocumentFieldSettings {
128
147
  width?: number;
129
148
  height?: number;
130
149
  value?: number | string;
150
+ /** If the field has been filled in, this contains the current value */
131
151
  result?: any;
152
+ /** Text field settings */
132
153
  leading?: number;
133
154
  alignment?: number;
134
155
  upperCase?: boolean;
156
+ /** Dropdowns, checkboxes, radio groups */
135
157
  options?: IDocumentFieldOptions[];
158
+ /** Signatures and Initials, result will be "signed" */
136
159
  base64?: string;
137
160
  hash?: string;
138
161
  ip_address?: string;
139
162
  signature_id?: string;
140
163
  signed_at?: string;
164
+ /** Checkbox settings */
141
165
  minimum_checked?: number;
142
166
  maximum_checked?: number;
143
167
  [key: string]: any;
144
168
  }
145
169
  export declare type TDocumentFieldType = 'signature' | 'initial' | 'checkbox_group' | 'radio_button_group' | 'textbox' | 'timestamp' | 'date' | 'dropdown' | 'textarea' | 'attachment' | 'payment';
146
170
  export interface IDocumentField {
171
+ /**
172
+ * The ID of the document the field is for. For historical reasons, this is called `envelope_id` because documents
173
+ * were previously called envelopes.
174
+ */
147
175
  envelope_id: string;
176
+ /** The machine name of the field, e.g. `checkbox_groupP1-18` */
148
177
  name: string;
178
+ /** If set, the placeholder/label for the field. */
149
179
  label: string | null;
180
+ /** The 1-based page number the field is displayed on. "Self-placed" fields that the user must apply will be on page 0. */
150
181
  page: number;
182
+ /** The ID of the role in the recipients list, e.g. `Recipient 2` */
151
183
  recipient_role: string;
184
+ /** The type of the field */
152
185
  type: TDocumentFieldType;
186
+ /** If true, the field will be required */
153
187
  required: boolean;
154
188
  settings?: IDocumentFieldSettings;
155
189
  validator: string | null;
190
+ /** Not sent by the server. Used in the UI to identify prepared fields. */
156
191
  prepared?: boolean;
157
192
  }
158
193
  /**
@@ -171,13 +206,16 @@ export interface IEnvelope {
171
206
  updated_at: string;
172
207
  canceled_at: string;
173
208
  reminder_id: string | null;
209
+ /** @deprecated. New envelopes will support more than one document attachment so new code should no longer refer to this field. */
174
210
  envelope_document_id: string;
175
211
  certificate_document_id: string | null;
176
212
  histories: IHistory[];
177
213
  recipients: IRecipient[];
178
214
  profile?: IProfile | null;
179
215
  certificate?: IEnvelopeDocument | null;
216
+ /** @deprecated. New code should use `documents[]`. */
180
217
  document?: IEnvelopeDocument | null;
218
+ /** Documents attached to this envelope */
181
219
  documents?: IEnvelopeDocument[] | null;
182
220
  fields?: IDocumentField[];
183
221
  }
@@ -221,12 +259,31 @@ export interface IDocumentSearchOptions {
221
259
  export declare type THistoryEvent = 'recipient:invited' | 'recipient:opened' | 'recipient:agreed' | 'recipient:signed' | 'recipient:submitted';
222
260
  export declare type TEventDetail = 'in_app' | 'mail' | 'signer' | '';
223
261
  export interface ICreateEnvelopeRole {
262
+ /** The type of role to create. Most participants in standard flows will be "signer" recipients. */
224
263
  type: TRecipientType;
264
+ /**
265
+ * The Role name of the recipient. Please note this is not the person's name. It is the ID of the role, e.g.
266
+ * 'Recipient 1', 'Seller', etc. This must match one of the pre-defined roles in the template's Recipients list.
267
+ */
225
268
  name: string;
269
+ /** The full name of the recipient as it will be displayed in reports and queries, e.g. 'Paige Turner'. */
226
270
  full_name: string;
271
+ /** The email address of the recipient. One of `email` or `phone` must be provided. */
227
272
  email?: string;
273
+ /**
274
+ * The phone number of the recipient. One of `email` or `phone` must be provided. If `phone` is included, the
275
+ * recipient will receive an SMS notification for the document.
276
+ */
228
277
  phone?: string;
278
+ /**
279
+ * The 1-based sequence number for the recipient. This can be used to override the template's workflow. Recipients
280
+ * are processed in parallel for each matching sequence number (e.g. all recipients at level "1" may act in parallel)
281
+ * and in series between sequence numbers (e.g. all recipients at level "1" must complete their tasks before
282
+ * recipients at level "2" may act).
283
+ */
229
284
  sequence: number;
285
+ /** Whether the recipient may delegate their tasks to others. Should be false for most standard workflows. */
230
286
  delegator: boolean;
287
+ /** A custom message to include in the email or SMS invitation. May be left blank for a default message. */
231
288
  message: string;
232
289
  }
@@ -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;
@@ -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;
@@ -162,6 +162,7 @@ export interface ITemplateDocument {
162
162
  template_id: string;
163
163
  mime: string;
164
164
  thumbnail_url: string;
165
+ pages?: IPage[];
165
166
  }
166
167
  export interface ITemplateField {
167
168
  name: string;
@@ -189,10 +190,20 @@ export interface ITemplateFieldSetting {
189
190
  export interface IPage {
190
191
  template_id: string;
191
192
  document_id: string;
193
+ /** Note: Page numbers are 1-based */
192
194
  sequence: number;
195
+ /** @deprecated. New code should use `sequence` */
193
196
  page_number: number;
194
197
  thumbnail_url: string;
198
+ /**
199
+ * The storage location for the page once rendered server-side. This can be used to determine whether a page has
200
+ * finished rendering, but cannot be accessed directly - client applications should use display_uri instead.
201
+ */
195
202
  image_uri?: string | null;
203
+ /**
204
+ * If the page was rendered server-side and the caller has access to view it, this will contain the signed URI
205
+ * to access it. Note that these URIs include short expirations and should never be cached.
206
+ */
196
207
  display_uri?: string | null;
197
208
  template_document?: ITemplateDocument;
198
209
  fields?: ITemplateField[];
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._ */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verdocs/js-sdk",
3
- "version": "3.0.0",
3
+ "version": "3.0.2",
4
4
  "private": false,
5
5
  "homepage": "https://github.com/Verdocs/js-sdk",
6
6
  "description": "Verdocs JS SDK",