@verdocs/js-sdk 4.1.5 → 4.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +211 -63
- package/dist/index.d.ts +211 -63
- package/dist/index.js +165 -48
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +158 -47
- package/dist/index.mjs.map +1 -1
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -384,6 +384,9 @@ interface IInitial {
|
|
|
384
384
|
deleted_at: string | null;
|
|
385
385
|
profile?: IProfile;
|
|
386
386
|
}
|
|
387
|
+
interface IKbaPINRequired {
|
|
388
|
+
type: "pin";
|
|
389
|
+
}
|
|
387
390
|
interface IRecipient {
|
|
388
391
|
envelope_id: string;
|
|
389
392
|
role_name: string;
|
|
@@ -417,10 +420,25 @@ interface IRecipient {
|
|
|
417
420
|
last_attempt_at: string;
|
|
418
421
|
/**
|
|
419
422
|
* If set, "KBA required" will carry through to automatically enable the same setting in Envelopes
|
|
420
|
-
* created from this template.
|
|
423
|
+
* created from this template. For privacy reasons, this field will only be visible to the creator
|
|
424
|
+
* of the envelope and the recipient referenced.
|
|
425
|
+
*/
|
|
426
|
+
kba_method: "pin" | "identity" | null;
|
|
427
|
+
/**
|
|
428
|
+
* If KBA is set to "PIN" this will be set to the PIN code required. For security reasons, this
|
|
429
|
+
* field will only be visible to the creator of the envelope.
|
|
430
|
+
*/
|
|
431
|
+
kba_pin?: string | null;
|
|
432
|
+
/**
|
|
433
|
+
* If KBA has been completed successfully, this will be set to true. For privacy reasons, this
|
|
434
|
+
* field will only be visible to the creator of the envelope and the recipient referenced.
|
|
421
435
|
*/
|
|
422
|
-
kba_method: string | null;
|
|
423
436
|
kba_completed: boolean;
|
|
437
|
+
/**
|
|
438
|
+
* If KBA has been completed (or partially successfully, this will contain metadata related to
|
|
439
|
+
* the questions and answers from the process. For privacy reasons, this field will only be visible
|
|
440
|
+
* to the recipient referenced.
|
|
441
|
+
*/
|
|
424
442
|
kba_details: Record<string, any>;
|
|
425
443
|
envelope?: IEnvelope;
|
|
426
444
|
profile?: IProfile;
|
|
@@ -467,7 +485,7 @@ interface IRole {
|
|
|
467
485
|
* If set, "KBA required" will carry through to automatically enable the same setting in Envelopes
|
|
468
486
|
* created from this template.
|
|
469
487
|
*/
|
|
470
|
-
kba_method:
|
|
488
|
+
kba_method: "pin" | "identity" | null;
|
|
471
489
|
}
|
|
472
490
|
interface ISignature {
|
|
473
491
|
id: string;
|
|
@@ -1346,6 +1364,105 @@ declare const getEnvelopesByTemplateId: (endpoint: VerdocsEndpoint, templateId:
|
|
|
1346
1364
|
* to be "stamped" by the user.
|
|
1347
1365
|
*/
|
|
1348
1366
|
declare const createInitials: (endpoint: VerdocsEndpoint, name: string, initials: Blob) => Promise<IInitial>;
|
|
1367
|
+
/**
|
|
1368
|
+
* KBA is not required at this time. Note that if there is a discrepancy between the `kba_required`
|
|
1369
|
+
* field here and that in the Recipient object, this object should be considered authoritative
|
|
1370
|
+
* (this can happen if the envelope sender updates the setting after the recipient has already
|
|
1371
|
+
* been invited).
|
|
1372
|
+
*/
|
|
1373
|
+
interface IRecipientKbaStatusNotRequired {
|
|
1374
|
+
envelope_id: string;
|
|
1375
|
+
role_name: string;
|
|
1376
|
+
kba_required: false;
|
|
1377
|
+
}
|
|
1378
|
+
/**
|
|
1379
|
+
* KBA has been completed and no further action is required.
|
|
1380
|
+
*/
|
|
1381
|
+
interface IRecipientKbaStatusComplete {
|
|
1382
|
+
envelope_id: string;
|
|
1383
|
+
role_name: string;
|
|
1384
|
+
kba_required: true;
|
|
1385
|
+
kba_completed: true;
|
|
1386
|
+
kba_method: string;
|
|
1387
|
+
}
|
|
1388
|
+
/**
|
|
1389
|
+
* A PIN code is required. Prompt the user to enter this PIN, and submit it via `submitKbaPin()`.
|
|
1390
|
+
*/
|
|
1391
|
+
interface IRecipientKbaStatusPinRequired {
|
|
1392
|
+
envelope_id: string;
|
|
1393
|
+
role_name: string;
|
|
1394
|
+
kba_required: true;
|
|
1395
|
+
kba_completed: false;
|
|
1396
|
+
kba_method: "pin";
|
|
1397
|
+
}
|
|
1398
|
+
/**
|
|
1399
|
+
* A full identity verification is required. Prompt the user for their address and other (optional)
|
|
1400
|
+
* details and submit them via `submitKbaIdentity()`.
|
|
1401
|
+
*/
|
|
1402
|
+
interface IRecipientKbaStatusIdentityRequired {
|
|
1403
|
+
envelope_id: string;
|
|
1404
|
+
role_name: string;
|
|
1405
|
+
kba_required: true;
|
|
1406
|
+
kba_completed: false;
|
|
1407
|
+
kba_method: "identity";
|
|
1408
|
+
}
|
|
1409
|
+
/**
|
|
1410
|
+
* Triggered by full identity verification if additional challenges are required. The recipient
|
|
1411
|
+
* should be shown the message and options, and submit a response via `submitKbaChallengeResponse()`.
|
|
1412
|
+
* Note that this response may be issued more than once if multiple challenges are required.
|
|
1413
|
+
*/
|
|
1414
|
+
interface IRecipientKbaChallengeRequired {
|
|
1415
|
+
envelope_id: string;
|
|
1416
|
+
role_name: string;
|
|
1417
|
+
kba_required: true;
|
|
1418
|
+
kba_completed: false;
|
|
1419
|
+
kba_method: "challenge";
|
|
1420
|
+
message: string;
|
|
1421
|
+
options: string[];
|
|
1422
|
+
}
|
|
1423
|
+
/**
|
|
1424
|
+
* Identity verification has failed. The user should be shown the message included. No further
|
|
1425
|
+
* signing operations may be performed.
|
|
1426
|
+
*/
|
|
1427
|
+
interface IRecipientKbaStatusFailed {
|
|
1428
|
+
envelope_id: string;
|
|
1429
|
+
role_name: string;
|
|
1430
|
+
kba_required: true;
|
|
1431
|
+
kba_completed: false;
|
|
1432
|
+
kba_method: "failed";
|
|
1433
|
+
meesage: string;
|
|
1434
|
+
}
|
|
1435
|
+
type TRecipientKbaStatus = IRecipientKbaStatusNotRequired | IRecipientKbaStatusComplete | IRecipientKbaStatusPinRequired | IRecipientKbaStatusIdentityRequired | IRecipientKbaChallengeRequired | IRecipientKbaStatusFailed;
|
|
1436
|
+
/**
|
|
1437
|
+
* Get the current KBA status. Note that this may only be called by the recipient and requires a
|
|
1438
|
+
* valid signing session to proceed. Although the Recipient object itself contains indications of
|
|
1439
|
+
* whether KBA is required, it will not contain the current status of the process. If
|
|
1440
|
+
* `recipient.kba_method` is set (not null), and `recipient.kba_completed` is false, this endpoint
|
|
1441
|
+
* should be called to determine the next KBA step required.
|
|
1442
|
+
*/
|
|
1443
|
+
declare const getKbaStatus: (endpoint: VerdocsEndpoint, envelopeId: string, roleName: string) => Promise<IRecipientKbaStatusNotRequired | IRecipientKbaStatusComplete | IRecipientKbaStatusPinRequired | IRecipientKbaStatusIdentityRequired | IRecipientKbaChallengeRequired | IRecipientKbaStatusFailed>;
|
|
1444
|
+
/**
|
|
1445
|
+
* Submit a response to a KBA PIN challenge.
|
|
1446
|
+
*/
|
|
1447
|
+
declare const submitKbaPin: (endpoint: VerdocsEndpoint, envelopeId: string, roleName: string, pin: string) => Promise<IRecipientKbaStatusNotRequired | IRecipientKbaStatusComplete | IRecipientKbaStatusPinRequired | IRecipientKbaStatusIdentityRequired | IRecipientKbaChallengeRequired | IRecipientKbaStatusFailed>;
|
|
1448
|
+
interface IKbaIdentity {
|
|
1449
|
+
address1: string;
|
|
1450
|
+
address2?: string;
|
|
1451
|
+
city?: string;
|
|
1452
|
+
state?: string;
|
|
1453
|
+
postalCode?: string;
|
|
1454
|
+
country?: string;
|
|
1455
|
+
ssn?: string;
|
|
1456
|
+
ssnLast4?: string;
|
|
1457
|
+
}
|
|
1458
|
+
/**
|
|
1459
|
+
* Submit an identity response to a KBA challenge.
|
|
1460
|
+
*/
|
|
1461
|
+
declare const submitKbaIdentity: (endpoint: VerdocsEndpoint, envelopeId: string, roleName: string, identity: IKbaIdentity) => Promise<IRecipientKbaStatusNotRequired | IRecipientKbaStatusComplete | IRecipientKbaStatusPinRequired | IRecipientKbaStatusIdentityRequired | IRecipientKbaChallengeRequired | IRecipientKbaStatusFailed>;
|
|
1462
|
+
/**
|
|
1463
|
+
* Submit an identity response to a KBA challenge.
|
|
1464
|
+
*/
|
|
1465
|
+
declare const submitKbaChallengeResponse: (endpoint: VerdocsEndpoint, envelopeId: string, roleName: string, response: string) => Promise<IRecipientKbaStatusNotRequired | IRecipientKbaStatusComplete | IRecipientKbaStatusPinRequired | IRecipientKbaStatusIdentityRequired | IRecipientKbaChallengeRequired | IRecipientKbaStatusFailed>;
|
|
1349
1466
|
/**
|
|
1350
1467
|
* Update a recipient's status block
|
|
1351
1468
|
*/
|
|
@@ -1653,6 +1770,26 @@ declare const deleteOrganization: (endpoint: VerdocsEndpoint, organizationId: st
|
|
|
1653
1770
|
* Update an organization.
|
|
1654
1771
|
*/
|
|
1655
1772
|
declare const updateOrganization: (endpoint: VerdocsEndpoint, organizationId: string, params: Partial<IOrganization>) => Promise<IOrganization>;
|
|
1773
|
+
/**
|
|
1774
|
+
* Update the organization's logo. This can only be called by an admin or owner of the organization.
|
|
1775
|
+
*
|
|
1776
|
+
* ```typescript
|
|
1777
|
+
* import {uploadOrganizationLogo} from '@verdocs/js-sdk';
|
|
1778
|
+
*
|
|
1779
|
+
* await uploadOrganizationLogo((VerdocsEndpoint.getDefault(), file);
|
|
1780
|
+
* ```
|
|
1781
|
+
*/
|
|
1782
|
+
declare const uploadOrganizationLogo: (endpoint: VerdocsEndpoint, file: File, onUploadProgress?: (percent: number, loadedBytes: number, totalBytes: number) => void) => Promise<IProfile>;
|
|
1783
|
+
/**
|
|
1784
|
+
* Update the organization's thumbnail. This can only be called by an admin or owner of the organization.
|
|
1785
|
+
*
|
|
1786
|
+
* ```typescript
|
|
1787
|
+
* import {uploadOrganizationThumbnail} from '@verdocs/js-sdk';
|
|
1788
|
+
*
|
|
1789
|
+
* await uploadOrganizationThumbnail((VerdocsEndpoint.getDefault(), file);
|
|
1790
|
+
* ```
|
|
1791
|
+
*/
|
|
1792
|
+
declare const uploadOrganizationThumbnail: (endpoint: VerdocsEndpoint, file: File, onUploadProgress?: (percent: number, loadedBytes: number, totalBytes: number) => void) => Promise<IProfile>;
|
|
1656
1793
|
/**
|
|
1657
1794
|
* Get the registered Webhooks for the caller's organization.
|
|
1658
1795
|
*/
|
|
@@ -2315,12 +2452,6 @@ declare const isValidEmail: (email: string | undefined) => boolean;
|
|
|
2315
2452
|
declare const isValidPhone: (phone: string | undefined) => boolean;
|
|
2316
2453
|
declare const isValidRoleName: (value: string, roles: IRole[]) => boolean;
|
|
2317
2454
|
declare const isValidTag: (value: string, tags: string[]) => boolean;
|
|
2318
|
-
interface ICreateProfileRequest {
|
|
2319
|
-
first_name: string;
|
|
2320
|
-
last_name: string;
|
|
2321
|
-
email: string;
|
|
2322
|
-
phone?: string;
|
|
2323
|
-
}
|
|
2324
2455
|
interface ISwitchProfileResponse {
|
|
2325
2456
|
profile: IProfile;
|
|
2326
2457
|
accessToken: string;
|
|
@@ -2402,11 +2533,10 @@ declare const authenticate: (endpoint: VerdocsEndpoint, params: TAuthenticationR
|
|
|
2402
2533
|
* If called before the session expires, this will refresh the caller's session and tokens.
|
|
2403
2534
|
*
|
|
2404
2535
|
* ```typescript
|
|
2405
|
-
* import {Auth} from '@verdocs/js-sdk
|
|
2406
|
-
* import {Transport} from '@verdocs/js-sdk/HTTP';
|
|
2536
|
+
* import {Auth, VerdocsEndpoint} from '@verdocs/js-sdk';
|
|
2407
2537
|
*
|
|
2408
2538
|
* const {accessToken} = await Auth.refreshTokens();
|
|
2409
|
-
*
|
|
2539
|
+
* VerdocsEndpoint.setAuthToken(accessToken);
|
|
2410
2540
|
* ```
|
|
2411
2541
|
*/
|
|
2412
2542
|
declare const refreshToken: (endpoint: VerdocsEndpoint, refreshToken: string) => Promise<IAuthenticateResponse>;
|
|
@@ -2414,7 +2544,7 @@ declare const refreshToken: (endpoint: VerdocsEndpoint, refreshToken: string) =>
|
|
|
2414
2544
|
* Update the caller's password when the old password is known (typically for logged-in users).
|
|
2415
2545
|
*
|
|
2416
2546
|
* ```typescript
|
|
2417
|
-
* import {changePassword} from '@verdocs/js-sdk
|
|
2547
|
+
* import {changePassword} from '@verdocs/js-sdk';
|
|
2418
2548
|
*
|
|
2419
2549
|
* const {status, message} = await changePassword({ email, oldPassword, newPassword });
|
|
2420
2550
|
* if (status !== 'OK') {
|
|
@@ -2427,7 +2557,7 @@ declare const changePassword: (endpoint: VerdocsEndpoint, params: IUpdatePasswor
|
|
|
2427
2557
|
* Request a password reset, when the old password is not known (typically in login forms).
|
|
2428
2558
|
*
|
|
2429
2559
|
* ```typescript
|
|
2430
|
-
* import {resetPassword} from '@verdocs/js-sdk
|
|
2560
|
+
* import {resetPassword} from '@verdocs/js-sdk';
|
|
2431
2561
|
*
|
|
2432
2562
|
* const {success} = await resetPassword({ email });
|
|
2433
2563
|
* if (status !== 'OK') {
|
|
@@ -2448,9 +2578,23 @@ declare const resetPassword: (endpoint: VerdocsEndpoint, params: {
|
|
|
2448
2578
|
* "anonymous" mode while verification is being performed.
|
|
2449
2579
|
*
|
|
2450
2580
|
* ```typescript
|
|
2451
|
-
* import {
|
|
2581
|
+
* import {resendVerification} from '@verdocs/js-sdk';
|
|
2452
2582
|
*
|
|
2453
|
-
* const result = await
|
|
2583
|
+
* const result = await resendVerification();
|
|
2584
|
+
* ```
|
|
2585
|
+
*/
|
|
2586
|
+
declare const verifyEmail: (endpoint: VerdocsEndpoint, email: string, code: string) => Promise<IAuthenticateResponse>;
|
|
2587
|
+
/**
|
|
2588
|
+
* Resend the email verification request. Note that to prevent certain forms of abuse, the email address is not
|
|
2589
|
+
* a parameter here. Instead, the caller must be authenticated as the (unverified) user. To simplify this process,
|
|
2590
|
+
* the access token to be used may be passed directly as a parameter here. This avoids the need to set it as the
|
|
2591
|
+
* active token on an endpoint, which may be inconvenient in workflows where it is preferable to keep the user in
|
|
2592
|
+
* "anonymous" mode while verification is being performed.
|
|
2593
|
+
*
|
|
2594
|
+
* ```typescript
|
|
2595
|
+
* import {resendVerification} from '@verdocs/js-sdk';
|
|
2596
|
+
*
|
|
2597
|
+
* const result = await resendVerification();
|
|
2454
2598
|
* ```
|
|
2455
2599
|
*/
|
|
2456
2600
|
declare const resendVerification: (endpoint: VerdocsEndpoint, accessToken?: string) => Promise<{
|
|
@@ -2461,9 +2605,9 @@ declare const getNotifications: (endpoint: VerdocsEndpoint) => Promise<any>;
|
|
|
2461
2605
|
* Get the user's available profiles. The current profile will be marked with `current: true`.
|
|
2462
2606
|
*
|
|
2463
2607
|
* ```typescript
|
|
2464
|
-
* import {
|
|
2608
|
+
* import {getProfiles} from '@verdocs/js-sdk';
|
|
2465
2609
|
*
|
|
2466
|
-
* const profiles = await
|
|
2610
|
+
* const profiles = await getProfiles();
|
|
2467
2611
|
* ```
|
|
2468
2612
|
*/
|
|
2469
2613
|
declare const getProfiles: (endpoint: VerdocsEndpoint) => Promise<IProfile[]>;
|
|
@@ -2471,91 +2615,95 @@ declare const getProfiles: (endpoint: VerdocsEndpoint) => Promise<IProfile[]>;
|
|
|
2471
2615
|
* Get the user's available profiles. The current profile will be marked with `current: true`.
|
|
2472
2616
|
*
|
|
2473
2617
|
* ```typescript
|
|
2474
|
-
* import {
|
|
2618
|
+
* import {getCurrentProfile} from '@verdocs/js-sdk';
|
|
2475
2619
|
*
|
|
2476
|
-
* const profiles = await
|
|
2620
|
+
* const profiles = await getCurrentProfile();
|
|
2477
2621
|
* ```
|
|
2478
2622
|
*/
|
|
2479
2623
|
declare const getCurrentProfile: (endpoint: VerdocsEndpoint) => Promise<IProfile | undefined>;
|
|
2480
|
-
/**
|
|
2481
|
-
* Create a profile. If the caller does not have a "current" profile set, the new profile will be made current.
|
|
2482
|
-
*
|
|
2483
|
-
* ```typescript
|
|
2484
|
-
* import {Profiles} from '@verdocs/js-sdk/Users';
|
|
2485
|
-
*
|
|
2486
|
-
* const newProfile = await Profiles.createProfile({ first_name: 'FIRST', last_name: 'LAST', email: 'EMAIL' });
|
|
2487
|
-
* ```
|
|
2488
|
-
*/
|
|
2489
|
-
declare const createProfile: (endpoint: VerdocsEndpoint, params: ICreateProfileRequest) => Promise<IProfile>;
|
|
2490
2624
|
/**
|
|
2491
2625
|
* Get a profile. The caller must have admin access to the given profile.
|
|
2492
2626
|
* TODO: Add a "public" profile endpoint for public pages
|
|
2493
2627
|
*
|
|
2494
2628
|
* ```typescript
|
|
2495
|
-
* import {
|
|
2629
|
+
* import {getProfile} from '@verdocs/js-sdk';
|
|
2496
2630
|
*
|
|
2497
|
-
* const profile = await
|
|
2631
|
+
* const profile = await getProfile('PROFILEID');
|
|
2498
2632
|
* ```
|
|
2499
2633
|
*/
|
|
2500
2634
|
declare const getProfile: (endpoint: VerdocsEndpoint, profileId: string) => Promise<IProfile>;
|
|
2501
2635
|
/**
|
|
2502
|
-
* Switch the caller's "current" profile. The current profile is used for permissions checking
|
|
2503
|
-
* for most operations in Verdocs. It is important to select the
|
|
2636
|
+
* Switch the caller's "current" profile. The current profile is used for permissions checking
|
|
2637
|
+
* and profile_id field settings for most operations in Verdocs. It is important to select the
|
|
2638
|
+
* appropropriate profile before calling other API functions.
|
|
2504
2639
|
*
|
|
2505
2640
|
* ```typescript
|
|
2506
|
-
* import {
|
|
2641
|
+
* import {switchProfile} from '@verdocs/js-sdk';
|
|
2507
2642
|
*
|
|
2508
|
-
* const newProfile = await
|
|
2643
|
+
* const newProfile = await switchProfile('PROFILEID');
|
|
2509
2644
|
* ```
|
|
2510
2645
|
*/
|
|
2511
2646
|
declare const switchProfile: (endpoint: VerdocsEndpoint, profileId: string) => Promise<ISwitchProfileResponse>;
|
|
2512
2647
|
/**
|
|
2513
|
-
* Update a profile. For future expansion, the profile ID to update is required, but currently
|
|
2514
|
-
* "current" profile for the caller.
|
|
2648
|
+
* Update a profile. For future expansion, the profile ID to update is required, but currently
|
|
2649
|
+
* this must also be the "current" profile for the caller.
|
|
2515
2650
|
*
|
|
2516
2651
|
* ```typescript
|
|
2517
|
-
* import {
|
|
2652
|
+
* import {updateProfile} from '@verdocs/js-sdk/Users';
|
|
2518
2653
|
*
|
|
2519
|
-
* const newProfile = await
|
|
2654
|
+
* const newProfile = await updateProfile('PROFILEID');
|
|
2520
2655
|
* ```
|
|
2521
2656
|
*/
|
|
2522
2657
|
declare const updateProfile: (endpoint: VerdocsEndpoint, profileId: string, params: IUpdateProfileRequest) => Promise<IProfile>;
|
|
2523
2658
|
/**
|
|
2524
|
-
* Delete a profile. If the requested profile is the caller's curent profile, the next
|
|
2659
|
+
* Delete a profile. If the requested profile is the caller's curent profile, the next
|
|
2660
|
+
* available profile will be selected.
|
|
2525
2661
|
*
|
|
2526
2662
|
* ```typescript
|
|
2527
|
-
* import {
|
|
2663
|
+
* import {deleteProfile} from '@verdocs/js-sdk';
|
|
2528
2664
|
*
|
|
2529
|
-
* await
|
|
2665
|
+
* await deleteProfile('PROFILEID');
|
|
2530
2666
|
* ```
|
|
2531
2667
|
*/
|
|
2532
|
-
declare const deleteProfile: (endpoint: VerdocsEndpoint, profileId: string) => Promise<
|
|
2668
|
+
declare const deleteProfile: (endpoint: VerdocsEndpoint, profileId: string) => Promise<IAuthenticateResponse | {
|
|
2669
|
+
status: "OK";
|
|
2670
|
+
message: "Your last profile has been deleted. You are now logged out.";
|
|
2671
|
+
}>;
|
|
2533
2672
|
/**
|
|
2534
|
-
* Create a user account
|
|
2535
|
-
*
|
|
2673
|
+
* Create a new user account. Note that there are two registration paths for creation:
|
|
2674
|
+
* - Get invited to an organization, by an admin or owner of that org.
|
|
2675
|
+
* - Created a new organization. The caller will become the first owner of the new org.
|
|
2676
|
+
*
|
|
2677
|
+
* This endpoint is for the second path, so an organization name is required. It is NOT
|
|
2678
|
+
* required to be unique because it is very common for businesses to have the same names,
|
|
2679
|
+
* without conflicting (e.g. "Delta" could be Delta Faucet or Delta Airlines).
|
|
2680
|
+
*
|
|
2681
|
+
* The new profile will automatically be set as the user's "current" profile, and new
|
|
2682
|
+
* session tokens will be returned to the caller. However, the caller's email may not yet
|
|
2683
|
+
* be verified. In that case, the caller will not yet be able to call other endpoints in
|
|
2684
|
+
* the Verdocs API. The caller will need to check their email for a verification code,
|
|
2685
|
+
* which should be submitted via the `verifyEmail` endpoint.
|
|
2536
2686
|
*
|
|
2537
2687
|
* ```typescript
|
|
2538
|
-
* import {
|
|
2688
|
+
* import {createProfile} from '@verdocs/js-sdk';
|
|
2539
2689
|
*
|
|
2540
|
-
* const
|
|
2541
|
-
* orgName: 'ORG', email: 'a@b.com', password: '12345678', firstName: 'FIRST', lastName: 'LAST'
|
|
2690
|
+
* const newSession = await createProfile({
|
|
2691
|
+
* orgName: 'NEW ORG', email: 'a@b.com', password: '12345678', firstName: 'FIRST', lastName: 'LAST'
|
|
2542
2692
|
* });
|
|
2543
2693
|
* ```
|
|
2544
2694
|
*/
|
|
2545
|
-
declare const
|
|
2695
|
+
declare const createProfile: (endpoint: VerdocsEndpoint, params: ICreateAccountRequest) => Promise<{
|
|
2546
2696
|
profile: IProfile;
|
|
2547
2697
|
organization: IOrganization;
|
|
2548
2698
|
}>;
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
declare const
|
|
2559
|
-
|
|
2560
|
-
}>;
|
|
2561
|
-
export { TRequestStatus, TTemplateSenderType, TTemplatePermission, TTemplateAction, TAccountPermission, TOrgPermission, TApiKeyPermission, TPermission, TRecipientAction, TEnvelopeStatus, TRecipientStatus, TRecipientType, TRole, TSortTemplateBy, TAccessKeyType, 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, IRecipient, IReminder, IRole, ISignature, ITemplate, ITemplateDocument, ITemplateField, ITextFieldSetting, ITemplateFieldSetting, IActivityEntry, TEnvironment, TSessionChangedListener, VerdocsEndpointOptions, VerdocsEndpoint, createEnvelope, getEnvelopesSummary, IEnvelopeSearchParams, searchEnvelopes, ISigningSessionResult, getSigningSession, getEnvelopeRecipients, getEnvelope, getEnvelopeDocument, getDocumentDownloadLink, getDocumentPreviewLink, cancelEnvelope, getEnvelopeFile, updateEnvelopeField, updateEnvelopeFieldSignature, updateEnvelopeFieldInitials, uploadEnvelopeFieldAttachment, deleteEnvelopeFieldAttachment, getFieldAttachment, getEnvelopeDocumentPageDisplayUri, throttledGetEnvelope, ITimeRange, IListEnvelopesParams, listEnvelopes, getEnvelopesByTemplateId, createInitials, 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, IEnvelopesSearchResultEntry, IEnvelopesSearchResult, IEnvelopesSummary, IDocumentSearchOptions, ICreateEnvelopeRole, IEnvelopeSummary, IEnvelopeSummaries, IInPersonLinkResponse, IUpdateRecipientSubmitParams, IUpdateRecipientDeclineParams, IUpdateRecipientClaimEnvelope, IUpdateRecipientStatus, IUpdateRecipientAgreedParams, IUpdateRecipientNameParams, IUpdateRecipientPrepareParams, ICreateEnvelopeReminderRequest, ICreateEnvelopeRequest, TEnvelopePermission, getApiKeys, createApiKey, rotateApiKey, updateApiKey, deleteApiKey, getGroups, getGroup, createGroup, addGroupMember, deleteGroupMember, updateGroup, getOrganizationInvitations, createOrganizationInvitation, deleteOrganizationInvitation, updateOrganizationInvitation, resendOrganizationInvitation, getOrganizationInvitation, acceptOrganizationInvitation, declineOrganizationInvitation, getOrganizationMembers, deleteOrganizationMember, updateOrganizationMember, getOrganizations, getOrganization, createOrganization, deleteOrganization, updateOrganization, ICreateApiKeyRequest, IUpdateApiKeyRequest, ICreateInvitationRequest, ISetWebhookRequest, getWebhooks, setWebhooks, 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, getTemplateOwnerInfo, IDocumentFromUri, IDocumentFromData, ITemplateCreateParams, createTemplate, createTemplatev2, ITemplateCreateFromSharepointParams, createTemplateFromSharepoint, updateTemplate, deleteTemplate, searchTemplates, ISearchTimeRange, IGetTemplateSummarySortBy, IGetTemplateSummaryParams, getTemplatesSummary, throttledGetTemplate, ITemplateListParams, listTemplates, getTemplateDocuments, getTemplateDocument, createTemplateDocument, deleteTemplateDocument, getTemplateDocumentFile, getTemplateDocumentThumbnail, getTemplateDocumentPageDisplayUri, ITemplateSummary, ITemplateSearchParams, ITemplateSummaries, ITemplateTag, ITag, IStar, ITemplateOwnerInfo, ITemplateSearchResult, IValidator, getValidators, getValidator, isValidEmail, isValidPhone, isValidRoleName, isValidTag, IROPCRequest, IClientCredentialsRequest, IRefreshTokenRequest, TAuthenticationRequest, authenticate, refreshToken, changePassword, resetPassword, resendVerification, getNotifications, getProfiles, getCurrentProfile, createProfile, getProfile, switchProfile, updateProfile, deleteProfile, createAccount, ISignupSurvey, recordSignupSurvey, ICreateProfileRequest, ISwitchProfileResponse, 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 };
|
|
2699
|
+
/**
|
|
2700
|
+
* Update the caller's profile photo. This can only be called for the user's "current" profile.
|
|
2701
|
+
*
|
|
2702
|
+
* ```typescript
|
|
2703
|
+
* import {uploadProfilePhoto} from '@verdocs/js-sdk';
|
|
2704
|
+
*
|
|
2705
|
+
* await uploadProfilePhoto((VerdocsEndpoint.getDefault(), file);
|
|
2706
|
+
* ```
|
|
2707
|
+
*/
|
|
2708
|
+
declare const uploadProfilePhoto: (endpoint: VerdocsEndpoint, file: File, onUploadProgress?: (percent: number, loadedBytes: number, totalBytes: number) => void) => Promise<IProfile>;
|
|
2709
|
+
export { TRequestStatus, TTemplateSenderType, TTemplatePermission, TTemplateAction, TAccountPermission, TOrgPermission, TApiKeyPermission, TPermission, TRecipientAction, TEnvelopeStatus, TRecipientStatus, TRecipientType, TRole, TSortTemplateBy, TAccessKeyType, 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, IActivityEntry, TEnvironment, TSessionChangedListener, VerdocsEndpointOptions, VerdocsEndpoint, createEnvelope, getEnvelopesSummary, IEnvelopeSearchParams, searchEnvelopes, ISigningSessionResult, getSigningSession, getEnvelopeRecipients, getEnvelope, getEnvelopeDocument, getDocumentDownloadLink, getDocumentPreviewLink, cancelEnvelope, getEnvelopeFile, updateEnvelopeField, updateEnvelopeFieldSignature, updateEnvelopeFieldInitials, uploadEnvelopeFieldAttachment, deleteEnvelopeFieldAttachment, getFieldAttachment, getEnvelopeDocumentPageDisplayUri, throttledGetEnvelope, ITimeRange, IListEnvelopesParams, listEnvelopes, getEnvelopesByTemplateId, createInitials, IRecipientKbaStatusNotRequired, IRecipientKbaStatusComplete, IRecipientKbaStatusPinRequired, IRecipientKbaStatusIdentityRequired, IRecipientKbaChallengeRequired, IRecipientKbaStatusFailed, TRecipientKbaStatus, getKbaStatus, submitKbaPin, IKbaIdentity, submitKbaIdentity, 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, IEnvelopesSearchResultEntry, IEnvelopesSearchResult, IEnvelopesSummary, IDocumentSearchOptions, ICreateEnvelopeRole, IEnvelopeSummary, IEnvelopeSummaries, IInPersonLinkResponse, IUpdateRecipientSubmitParams, IUpdateRecipientDeclineParams, IUpdateRecipientClaimEnvelope, IUpdateRecipientStatus, IUpdateRecipientAgreedParams, IUpdateRecipientNameParams, IUpdateRecipientPrepareParams, ICreateEnvelopeReminderRequest, ICreateEnvelopeRequest, TEnvelopePermission, getApiKeys, createApiKey, rotateApiKey, updateApiKey, deleteApiKey, getGroups, getGroup, createGroup, addGroupMember, deleteGroupMember, updateGroup, getOrganizationInvitations, createOrganizationInvitation, deleteOrganizationInvitation, updateOrganizationInvitation, resendOrganizationInvitation, getOrganizationInvitation, acceptOrganizationInvitation, declineOrganizationInvitation, getOrganizationMembers, deleteOrganizationMember, updateOrganizationMember, getOrganizations, getOrganization, createOrganization, deleteOrganization, updateOrganization, uploadOrganizationLogo, uploadOrganizationThumbnail, ICreateApiKeyRequest, IUpdateApiKeyRequest, ICreateInvitationRequest, ISetWebhookRequest, getWebhooks, setWebhooks, 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, getTemplateOwnerInfo, IDocumentFromUri, IDocumentFromData, ITemplateCreateParams, createTemplate, createTemplatev2, ITemplateCreateFromSharepointParams, createTemplateFromSharepoint, updateTemplate, deleteTemplate, searchTemplates, ISearchTimeRange, IGetTemplateSummarySortBy, IGetTemplateSummaryParams, getTemplatesSummary, throttledGetTemplate, ITemplateListParams, listTemplates, getTemplateDocuments, getTemplateDocument, createTemplateDocument, deleteTemplateDocument, getTemplateDocumentFile, getTemplateDocumentThumbnail, getTemplateDocumentPageDisplayUri, ITemplateSummary, ITemplateSearchParams, ITemplateSummaries, ITemplateTag, ITag, IStar, ITemplateOwnerInfo, 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, uploadProfilePhoto, ISwitchProfileResponse, 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 };
|