@verdocs/js-sdk 4.2.2 → 4.2.4
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/dist/index.d.mts +144 -223
- package/dist/index.d.ts +144 -223
- package/dist/index.js +7 -86
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -82
- package/dist/index.mjs.map +1 -1
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1371,77 +1371,63 @@ declare const getEnvelopes: (endpoint: VerdocsEndpoint, params?: IListEnvelopesP
|
|
|
1371
1371
|
*/
|
|
1372
1372
|
declare const createInitials: (endpoint: VerdocsEndpoint, name: string, initials: Blob) => Promise<IInitial>;
|
|
1373
1373
|
/**
|
|
1374
|
-
* KBA is not required at this time.
|
|
1375
|
-
* field here and that in the Recipient object, this object should be considered authoritative
|
|
1376
|
-
* (this can happen if the envelope sender updates the setting after the recipient has already
|
|
1377
|
-
* been invited).
|
|
1374
|
+
* KBA is not required at this time.
|
|
1378
1375
|
*/
|
|
1379
|
-
interface
|
|
1376
|
+
interface IRecipientKbaStepNone {
|
|
1380
1377
|
envelope_id: string;
|
|
1381
1378
|
role_name: string;
|
|
1382
|
-
|
|
1379
|
+
kba_step: "none";
|
|
1383
1380
|
}
|
|
1384
1381
|
/**
|
|
1385
1382
|
* KBA has been completed and no further action is required.
|
|
1386
1383
|
*/
|
|
1387
|
-
interface
|
|
1384
|
+
interface IRecipientKbaStepComplete {
|
|
1388
1385
|
envelope_id: string;
|
|
1389
1386
|
role_name: string;
|
|
1390
|
-
|
|
1391
|
-
kba_completed: true;
|
|
1392
|
-
kba_method: string;
|
|
1387
|
+
kba_step: "complete";
|
|
1393
1388
|
}
|
|
1394
1389
|
/**
|
|
1395
1390
|
* A PIN code is required. Prompt the user to enter this PIN, and submit it via `submitKbaPin()`.
|
|
1396
1391
|
*/
|
|
1397
|
-
interface
|
|
1392
|
+
interface IRecipientKbaStepPin {
|
|
1398
1393
|
envelope_id: string;
|
|
1399
1394
|
role_name: string;
|
|
1400
|
-
|
|
1401
|
-
kba_completed: false;
|
|
1402
|
-
kba_method: "pin";
|
|
1395
|
+
kba_step: "pin";
|
|
1403
1396
|
}
|
|
1404
1397
|
/**
|
|
1405
1398
|
* A full identity verification is required. Prompt the user for their address and other (optional)
|
|
1406
1399
|
* details and submit them via `submitKbaIdentity()`.
|
|
1407
1400
|
*/
|
|
1408
|
-
interface
|
|
1401
|
+
interface IRecipientKbaStepIdentity {
|
|
1409
1402
|
envelope_id: string;
|
|
1410
1403
|
role_name: string;
|
|
1411
|
-
|
|
1412
|
-
kba_completed: false;
|
|
1413
|
-
kba_method: "identity";
|
|
1404
|
+
kba_step: "identity";
|
|
1414
1405
|
}
|
|
1415
1406
|
/**
|
|
1416
|
-
*
|
|
1417
|
-
*
|
|
1418
|
-
* Note that this response may be issued more than once if multiple challenges are required.
|
|
1407
|
+
* If a positive identification was not possible, the user may be asked to answer 1 or more
|
|
1408
|
+
* challenge questions via this response. They should be submitted via `submitKbaChallengeResponse()`.
|
|
1419
1409
|
*/
|
|
1420
|
-
interface
|
|
1410
|
+
interface IRecipientKbaStepChallenge {
|
|
1421
1411
|
envelope_id: string;
|
|
1422
1412
|
role_name: string;
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
kba_method: "challenge";
|
|
1426
|
-
challenges: {
|
|
1413
|
+
kba_step: "challenge";
|
|
1414
|
+
questions: {
|
|
1427
1415
|
type: string;
|
|
1428
1416
|
message: string;
|
|
1429
|
-
options: string[];
|
|
1417
|
+
options: (string | number)[];
|
|
1430
1418
|
}[];
|
|
1431
1419
|
}
|
|
1432
1420
|
/**
|
|
1433
1421
|
* Identity verification has failed. The user should be shown the message included. No further
|
|
1434
1422
|
* signing operations may be performed.
|
|
1435
1423
|
*/
|
|
1436
|
-
interface
|
|
1424
|
+
interface IRecipientKbaStepFailed {
|
|
1437
1425
|
envelope_id: string;
|
|
1438
1426
|
role_name: string;
|
|
1439
|
-
|
|
1440
|
-
kba_completed: false;
|
|
1441
|
-
kba_method: "failed";
|
|
1427
|
+
kba_step: "failed";
|
|
1442
1428
|
message: string;
|
|
1443
1429
|
}
|
|
1444
|
-
type
|
|
1430
|
+
type TRecipientKbaStep = IRecipientKbaStepNone | IRecipientKbaStepComplete | IRecipientKbaStepPin | IRecipientKbaStepIdentity | IRecipientKbaStepChallenge | IRecipientKbaStepFailed;
|
|
1445
1431
|
/**
|
|
1446
1432
|
* Get the current KBA status. Note that this may only be called by the recipient and requires a
|
|
1447
1433
|
* valid signing session to proceed. Although the Recipient object itself contains indications of
|
|
@@ -1449,11 +1435,11 @@ type TRecipientKbaStatus = IRecipientKbaStatusNotRequired | IRecipientKbaStatusC
|
|
|
1449
1435
|
* `recipient.kba_method` is set (not null), and `recipient.kba_completed` is false, this endpoint
|
|
1450
1436
|
* should be called to determine the next KBA step required.
|
|
1451
1437
|
*/
|
|
1452
|
-
declare const
|
|
1438
|
+
declare const getKbaStep: (endpoint: VerdocsEndpoint, envelopeId: string, roleName: string) => Promise<IRecipientKbaStepNone | IRecipientKbaStepComplete | IRecipientKbaStepPin | IRecipientKbaStepIdentity | IRecipientKbaStepChallenge | IRecipientKbaStepFailed>;
|
|
1453
1439
|
/**
|
|
1454
1440
|
* Submit a response to a KBA PIN challenge.
|
|
1455
1441
|
*/
|
|
1456
|
-
declare const submitKbaPin: (endpoint: VerdocsEndpoint, envelopeId: string, roleName: string, pin: string) => Promise<
|
|
1442
|
+
declare const submitKbaPin: (endpoint: VerdocsEndpoint, envelopeId: string, roleName: string, pin: string) => Promise<IRecipientKbaStepNone | IRecipientKbaStepComplete | IRecipientKbaStepPin | IRecipientKbaStepIdentity | IRecipientKbaStepChallenge | IRecipientKbaStepFailed>;
|
|
1457
1443
|
interface IKbaIdentity {
|
|
1458
1444
|
address1: string;
|
|
1459
1445
|
address2?: string;
|
|
@@ -1467,11 +1453,18 @@ interface IKbaIdentity {
|
|
|
1467
1453
|
/**
|
|
1468
1454
|
* Submit an identity response to a KBA challenge.
|
|
1469
1455
|
*/
|
|
1470
|
-
declare const submitKbaIdentity: (endpoint: VerdocsEndpoint, envelopeId: string, roleName: string, identity: IKbaIdentity) => Promise<
|
|
1456
|
+
declare const submitKbaIdentity: (endpoint: VerdocsEndpoint, envelopeId: string, roleName: string, identity: IKbaIdentity) => Promise<IRecipientKbaStepNone | IRecipientKbaStepComplete | IRecipientKbaStepPin | IRecipientKbaStepIdentity | IRecipientKbaStepChallenge | IRecipientKbaStepFailed>;
|
|
1457
|
+
interface IKbaChallengeResponse {
|
|
1458
|
+
responses: {
|
|
1459
|
+
type: string;
|
|
1460
|
+
answer: string | number;
|
|
1461
|
+
}[];
|
|
1462
|
+
}
|
|
1471
1463
|
/**
|
|
1472
|
-
* Submit an identity response to a KBA challenge.
|
|
1464
|
+
* Submit an identity response to a KBA challenge. Answers should be submitted in the same order as
|
|
1465
|
+
* the challenges were listed in `IRecipientKbaStepChallenge.questions`.
|
|
1473
1466
|
*/
|
|
1474
|
-
declare const submitKbaChallengeResponse: (endpoint: VerdocsEndpoint, envelopeId: string, roleName: string, response:
|
|
1467
|
+
declare const submitKbaChallengeResponse: (endpoint: VerdocsEndpoint, envelopeId: string, roleName: string, response: IKbaChallengeResponse) => Promise<IRecipientKbaStepNone | IRecipientKbaStepComplete | IRecipientKbaStepPin | IRecipientKbaStepIdentity | IRecipientKbaStepChallenge | IRecipientKbaStepFailed>;
|
|
1475
1468
|
/**
|
|
1476
1469
|
* Update a recipient's status block
|
|
1477
1470
|
*/
|
|
@@ -2111,6 +2104,117 @@ declare const getWebhooks: (endpoint: VerdocsEndpoint) => Promise<IWebhook>;
|
|
|
2111
2104
|
* ```
|
|
2112
2105
|
*/
|
|
2113
2106
|
declare const setWebhooks: (endpoint: VerdocsEndpoint, params: ISetWebhookRequest) => Promise<IWebhook>;
|
|
2107
|
+
declare const canPerformTemplateAction: (profile: IProfile | null | undefined, action: TTemplateAction, template?: ITemplate) => {
|
|
2108
|
+
canPerform: boolean;
|
|
2109
|
+
message: string;
|
|
2110
|
+
};
|
|
2111
|
+
declare const hasRequiredPermissions: (profile: IProfile | null | undefined, permissions: TPermission[]) => boolean;
|
|
2112
|
+
/**
|
|
2113
|
+
* Add a field to a template.
|
|
2114
|
+
*/
|
|
2115
|
+
declare const createField: (endpoint: VerdocsEndpoint, templateId: string, params: ITemplateField) => Promise<ITemplateField>;
|
|
2116
|
+
/**
|
|
2117
|
+
* Update a template field.
|
|
2118
|
+
*/
|
|
2119
|
+
declare const updateField: (endpoint: VerdocsEndpoint, templateId: string, fieldName: string, params: Partial<ITemplateField>) => Promise<ITemplateField>;
|
|
2120
|
+
/**
|
|
2121
|
+
* REmove a field from a template.
|
|
2122
|
+
*/
|
|
2123
|
+
declare const deleteField: (endpoint: VerdocsEndpoint, templateId: string, fieldName: string) => Promise<any>;
|
|
2124
|
+
/**
|
|
2125
|
+
* Check to see if the user created the template.
|
|
2126
|
+
*/
|
|
2127
|
+
declare const userIsTemplateCreator: (profile: IProfile | null | undefined, template: ITemplate) => boolean | null | undefined;
|
|
2128
|
+
/**
|
|
2129
|
+
* Check to see if a template is "shared" with the user.
|
|
2130
|
+
*/
|
|
2131
|
+
declare const userHasSharedTemplate: (profile: IProfile | null | undefined, template: ITemplate) => boolean | null | undefined;
|
|
2132
|
+
/**
|
|
2133
|
+
* Check to see if the user can create a personal/private template.
|
|
2134
|
+
*/
|
|
2135
|
+
declare const userCanCreatePersonalTemplate: (profile: IProfile | null | undefined) => boolean;
|
|
2136
|
+
/**
|
|
2137
|
+
* Check to see if the user can create an org-shared template.
|
|
2138
|
+
*/
|
|
2139
|
+
declare const userCanCreateOrgTemplate: (profile: IProfile | null | undefined) => boolean;
|
|
2140
|
+
/**
|
|
2141
|
+
* Check to see if the user can create a public template.
|
|
2142
|
+
*/
|
|
2143
|
+
declare const userCanCreatePublicTemplate: (profile: IProfile | null | undefined) => boolean;
|
|
2144
|
+
/**
|
|
2145
|
+
* Check to see if the user can read/view a template.
|
|
2146
|
+
*/
|
|
2147
|
+
declare const userCanReadTemplate: (profile: IProfile | null | undefined, template: ITemplate) => boolean | null | undefined;
|
|
2148
|
+
/**
|
|
2149
|
+
* Check to see if the user can update a tempate.
|
|
2150
|
+
*/
|
|
2151
|
+
declare const userCanUpdateTemplate: (profile: IProfile | null | undefined, template: ITemplate) => boolean | null | undefined;
|
|
2152
|
+
/**
|
|
2153
|
+
* Check to see if the user can change whether a template is personal vs org-shared.
|
|
2154
|
+
*/
|
|
2155
|
+
declare const userCanMakeTemplatePrivate: (profile: IProfile | null | undefined, template: ITemplate) => boolean;
|
|
2156
|
+
/**
|
|
2157
|
+
* Check to see if the user can change whether a template is personal vs org-shared.
|
|
2158
|
+
*/
|
|
2159
|
+
declare const userCanMakeTemplateShared: (profile: IProfile | null | undefined, template: ITemplate) => boolean;
|
|
2160
|
+
/**
|
|
2161
|
+
* Check to see if the user can change whether a template is personal vs org-shared.
|
|
2162
|
+
*/
|
|
2163
|
+
declare const userCanMakeTemplatePublic: (profile: IProfile | null | undefined, template: ITemplate) => boolean;
|
|
2164
|
+
/**
|
|
2165
|
+
* Check to see if the user can change whether a template is personal vs org-shared.
|
|
2166
|
+
*/
|
|
2167
|
+
declare const userCanChangeOrgVisibility: (profile: IProfile | null | undefined, template: ITemplate) => boolean | null | undefined;
|
|
2168
|
+
/**
|
|
2169
|
+
* Check to see if the user can change whether a template is personal vs org-shared.
|
|
2170
|
+
*/
|
|
2171
|
+
declare const userCanDeleteTemplate: (profile: IProfile | null | undefined, template: ITemplate) => boolean;
|
|
2172
|
+
/**
|
|
2173
|
+
* Confirm whether the user can create an envelope using the specified template.
|
|
2174
|
+
*/
|
|
2175
|
+
declare const userCanSendTemplate: (profile: IProfile | null | undefined, template: ITemplate) => boolean | null | undefined;
|
|
2176
|
+
/**
|
|
2177
|
+
* Confirm whether the user can create a new template.
|
|
2178
|
+
*/
|
|
2179
|
+
declare const userCanCreateTemplate: (profile: IProfile | null | undefined) => boolean;
|
|
2180
|
+
/**
|
|
2181
|
+
* Check to see if the user can "build" the template (use the field builder). The user must have write access to the
|
|
2182
|
+
* template, and the template must have at least one signer role.
|
|
2183
|
+
*/
|
|
2184
|
+
declare const userCanBuildTemplate: (profile: IProfile | null | undefined, template: ITemplate) => boolean | null | undefined;
|
|
2185
|
+
declare const getFieldsForRole: (template: ITemplate, role_name: string) => ITemplateField[];
|
|
2186
|
+
/**
|
|
2187
|
+
* Check to see if the user can preview the template. The user must have read access to the template, the template must
|
|
2188
|
+
* have at least one signer, and every signer must have at least one field.
|
|
2189
|
+
*/
|
|
2190
|
+
declare const userCanPreviewTemplate: (profile: IProfile | null | undefined, template: ITemplate) => boolean | null | undefined;
|
|
2191
|
+
interface ICreateTemplateReminderRequest {
|
|
2192
|
+
setup_time: number;
|
|
2193
|
+
interval_time: number;
|
|
2194
|
+
}
|
|
2195
|
+
/**
|
|
2196
|
+
* Enable automatic reminders. setup_time is the number of days after the envelope is sent that the first reminder
|
|
2197
|
+
* should be sent. interval_time is the number of days between reminders.
|
|
2198
|
+
*/
|
|
2199
|
+
declare const createTemplateReminder: (endpoint: VerdocsEndpoint, templateId: string, params: ICreateTemplateReminderRequest) => Promise<ITemplate>;
|
|
2200
|
+
/**
|
|
2201
|
+
* Get the reminder configuration for a template.
|
|
2202
|
+
*/
|
|
2203
|
+
declare const getTemplateReminder: (endpoint: VerdocsEndpoint, templateId: string, reminderId: string) => Promise<IReminder>;
|
|
2204
|
+
/**
|
|
2205
|
+
* Update the reminder configuration for a template.
|
|
2206
|
+
*/
|
|
2207
|
+
declare const updateTemplateReminder: (endpoint: VerdocsEndpoint, templateId: string, reminderId: string, params: ICreateTemplateReminderRequest) => Promise<IReminder>;
|
|
2208
|
+
/**
|
|
2209
|
+
* Delete the reminder configuration for a template.
|
|
2210
|
+
*/
|
|
2211
|
+
declare const deleteTemplateReminder: (endpoint: VerdocsEndpoint, templateId: string, reminderId: string) => Promise<any>;
|
|
2212
|
+
declare const createTemplateRole: (endpoint: VerdocsEndpoint, templateId: string, params: IRole) => Promise<IRole>;
|
|
2213
|
+
declare const getTemplateRoles: (endpoint: VerdocsEndpoint, templateId: string) => Promise<IRole[]>;
|
|
2214
|
+
declare const getTemplateRole: (endpoint: VerdocsEndpoint, templateId: string, roleName: string) => Promise<IRole>;
|
|
2215
|
+
declare const updateTemplateRole: (endpoint: VerdocsEndpoint, templateId: string, roleName: string, params: Partial<IRole>) => Promise<IRole>;
|
|
2216
|
+
declare const deleteTemplateRole: (endpoint: VerdocsEndpoint, templateId: string, roleName: string) => Promise<any>;
|
|
2217
|
+
declare const getTemplateRoleFields: (endpoint: VerdocsEndpoint, templateId: string, roleName: string) => Promise<ITemplateField[]>;
|
|
2114
2218
|
/**
|
|
2115
2219
|
* Given a `rgba(r,g,b,a)` string value, returns the hex equivalent, dropping the alpha channel.
|
|
2116
2220
|
*/
|
|
@@ -2217,31 +2321,6 @@ declare const decodeJWTBody: (token: string) => any;
|
|
|
2217
2321
|
* the presence of the `document_id` field, which will only be present for signing sessions.
|
|
2218
2322
|
*/
|
|
2219
2323
|
declare const decodeAccessTokenBody: (token: string) => TSession;
|
|
2220
|
-
/**
|
|
2221
|
-
* Some template search and list endpoints return only a partial set of fields for each entry via this structure.
|
|
2222
|
-
*/
|
|
2223
|
-
interface ITemplateSummary {
|
|
2224
|
-
id: string;
|
|
2225
|
-
name: string;
|
|
2226
|
-
description: string | null;
|
|
2227
|
-
sender: TTemplateSenderType;
|
|
2228
|
-
counter: number;
|
|
2229
|
-
star_counter: number;
|
|
2230
|
-
created_at: string;
|
|
2231
|
-
updated_at: string;
|
|
2232
|
-
last_used_at: string | null;
|
|
2233
|
-
/**
|
|
2234
|
-
* If true, the template is considered "sendable" (it has at least one signer, and every signer has at least one field.)
|
|
2235
|
-
*/
|
|
2236
|
-
is_sendable: boolean;
|
|
2237
|
-
is_personal: boolean;
|
|
2238
|
-
is_public: boolean;
|
|
2239
|
-
profile_id: string;
|
|
2240
|
-
organization_id: string;
|
|
2241
|
-
reminder_id: string;
|
|
2242
|
-
tags: string[];
|
|
2243
|
-
allowed_operations: TTemplateAction[];
|
|
2244
|
-
}
|
|
2245
2324
|
interface ITemplateSearchParams {
|
|
2246
2325
|
id?: string;
|
|
2247
2326
|
name?: string;
|
|
@@ -2261,12 +2340,6 @@ interface ITemplateSearchParams {
|
|
|
2261
2340
|
row?: number;
|
|
2262
2341
|
page?: number;
|
|
2263
2342
|
}
|
|
2264
|
-
interface ITemplateSummaries {
|
|
2265
|
-
page: number;
|
|
2266
|
-
count: number;
|
|
2267
|
-
total: number;
|
|
2268
|
-
records: ITemplateSummary[];
|
|
2269
|
-
}
|
|
2270
2343
|
interface ITemplateTag {
|
|
2271
2344
|
tag_name: string;
|
|
2272
2345
|
template_id: string;
|
|
@@ -2281,128 +2354,12 @@ interface IStar {
|
|
|
2281
2354
|
template_id: string;
|
|
2282
2355
|
profile_id: string;
|
|
2283
2356
|
}
|
|
2284
|
-
interface ITemplateOwnerInfo {
|
|
2285
|
-
email: string;
|
|
2286
|
-
name: string;
|
|
2287
|
-
profile_id: string;
|
|
2288
|
-
}
|
|
2289
2357
|
interface ITemplateSearchResult {
|
|
2290
2358
|
page: number;
|
|
2291
2359
|
row: number;
|
|
2292
2360
|
total: number;
|
|
2293
2361
|
result: ITemplate[];
|
|
2294
2362
|
}
|
|
2295
|
-
declare const canPerformTemplateAction: (profile: IProfile | null | undefined, action: TTemplateAction, template?: ITemplate | ITemplateSummary) => {
|
|
2296
|
-
canPerform: boolean;
|
|
2297
|
-
message: string;
|
|
2298
|
-
};
|
|
2299
|
-
declare const hasRequiredPermissions: (profile: IProfile | null | undefined, permissions: TPermission[]) => boolean;
|
|
2300
|
-
/**
|
|
2301
|
-
* Add a field to a template.
|
|
2302
|
-
*/
|
|
2303
|
-
declare const createField: (endpoint: VerdocsEndpoint, templateId: string, params: ITemplateField) => Promise<ITemplateField>;
|
|
2304
|
-
/**
|
|
2305
|
-
* Update a template field.
|
|
2306
|
-
*/
|
|
2307
|
-
declare const updateField: (endpoint: VerdocsEndpoint, templateId: string, fieldName: string, params: Partial<ITemplateField>) => Promise<ITemplateField>;
|
|
2308
|
-
/**
|
|
2309
|
-
* REmove a field from a template.
|
|
2310
|
-
*/
|
|
2311
|
-
declare const deleteField: (endpoint: VerdocsEndpoint, templateId: string, fieldName: string) => Promise<any>;
|
|
2312
|
-
/**
|
|
2313
|
-
* Check to see if the user created the template.
|
|
2314
|
-
*/
|
|
2315
|
-
declare const userIsTemplateCreator: (profile: IProfile | null | undefined, template: ITemplate | ITemplateSummary) => boolean | null | undefined;
|
|
2316
|
-
/**
|
|
2317
|
-
* Check to see if a template is "shared" with the user.
|
|
2318
|
-
*/
|
|
2319
|
-
declare const userHasSharedTemplate: (profile: IProfile | null | undefined, template: ITemplate | ITemplateSummary) => boolean | null | undefined;
|
|
2320
|
-
/**
|
|
2321
|
-
* Check to see if the user can create a personal/private template.
|
|
2322
|
-
*/
|
|
2323
|
-
declare const userCanCreatePersonalTemplate: (profile: IProfile | null | undefined) => boolean;
|
|
2324
|
-
/**
|
|
2325
|
-
* Check to see if the user can create an org-shared template.
|
|
2326
|
-
*/
|
|
2327
|
-
declare const userCanCreateOrgTemplate: (profile: IProfile | null | undefined) => boolean;
|
|
2328
|
-
/**
|
|
2329
|
-
* Check to see if the user can create a public template.
|
|
2330
|
-
*/
|
|
2331
|
-
declare const userCanCreatePublicTemplate: (profile: IProfile | null | undefined) => boolean;
|
|
2332
|
-
/**
|
|
2333
|
-
* Check to see if the user can read/view a template.
|
|
2334
|
-
*/
|
|
2335
|
-
declare const userCanReadTemplate: (profile: IProfile | null | undefined, template: ITemplate | ITemplateSummary) => boolean | null | undefined;
|
|
2336
|
-
/**
|
|
2337
|
-
* Check to see if the user can update a tempate.
|
|
2338
|
-
*/
|
|
2339
|
-
declare const userCanUpdateTemplate: (profile: IProfile | null | undefined, template: ITemplate | ITemplateSummary) => boolean | null | undefined;
|
|
2340
|
-
/**
|
|
2341
|
-
* Check to see if the user can change whether a template is personal vs org-shared.
|
|
2342
|
-
*/
|
|
2343
|
-
declare const userCanMakeTemplatePrivate: (profile: IProfile | null | undefined, template: ITemplate | ITemplateSummary) => boolean;
|
|
2344
|
-
/**
|
|
2345
|
-
* Check to see if the user can change whether a template is personal vs org-shared.
|
|
2346
|
-
*/
|
|
2347
|
-
declare const userCanMakeTemplateShared: (profile: IProfile | null | undefined, template: ITemplate | ITemplateSummary) => boolean;
|
|
2348
|
-
/**
|
|
2349
|
-
* Check to see if the user can change whether a template is personal vs org-shared.
|
|
2350
|
-
*/
|
|
2351
|
-
declare const userCanMakeTemplatePublic: (profile: IProfile | null | undefined, template: ITemplate | ITemplateSummary) => boolean;
|
|
2352
|
-
/**
|
|
2353
|
-
* Check to see if the user can change whether a template is personal vs org-shared.
|
|
2354
|
-
*/
|
|
2355
|
-
declare const userCanChangeOrgVisibility: (profile: IProfile | null | undefined, template: ITemplate | ITemplateSummary) => boolean | null | undefined;
|
|
2356
|
-
/**
|
|
2357
|
-
* Check to see if the user can change whether a template is personal vs org-shared.
|
|
2358
|
-
*/
|
|
2359
|
-
declare const userCanDeleteTemplate: (profile: IProfile | null | undefined, template: ITemplate | ITemplateSummary) => boolean;
|
|
2360
|
-
/**
|
|
2361
|
-
* Confirm whether the user can create an envelope using the specified template.
|
|
2362
|
-
*/
|
|
2363
|
-
declare const userCanSendTemplate: (profile: IProfile | null | undefined, template: ITemplate | ITemplateSummary) => boolean | null | undefined;
|
|
2364
|
-
/**
|
|
2365
|
-
* Confirm whether the user can create a new template.
|
|
2366
|
-
*/
|
|
2367
|
-
declare const userCanCreateTemplate: (profile: IProfile | null | undefined) => boolean;
|
|
2368
|
-
/**
|
|
2369
|
-
* Check to see if the user can "build" the template (use the field builder). The user must have write access to the
|
|
2370
|
-
* template, and the template must have at least one signer role.
|
|
2371
|
-
*/
|
|
2372
|
-
declare const userCanBuildTemplate: (profile: IProfile | null | undefined, template: ITemplate) => boolean | null | undefined;
|
|
2373
|
-
declare const getFieldsForRole: (template: ITemplate, role_name: string) => ITemplateField[];
|
|
2374
|
-
/**
|
|
2375
|
-
* Check to see if the user can preview the template. The user must have read access to the template, the template must
|
|
2376
|
-
* have at least one signer, and every signer must have at least one field.
|
|
2377
|
-
*/
|
|
2378
|
-
declare const userCanPreviewTemplate: (profile: IProfile | null | undefined, template: ITemplate) => boolean | null | undefined;
|
|
2379
|
-
interface ICreateTemplateReminderRequest {
|
|
2380
|
-
setup_time: number;
|
|
2381
|
-
interval_time: number;
|
|
2382
|
-
}
|
|
2383
|
-
/**
|
|
2384
|
-
* Enable automatic reminders. setup_time is the number of days after the envelope is sent that the first reminder
|
|
2385
|
-
* should be sent. interval_time is the number of days between reminders.
|
|
2386
|
-
*/
|
|
2387
|
-
declare const createTemplateReminder: (endpoint: VerdocsEndpoint, templateId: string, params: ICreateTemplateReminderRequest) => Promise<ITemplate>;
|
|
2388
|
-
/**
|
|
2389
|
-
* Get the reminder configuration for a template.
|
|
2390
|
-
*/
|
|
2391
|
-
declare const getTemplateReminder: (endpoint: VerdocsEndpoint, templateId: string, reminderId: string) => Promise<IReminder>;
|
|
2392
|
-
/**
|
|
2393
|
-
* Update the reminder configuration for a template.
|
|
2394
|
-
*/
|
|
2395
|
-
declare const updateTemplateReminder: (endpoint: VerdocsEndpoint, templateId: string, reminderId: string, params: ICreateTemplateReminderRequest) => Promise<IReminder>;
|
|
2396
|
-
/**
|
|
2397
|
-
* Delete the reminder configuration for a template.
|
|
2398
|
-
*/
|
|
2399
|
-
declare const deleteTemplateReminder: (endpoint: VerdocsEndpoint, templateId: string, reminderId: string) => Promise<any>;
|
|
2400
|
-
declare const createTemplateRole: (endpoint: VerdocsEndpoint, templateId: string, params: IRole) => Promise<IRole>;
|
|
2401
|
-
declare const getTemplateRoles: (endpoint: VerdocsEndpoint, templateId: string) => Promise<IRole[]>;
|
|
2402
|
-
declare const getTemplateRole: (endpoint: VerdocsEndpoint, templateId: string, roleName: string) => Promise<IRole>;
|
|
2403
|
-
declare const updateTemplateRole: (endpoint: VerdocsEndpoint, templateId: string, roleName: string, params: Partial<IRole>) => Promise<IRole>;
|
|
2404
|
-
declare const deleteTemplateRole: (endpoint: VerdocsEndpoint, templateId: string, roleName: string) => Promise<any>;
|
|
2405
|
-
declare const getTemplateRoleFields: (endpoint: VerdocsEndpoint, templateId: string, roleName: string) => Promise<ITemplateField[]>;
|
|
2406
2363
|
/**
|
|
2407
2364
|
* Get the template stars for a template.
|
|
2408
2365
|
*/
|
|
@@ -2410,7 +2367,7 @@ declare const getStars: (endpoint: VerdocsEndpoint, templateId: string) => Promi
|
|
|
2410
2367
|
/**
|
|
2411
2368
|
* Toggle the template star for a template.
|
|
2412
2369
|
*/
|
|
2413
|
-
declare const toggleStar: (endpoint: VerdocsEndpoint, templateId: string) => Promise<
|
|
2370
|
+
declare const toggleStar: (endpoint: VerdocsEndpoint, templateId: string) => Promise<ITemplate>;
|
|
2414
2371
|
/**
|
|
2415
2372
|
* Apply a tag to a template.
|
|
2416
2373
|
*/
|
|
@@ -2485,16 +2442,6 @@ declare const getTemplates: (endpoint: VerdocsEndpoint, params?: IGetTemplatesPa
|
|
|
2485
2442
|
* ```
|
|
2486
2443
|
*/
|
|
2487
2444
|
declare const getTemplate: (endpoint: VerdocsEndpoint, templateId: string) => Promise<ITemplate>;
|
|
2488
|
-
/**
|
|
2489
|
-
* Get owner information for a template.
|
|
2490
|
-
*
|
|
2491
|
-
* ```typescript
|
|
2492
|
-
* import {Templates} from '@verdocs/js-sdk/Templates';
|
|
2493
|
-
*
|
|
2494
|
-
* const template = await Templates.getTemplateOwnerInfo((VerdocsEndpoint.getDefault(), '83da3d70-7857-4392-b876-c4592a304bc9');
|
|
2495
|
-
* ```
|
|
2496
|
-
*/
|
|
2497
|
-
declare const getTemplateOwnerInfo: (endpoint: VerdocsEndpoint, templateId: string) => Promise<ITemplateOwnerInfo>;
|
|
2498
2445
|
/**
|
|
2499
2446
|
* Represents a document to be attached to a template via an externally-accessible URI. A copy of the document will be
|
|
2500
2447
|
* downloaded from the specified URI. Note that the URI will be accessed without headers or other authorization methods
|
|
@@ -2549,16 +2496,6 @@ interface ITemplateCreateParams {
|
|
|
2549
2496
|
*/
|
|
2550
2497
|
fields?: ITemplateField[];
|
|
2551
2498
|
}
|
|
2552
|
-
/**
|
|
2553
|
-
* Create a template.
|
|
2554
|
-
*
|
|
2555
|
-
* ```typescript
|
|
2556
|
-
* import {Templates} from '@verdocs/js-sdk/Templates';
|
|
2557
|
-
*
|
|
2558
|
-
* const newTemplate = await Templates.createTemplate((VerdocsEndpoint.getDefault(), {...});
|
|
2559
|
-
* ```
|
|
2560
|
-
*/
|
|
2561
|
-
declare const createTemplate: (endpoint: VerdocsEndpoint, params: ITemplateCreateParams, onUploadProgress?: (percent: number, loadedBytes: number, totalBytes: number) => void) => Promise<ITemplate>;
|
|
2562
2499
|
/**
|
|
2563
2500
|
* Create a template.
|
|
2564
2501
|
*
|
|
@@ -2568,7 +2505,7 @@ declare const createTemplate: (endpoint: VerdocsEndpoint, params: ITemplateCreat
|
|
|
2568
2505
|
* const newTemplate = await Templates.createTemplatev2((VerdocsEndpoint.getDefault(), {...});
|
|
2569
2506
|
* ```
|
|
2570
2507
|
*/
|
|
2571
|
-
declare const
|
|
2508
|
+
declare const createTemplate: (endpoint: VerdocsEndpoint, params: ITemplateCreateParams, onUploadProgress?: (percent: number, loadedBytes: number, totalBytes: number) => void) => Promise<ITemplate>;
|
|
2572
2509
|
interface ITemplateCreateFromSharepointParams {
|
|
2573
2510
|
/** Name for the template to create. */
|
|
2574
2511
|
name: string;
|
|
@@ -2646,22 +2583,6 @@ interface IGetTemplateSummaryParams {
|
|
|
2646
2583
|
row?: number;
|
|
2647
2584
|
page?: number;
|
|
2648
2585
|
}
|
|
2649
|
-
/**
|
|
2650
|
-
* Get a summary of template data, typically used to populate admin panel dashboard pages.
|
|
2651
|
-
*
|
|
2652
|
-
* ```typescript
|
|
2653
|
-
* import {Templates} from '@verdocs/js-sdk/Templates';
|
|
2654
|
-
*
|
|
2655
|
-
* const summary = await Templates.getSummary((VerdocsEndpoint.getDefault(), 0);
|
|
2656
|
-
* ```
|
|
2657
|
-
*/
|
|
2658
|
-
declare const getTemplatesSummary: (endpoint: VerdocsEndpoint, params?: IGetTemplateSummaryParams) => Promise<ITemplateSummary>;
|
|
2659
|
-
/**
|
|
2660
|
-
* Wrapper for `getTemplate()` that limits queries to one every 2 seconds per template ID.
|
|
2661
|
-
* This is intended for use in component hierarchies that all rely on the same template
|
|
2662
|
-
* to avoid unnecessary repeat server calls.
|
|
2663
|
-
*/
|
|
2664
|
-
declare const throttledGetTemplate: (endpoint: VerdocsEndpoint, templateId: string) => ITemplate | Promise<ITemplate>;
|
|
2665
2586
|
interface ITemplateListParams {
|
|
2666
2587
|
status?: string[];
|
|
2667
2588
|
q?: string;
|
|
@@ -2765,4 +2686,4 @@ declare const isValidEmail: (email: string | undefined) => boolean;
|
|
|
2765
2686
|
declare const isValidPhone: (phone: string | undefined) => boolean;
|
|
2766
2687
|
declare const isValidRoleName: (value: string, roles: IRole[]) => boolean;
|
|
2767
2688
|
declare const isValidTag: (value: string, tags: string[]) => boolean;
|
|
2768
|
-
export { TRequestStatus, TTemplateSenderType, TTemplateAction, TRecipientAction, TEnvelopeStatus, TRecipientStatus, TRecipientType, TSortTemplateBy, TAccessKeyType, TApiKeyPermission, THistoryEvent, TEventDetail, TEnvelopeUpdateResult, TFieldType, IChannel, IDisabledChannel, INotification, IApiKey, IGroup, IGroupProfile, IOAuth2App, IOrganization, IOrganizationInvitation, IPendingWebhook, IProfile, IWebhookEvents, IWebhook, IInPersonAccessKey, IInAppAccessKey, IEmailAccessKey, ISMSAccessKey, TAccessKey, IEnvelope, IEnvelopeDocument, IEnvelopeField, IEnvelopeFieldOptions, IEnvelopeFieldSettings, IEnvelopeHistory, IInitial, IKbaPINRequired, IRecipient, IReminder, IRole, ISignature, ITemplate, ITemplateDocument, ITemplateField, ITextFieldSetting, ITemplateFieldSetting, TEnvironment, TSessionChangedListener, VerdocsEndpointOptions, VerdocsEndpoint, createEnvelope, getEnvelopesSummary, ISigningSessionResult, getSigningSession, getEnvelopeRecipients, getEnvelope, getEnvelopeDocument, getDocumentDownloadLink, getDocumentPreviewLink, cancelEnvelope, getEnvelopeFile, updateEnvelopeField, updateEnvelopeFieldSignature, updateEnvelopeFieldInitials, uploadEnvelopeFieldAttachment, deleteEnvelopeFieldAttachment, getFieldAttachment, getEnvelopeDocumentPageDisplayUri, ITimeRange, IListEnvelopesParams, getEnvelopes, createInitials,
|
|
2689
|
+
export { TRequestStatus, TTemplateSenderType, TTemplateAction, TRecipientAction, TEnvelopeStatus, TRecipientStatus, TRecipientType, TSortTemplateBy, TAccessKeyType, TApiKeyPermission, THistoryEvent, TEventDetail, TEnvelopeUpdateResult, TFieldType, IChannel, IDisabledChannel, INotification, IApiKey, IGroup, IGroupProfile, IOAuth2App, IOrganization, IOrganizationInvitation, IPendingWebhook, IProfile, IWebhookEvents, IWebhook, IInPersonAccessKey, IInAppAccessKey, IEmailAccessKey, ISMSAccessKey, TAccessKey, IEnvelope, IEnvelopeDocument, IEnvelopeField, IEnvelopeFieldOptions, IEnvelopeFieldSettings, IEnvelopeHistory, IInitial, IKbaPINRequired, IRecipient, IReminder, IRole, ISignature, ITemplate, ITemplateDocument, ITemplateField, ITextFieldSetting, ITemplateFieldSetting, TEnvironment, TSessionChangedListener, VerdocsEndpointOptions, VerdocsEndpoint, createEnvelope, getEnvelopesSummary, ISigningSessionResult, getSigningSession, getEnvelopeRecipients, getEnvelope, getEnvelopeDocument, getDocumentDownloadLink, getDocumentPreviewLink, cancelEnvelope, getEnvelopeFile, updateEnvelopeField, updateEnvelopeFieldSignature, updateEnvelopeFieldInitials, uploadEnvelopeFieldAttachment, deleteEnvelopeFieldAttachment, getFieldAttachment, getEnvelopeDocumentPageDisplayUri, ITimeRange, IListEnvelopesParams, getEnvelopes, createInitials, IRecipientKbaStepNone, IRecipientKbaStepComplete, IRecipientKbaStepPin, IRecipientKbaStepIdentity, IRecipientKbaStepChallenge, IRecipientKbaStepFailed, TRecipientKbaStep, getKbaStep, submitKbaPin, IKbaIdentity, submitKbaIdentity, IKbaChallengeResponse, submitKbaChallengeResponse, updateRecipient, envelopeRecipientSubmit, envelopeRecipientDecline, envelopeRecipientChangeOwner, envelopeRecipientAgree, envelopeRecipientUpdateName, envelopeRecipientPrepare, ISignerTokenResponse, getSignerToken, getInPersonLink, sendDelegate, resendInvitation, createEnvelopeReminder, getEnvelopeReminder, updateEnvelopeReminder, deleteEnvelopeReminder, userIsEnvelopeOwner, userIsEnvelopeRecipient, envelopeIsActive, envelopeIsComplete, userCanCancelEnvelope, userCanFinishEnvelope, recipientHasAction, getRecipientsWithActions, recipientCanAct, userCanAct, userCanSignNow, getNextRecipient, createSignature, getSignatures, getSignature, deleteSignature, IEnvelopesSearchResult, IEnvelopesSummary, IDocumentSearchOptions, ICreateEnvelopeRole, IEnvelopeSummaries, IInPersonLinkResponse, IUpdateRecipientSubmitParams, IUpdateRecipientDeclineParams, IUpdateRecipientClaimEnvelope, IUpdateRecipientStatus, IUpdateRecipientAgreedParams, IUpdateRecipientNameParams, IUpdateRecipientPrepareParams, ICreateEnvelopeReminderRequest, ICreateEnvelopeRequest, getApiKeys, createApiKey, rotateApiKey, updateApiKey, deleteApiKey, getGroups, getGroup, createGroup, addGroupMember, deleteGroupMember, updateGroup, getOrganizationInvitations, createOrganizationInvitation, deleteOrganizationInvitation, updateOrganizationInvitation, resendOrganizationInvitation, getOrganizationInvitation, acceptOrganizationInvitation, declineOrganizationInvitation, getOrganizationMembers, deleteOrganizationMember, updateOrganizationMember, getOrganization, updateOrganization, updateOrganizationLogo, updateOrganizationThumbnail, ICreateApiKeyRequest, IUpdateApiKeyRequest, ICreateInvitationRequest, IAcceptOrganizationInvitationRequest, ISetWebhookRequest, getWebhooks, setWebhooks, TTemplatePermissionCreatePublic, TTemplatePermissionCreateOrg, TTemplatePermissionCreatePersonal, TTemplatePermissionDelete, TTemplatePermissionVisibility, TTemplateMemberRead, TTemplateMemberWrite, TTemplateMemberDelete, TTemplateMemberVisibility, TTemplatePermission, TAccountPermissionOwnerAdd, TAccountPermissionOwnerRemove, TAccountPermissionAdminAdd, TAccountPermissionAdminRemove, TAccountPermissionMemberView, TAccountPermissionMemberAdd, TAccountPermissionMemberRemove, TAccountPermission, TOrgPermissionCreate, TOrgPermissionView, TOrgPermissionUpdate, TOrgPermissionDelete, TOrgPermissionTransfer, TOrgPermissionList, TOrgPermission, TEnvelopePermissionCreate, TEnvelopePermissionCancel, TEnvelopePermissionView, TEnvelopePermissionOrg, TEnvelopePermission, TPermission, TRole, RolePermissions, userHasPermissions, ISigningSessionRequest, ISigningSession, IUserSession, TSessionType, TSession, TActiveSession, canPerformTemplateAction, hasRequiredPermissions, createField, updateField, deleteField, userIsTemplateCreator, userHasSharedTemplate, userCanCreatePersonalTemplate, userCanCreateOrgTemplate, userCanCreatePublicTemplate, userCanReadTemplate, userCanUpdateTemplate, userCanMakeTemplatePrivate, userCanMakeTemplateShared, userCanMakeTemplatePublic, userCanChangeOrgVisibility, userCanDeleteTemplate, userCanSendTemplate, userCanCreateTemplate, userCanBuildTemplate, getFieldsForRole, userCanPreviewTemplate, ICreateTemplateReminderRequest, createTemplateReminder, getTemplateReminder, updateTemplateReminder, deleteTemplateReminder, createTemplateRole, getTemplateRoles, getTemplateRole, updateTemplateRole, deleteTemplateRole, getTemplateRoleFields, getStars, toggleStar, addTemplateTag, getTemplateTags, deleteTemplateTag, createTag, getTag, getAllTags, IGetTemplatesParams, getTemplates, getTemplate, IDocumentFromUri, IDocumentFromData, ITemplateCreateParams, createTemplate, ITemplateCreateFromSharepointParams, createTemplateFromSharepoint, updateTemplate, deleteTemplate, searchTemplates, ISearchTimeRange, IGetTemplateSummarySortBy, IGetTemplateSummaryParams, ITemplateListParams, listTemplates, getTemplateDocuments, getTemplateDocument, createTemplateDocument, deleteTemplateDocument, getTemplateDocumentFile, getTemplateDocumentThumbnail, getTemplateDocumentPageDisplayUri, ITemplateSearchParams, ITemplateTag, ITag, IStar, ITemplateSearchResult, IValidator, getValidators, getValidator, isValidEmail, isValidPhone, isValidRoleName, isValidTag, IROPCRequest, IClientCredentialsRequest, IRefreshTokenRequest, TAuthenticationRequest, authenticate, refreshToken, changePassword, resetPassword, verifyEmail, resendVerification, getNotifications, getProfiles, getCurrentProfile, getProfile, switchProfile, updateProfile, deleteProfile, createProfile, updateProfilePhoto, IUpdateProfileRequest, IAuthenticateResponse, IUpdatePasswordRequest, IUpdatePasswordResponse, ICreateAccountRequest, getRGB, getRGBA, nameToRGBA, getRoleColor, formatShortTimeAgo, timePeriod, getRTop, getRLeft, getRValue, blobToBase64, rescale, fileToDataUrl, downloadBlob, Countries, getCountryByCode, isFrenchGuiana, isGuadeloupe, isMartinique, isMayotte, getPlusOneCountry, isCanada, isAmericanSamoa, isDominicanRepublic, isPuertoRico, getMatchingCountry, integerSequence, formatFullName, formatInitials, fullNameToInitials, capitalize, convertToE164, AtoB, decodeJWTBody, decodeAccessTokenBody, IFileWithData, ICountry, ITimePeriod };
|