@verdocs/js-sdk 4.2.1 → 4.2.3
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 +173 -401
- package/dist/index.d.ts +173 -401
- package/dist/index.js +12 -120
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -114
- package/dist/index.mjs.map +1 -1
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -856,24 +856,6 @@ interface ITemplateFieldSetting {
|
|
|
856
856
|
options?: any[];
|
|
857
857
|
[key: string]: any;
|
|
858
858
|
}
|
|
859
|
-
interface IActivityEntry {
|
|
860
|
-
id: string;
|
|
861
|
-
name: string;
|
|
862
|
-
canceled_at: string;
|
|
863
|
-
created_at: string;
|
|
864
|
-
updated_at: string;
|
|
865
|
-
profile_id: string;
|
|
866
|
-
status: TEnvelopeStatus;
|
|
867
|
-
template_id: string;
|
|
868
|
-
recipient: {
|
|
869
|
-
claimed: boolean;
|
|
870
|
-
email: string;
|
|
871
|
-
name: string;
|
|
872
|
-
profile_id: string;
|
|
873
|
-
status: TRecipientStatus;
|
|
874
|
-
type: TRecipientType;
|
|
875
|
-
};
|
|
876
|
-
}
|
|
877
859
|
type TRequestStatus = "OK" | "ERROR";
|
|
878
860
|
type TTemplateSenderType = "creator" | "organization_member" | "organization_member_as_creator" | "everyone" | "everyone_as_creator";
|
|
879
861
|
type TTemplateAction = "create_personal" | "create_org" | "create_public" | "read" | "write" | "delete" | "change_visibility_personal" | "change_visibility_org" | "change_visibility_public";
|
|
@@ -1115,58 +1097,26 @@ declare class VerdocsEndpoint {
|
|
|
1115
1097
|
*/
|
|
1116
1098
|
loadSession(): VerdocsEndpoint;
|
|
1117
1099
|
}
|
|
1118
|
-
/**
|
|
1119
|
-
* One entry in an envelope search result.
|
|
1120
|
-
* NOTE: Many of the fields here are undefined unless "summary=true" is included in the search terms
|
|
1121
|
-
*/
|
|
1122
|
-
interface IEnvelopesSearchResultEntry {
|
|
1123
|
-
id: string;
|
|
1124
|
-
canceled_at: string;
|
|
1125
|
-
certificate_document_id: string;
|
|
1126
|
-
created_at: string;
|
|
1127
|
-
histories: IEnvelopeHistory[];
|
|
1128
|
-
indexed_at: string;
|
|
1129
|
-
name: string;
|
|
1130
|
-
no_contact: boolean;
|
|
1131
|
-
organization_id: string;
|
|
1132
|
-
profile_id: string;
|
|
1133
|
-
recipients: IRecipient[];
|
|
1134
|
-
reminder_id: string | null;
|
|
1135
|
-
status: TEnvelopeStatus;
|
|
1136
|
-
/** Defaults to 'private'. If set to 'shared', this envelope will be visible to other users in the same organization. Ignored for personal profiles. */
|
|
1137
|
-
visibility: "private" | "shared";
|
|
1138
|
-
next_recipient: {
|
|
1139
|
-
claimed: boolean;
|
|
1140
|
-
email: string;
|
|
1141
|
-
name: string;
|
|
1142
|
-
profile_id: string;
|
|
1143
|
-
status: TRecipientStatus;
|
|
1144
|
-
type: TRecipientType;
|
|
1145
|
-
};
|
|
1146
|
-
template_id: string;
|
|
1147
|
-
total_count: number;
|
|
1148
|
-
updated_at: string;
|
|
1149
|
-
}
|
|
1150
1100
|
interface IEnvelopesSearchResult {
|
|
1151
1101
|
page: number;
|
|
1152
1102
|
total: number;
|
|
1153
|
-
result:
|
|
1103
|
+
result: IEnvelope[];
|
|
1154
1104
|
}
|
|
1155
1105
|
interface IEnvelopesSummary {
|
|
1156
1106
|
action_required: {
|
|
1157
1107
|
page: number;
|
|
1158
1108
|
total: number;
|
|
1159
|
-
result:
|
|
1109
|
+
result: IEnvelope[];
|
|
1160
1110
|
};
|
|
1161
1111
|
completed: {
|
|
1162
1112
|
page: number;
|
|
1163
1113
|
total: number;
|
|
1164
|
-
result:
|
|
1114
|
+
result: IEnvelope[];
|
|
1165
1115
|
};
|
|
1166
1116
|
waiting_others: {
|
|
1167
1117
|
page: number;
|
|
1168
1118
|
total: number;
|
|
1169
|
-
result:
|
|
1119
|
+
result: IEnvelope[];
|
|
1170
1120
|
};
|
|
1171
1121
|
}
|
|
1172
1122
|
interface IDocumentSearchOptions {
|
|
@@ -1208,30 +1158,11 @@ interface ICreateEnvelopeRole {
|
|
|
1208
1158
|
/** A custom message to include in the email or SMS invitation. May be left blank for a default message. */
|
|
1209
1159
|
message: string;
|
|
1210
1160
|
}
|
|
1211
|
-
interface IEnvelopeSummary {
|
|
1212
|
-
id: string;
|
|
1213
|
-
profile_id: string;
|
|
1214
|
-
organization_id: string | null;
|
|
1215
|
-
name: string;
|
|
1216
|
-
status: TEnvelopeStatus;
|
|
1217
|
-
template_id: string;
|
|
1218
|
-
created_at: string;
|
|
1219
|
-
updated_at: string;
|
|
1220
|
-
canceled_at: string;
|
|
1221
|
-
envelope_document_id: string;
|
|
1222
|
-
certificate_document_id: string | null;
|
|
1223
|
-
reminder_id: string | null;
|
|
1224
|
-
no_contact: boolean;
|
|
1225
|
-
visibility: "private" | "shared";
|
|
1226
|
-
documents: IEnvelopeDocument[];
|
|
1227
|
-
recipients: IRecipient[];
|
|
1228
|
-
fields: IEnvelopeField[];
|
|
1229
|
-
}
|
|
1230
1161
|
interface IEnvelopeSummaries {
|
|
1231
1162
|
page: number;
|
|
1232
1163
|
count: number;
|
|
1233
1164
|
total: number;
|
|
1234
|
-
records:
|
|
1165
|
+
records: IEnvelope[];
|
|
1235
1166
|
}
|
|
1236
1167
|
interface IInPersonLinkResponse {
|
|
1237
1168
|
link: string;
|
|
@@ -1321,77 +1252,12 @@ declare const createEnvelope: (endpoint: VerdocsEndpoint, request: ICreateEnvelo
|
|
|
1321
1252
|
* Get a summary of currently active envelopes.
|
|
1322
1253
|
*
|
|
1323
1254
|
* ```typescript
|
|
1324
|
-
* import {
|
|
1255
|
+
* import {getEnvelopesSummary} from '@verdocs/js-sdk/Envelopes';
|
|
1325
1256
|
*
|
|
1326
|
-
* const {action_required, completed, waiting_on_others} = await
|
|
1257
|
+
* const {action_required, completed, waiting_on_others} = await getEnvelopesSummary(VerdocsEndpoint.getDefault());
|
|
1327
1258
|
* ```
|
|
1328
1259
|
*/
|
|
1329
1260
|
declare const getEnvelopesSummary: (endpoint: VerdocsEndpoint, page: number) => Promise<IEnvelopesSummary>;
|
|
1330
|
-
interface IEnvelopeSearchParams {
|
|
1331
|
-
/** The envelope must have been created via the specified template ID. */
|
|
1332
|
-
template_id?: string;
|
|
1333
|
-
/** The envelope must match one of the specified statuses. */
|
|
1334
|
-
envelope_status?: TEnvelopeStatus[];
|
|
1335
|
-
/** At least one of the recipients must match one of the specified statuses. */
|
|
1336
|
-
recipient_status?: TRecipientStatus[];
|
|
1337
|
-
/** The envelope's name (inherited from the template) must match the specified string. */
|
|
1338
|
-
envelope_name?: string;
|
|
1339
|
-
/** At least one of the envelope's recipients must match the specified name. */
|
|
1340
|
-
recipient_name?: string;
|
|
1341
|
-
/** At least one of the envelope's recipients must match the specified email address. */
|
|
1342
|
-
recipient_email?: string;
|
|
1343
|
-
/** Match against envelope_name, recipient_name, or recipient_email all at once. */
|
|
1344
|
-
name?: string;
|
|
1345
|
-
/** At least one of the envelope's recipients must match the specified ID. */
|
|
1346
|
-
recipient_id?: string;
|
|
1347
|
-
/** The date-range in which the envelope was created. Values should be specified in ISO8601 "UTC" format. */
|
|
1348
|
-
created_at?: {
|
|
1349
|
-
start_time: string;
|
|
1350
|
-
end_time: string;
|
|
1351
|
-
};
|
|
1352
|
-
/**
|
|
1353
|
-
* The date-range in which the envelope was last updated. Values should be specified in ISO8601 "UTC" format.
|
|
1354
|
-
* Note that any operations that alter the envelope are considered "updates", including status changes (cancellation),
|
|
1355
|
-
* recipient actions (opening/signing), etc.
|
|
1356
|
-
*/
|
|
1357
|
-
updated_at?: {
|
|
1358
|
-
start_time: string;
|
|
1359
|
-
end_time: string;
|
|
1360
|
-
};
|
|
1361
|
-
/** The date-range in which the envelope was canceled. Values should be specified in ISO8601 "UTC" format. */
|
|
1362
|
-
canceled_at?: {
|
|
1363
|
-
start_time: string;
|
|
1364
|
-
end_time: string;
|
|
1365
|
-
};
|
|
1366
|
-
/** Perform a "contains" search where any of the attached documents' fields contains the specified value. */
|
|
1367
|
-
text_field_value?: string;
|
|
1368
|
-
/** Set to true to retrieve only summary records (IEnvelopeSummary). */
|
|
1369
|
-
summary?: boolean;
|
|
1370
|
-
/** Set to true to retrieve only those envelopes owned by the caller. */
|
|
1371
|
-
is_owner?: boolean;
|
|
1372
|
-
/** Set to true to retrieve only those envelopes in which the caller is one of the recipients. */
|
|
1373
|
-
is_recipient?: boolean;
|
|
1374
|
-
/** Whether the recipient has "claimed" the envelope. */
|
|
1375
|
-
recipient_claimed?: boolean;
|
|
1376
|
-
/** The maximum number of records to return. Should be used in place of `row`. */
|
|
1377
|
-
limit?: number;
|
|
1378
|
-
/** The page number to return. Page numbers are 0-based. */
|
|
1379
|
-
page?: number;
|
|
1380
|
-
/** The field to sort the results by. */
|
|
1381
|
-
sort_by?: "created_at" | "updated_at" | "envelope_name" | "canceled_at" | "envelope_status";
|
|
1382
|
-
/** Whether to sort in ascending (default) or descending order. */
|
|
1383
|
-
ascending?: boolean;
|
|
1384
|
-
}
|
|
1385
|
-
/**
|
|
1386
|
-
* Search for envelopes matching various criteria.
|
|
1387
|
-
*
|
|
1388
|
-
* ```typescript
|
|
1389
|
-
* import {Envelopes} from '@verdocs/js-sdk/Envelopes';
|
|
1390
|
-
*
|
|
1391
|
-
* const {result, page, total} = await Envelopes.search(VerdocsEndpoint.getDefault(), { ... });
|
|
1392
|
-
* ```
|
|
1393
|
-
*/
|
|
1394
|
-
declare const searchEnvelopes: (endpoint: VerdocsEndpoint, params: IEnvelopeSearchParams) => Promise<IEnvelopesSearchResult>;
|
|
1395
1261
|
interface ISigningSessionResult {
|
|
1396
1262
|
recipient: IRecipient;
|
|
1397
1263
|
session: ISigningSession;
|
|
@@ -1465,52 +1331,34 @@ declare const getFieldAttachment: (endpoint: VerdocsEndpoint, envelopeId: string
|
|
|
1465
1331
|
* for DISPLAY ONLY, are not legally binding documents, and do not contain any encoded metadata from participants.
|
|
1466
1332
|
*/
|
|
1467
1333
|
declare const getEnvelopeDocumentPageDisplayUri: (endpoint: VerdocsEndpoint, envelopeId: string, documentId: string, page: number, type?: "original" | "filled" | "certificate") => Promise<string>;
|
|
1468
|
-
/**
|
|
1469
|
-
* Wrapper for `getEnvelope()` that limits queries to one every 2 seconds per template ID.
|
|
1470
|
-
* This is intended for use in component hierarchies that all rely on the same template
|
|
1471
|
-
* to avoid unnecessary repeat server calls.
|
|
1472
|
-
*/
|
|
1473
|
-
declare const throttledGetEnvelope: (endpoint: VerdocsEndpoint, envelopeId: string) => IEnvelope | Promise<IEnvelope>;
|
|
1474
1334
|
interface ITimeRange {
|
|
1475
1335
|
start: string;
|
|
1476
1336
|
end: string;
|
|
1477
1337
|
}
|
|
1478
|
-
// /**
|
|
1479
|
-
// * Lists all templates accessible by the caller, with optional filters.
|
|
1480
|
-
// *
|
|
1481
|
-
// * ```typescript
|
|
1482
|
-
// * import {Envelopes} from '@verdocs/js-sdk/Templates';
|
|
1483
|
-
// *
|
|
1484
|
-
// * await Envelopes.listEnvelopes((VerdocsEndpoint.getDefault(), { name: 'test', sort: 'updated_at' });
|
|
1485
|
-
// * ```
|
|
1486
|
-
// */
|
|
1487
|
-
// export const listEnvelopes = (endpoint: VerdocsEndpoint, params?: IListEnvelopesParams) =>
|
|
1488
|
-
// endpoint.api //
|
|
1489
|
-
// .post<IEnvelopeSummaries>('/envelopes/list', params, {baseURL: endpoint.getBaseURLv2()})
|
|
1490
|
-
// .then((r) => r.data);
|
|
1491
1338
|
interface IListEnvelopesParams {
|
|
1492
|
-
view?: "inbox" | "sent" | "action" | "waiting" | "completed";
|
|
1493
1339
|
q?: string;
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1340
|
+
view?: "inbox" | "sent" | "action" | "waiting" | "completed";
|
|
1341
|
+
status?: ("complete" | "pending" | "in progress" | "declined" | "canceled")[];
|
|
1342
|
+
include_org?: boolean;
|
|
1497
1343
|
template_id?: string;
|
|
1344
|
+
created_before?: string;
|
|
1345
|
+
created_after?: string;
|
|
1498
1346
|
sort_by?: "name" | "created_at" | "updated_at" | "canceled_at" | "status";
|
|
1499
1347
|
ascending?: boolean;
|
|
1500
1348
|
rows?: number;
|
|
1501
1349
|
page?: number;
|
|
1502
1350
|
}
|
|
1503
|
-
/**
|
|
1351
|
+
/**
|
|
1504
1352
|
* Lists all envelopes accessible by the caller, with optional filters.
|
|
1505
1353
|
*
|
|
1506
1354
|
* ```typescript
|
|
1507
|
-
* import {
|
|
1355
|
+
* import {getEnvelopes} from '@verdocs/js-sdk/Envelopes';
|
|
1508
1356
|
*
|
|
1509
|
-
* const {
|
|
1357
|
+
* const {count, envelopes} = await getEnvelopes((VerdocsEndpoint.getDefault(), { q: 'test' });
|
|
1510
1358
|
* ```
|
|
1511
1359
|
*/
|
|
1512
1360
|
declare const getEnvelopes: (endpoint: VerdocsEndpoint, params?: IListEnvelopesParams) => Promise<{
|
|
1513
|
-
|
|
1361
|
+
count: number;
|
|
1514
1362
|
rows: number;
|
|
1515
1363
|
page: number;
|
|
1516
1364
|
envelopes: IEnvelope[];
|
|
@@ -1523,74 +1371,63 @@ declare const getEnvelopes: (endpoint: VerdocsEndpoint, params?: IListEnvelopesP
|
|
|
1523
1371
|
*/
|
|
1524
1372
|
declare const createInitials: (endpoint: VerdocsEndpoint, name: string, initials: Blob) => Promise<IInitial>;
|
|
1525
1373
|
/**
|
|
1526
|
-
* KBA is not required at this time.
|
|
1527
|
-
* field here and that in the Recipient object, this object should be considered authoritative
|
|
1528
|
-
* (this can happen if the envelope sender updates the setting after the recipient has already
|
|
1529
|
-
* been invited).
|
|
1374
|
+
* KBA is not required at this time.
|
|
1530
1375
|
*/
|
|
1531
|
-
interface
|
|
1376
|
+
interface IRecipientKbaStepNone {
|
|
1532
1377
|
envelope_id: string;
|
|
1533
1378
|
role_name: string;
|
|
1534
|
-
|
|
1379
|
+
kba_step: "none";
|
|
1535
1380
|
}
|
|
1536
1381
|
/**
|
|
1537
1382
|
* KBA has been completed and no further action is required.
|
|
1538
1383
|
*/
|
|
1539
|
-
interface
|
|
1384
|
+
interface IRecipientKbaStepComplete {
|
|
1540
1385
|
envelope_id: string;
|
|
1541
1386
|
role_name: string;
|
|
1542
|
-
|
|
1543
|
-
kba_completed: true;
|
|
1544
|
-
kba_method: string;
|
|
1387
|
+
kba_step: "complete";
|
|
1545
1388
|
}
|
|
1546
1389
|
/**
|
|
1547
1390
|
* A PIN code is required. Prompt the user to enter this PIN, and submit it via `submitKbaPin()`.
|
|
1548
1391
|
*/
|
|
1549
|
-
interface
|
|
1392
|
+
interface IRecipientKbaStepPin {
|
|
1550
1393
|
envelope_id: string;
|
|
1551
1394
|
role_name: string;
|
|
1552
|
-
|
|
1553
|
-
kba_completed: false;
|
|
1554
|
-
kba_method: "pin";
|
|
1395
|
+
kba_step: "pin";
|
|
1555
1396
|
}
|
|
1556
1397
|
/**
|
|
1557
1398
|
* A full identity verification is required. Prompt the user for their address and other (optional)
|
|
1558
1399
|
* details and submit them via `submitKbaIdentity()`.
|
|
1559
1400
|
*/
|
|
1560
|
-
interface
|
|
1401
|
+
interface IRecipientKbaStepIdentity {
|
|
1561
1402
|
envelope_id: string;
|
|
1562
1403
|
role_name: string;
|
|
1563
|
-
|
|
1564
|
-
kba_completed: false;
|
|
1565
|
-
kba_method: "identity";
|
|
1404
|
+
kba_step: "identity";
|
|
1566
1405
|
}
|
|
1567
1406
|
/**
|
|
1568
|
-
*
|
|
1569
|
-
*
|
|
1570
|
-
* 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()`.
|
|
1571
1409
|
*/
|
|
1572
|
-
interface
|
|
1410
|
+
interface IRecipientKbaStepChallenge {
|
|
1573
1411
|
envelope_id: string;
|
|
1574
1412
|
role_name: string;
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1413
|
+
kba_step: "challenge";
|
|
1414
|
+
questions: {
|
|
1415
|
+
type: string;
|
|
1416
|
+
message: string;
|
|
1417
|
+
options: string[];
|
|
1418
|
+
}[];
|
|
1580
1419
|
}
|
|
1581
1420
|
/**
|
|
1582
1421
|
* Identity verification has failed. The user should be shown the message included. No further
|
|
1583
1422
|
* signing operations may be performed.
|
|
1584
1423
|
*/
|
|
1585
|
-
interface
|
|
1424
|
+
interface IRecipientKbaStepFailed {
|
|
1586
1425
|
envelope_id: string;
|
|
1587
1426
|
role_name: string;
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
kba_method: "failed";
|
|
1591
|
-
meesage: string;
|
|
1427
|
+
kba_step: "failed";
|
|
1428
|
+
message: string;
|
|
1592
1429
|
}
|
|
1593
|
-
type
|
|
1430
|
+
type TRecipientKbaStep = IRecipientKbaStepNone | IRecipientKbaStepComplete | IRecipientKbaStepPin | IRecipientKbaStepIdentity | IRecipientKbaStepChallenge | IRecipientKbaStepFailed;
|
|
1594
1431
|
/**
|
|
1595
1432
|
* Get the current KBA status. Note that this may only be called by the recipient and requires a
|
|
1596
1433
|
* valid signing session to proceed. Although the Recipient object itself contains indications of
|
|
@@ -1598,11 +1435,11 @@ type TRecipientKbaStatus = IRecipientKbaStatusNotRequired | IRecipientKbaStatusC
|
|
|
1598
1435
|
* `recipient.kba_method` is set (not null), and `recipient.kba_completed` is false, this endpoint
|
|
1599
1436
|
* should be called to determine the next KBA step required.
|
|
1600
1437
|
*/
|
|
1601
|
-
declare const
|
|
1438
|
+
declare const getKbaStep: (endpoint: VerdocsEndpoint, envelopeId: string, roleName: string) => Promise<IRecipientKbaStepNone | IRecipientKbaStepComplete | IRecipientKbaStepPin | IRecipientKbaStepIdentity | IRecipientKbaStepChallenge | IRecipientKbaStepFailed>;
|
|
1602
1439
|
/**
|
|
1603
1440
|
* Submit a response to a KBA PIN challenge.
|
|
1604
1441
|
*/
|
|
1605
|
-
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>;
|
|
1606
1443
|
interface IKbaIdentity {
|
|
1607
1444
|
address1: string;
|
|
1608
1445
|
address2?: string;
|
|
@@ -1616,11 +1453,18 @@ interface IKbaIdentity {
|
|
|
1616
1453
|
/**
|
|
1617
1454
|
* Submit an identity response to a KBA challenge.
|
|
1618
1455
|
*/
|
|
1619
|
-
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;
|
|
1461
|
+
}[];
|
|
1462
|
+
}
|
|
1620
1463
|
/**
|
|
1621
|
-
* 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`.
|
|
1622
1466
|
*/
|
|
1623
|
-
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>;
|
|
1624
1468
|
/**
|
|
1625
1469
|
* Update a recipient's status block
|
|
1626
1470
|
*/
|
|
@@ -1691,27 +1535,27 @@ declare const deleteEnvelopeReminder: (endpoint: VerdocsEndpoint, envelopeId: st
|
|
|
1691
1535
|
/**
|
|
1692
1536
|
* Check to see if the user owns the envelope.
|
|
1693
1537
|
*/
|
|
1694
|
-
declare const userIsEnvelopeOwner: (profile: IProfile | null | undefined, envelope: IEnvelope
|
|
1538
|
+
declare const userIsEnvelopeOwner: (profile: IProfile | null | undefined, envelope: IEnvelope) => boolean;
|
|
1695
1539
|
/**
|
|
1696
1540
|
* Check to see if the user owns the envelope.
|
|
1697
1541
|
*/
|
|
1698
|
-
declare const userIsEnvelopeRecipient: (profile: IProfile | null | undefined, envelope: IEnvelope
|
|
1542
|
+
declare const userIsEnvelopeRecipient: (profile: IProfile | null | undefined, envelope: IEnvelope) => boolean;
|
|
1699
1543
|
/**
|
|
1700
1544
|
* Check to see if the envelope has pending actions.
|
|
1701
1545
|
*/
|
|
1702
|
-
declare const envelopeIsActive: (envelope: IEnvelope
|
|
1546
|
+
declare const envelopeIsActive: (envelope: IEnvelope) => boolean;
|
|
1703
1547
|
/**
|
|
1704
1548
|
* Check to see if the envelope has been completed.
|
|
1705
1549
|
*/
|
|
1706
|
-
declare const envelopeIsComplete: (envelope: IEnvelope
|
|
1550
|
+
declare const envelopeIsComplete: (envelope: IEnvelope) => boolean;
|
|
1707
1551
|
/**
|
|
1708
1552
|
* Check to see if the user owns the envelope.
|
|
1709
1553
|
*/
|
|
1710
|
-
declare const userCanCancelEnvelope: (profile: IProfile | null | undefined, envelope: IEnvelope
|
|
1554
|
+
declare const userCanCancelEnvelope: (profile: IProfile | null | undefined, envelope: IEnvelope) => boolean;
|
|
1711
1555
|
/**
|
|
1712
1556
|
* Check to see if the user owns the envelope.
|
|
1713
1557
|
*/
|
|
1714
|
-
declare const userCanFinishEnvelope: (profile: IProfile | null | undefined, envelope: IEnvelope
|
|
1558
|
+
declare const userCanFinishEnvelope: (profile: IProfile | null | undefined, envelope: IEnvelope) => boolean;
|
|
1715
1559
|
/**
|
|
1716
1560
|
* Returns true if the recipient has a pending action. Note that this does not necessarily mean the recipient can act (yet).
|
|
1717
1561
|
*/
|
|
@@ -1719,7 +1563,7 @@ declare const recipientHasAction: (recipient: IRecipient) => boolean;
|
|
|
1719
1563
|
/**
|
|
1720
1564
|
* Returns the recipients who still have a pending action. Note that not all of these recipients may be able to act (yet).
|
|
1721
1565
|
*/
|
|
1722
|
-
declare const getRecipientsWithActions: (envelope: IEnvelope
|
|
1566
|
+
declare const getRecipientsWithActions: (envelope: IEnvelope) => IRecipient[];
|
|
1723
1567
|
/**
|
|
1724
1568
|
* Returns true if the recipient can act.
|
|
1725
1569
|
*/
|
|
@@ -1731,8 +1575,8 @@ declare const userCanAct: (email: string, recipientsWithActions: IRecipient[]) =
|
|
|
1731
1575
|
/**
|
|
1732
1576
|
* Returns true if the user can act.
|
|
1733
1577
|
*/
|
|
1734
|
-
declare const userCanSignNow: (profile: IProfile | null | undefined, envelope: IEnvelope
|
|
1735
|
-
declare const getNextRecipient: (envelope: IEnvelope
|
|
1578
|
+
declare const userCanSignNow: (profile: IProfile | null | undefined, envelope: IEnvelope) => boolean | undefined;
|
|
1579
|
+
declare const getNextRecipient: (envelope: IEnvelope) => IRecipient;
|
|
1736
1580
|
/**
|
|
1737
1581
|
* Create a signature block. In a typical signing workflow, the user is asked at the beginning of the process to "adopt"
|
|
1738
1582
|
* a signature block to be used for all signature fields in the document. Thus, this is typically called one time to
|
|
@@ -2260,6 +2104,117 @@ declare const getWebhooks: (endpoint: VerdocsEndpoint) => Promise<IWebhook>;
|
|
|
2260
2104
|
* ```
|
|
2261
2105
|
*/
|
|
2262
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[]>;
|
|
2263
2218
|
/**
|
|
2264
2219
|
* Given a `rgba(r,g,b,a)` string value, returns the hex equivalent, dropping the alpha channel.
|
|
2265
2220
|
*/
|
|
@@ -2366,31 +2321,6 @@ declare const decodeJWTBody: (token: string) => any;
|
|
|
2366
2321
|
* the presence of the `document_id` field, which will only be present for signing sessions.
|
|
2367
2322
|
*/
|
|
2368
2323
|
declare const decodeAccessTokenBody: (token: string) => TSession;
|
|
2369
|
-
/**
|
|
2370
|
-
* Some template search and list endpoints return only a partial set of fields for each entry via this structure.
|
|
2371
|
-
*/
|
|
2372
|
-
interface ITemplateSummary {
|
|
2373
|
-
id: string;
|
|
2374
|
-
name: string;
|
|
2375
|
-
description: string | null;
|
|
2376
|
-
sender: TTemplateSenderType;
|
|
2377
|
-
counter: number;
|
|
2378
|
-
star_counter: number;
|
|
2379
|
-
created_at: string;
|
|
2380
|
-
updated_at: string;
|
|
2381
|
-
last_used_at: string | null;
|
|
2382
|
-
/**
|
|
2383
|
-
* If true, the template is considered "sendable" (it has at least one signer, and every signer has at least one field.)
|
|
2384
|
-
*/
|
|
2385
|
-
is_sendable: boolean;
|
|
2386
|
-
is_personal: boolean;
|
|
2387
|
-
is_public: boolean;
|
|
2388
|
-
profile_id: string;
|
|
2389
|
-
organization_id: string;
|
|
2390
|
-
reminder_id: string;
|
|
2391
|
-
tags: string[];
|
|
2392
|
-
allowed_operations: TTemplateAction[];
|
|
2393
|
-
}
|
|
2394
2324
|
interface ITemplateSearchParams {
|
|
2395
2325
|
id?: string;
|
|
2396
2326
|
name?: string;
|
|
@@ -2410,12 +2340,6 @@ interface ITemplateSearchParams {
|
|
|
2410
2340
|
row?: number;
|
|
2411
2341
|
page?: number;
|
|
2412
2342
|
}
|
|
2413
|
-
interface ITemplateSummaries {
|
|
2414
|
-
page: number;
|
|
2415
|
-
count: number;
|
|
2416
|
-
total: number;
|
|
2417
|
-
records: ITemplateSummary[];
|
|
2418
|
-
}
|
|
2419
2343
|
interface ITemplateTag {
|
|
2420
2344
|
tag_name: string;
|
|
2421
2345
|
template_id: string;
|
|
@@ -2430,128 +2354,12 @@ interface IStar {
|
|
|
2430
2354
|
template_id: string;
|
|
2431
2355
|
profile_id: string;
|
|
2432
2356
|
}
|
|
2433
|
-
interface ITemplateOwnerInfo {
|
|
2434
|
-
email: string;
|
|
2435
|
-
name: string;
|
|
2436
|
-
profile_id: string;
|
|
2437
|
-
}
|
|
2438
2357
|
interface ITemplateSearchResult {
|
|
2439
2358
|
page: number;
|
|
2440
2359
|
row: number;
|
|
2441
2360
|
total: number;
|
|
2442
2361
|
result: ITemplate[];
|
|
2443
2362
|
}
|
|
2444
|
-
declare const canPerformTemplateAction: (profile: IProfile | null | undefined, action: TTemplateAction, template?: ITemplate | ITemplateSummary) => {
|
|
2445
|
-
canPerform: boolean;
|
|
2446
|
-
message: string;
|
|
2447
|
-
};
|
|
2448
|
-
declare const hasRequiredPermissions: (profile: IProfile | null | undefined, permissions: TPermission[]) => boolean;
|
|
2449
|
-
/**
|
|
2450
|
-
* Add a field to a template.
|
|
2451
|
-
*/
|
|
2452
|
-
declare const createField: (endpoint: VerdocsEndpoint, templateId: string, params: ITemplateField) => Promise<ITemplateField>;
|
|
2453
|
-
/**
|
|
2454
|
-
* Update a template field.
|
|
2455
|
-
*/
|
|
2456
|
-
declare const updateField: (endpoint: VerdocsEndpoint, templateId: string, fieldName: string, params: Partial<ITemplateField>) => Promise<ITemplateField>;
|
|
2457
|
-
/**
|
|
2458
|
-
* REmove a field from a template.
|
|
2459
|
-
*/
|
|
2460
|
-
declare const deleteField: (endpoint: VerdocsEndpoint, templateId: string, fieldName: string) => Promise<any>;
|
|
2461
|
-
/**
|
|
2462
|
-
* Check to see if the user created the template.
|
|
2463
|
-
*/
|
|
2464
|
-
declare const userIsTemplateCreator: (profile: IProfile | null | undefined, template: ITemplate | ITemplateSummary) => boolean | null | undefined;
|
|
2465
|
-
/**
|
|
2466
|
-
* Check to see if a template is "shared" with the user.
|
|
2467
|
-
*/
|
|
2468
|
-
declare const userHasSharedTemplate: (profile: IProfile | null | undefined, template: ITemplate | ITemplateSummary) => boolean | null | undefined;
|
|
2469
|
-
/**
|
|
2470
|
-
* Check to see if the user can create a personal/private template.
|
|
2471
|
-
*/
|
|
2472
|
-
declare const userCanCreatePersonalTemplate: (profile: IProfile | null | undefined) => boolean;
|
|
2473
|
-
/**
|
|
2474
|
-
* Check to see if the user can create an org-shared template.
|
|
2475
|
-
*/
|
|
2476
|
-
declare const userCanCreateOrgTemplate: (profile: IProfile | null | undefined) => boolean;
|
|
2477
|
-
/**
|
|
2478
|
-
* Check to see if the user can create a public template.
|
|
2479
|
-
*/
|
|
2480
|
-
declare const userCanCreatePublicTemplate: (profile: IProfile | null | undefined) => boolean;
|
|
2481
|
-
/**
|
|
2482
|
-
* Check to see if the user can read/view a template.
|
|
2483
|
-
*/
|
|
2484
|
-
declare const userCanReadTemplate: (profile: IProfile | null | undefined, template: ITemplate | ITemplateSummary) => boolean | null | undefined;
|
|
2485
|
-
/**
|
|
2486
|
-
* Check to see if the user can update a tempate.
|
|
2487
|
-
*/
|
|
2488
|
-
declare const userCanUpdateTemplate: (profile: IProfile | null | undefined, template: ITemplate | ITemplateSummary) => boolean | null | undefined;
|
|
2489
|
-
/**
|
|
2490
|
-
* Check to see if the user can change whether a template is personal vs org-shared.
|
|
2491
|
-
*/
|
|
2492
|
-
declare const userCanMakeTemplatePrivate: (profile: IProfile | null | undefined, template: ITemplate | ITemplateSummary) => boolean;
|
|
2493
|
-
/**
|
|
2494
|
-
* Check to see if the user can change whether a template is personal vs org-shared.
|
|
2495
|
-
*/
|
|
2496
|
-
declare const userCanMakeTemplateShared: (profile: IProfile | null | undefined, template: ITemplate | ITemplateSummary) => boolean;
|
|
2497
|
-
/**
|
|
2498
|
-
* Check to see if the user can change whether a template is personal vs org-shared.
|
|
2499
|
-
*/
|
|
2500
|
-
declare const userCanMakeTemplatePublic: (profile: IProfile | null | undefined, template: ITemplate | ITemplateSummary) => boolean;
|
|
2501
|
-
/**
|
|
2502
|
-
* Check to see if the user can change whether a template is personal vs org-shared.
|
|
2503
|
-
*/
|
|
2504
|
-
declare const userCanChangeOrgVisibility: (profile: IProfile | null | undefined, template: ITemplate | ITemplateSummary) => boolean | null | undefined;
|
|
2505
|
-
/**
|
|
2506
|
-
* Check to see if the user can change whether a template is personal vs org-shared.
|
|
2507
|
-
*/
|
|
2508
|
-
declare const userCanDeleteTemplate: (profile: IProfile | null | undefined, template: ITemplate | ITemplateSummary) => boolean;
|
|
2509
|
-
/**
|
|
2510
|
-
* Confirm whether the user can create an envelope using the specified template.
|
|
2511
|
-
*/
|
|
2512
|
-
declare const userCanSendTemplate: (profile: IProfile | null | undefined, template: ITemplate | ITemplateSummary) => boolean | null | undefined;
|
|
2513
|
-
/**
|
|
2514
|
-
* Confirm whether the user can create a new template.
|
|
2515
|
-
*/
|
|
2516
|
-
declare const userCanCreateTemplate: (profile: IProfile | null | undefined) => boolean;
|
|
2517
|
-
/**
|
|
2518
|
-
* Check to see if the user can "build" the template (use the field builder). The user must have write access to the
|
|
2519
|
-
* template, and the template must have at least one signer role.
|
|
2520
|
-
*/
|
|
2521
|
-
declare const userCanBuildTemplate: (profile: IProfile | null | undefined, template: ITemplate) => boolean | null | undefined;
|
|
2522
|
-
declare const getFieldsForRole: (template: ITemplate, role_name: string) => ITemplateField[];
|
|
2523
|
-
/**
|
|
2524
|
-
* Check to see if the user can preview the template. The user must have read access to the template, the template must
|
|
2525
|
-
* have at least one signer, and every signer must have at least one field.
|
|
2526
|
-
*/
|
|
2527
|
-
declare const userCanPreviewTemplate: (profile: IProfile | null | undefined, template: ITemplate) => boolean | null | undefined;
|
|
2528
|
-
interface ICreateTemplateReminderRequest {
|
|
2529
|
-
setup_time: number;
|
|
2530
|
-
interval_time: number;
|
|
2531
|
-
}
|
|
2532
|
-
/**
|
|
2533
|
-
* Enable automatic reminders. setup_time is the number of days after the envelope is sent that the first reminder
|
|
2534
|
-
* should be sent. interval_time is the number of days between reminders.
|
|
2535
|
-
*/
|
|
2536
|
-
declare const createTemplateReminder: (endpoint: VerdocsEndpoint, templateId: string, params: ICreateTemplateReminderRequest) => Promise<ITemplate>;
|
|
2537
|
-
/**
|
|
2538
|
-
* Get the reminder configuration for a template.
|
|
2539
|
-
*/
|
|
2540
|
-
declare const getTemplateReminder: (endpoint: VerdocsEndpoint, templateId: string, reminderId: string) => Promise<IReminder>;
|
|
2541
|
-
/**
|
|
2542
|
-
* Update the reminder configuration for a template.
|
|
2543
|
-
*/
|
|
2544
|
-
declare const updateTemplateReminder: (endpoint: VerdocsEndpoint, templateId: string, reminderId: string, params: ICreateTemplateReminderRequest) => Promise<IReminder>;
|
|
2545
|
-
/**
|
|
2546
|
-
* Delete the reminder configuration for a template.
|
|
2547
|
-
*/
|
|
2548
|
-
declare const deleteTemplateReminder: (endpoint: VerdocsEndpoint, templateId: string, reminderId: string) => Promise<any>;
|
|
2549
|
-
declare const createTemplateRole: (endpoint: VerdocsEndpoint, templateId: string, params: IRole) => Promise<IRole>;
|
|
2550
|
-
declare const getTemplateRoles: (endpoint: VerdocsEndpoint, templateId: string) => Promise<IRole[]>;
|
|
2551
|
-
declare const getTemplateRole: (endpoint: VerdocsEndpoint, templateId: string, roleName: string) => Promise<IRole>;
|
|
2552
|
-
declare const updateTemplateRole: (endpoint: VerdocsEndpoint, templateId: string, roleName: string, params: Partial<IRole>) => Promise<IRole>;
|
|
2553
|
-
declare const deleteTemplateRole: (endpoint: VerdocsEndpoint, templateId: string, roleName: string) => Promise<any>;
|
|
2554
|
-
declare const getTemplateRoleFields: (endpoint: VerdocsEndpoint, templateId: string, roleName: string) => Promise<ITemplateField[]>;
|
|
2555
2363
|
/**
|
|
2556
2364
|
* Get the template stars for a template.
|
|
2557
2365
|
*/
|
|
@@ -2559,7 +2367,7 @@ declare const getStars: (endpoint: VerdocsEndpoint, templateId: string) => Promi
|
|
|
2559
2367
|
/**
|
|
2560
2368
|
* Toggle the template star for a template.
|
|
2561
2369
|
*/
|
|
2562
|
-
declare const toggleStar: (endpoint: VerdocsEndpoint, templateId: string) => Promise<
|
|
2370
|
+
declare const toggleStar: (endpoint: VerdocsEndpoint, templateId: string) => Promise<ITemplate>;
|
|
2563
2371
|
/**
|
|
2564
2372
|
* Apply a tag to a template.
|
|
2565
2373
|
*/
|
|
@@ -2634,16 +2442,6 @@ declare const getTemplates: (endpoint: VerdocsEndpoint, params?: IGetTemplatesPa
|
|
|
2634
2442
|
* ```
|
|
2635
2443
|
*/
|
|
2636
2444
|
declare const getTemplate: (endpoint: VerdocsEndpoint, templateId: string) => Promise<ITemplate>;
|
|
2637
|
-
/**
|
|
2638
|
-
* Get owner information for a template.
|
|
2639
|
-
*
|
|
2640
|
-
* ```typescript
|
|
2641
|
-
* import {Templates} from '@verdocs/js-sdk/Templates';
|
|
2642
|
-
*
|
|
2643
|
-
* const template = await Templates.getTemplateOwnerInfo((VerdocsEndpoint.getDefault(), '83da3d70-7857-4392-b876-c4592a304bc9');
|
|
2644
|
-
* ```
|
|
2645
|
-
*/
|
|
2646
|
-
declare const getTemplateOwnerInfo: (endpoint: VerdocsEndpoint, templateId: string) => Promise<ITemplateOwnerInfo>;
|
|
2647
2445
|
/**
|
|
2648
2446
|
* Represents a document to be attached to a template via an externally-accessible URI. A copy of the document will be
|
|
2649
2447
|
* downloaded from the specified URI. Note that the URI will be accessed without headers or other authorization methods
|
|
@@ -2698,16 +2496,6 @@ interface ITemplateCreateParams {
|
|
|
2698
2496
|
*/
|
|
2699
2497
|
fields?: ITemplateField[];
|
|
2700
2498
|
}
|
|
2701
|
-
/**
|
|
2702
|
-
* Create a template.
|
|
2703
|
-
*
|
|
2704
|
-
* ```typescript
|
|
2705
|
-
* import {Templates} from '@verdocs/js-sdk/Templates';
|
|
2706
|
-
*
|
|
2707
|
-
* const newTemplate = await Templates.createTemplate((VerdocsEndpoint.getDefault(), {...});
|
|
2708
|
-
* ```
|
|
2709
|
-
*/
|
|
2710
|
-
declare const createTemplate: (endpoint: VerdocsEndpoint, params: ITemplateCreateParams, onUploadProgress?: (percent: number, loadedBytes: number, totalBytes: number) => void) => Promise<ITemplate>;
|
|
2711
2499
|
/**
|
|
2712
2500
|
* Create a template.
|
|
2713
2501
|
*
|
|
@@ -2717,7 +2505,7 @@ declare const createTemplate: (endpoint: VerdocsEndpoint, params: ITemplateCreat
|
|
|
2717
2505
|
* const newTemplate = await Templates.createTemplatev2((VerdocsEndpoint.getDefault(), {...});
|
|
2718
2506
|
* ```
|
|
2719
2507
|
*/
|
|
2720
|
-
declare const
|
|
2508
|
+
declare const createTemplate: (endpoint: VerdocsEndpoint, params: ITemplateCreateParams, onUploadProgress?: (percent: number, loadedBytes: number, totalBytes: number) => void) => Promise<ITemplate>;
|
|
2721
2509
|
interface ITemplateCreateFromSharepointParams {
|
|
2722
2510
|
/** Name for the template to create. */
|
|
2723
2511
|
name: string;
|
|
@@ -2795,22 +2583,6 @@ interface IGetTemplateSummaryParams {
|
|
|
2795
2583
|
row?: number;
|
|
2796
2584
|
page?: number;
|
|
2797
2585
|
}
|
|
2798
|
-
/**
|
|
2799
|
-
* Get a summary of template data, typically used to populate admin panel dashboard pages.
|
|
2800
|
-
*
|
|
2801
|
-
* ```typescript
|
|
2802
|
-
* import {Templates} from '@verdocs/js-sdk/Templates';
|
|
2803
|
-
*
|
|
2804
|
-
* const summary = await Templates.getSummary((VerdocsEndpoint.getDefault(), 0);
|
|
2805
|
-
* ```
|
|
2806
|
-
*/
|
|
2807
|
-
declare const getTemplatesSummary: (endpoint: VerdocsEndpoint, params?: IGetTemplateSummaryParams) => Promise<ITemplateSummary>;
|
|
2808
|
-
/**
|
|
2809
|
-
* Wrapper for `getTemplate()` that limits queries to one every 2 seconds per template ID.
|
|
2810
|
-
* This is intended for use in component hierarchies that all rely on the same template
|
|
2811
|
-
* to avoid unnecessary repeat server calls.
|
|
2812
|
-
*/
|
|
2813
|
-
declare const throttledGetTemplate: (endpoint: VerdocsEndpoint, templateId: string) => ITemplate | Promise<ITemplate>;
|
|
2814
2586
|
interface ITemplateListParams {
|
|
2815
2587
|
status?: string[];
|
|
2816
2588
|
q?: string;
|
|
@@ -2914,4 +2686,4 @@ declare const isValidEmail: (email: string | undefined) => boolean;
|
|
|
2914
2686
|
declare const isValidPhone: (phone: string | undefined) => boolean;
|
|
2915
2687
|
declare const isValidRoleName: (value: string, roles: IRole[]) => boolean;
|
|
2916
2688
|
declare const isValidTag: (value: string, tags: string[]) => boolean;
|
|
2917
|
-
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,
|
|
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 };
|