@verdocs/js-sdk 4.0.11 → 4.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +70 -149
- package/dist/index.d.ts +70 -149
- package/dist/index.js +130 -187
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +124 -169
- package/dist/index.mjs.map +1 -1
- package/dist/package.json +2 -1
- package/package.json +2 -1
package/dist/index.d.ts
CHANGED
|
@@ -77,22 +77,18 @@ interface IOrganization {
|
|
|
77
77
|
address2: string | null;
|
|
78
78
|
phone: string | null;
|
|
79
79
|
/** If the organization is a business, its name. Note that a business name can be different from an organization name. */
|
|
80
|
-
business_name: string | null;
|
|
81
|
-
/** If true, the organization is a business */
|
|
82
|
-
is_business: boolean;
|
|
83
|
-
/** If the organization is a business, its name. Note that a business name can be different from an organization name. */
|
|
84
80
|
contact_email: string | null;
|
|
85
|
-
slug
|
|
81
|
+
slug?: string | null;
|
|
86
82
|
/** Web site URL */
|
|
87
|
-
url
|
|
88
|
-
full_logo_url
|
|
89
|
-
thumbnail_url
|
|
90
|
-
primary_color
|
|
91
|
-
secondary_color
|
|
92
|
-
entitlements
|
|
93
|
-
mtd_usage
|
|
94
|
-
ytd_usage
|
|
95
|
-
data
|
|
83
|
+
url?: string | null;
|
|
84
|
+
full_logo_url?: string | null;
|
|
85
|
+
thumbnail_url?: string | null;
|
|
86
|
+
primary_color?: string | null;
|
|
87
|
+
secondary_color?: string | null;
|
|
88
|
+
entitlements?: Record<string, any> | null;
|
|
89
|
+
mtd_usage?: Record<string, any> | null;
|
|
90
|
+
ytd_usage?: Record<string, any> | null;
|
|
91
|
+
data?: Record<string, any> | null;
|
|
96
92
|
/** Creation date/time. */
|
|
97
93
|
created_at: string;
|
|
98
94
|
/** Last-update date/time. */
|
|
@@ -150,7 +146,6 @@ interface IProfile {
|
|
|
150
146
|
current: boolean;
|
|
151
147
|
permissions: TPermission[];
|
|
152
148
|
roles: TRole[];
|
|
153
|
-
plans: TPlan[];
|
|
154
149
|
// Creation date/time.
|
|
155
150
|
created_at: string;
|
|
156
151
|
// Last-update date/time.
|
|
@@ -286,6 +281,8 @@ interface IEnvelopeDocument {
|
|
|
286
281
|
mime: string;
|
|
287
282
|
created_at: string;
|
|
288
283
|
updated_at: string;
|
|
284
|
+
// @deprecated. Use pages instead.
|
|
285
|
+
page_numbers: number;
|
|
289
286
|
envelope?: IEnvelope | null;
|
|
290
287
|
template_document?: ITemplateDocument | null;
|
|
291
288
|
fields?: IEnvelopeField[];
|
|
@@ -566,6 +563,8 @@ interface ITemplate {
|
|
|
566
563
|
roles?: IRole[];
|
|
567
564
|
documents?: ITemplateDocument[];
|
|
568
565
|
fields?: ITemplateField[];
|
|
566
|
+
// @deprecated. Use documents instead.
|
|
567
|
+
template_documents?: ITemplateDocument[];
|
|
569
568
|
}
|
|
570
569
|
/**
|
|
571
570
|
* A file attached to the template for display/signing.
|
|
@@ -583,6 +582,8 @@ interface ITemplateDocument {
|
|
|
583
582
|
}[];
|
|
584
583
|
created_at: string | null;
|
|
585
584
|
updated_at: string | null;
|
|
585
|
+
// @deprecated. Use pages instead.
|
|
586
|
+
page_numbers?: number;
|
|
586
587
|
template?: ITemplate;
|
|
587
588
|
}
|
|
588
589
|
interface ITemplateField {
|
|
@@ -614,6 +615,8 @@ interface ITemplateField {
|
|
|
614
615
|
placeholder: string | null;
|
|
615
616
|
/** For fields that support grouping (radio buttons and check boxes) the value selected will be stored under this name. */
|
|
616
617
|
group: string | null;
|
|
618
|
+
// @deprecated. Use settings instead.
|
|
619
|
+
setting?: ITemplateFieldSetting | null;
|
|
617
620
|
}
|
|
618
621
|
interface ITextFieldSetting {
|
|
619
622
|
x: number;
|
|
@@ -864,8 +867,6 @@ interface IUserSession {
|
|
|
864
867
|
permissions: TPermission[];
|
|
865
868
|
roles: TRole[];
|
|
866
869
|
profile: IProfile;
|
|
867
|
-
plans?: TPlan[];
|
|
868
|
-
[key: string]: any;
|
|
869
870
|
}
|
|
870
871
|
/**
|
|
871
872
|
* Verdocs supports two types of authenticated sessions: User and Signing. Both behave similarly and have similar
|
|
@@ -1493,7 +1494,7 @@ type TRecipientType = "signer" | "cc" | "approver";
|
|
|
1493
1494
|
/**
|
|
1494
1495
|
* Plans provide access to Verdocs product features.
|
|
1495
1496
|
*/
|
|
1496
|
-
type TPlan =
|
|
1497
|
+
// export type TPlan = 'env:essential' | 'org:standard';
|
|
1497
1498
|
/**
|
|
1498
1499
|
* Roles provide access to groups of permissions. Note that for historical reasons there is some overlap in the
|
|
1499
1500
|
* use of the term "role". TRole refers to a user type. A "Role" (IRole) is a Template participant placeholder.
|
|
@@ -1536,117 +1537,108 @@ interface ISetWebhookRequest {
|
|
|
1536
1537
|
* Get a list of keys for a given organization. The caller must have admin access to the organization.
|
|
1537
1538
|
*
|
|
1538
1539
|
* ```typescript
|
|
1539
|
-
* import {ApiKeys} from '@verdocs/js-sdk
|
|
1540
|
+
* import {ApiKeys} from '@verdocs/js-sdk';
|
|
1540
1541
|
*
|
|
1541
1542
|
* const keys = await ApiKeys.getKeys(ORGID);
|
|
1542
1543
|
* ```
|
|
1543
1544
|
*/
|
|
1544
|
-
declare const getApiKeys: (endpoint: VerdocsEndpoint
|
|
1545
|
+
declare const getApiKeys: (endpoint: VerdocsEndpoint) => Promise<IApiKey[]>;
|
|
1545
1546
|
/**
|
|
1546
1547
|
* Create an API key.
|
|
1547
1548
|
*
|
|
1548
1549
|
* ```typescript
|
|
1549
|
-
* import {ApiKeys} from '@verdocs/js-sdk
|
|
1550
|
+
* import {ApiKeys} from '@verdocs/js-sdk';
|
|
1550
1551
|
*
|
|
1551
1552
|
* await ApiKeys.createKey(ORGID, {name: NEWNAME});
|
|
1552
1553
|
* ```
|
|
1553
1554
|
*/
|
|
1554
|
-
declare const createApiKey: (endpoint: VerdocsEndpoint,
|
|
1555
|
+
declare const createApiKey: (endpoint: VerdocsEndpoint, params: ICreateApiKeyRequest) => Promise<IApiKey>;
|
|
1555
1556
|
/**
|
|
1556
1557
|
* Rotate the secret for an API key. The caller must have admin access to the organization.
|
|
1557
1558
|
*
|
|
1558
1559
|
* ```typescript
|
|
1559
|
-
* import {ApiKeys} from '@verdocs/js-sdk
|
|
1560
|
+
* import {ApiKeys} from '@verdocs/js-sdk';
|
|
1560
1561
|
*
|
|
1561
1562
|
* const {client_secret: newSecret} = await ApiKeys.rotateKey(ORGID, CLIENTID);
|
|
1562
1563
|
* ```
|
|
1563
1564
|
*/
|
|
1564
|
-
declare const rotateApiKey: (endpoint: VerdocsEndpoint,
|
|
1565
|
+
declare const rotateApiKey: (endpoint: VerdocsEndpoint, clientId: string) => Promise<IApiKey>;
|
|
1565
1566
|
/**
|
|
1566
1567
|
* Update an API key to change its assigned Profile ID or Name.
|
|
1567
1568
|
*
|
|
1568
1569
|
* ```typescript
|
|
1569
|
-
* import {ApiKeys} from '@verdocs/js-sdk
|
|
1570
|
+
* import {ApiKeys} from '@verdocs/js-sdk';
|
|
1570
1571
|
*
|
|
1571
1572
|
* await ApiKeys.updateKey(ORGID, CLIENTID, {name: NEWNAME});
|
|
1572
1573
|
* ```
|
|
1573
1574
|
*/
|
|
1574
|
-
declare const updateApiKey: (endpoint: VerdocsEndpoint,
|
|
1575
|
+
declare const updateApiKey: (endpoint: VerdocsEndpoint, clientId: string, params: IUpdateApiKeyRequest) => Promise<IApiKey>;
|
|
1575
1576
|
/**
|
|
1576
1577
|
* Delete an API key.
|
|
1577
1578
|
*
|
|
1578
1579
|
* ```typescript
|
|
1579
|
-
* import {ApiKeys} from '@verdocs/js-sdk
|
|
1580
|
+
* import {ApiKeys} from '@verdocs/js-sdk';
|
|
1580
1581
|
*
|
|
1581
1582
|
* await ApiKeys.deleteKey(ORGID, CLIENTID);
|
|
1582
1583
|
* ```
|
|
1583
1584
|
*/
|
|
1584
|
-
declare const deleteApiKey: (endpoint: VerdocsEndpoint,
|
|
1585
|
+
declare const deleteApiKey: (endpoint: VerdocsEndpoint, clientId: string) => Promise<any>;
|
|
1585
1586
|
/**
|
|
1586
1587
|
* Get a list of groups for a given organization. The caller must have admin access to the organization.
|
|
1587
1588
|
*
|
|
1588
1589
|
* ```typescript
|
|
1589
|
-
* import {
|
|
1590
|
-
*
|
|
1591
|
-
* const groups = await Groups.getGroups(ORGID);
|
|
1592
|
-
* ```
|
|
1593
|
-
*/
|
|
1594
|
-
declare const getGroups: (endpoint: VerdocsEndpoint, organizationId: string) => Promise<IGroup[]>;
|
|
1595
|
-
/**
|
|
1596
|
-
* Get a single group by name. Returns a detail record.
|
|
1597
|
-
*
|
|
1598
|
-
* ```typescript
|
|
1599
|
-
* import {Groups} from '@verdocs/js-sdk/Organizations';
|
|
1590
|
+
* import {getGroups} from '@verdocs/js-sdk';
|
|
1600
1591
|
*
|
|
1601
|
-
* const groups = await
|
|
1592
|
+
* const groups = await getGroups(ORGID);
|
|
1602
1593
|
* ```
|
|
1603
1594
|
*/
|
|
1604
|
-
declare const
|
|
1595
|
+
declare const getGroups: (endpoint: VerdocsEndpoint) => Promise<IGroup[]>;
|
|
1605
1596
|
/**
|
|
1606
|
-
* Get the details for a group.
|
|
1597
|
+
* Get the details for a group, including its member profiles and list of permissions.
|
|
1607
1598
|
*
|
|
1608
1599
|
* ```typescript
|
|
1609
|
-
* import {
|
|
1600
|
+
* import {getGroup} from '@verdocs/js-sdk/v2/organization-groups';
|
|
1610
1601
|
*
|
|
1611
|
-
* const groups = await
|
|
1602
|
+
* const groups = await getGroup(GROUPID);
|
|
1612
1603
|
* ```
|
|
1613
1604
|
*/
|
|
1614
|
-
declare const getGroup: (endpoint: VerdocsEndpoint,
|
|
1615
|
-
declare const
|
|
1616
|
-
declare const
|
|
1617
|
-
declare const
|
|
1618
|
-
declare const
|
|
1619
|
-
|
|
1605
|
+
declare const getGroup: (endpoint: VerdocsEndpoint, groupId: string) => Promise<IGroup>;
|
|
1606
|
+
declare const createGroup: (endpoint: VerdocsEndpoint, name: string) => Promise<any>;
|
|
1607
|
+
declare const addGroupMember: (endpoint: VerdocsEndpoint, groupId: string, profile_id: string) => Promise<any>;
|
|
1608
|
+
declare const deleteGroupMember: (endpoint: VerdocsEndpoint, groupId: string, profile_id: string) => Promise<any>;
|
|
1609
|
+
declare const updateGroup: (endpoint: VerdocsEndpoint, groupId: string, params: {
|
|
1610
|
+
permissions: TPermission[];
|
|
1611
|
+
}) => Promise<any>;
|
|
1620
1612
|
/**
|
|
1621
1613
|
* An invitation represents an opportunity for a Member to join an Organization.
|
|
1622
1614
|
*
|
|
1623
1615
|
* @module
|
|
1624
1616
|
*/
|
|
1625
|
-
declare const getOrganizationInvitations: (endpoint: VerdocsEndpoint
|
|
1626
|
-
declare const createOrganizationInvitation: (endpoint: VerdocsEndpoint,
|
|
1627
|
-
declare const deleteOrganizationInvitation: (endpoint: VerdocsEndpoint,
|
|
1628
|
-
declare const updateOrganizationInvitation: (endpoint: VerdocsEndpoint,
|
|
1629
|
-
declare const resendOrganizationInvitation: (endpoint: VerdocsEndpoint,
|
|
1630
|
-
declare const
|
|
1631
|
-
declare const
|
|
1632
|
-
declare const declineOrganizationInvitation: (endpoint: VerdocsEndpoint, organizationId: string, email: string, token: string) => Promise<{
|
|
1617
|
+
declare const getOrganizationInvitations: (endpoint: VerdocsEndpoint) => Promise<IOrganizationInvitation[]>;
|
|
1618
|
+
declare const createOrganizationInvitation: (endpoint: VerdocsEndpoint, params: ICreateInvitationRequest) => Promise<IOrganizationInvitation>;
|
|
1619
|
+
declare const deleteOrganizationInvitation: (endpoint: VerdocsEndpoint, email: string) => Promise<any>;
|
|
1620
|
+
declare const updateOrganizationInvitation: (endpoint: VerdocsEndpoint, email: string, params: Partial<ICreateInvitationRequest>) => Promise<IOrganizationInvitation>;
|
|
1621
|
+
declare const resendOrganizationInvitation: (endpoint: VerdocsEndpoint, email: string) => Promise<any>;
|
|
1622
|
+
declare const acceptOrganizationInvitation: (endpoint: VerdocsEndpoint, email: string, token: string) => Promise<IProfile>;
|
|
1623
|
+
declare const declineOrganizationInvitation: (endpoint: VerdocsEndpoint, email: string, token: string) => Promise<{
|
|
1633
1624
|
status: "OK";
|
|
1634
1625
|
}>;
|
|
1635
|
-
declare const claimNewUser: (endpoint: VerdocsEndpoint, organizationId: string, email: string, token: string) => Promise<any>;
|
|
1636
1626
|
/**
|
|
1637
1627
|
* An Organization Member (aka Profile) is an individual user with access to an organization.
|
|
1638
1628
|
*
|
|
1639
1629
|
* @module
|
|
1640
1630
|
*/
|
|
1641
|
-
declare const getOrganizationMembers: (endpoint: VerdocsEndpoint
|
|
1642
|
-
declare const deleteOrganizationMember: (endpoint: VerdocsEndpoint,
|
|
1643
|
-
declare const
|
|
1644
|
-
declare const deleteOrganizationMemberRole: (endpoint: VerdocsEndpoint, organizationId: string, profileId: string, roleId: string) => Promise<any>;
|
|
1645
|
-
declare const getOrganizationMemberPlans: (endpoint: VerdocsEndpoint, organizationId: string, profileId: string) => Promise<any>;
|
|
1631
|
+
declare const getOrganizationMembers: (endpoint: VerdocsEndpoint) => Promise<IProfile[]>;
|
|
1632
|
+
declare const deleteOrganizationMember: (endpoint: VerdocsEndpoint, profileId: string) => Promise<any>;
|
|
1633
|
+
declare const updateOrganizationMember: (endpoint: VerdocsEndpoint, profileId: string, params: Pick<IProfile, "roles" | "permissions">) => Promise<any>;
|
|
1646
1634
|
/**
|
|
1647
|
-
* Get a list of organizations the
|
|
1635
|
+
* Get a list of organizations the caller is a member of.
|
|
1648
1636
|
*/
|
|
1649
1637
|
declare const getOrganizations: (endpoint: VerdocsEndpoint) => Promise<IOrganization[]>;
|
|
1638
|
+
/**
|
|
1639
|
+
* Get an organization by ID.
|
|
1640
|
+
*/
|
|
1641
|
+
declare const getOrganization: (endpoint: VerdocsEndpoint, organizationId: string) => Promise<IOrganization>;
|
|
1650
1642
|
/**
|
|
1651
1643
|
* Create an organization.
|
|
1652
1644
|
*/
|
|
@@ -1656,14 +1648,16 @@ declare const createOrganization: (endpoint: VerdocsEndpoint) => Promise<IOrgani
|
|
|
1656
1648
|
*/
|
|
1657
1649
|
declare const deleteOrganization: (endpoint: VerdocsEndpoint, organizationId: string) => Promise<any>;
|
|
1658
1650
|
/**
|
|
1659
|
-
*
|
|
1651
|
+
* Update an organization.
|
|
1660
1652
|
*/
|
|
1661
|
-
declare const
|
|
1653
|
+
declare const updateOrganization: (endpoint: VerdocsEndpoint, organizationId: string, params: Partial<IOrganization>) => Promise<IOrganization>;
|
|
1662
1654
|
/**
|
|
1663
|
-
*
|
|
1655
|
+
* Get the registered Webhooks for the caller's organization.
|
|
1664
1656
|
*/
|
|
1665
|
-
declare const updateOrganization: (endpoint: VerdocsEndpoint, organizationId: string, params: any) => Promise<IOrganization>;
|
|
1666
1657
|
declare const getWebhooks: (endpoint: VerdocsEndpoint) => Promise<IWebhook>;
|
|
1658
|
+
/**
|
|
1659
|
+
* Update the registered Webhooks for the caller's organization.
|
|
1660
|
+
*/
|
|
1667
1661
|
declare const setWebhooks: (endpoint: VerdocsEndpoint, params: ISetWebhookRequest) => Promise<IWebhook>;
|
|
1668
1662
|
/**
|
|
1669
1663
|
* Given a `rgba(r,g,b,a)` string value, returns the hex equivalent, dropping the alpha channel.
|
|
@@ -2352,15 +2346,6 @@ interface IAuthenticateResponse {
|
|
|
2352
2346
|
accessToken: string;
|
|
2353
2347
|
refreshToken: string;
|
|
2354
2348
|
}
|
|
2355
|
-
interface TokenValidationRequest {
|
|
2356
|
-
token: string;
|
|
2357
|
-
}
|
|
2358
|
-
interface TokenValidationResponse {
|
|
2359
|
-
/** True if the token is valid */
|
|
2360
|
-
valid: boolean;
|
|
2361
|
-
/** The decoded and validated body of the JWT */
|
|
2362
|
-
payload: any;
|
|
2363
|
-
}
|
|
2364
2349
|
interface IUpdatePasswordRequest {
|
|
2365
2350
|
email: string;
|
|
2366
2351
|
oldPassword: string;
|
|
@@ -2371,26 +2356,13 @@ interface UpdatePasswordResponse {
|
|
|
2371
2356
|
/** Success or failure message */
|
|
2372
2357
|
message: string;
|
|
2373
2358
|
}
|
|
2374
|
-
interface
|
|
2375
|
-
email: string;
|
|
2376
|
-
}
|
|
2377
|
-
interface UpdateEmailResponse {
|
|
2378
|
-
profiles: IProfile[];
|
|
2379
|
-
}
|
|
2380
|
-
interface ICreateBusinessAccountRequest {
|
|
2359
|
+
interface ICreateAccountRequest {
|
|
2381
2360
|
email: string;
|
|
2382
2361
|
password: string;
|
|
2383
2362
|
firstName: string;
|
|
2384
2363
|
lastName: string;
|
|
2385
2364
|
orgName: string;
|
|
2386
2365
|
}
|
|
2387
|
-
interface ICreateUserRequest {
|
|
2388
|
-
firstName: string;
|
|
2389
|
-
lastName: string;
|
|
2390
|
-
email: string;
|
|
2391
|
-
password: string;
|
|
2392
|
-
fromInviteCode: string;
|
|
2393
|
-
}
|
|
2394
2366
|
/**
|
|
2395
2367
|
* Authenticate to Verdocs via user/password authentication
|
|
2396
2368
|
*
|
|
@@ -2408,7 +2380,7 @@ declare const authenticateUser: (endpoint: VerdocsEndpoint, params: IAuthenticat
|
|
|
2408
2380
|
* NodeJS server-side applications. Never expose your Client Secret in a Web or Mobile app!** Also note
|
|
2409
2381
|
* that access tokens may be cached by server-side apps (and this is recommended) but do expire after 2
|
|
2410
2382
|
* hours. This expiration may change based on future security needs. Application developers are encouraged
|
|
2411
|
-
* to check the `exp` expiration field in the response
|
|
2383
|
+
* to check the `exp` expiration field in the response, and renew tokens after they expire.
|
|
2412
2384
|
*
|
|
2413
2385
|
* ```typescript
|
|
2414
2386
|
* import {Auth} from '@verdocs/js-sdk/Auth';
|
|
@@ -2419,21 +2391,6 @@ declare const authenticateUser: (endpoint: VerdocsEndpoint, params: IAuthenticat
|
|
|
2419
2391
|
* ```
|
|
2420
2392
|
*/
|
|
2421
2393
|
declare const authenticateApp: (endpoint: VerdocsEndpoint, params: IAuthenticateAppRequest) => Promise<IAuthenticateResponse>;
|
|
2422
|
-
/**
|
|
2423
|
-
* Validate a token. Only Verdocs tokens will be accepted. Most applications can decode tokens locally,
|
|
2424
|
-
* because tokens will be validated when API calls are made anyway. However, high-security applications
|
|
2425
|
-
* may use this endpoint to check if a token has been revoked.
|
|
2426
|
-
*
|
|
2427
|
-
* ```typescript
|
|
2428
|
-
* import {Auth} from '@verdocs/js-sdk/Auth';
|
|
2429
|
-
*
|
|
2430
|
-
* const {valid} = await Auth.validateToken({ token });
|
|
2431
|
-
* if (!valid) {
|
|
2432
|
-
* window.alert('Session invalid or expired. Please re-authenticate.');
|
|
2433
|
-
* }
|
|
2434
|
-
* ```
|
|
2435
|
-
*/
|
|
2436
|
-
declare const validateToken: (endpoint: VerdocsEndpoint, params: TokenValidationRequest) => Promise<TokenValidationResponse>;
|
|
2437
2394
|
/**
|
|
2438
2395
|
* If called before the session expires, this will refresh the caller's session and tokens.
|
|
2439
2396
|
*
|
|
@@ -2447,7 +2404,7 @@ declare const validateToken: (endpoint: VerdocsEndpoint, params: TokenValidation
|
|
|
2447
2404
|
*/
|
|
2448
2405
|
declare const refreshTokens: (endpoint: VerdocsEndpoint) => Promise<IAuthenticateResponse>;
|
|
2449
2406
|
/**
|
|
2450
|
-
* Update the caller's password
|
|
2407
|
+
* Update the caller's password when the old password is known (typically for logged-in users).
|
|
2451
2408
|
*
|
|
2452
2409
|
* ```typescript
|
|
2453
2410
|
* import {Auth} from '@verdocs/js-sdk/Auth';
|
|
@@ -2458,9 +2415,9 @@ declare const refreshTokens: (endpoint: VerdocsEndpoint) => Promise<IAuthenticat
|
|
|
2458
2415
|
* }
|
|
2459
2416
|
* ```
|
|
2460
2417
|
*/
|
|
2461
|
-
declare const
|
|
2418
|
+
declare const changePassword: (endpoint: VerdocsEndpoint, params: IUpdatePasswordRequest) => Promise<UpdatePasswordResponse>;
|
|
2462
2419
|
/**
|
|
2463
|
-
*
|
|
2420
|
+
* Request a password reset, when the old password is not known (typically in login forms).
|
|
2464
2421
|
*
|
|
2465
2422
|
* ```typescript
|
|
2466
2423
|
* import {Auth} from '@verdocs/js-sdk/Auth';
|
|
@@ -2476,16 +2433,6 @@ declare const resetPassword: (endpoint: VerdocsEndpoint, params: {
|
|
|
2476
2433
|
}) => Promise<{
|
|
2477
2434
|
success: boolean;
|
|
2478
2435
|
}>;
|
|
2479
|
-
/**
|
|
2480
|
-
* Update the caller's email address.
|
|
2481
|
-
*
|
|
2482
|
-
* ```typescript
|
|
2483
|
-
* import {Auth} from '@verdocs/js-sdk/Auth';
|
|
2484
|
-
*
|
|
2485
|
-
* const {profiles} = await Auth.updateEmail({ email: newEmail });
|
|
2486
|
-
* ```
|
|
2487
|
-
*/
|
|
2488
|
-
declare const updateEmail: (endpoint: VerdocsEndpoint, params: UpdateEmailRequest) => Promise<UpdateEmailResponse>;
|
|
2489
2436
|
/**
|
|
2490
2437
|
* Resend the email verification request. Note that to prevent certain forms of abuse, the email address is not
|
|
2491
2438
|
* a parameter here. Instead, the caller must be authenticated as the (unverified) user. To simplify this process,
|
|
@@ -2502,9 +2449,6 @@ declare const updateEmail: (endpoint: VerdocsEndpoint, params: UpdateEmailReques
|
|
|
2502
2449
|
declare const resendVerification: (endpoint: VerdocsEndpoint, accessToken?: string) => Promise<{
|
|
2503
2450
|
result: "done";
|
|
2504
2451
|
}>;
|
|
2505
|
-
declare const createUser: (endpoint: VerdocsEndpoint, params: ICreateUserRequest) => Promise<IProfile>;
|
|
2506
|
-
// TODO
|
|
2507
|
-
declare const billingPlaceholder: {};
|
|
2508
2452
|
declare const getNotifications: (endpoint: VerdocsEndpoint) => Promise<any>;
|
|
2509
2453
|
/**
|
|
2510
2454
|
* Get the user's available profiles. The current profile will be marked with `current: true`.
|
|
@@ -2526,16 +2470,6 @@ declare const getProfiles: (endpoint: VerdocsEndpoint) => Promise<IProfile[]>;
|
|
|
2526
2470
|
* ```
|
|
2527
2471
|
*/
|
|
2528
2472
|
declare const getCurrentProfile: (endpoint: VerdocsEndpoint) => Promise<IProfile | undefined>;
|
|
2529
|
-
/**
|
|
2530
|
-
* Get a list of system roles.
|
|
2531
|
-
*
|
|
2532
|
-
* ```typescript
|
|
2533
|
-
* import {Profiles} from '@verdocs/js-sdk/Users';
|
|
2534
|
-
*
|
|
2535
|
-
* const roles = await Profiles.getRoles();
|
|
2536
|
-
* ```
|
|
2537
|
-
*/
|
|
2538
|
-
declare const getRoles: (endpoint: VerdocsEndpoint) => Promise<TRole[]>;
|
|
2539
2473
|
/**
|
|
2540
2474
|
* Create a profile. If the caller does not have a "current" profile set, the new profile will be made current.
|
|
2541
2475
|
*
|
|
@@ -2557,16 +2491,6 @@ declare const createProfile: (endpoint: VerdocsEndpoint, params: ICreateProfileR
|
|
|
2557
2491
|
* ```
|
|
2558
2492
|
*/
|
|
2559
2493
|
declare const getProfile: (endpoint: VerdocsEndpoint, profileId: string) => Promise<IProfile>;
|
|
2560
|
-
/**
|
|
2561
|
-
* Get a profile's groups.
|
|
2562
|
-
*
|
|
2563
|
-
* ```typescript
|
|
2564
|
-
* import {Profiles} from '@verdocs/js-sdk/Users';
|
|
2565
|
-
*
|
|
2566
|
-
* const groups = await Profiles.getProfileGroups('PROFILEID');
|
|
2567
|
-
* ```
|
|
2568
|
-
*/
|
|
2569
|
-
declare const getProfileGroups: (endpoint: VerdocsEndpoint, profileId: string) => Promise<IGroup[]>;
|
|
2570
2494
|
/**
|
|
2571
2495
|
* Switch the caller's "current" profile. The current profile is used for permissions checking and profile_id field settings
|
|
2572
2496
|
* for most operations in Verdocs. It is important to select the appropropriate profile before calling other API functions.
|
|
@@ -2589,9 +2513,6 @@ declare const switchProfile: (endpoint: VerdocsEndpoint, profileId: string) => P
|
|
|
2589
2513
|
* ```
|
|
2590
2514
|
*/
|
|
2591
2515
|
declare const updateProfile: (endpoint: VerdocsEndpoint, profileId: string, params: IUpdateProfileRequest) => Promise<IProfile>;
|
|
2592
|
-
// endpoint.api //
|
|
2593
|
-
// .post<IEnvelopeSummaries>('/envelopes/list', params, {baseURL: endpoint.getBaseURLv2()})
|
|
2594
|
-
// .then((r) => r.data);
|
|
2595
2516
|
/**
|
|
2596
2517
|
* Delete a profile. If the requested profile is the caller's curent profile, the next available profile will be selected.
|
|
2597
2518
|
*
|
|
@@ -2614,7 +2535,7 @@ declare const deleteProfile: (endpoint: VerdocsEndpoint, profileId: string) => P
|
|
|
2614
2535
|
* });
|
|
2615
2536
|
* ```
|
|
2616
2537
|
*/
|
|
2617
|
-
declare const
|
|
2538
|
+
declare const createAccount: (endpoint: VerdocsEndpoint, params: ICreateAccountRequest) => Promise<{
|
|
2618
2539
|
profile: IProfile;
|
|
2619
2540
|
organization: IOrganization;
|
|
2620
2541
|
}>;
|
|
@@ -2630,4 +2551,4 @@ interface ISignupSurvey {
|
|
|
2630
2551
|
declare const recordSignupSurvey: (endpoint: VerdocsEndpoint, params: ISignupSurvey) => Promise<{
|
|
2631
2552
|
status: "OK";
|
|
2632
2553
|
}>;
|
|
2633
|
-
export { TRequestStatus, TTemplateSenderType, TTemplatePermission, TTemplateAction, TAccountPermission, TOrgPermission, TApiKeyPermission, TPermission, TRecipientAction, TEnvelopeStatus, TRecipientStatus, TRecipientType,
|
|
2554
|
+
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, 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, authenticateUser, authenticateApp, refreshTokens, changePassword, resetPassword, resendVerification, getNotifications, getProfiles, getCurrentProfile, createProfile, getProfile, switchProfile, updateProfile, deleteProfile, createAccount, ISignupSurvey, recordSignupSurvey, ICreateProfileRequest, ISwitchProfileResponse, IUpdateProfileRequest, IAuthenticateUserRequest, IAuthenticateAppRequest, IAuthenticateResponse, IUpdatePasswordRequest, UpdatePasswordResponse, 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 };
|