@verdocs/js-sdk 4.0.11 → 4.1.0
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 +62 -149
- package/dist/index.d.ts +62 -149
- package/dist/index.js +96 -185
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +90 -167
- 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.
|
|
@@ -864,8 +859,6 @@ interface IUserSession {
|
|
|
864
859
|
permissions: TPermission[];
|
|
865
860
|
roles: TRole[];
|
|
866
861
|
profile: IProfile;
|
|
867
|
-
plans?: TPlan[];
|
|
868
|
-
[key: string]: any;
|
|
869
862
|
}
|
|
870
863
|
/**
|
|
871
864
|
* Verdocs supports two types of authenticated sessions: User and Signing. Both behave similarly and have similar
|
|
@@ -1493,7 +1486,7 @@ type TRecipientType = "signer" | "cc" | "approver";
|
|
|
1493
1486
|
/**
|
|
1494
1487
|
* Plans provide access to Verdocs product features.
|
|
1495
1488
|
*/
|
|
1496
|
-
type TPlan =
|
|
1489
|
+
// export type TPlan = 'env:essential' | 'org:standard';
|
|
1497
1490
|
/**
|
|
1498
1491
|
* Roles provide access to groups of permissions. Note that for historical reasons there is some overlap in the
|
|
1499
1492
|
* use of the term "role". TRole refers to a user type. A "Role" (IRole) is a Template participant placeholder.
|
|
@@ -1536,117 +1529,108 @@ interface ISetWebhookRequest {
|
|
|
1536
1529
|
* Get a list of keys for a given organization. The caller must have admin access to the organization.
|
|
1537
1530
|
*
|
|
1538
1531
|
* ```typescript
|
|
1539
|
-
* import {ApiKeys} from '@verdocs/js-sdk
|
|
1532
|
+
* import {ApiKeys} from '@verdocs/js-sdk';
|
|
1540
1533
|
*
|
|
1541
1534
|
* const keys = await ApiKeys.getKeys(ORGID);
|
|
1542
1535
|
* ```
|
|
1543
1536
|
*/
|
|
1544
|
-
declare const getApiKeys: (endpoint: VerdocsEndpoint
|
|
1537
|
+
declare const getApiKeys: (endpoint: VerdocsEndpoint) => Promise<IApiKey[]>;
|
|
1545
1538
|
/**
|
|
1546
1539
|
* Create an API key.
|
|
1547
1540
|
*
|
|
1548
1541
|
* ```typescript
|
|
1549
|
-
* import {ApiKeys} from '@verdocs/js-sdk
|
|
1542
|
+
* import {ApiKeys} from '@verdocs/js-sdk';
|
|
1550
1543
|
*
|
|
1551
1544
|
* await ApiKeys.createKey(ORGID, {name: NEWNAME});
|
|
1552
1545
|
* ```
|
|
1553
1546
|
*/
|
|
1554
|
-
declare const createApiKey: (endpoint: VerdocsEndpoint,
|
|
1547
|
+
declare const createApiKey: (endpoint: VerdocsEndpoint, params: ICreateApiKeyRequest) => Promise<IApiKey>;
|
|
1555
1548
|
/**
|
|
1556
1549
|
* Rotate the secret for an API key. The caller must have admin access to the organization.
|
|
1557
1550
|
*
|
|
1558
1551
|
* ```typescript
|
|
1559
|
-
* import {ApiKeys} from '@verdocs/js-sdk
|
|
1552
|
+
* import {ApiKeys} from '@verdocs/js-sdk';
|
|
1560
1553
|
*
|
|
1561
1554
|
* const {client_secret: newSecret} = await ApiKeys.rotateKey(ORGID, CLIENTID);
|
|
1562
1555
|
* ```
|
|
1563
1556
|
*/
|
|
1564
|
-
declare const rotateApiKey: (endpoint: VerdocsEndpoint,
|
|
1557
|
+
declare const rotateApiKey: (endpoint: VerdocsEndpoint, clientId: string) => Promise<IApiKey>;
|
|
1565
1558
|
/**
|
|
1566
1559
|
* Update an API key to change its assigned Profile ID or Name.
|
|
1567
1560
|
*
|
|
1568
1561
|
* ```typescript
|
|
1569
|
-
* import {ApiKeys} from '@verdocs/js-sdk
|
|
1562
|
+
* import {ApiKeys} from '@verdocs/js-sdk';
|
|
1570
1563
|
*
|
|
1571
1564
|
* await ApiKeys.updateKey(ORGID, CLIENTID, {name: NEWNAME});
|
|
1572
1565
|
* ```
|
|
1573
1566
|
*/
|
|
1574
|
-
declare const updateApiKey: (endpoint: VerdocsEndpoint,
|
|
1567
|
+
declare const updateApiKey: (endpoint: VerdocsEndpoint, clientId: string, params: IUpdateApiKeyRequest) => Promise<IApiKey>;
|
|
1575
1568
|
/**
|
|
1576
1569
|
* Delete an API key.
|
|
1577
1570
|
*
|
|
1578
1571
|
* ```typescript
|
|
1579
|
-
* import {ApiKeys} from '@verdocs/js-sdk
|
|
1572
|
+
* import {ApiKeys} from '@verdocs/js-sdk';
|
|
1580
1573
|
*
|
|
1581
1574
|
* await ApiKeys.deleteKey(ORGID, CLIENTID);
|
|
1582
1575
|
* ```
|
|
1583
1576
|
*/
|
|
1584
|
-
declare const deleteApiKey: (endpoint: VerdocsEndpoint,
|
|
1577
|
+
declare const deleteApiKey: (endpoint: VerdocsEndpoint, clientId: string) => Promise<any>;
|
|
1585
1578
|
/**
|
|
1586
1579
|
* Get a list of groups for a given organization. The caller must have admin access to the organization.
|
|
1587
1580
|
*
|
|
1588
1581
|
* ```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';
|
|
1582
|
+
* import {getGroups} from '@verdocs/js-sdk';
|
|
1600
1583
|
*
|
|
1601
|
-
* const groups = await
|
|
1584
|
+
* const groups = await getGroups(ORGID);
|
|
1602
1585
|
* ```
|
|
1603
1586
|
*/
|
|
1604
|
-
declare const
|
|
1587
|
+
declare const getGroups: (endpoint: VerdocsEndpoint) => Promise<IGroup[]>;
|
|
1605
1588
|
/**
|
|
1606
|
-
* Get the details for a group.
|
|
1589
|
+
* Get the details for a group, including its member profiles and list of permissions.
|
|
1607
1590
|
*
|
|
1608
1591
|
* ```typescript
|
|
1609
|
-
* import {
|
|
1592
|
+
* import {getGroup} from '@verdocs/js-sdk/v2/organization-groups';
|
|
1610
1593
|
*
|
|
1611
|
-
* const groups = await
|
|
1594
|
+
* const groups = await getGroup(GROUPID);
|
|
1612
1595
|
* ```
|
|
1613
1596
|
*/
|
|
1614
|
-
declare const getGroup: (endpoint: VerdocsEndpoint,
|
|
1615
|
-
declare const
|
|
1616
|
-
declare const
|
|
1617
|
-
declare const
|
|
1618
|
-
declare const
|
|
1619
|
-
|
|
1597
|
+
declare const getGroup: (endpoint: VerdocsEndpoint, groupId: string) => Promise<IGroup>;
|
|
1598
|
+
declare const createGroup: (endpoint: VerdocsEndpoint, name: string) => Promise<any>;
|
|
1599
|
+
declare const addGroupMember: (endpoint: VerdocsEndpoint, groupId: string, profile_id: string) => Promise<any>;
|
|
1600
|
+
declare const deleteGroupMember: (endpoint: VerdocsEndpoint, groupId: string, profile_id: string) => Promise<any>;
|
|
1601
|
+
declare const updateGroup: (endpoint: VerdocsEndpoint, groupId: string, params: {
|
|
1602
|
+
permissions: TPermission[];
|
|
1603
|
+
}) => Promise<any>;
|
|
1620
1604
|
/**
|
|
1621
1605
|
* An invitation represents an opportunity for a Member to join an Organization.
|
|
1622
1606
|
*
|
|
1623
1607
|
* @module
|
|
1624
1608
|
*/
|
|
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<{
|
|
1609
|
+
declare const getOrganizationInvitations: (endpoint: VerdocsEndpoint) => Promise<IOrganizationInvitation[]>;
|
|
1610
|
+
declare const createOrganizationInvitation: (endpoint: VerdocsEndpoint, params: ICreateInvitationRequest) => Promise<IOrganizationInvitation>;
|
|
1611
|
+
declare const deleteOrganizationInvitation: (endpoint: VerdocsEndpoint, email: string) => Promise<any>;
|
|
1612
|
+
declare const updateOrganizationInvitation: (endpoint: VerdocsEndpoint, email: string, params: Partial<ICreateInvitationRequest>) => Promise<IOrganizationInvitation>;
|
|
1613
|
+
declare const resendOrganizationInvitation: (endpoint: VerdocsEndpoint, email: string) => Promise<any>;
|
|
1614
|
+
declare const acceptOrganizationInvitation: (endpoint: VerdocsEndpoint, email: string, token: string) => Promise<IProfile>;
|
|
1615
|
+
declare const declineOrganizationInvitation: (endpoint: VerdocsEndpoint, email: string, token: string) => Promise<{
|
|
1633
1616
|
status: "OK";
|
|
1634
1617
|
}>;
|
|
1635
|
-
declare const claimNewUser: (endpoint: VerdocsEndpoint, organizationId: string, email: string, token: string) => Promise<any>;
|
|
1636
1618
|
/**
|
|
1637
1619
|
* An Organization Member (aka Profile) is an individual user with access to an organization.
|
|
1638
1620
|
*
|
|
1639
1621
|
* @module
|
|
1640
1622
|
*/
|
|
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>;
|
|
1623
|
+
declare const getOrganizationMembers: (endpoint: VerdocsEndpoint) => Promise<IProfile[]>;
|
|
1624
|
+
declare const deleteOrganizationMember: (endpoint: VerdocsEndpoint, profileId: string) => Promise<any>;
|
|
1625
|
+
declare const updateOrganizationMember: (endpoint: VerdocsEndpoint, profileId: string, params: Pick<IProfile, "roles" | "permissions">) => Promise<any>;
|
|
1646
1626
|
/**
|
|
1647
|
-
* Get a list of organizations the
|
|
1627
|
+
* Get a list of organizations the caller is a member of.
|
|
1648
1628
|
*/
|
|
1649
1629
|
declare const getOrganizations: (endpoint: VerdocsEndpoint) => Promise<IOrganization[]>;
|
|
1630
|
+
/**
|
|
1631
|
+
* Get an organization by ID.
|
|
1632
|
+
*/
|
|
1633
|
+
declare const getOrganization: (endpoint: VerdocsEndpoint, organizationId: string) => Promise<IOrganization>;
|
|
1650
1634
|
/**
|
|
1651
1635
|
* Create an organization.
|
|
1652
1636
|
*/
|
|
@@ -1656,14 +1640,16 @@ declare const createOrganization: (endpoint: VerdocsEndpoint) => Promise<IOrgani
|
|
|
1656
1640
|
*/
|
|
1657
1641
|
declare const deleteOrganization: (endpoint: VerdocsEndpoint, organizationId: string) => Promise<any>;
|
|
1658
1642
|
/**
|
|
1659
|
-
*
|
|
1643
|
+
* Update an organization.
|
|
1660
1644
|
*/
|
|
1661
|
-
declare const
|
|
1645
|
+
declare const updateOrganization: (endpoint: VerdocsEndpoint, organizationId: string, params: Partial<IOrganization>) => Promise<IOrganization>;
|
|
1662
1646
|
/**
|
|
1663
|
-
*
|
|
1647
|
+
* Get the registered Webhooks for the caller's organization.
|
|
1664
1648
|
*/
|
|
1665
|
-
declare const updateOrganization: (endpoint: VerdocsEndpoint, organizationId: string, params: any) => Promise<IOrganization>;
|
|
1666
1649
|
declare const getWebhooks: (endpoint: VerdocsEndpoint) => Promise<IWebhook>;
|
|
1650
|
+
/**
|
|
1651
|
+
* Update the registered Webhooks for the caller's organization.
|
|
1652
|
+
*/
|
|
1667
1653
|
declare const setWebhooks: (endpoint: VerdocsEndpoint, params: ISetWebhookRequest) => Promise<IWebhook>;
|
|
1668
1654
|
/**
|
|
1669
1655
|
* Given a `rgba(r,g,b,a)` string value, returns the hex equivalent, dropping the alpha channel.
|
|
@@ -2352,15 +2338,6 @@ interface IAuthenticateResponse {
|
|
|
2352
2338
|
accessToken: string;
|
|
2353
2339
|
refreshToken: string;
|
|
2354
2340
|
}
|
|
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
2341
|
interface IUpdatePasswordRequest {
|
|
2365
2342
|
email: string;
|
|
2366
2343
|
oldPassword: string;
|
|
@@ -2371,26 +2348,13 @@ interface UpdatePasswordResponse {
|
|
|
2371
2348
|
/** Success or failure message */
|
|
2372
2349
|
message: string;
|
|
2373
2350
|
}
|
|
2374
|
-
interface
|
|
2375
|
-
email: string;
|
|
2376
|
-
}
|
|
2377
|
-
interface UpdateEmailResponse {
|
|
2378
|
-
profiles: IProfile[];
|
|
2379
|
-
}
|
|
2380
|
-
interface ICreateBusinessAccountRequest {
|
|
2351
|
+
interface ICreateAccountRequest {
|
|
2381
2352
|
email: string;
|
|
2382
2353
|
password: string;
|
|
2383
2354
|
firstName: string;
|
|
2384
2355
|
lastName: string;
|
|
2385
2356
|
orgName: string;
|
|
2386
2357
|
}
|
|
2387
|
-
interface ICreateUserRequest {
|
|
2388
|
-
firstName: string;
|
|
2389
|
-
lastName: string;
|
|
2390
|
-
email: string;
|
|
2391
|
-
password: string;
|
|
2392
|
-
fromInviteCode: string;
|
|
2393
|
-
}
|
|
2394
2358
|
/**
|
|
2395
2359
|
* Authenticate to Verdocs via user/password authentication
|
|
2396
2360
|
*
|
|
@@ -2408,7 +2372,7 @@ declare const authenticateUser: (endpoint: VerdocsEndpoint, params: IAuthenticat
|
|
|
2408
2372
|
* NodeJS server-side applications. Never expose your Client Secret in a Web or Mobile app!** Also note
|
|
2409
2373
|
* that access tokens may be cached by server-side apps (and this is recommended) but do expire after 2
|
|
2410
2374
|
* hours. This expiration may change based on future security needs. Application developers are encouraged
|
|
2411
|
-
* to check the `exp` expiration field in the response
|
|
2375
|
+
* to check the `exp` expiration field in the response, and renew tokens after they expire.
|
|
2412
2376
|
*
|
|
2413
2377
|
* ```typescript
|
|
2414
2378
|
* import {Auth} from '@verdocs/js-sdk/Auth';
|
|
@@ -2419,21 +2383,6 @@ declare const authenticateUser: (endpoint: VerdocsEndpoint, params: IAuthenticat
|
|
|
2419
2383
|
* ```
|
|
2420
2384
|
*/
|
|
2421
2385
|
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
2386
|
/**
|
|
2438
2387
|
* If called before the session expires, this will refresh the caller's session and tokens.
|
|
2439
2388
|
*
|
|
@@ -2447,7 +2396,7 @@ declare const validateToken: (endpoint: VerdocsEndpoint, params: TokenValidation
|
|
|
2447
2396
|
*/
|
|
2448
2397
|
declare const refreshTokens: (endpoint: VerdocsEndpoint) => Promise<IAuthenticateResponse>;
|
|
2449
2398
|
/**
|
|
2450
|
-
* Update the caller's password
|
|
2399
|
+
* Update the caller's password when the old password is known (typically for logged-in users).
|
|
2451
2400
|
*
|
|
2452
2401
|
* ```typescript
|
|
2453
2402
|
* import {Auth} from '@verdocs/js-sdk/Auth';
|
|
@@ -2458,9 +2407,9 @@ declare const refreshTokens: (endpoint: VerdocsEndpoint) => Promise<IAuthenticat
|
|
|
2458
2407
|
* }
|
|
2459
2408
|
* ```
|
|
2460
2409
|
*/
|
|
2461
|
-
declare const
|
|
2410
|
+
declare const changePassword: (endpoint: VerdocsEndpoint, params: IUpdatePasswordRequest) => Promise<UpdatePasswordResponse>;
|
|
2462
2411
|
/**
|
|
2463
|
-
*
|
|
2412
|
+
* Request a password reset, when the old password is not known (typically in login forms).
|
|
2464
2413
|
*
|
|
2465
2414
|
* ```typescript
|
|
2466
2415
|
* import {Auth} from '@verdocs/js-sdk/Auth';
|
|
@@ -2476,16 +2425,6 @@ declare const resetPassword: (endpoint: VerdocsEndpoint, params: {
|
|
|
2476
2425
|
}) => Promise<{
|
|
2477
2426
|
success: boolean;
|
|
2478
2427
|
}>;
|
|
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
2428
|
/**
|
|
2490
2429
|
* Resend the email verification request. Note that to prevent certain forms of abuse, the email address is not
|
|
2491
2430
|
* a parameter here. Instead, the caller must be authenticated as the (unverified) user. To simplify this process,
|
|
@@ -2502,9 +2441,6 @@ declare const updateEmail: (endpoint: VerdocsEndpoint, params: UpdateEmailReques
|
|
|
2502
2441
|
declare const resendVerification: (endpoint: VerdocsEndpoint, accessToken?: string) => Promise<{
|
|
2503
2442
|
result: "done";
|
|
2504
2443
|
}>;
|
|
2505
|
-
declare const createUser: (endpoint: VerdocsEndpoint, params: ICreateUserRequest) => Promise<IProfile>;
|
|
2506
|
-
// TODO
|
|
2507
|
-
declare const billingPlaceholder: {};
|
|
2508
2444
|
declare const getNotifications: (endpoint: VerdocsEndpoint) => Promise<any>;
|
|
2509
2445
|
/**
|
|
2510
2446
|
* Get the user's available profiles. The current profile will be marked with `current: true`.
|
|
@@ -2526,16 +2462,6 @@ declare const getProfiles: (endpoint: VerdocsEndpoint) => Promise<IProfile[]>;
|
|
|
2526
2462
|
* ```
|
|
2527
2463
|
*/
|
|
2528
2464
|
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
2465
|
/**
|
|
2540
2466
|
* Create a profile. If the caller does not have a "current" profile set, the new profile will be made current.
|
|
2541
2467
|
*
|
|
@@ -2557,16 +2483,6 @@ declare const createProfile: (endpoint: VerdocsEndpoint, params: ICreateProfileR
|
|
|
2557
2483
|
* ```
|
|
2558
2484
|
*/
|
|
2559
2485
|
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
2486
|
/**
|
|
2571
2487
|
* Switch the caller's "current" profile. The current profile is used for permissions checking and profile_id field settings
|
|
2572
2488
|
* for most operations in Verdocs. It is important to select the appropropriate profile before calling other API functions.
|
|
@@ -2589,9 +2505,6 @@ declare const switchProfile: (endpoint: VerdocsEndpoint, profileId: string) => P
|
|
|
2589
2505
|
* ```
|
|
2590
2506
|
*/
|
|
2591
2507
|
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
2508
|
/**
|
|
2596
2509
|
* Delete a profile. If the requested profile is the caller's curent profile, the next available profile will be selected.
|
|
2597
2510
|
*
|
|
@@ -2614,7 +2527,7 @@ declare const deleteProfile: (endpoint: VerdocsEndpoint, profileId: string) => P
|
|
|
2614
2527
|
* });
|
|
2615
2528
|
* ```
|
|
2616
2529
|
*/
|
|
2617
|
-
declare const
|
|
2530
|
+
declare const createAccount: (endpoint: VerdocsEndpoint, params: ICreateAccountRequest) => Promise<{
|
|
2618
2531
|
profile: IProfile;
|
|
2619
2532
|
organization: IOrganization;
|
|
2620
2533
|
}>;
|
|
@@ -2630,4 +2543,4 @@ interface ISignupSurvey {
|
|
|
2630
2543
|
declare const recordSignupSurvey: (endpoint: VerdocsEndpoint, params: ISignupSurvey) => Promise<{
|
|
2631
2544
|
status: "OK";
|
|
2632
2545
|
}>;
|
|
2633
|
-
export { TRequestStatus, TTemplateSenderType, TTemplatePermission, TTemplateAction, TAccountPermission, TOrgPermission, TApiKeyPermission, TPermission, TRecipientAction, TEnvelopeStatus, TRecipientStatus, TRecipientType,
|
|
2546
|
+
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 };
|