@verdocs/js-sdk 4.0.10 → 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.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: string | null;
81
+ slug?: string | null;
86
82
  /** Web site URL */
87
- url: string | null;
88
- full_logo_url: string | null;
89
- thumbnail_url: string | null;
90
- primary_color: string | null;
91
- secondary_color: string | null;
92
- entitlements: Record<string, any> | null;
93
- mtd_usage: Record<string, any> | null;
94
- ytd_usage: Record<string, any> | null;
95
- data: Record<string, any> | null;
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 = "env:essential" | "org:standard";
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/Organizations';
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, organizationId: string) => Promise<IApiKey[]>;
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/Organizations';
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, organizationId: string, params: ICreateApiKeyRequest) => Promise<IApiKey>;
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/Organizations';
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, organizationId: string, clientId: string) => Promise<IApiKey>;
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/Organizations';
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, organizationId: string, clientId: string, params: IUpdateApiKeyRequest) => Promise<IApiKey>;
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/Organizations';
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, organizationId: string, clientId: string) => Promise<any>;
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 {Groups} from '@verdocs/js-sdk/Organizations';
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 Groups.getGroups(ORGID);
1584
+ * const groups = await getGroups(ORGID);
1602
1585
  * ```
1603
1586
  */
1604
- declare const getGroupByName: (endpoint: VerdocsEndpoint, organizationId: string, name?: string) => Promise<IGroup>;
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 {Groups} from '@verdocs/js-sdk/Organizations';
1592
+ * import {getGroup} from '@verdocs/js-sdk/v2/organization-groups';
1610
1593
  *
1611
- * const groups = await Groups.getGroups(ORGID);
1594
+ * const groups = await getGroup(GROUPID);
1612
1595
  * ```
1613
1596
  */
1614
- declare const getGroup: (endpoint: VerdocsEndpoint, organizationId: string, groupId: string) => Promise<IGroup>;
1615
- declare const getGroupMembers: (endpoint: VerdocsEndpoint, organizationId: string, groupId: string) => Promise<any>;
1616
- declare const addGroupMembers: (endpoint: VerdocsEndpoint, organizationId: string, groupId: string, params: any) => Promise<any>;
1617
- declare const deleteGroupMembers: (endpoint: VerdocsEndpoint, organizationId: string, groupId: string, params: any) => Promise<any>;
1618
- declare const addGroupPermission: (endpoint: VerdocsEndpoint, organizationId: string, groupId: string, permission: TPermission) => Promise<any>;
1619
- declare const deleteGroupPermission: (endpoint: VerdocsEndpoint, organizationId: string, groupId: string, permission: TPermission) => Promise<any>;
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, organizationId: string) => Promise<IOrganizationInvitation[]>;
1626
- declare const createOrganizationInvitation: (endpoint: VerdocsEndpoint, organizationId: string, params: ICreateInvitationRequest) => Promise<IOrganizationInvitation>;
1627
- declare const deleteOrganizationInvitation: (endpoint: VerdocsEndpoint, organizationId: string, email: string) => Promise<any>;
1628
- declare const updateOrganizationInvitation: (endpoint: VerdocsEndpoint, organizationId: string, email: string, params: Partial<ICreateInvitationRequest>) => Promise<IOrganizationInvitation>;
1629
- declare const resendOrganizationInvitation: (endpoint: VerdocsEndpoint, organizationId: string, email: string) => Promise<any>;
1630
- declare const getOrganizationInvitation: (endpoint: VerdocsEndpoint, organizationId: string, email: string, token: string) => Promise<IOrganizationInvitation>;
1631
- declare const acceptOrganizationInvitation: (endpoint: VerdocsEndpoint, organizationId: string, email: string, token: string) => Promise<IProfile>;
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, organizationId: string) => Promise<IProfile[]>;
1642
- declare const deleteOrganizationMember: (endpoint: VerdocsEndpoint, organizationId: string, profileId: string) => Promise<any>;
1643
- declare const addOrganizationMemberRole: (endpoint: VerdocsEndpoint, organizationId: string, profileId: string, roleId: string) => Promise<IRole>;
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 user has access to.
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
- * Get an organization by ID.
1643
+ * Update an organization.
1660
1644
  */
1661
- declare const getOrganization: (endpoint: VerdocsEndpoint, organizationId: string) => Promise<IOrganization>;
1645
+ declare const updateOrganization: (endpoint: VerdocsEndpoint, organizationId: string, params: Partial<IOrganization>) => Promise<IOrganization>;
1662
1646
  /**
1663
- * Update an organization.
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.
@@ -1863,6 +1849,73 @@ declare const updateField: (endpoint: VerdocsEndpoint, templateId: string, field
1863
1849
  * REmove a field from a template.
1864
1850
  */
1865
1851
  declare const deleteField: (endpoint: VerdocsEndpoint, templateId: string, fieldName: string) => Promise<any>;
1852
+ /**
1853
+ * Check to see if the user created the template.
1854
+ */
1855
+ declare const userIsTemplateCreator: (session: TSession, template: ITemplate | ITemplateSummary) => boolean | null;
1856
+ /**
1857
+ * Check to see if a template is "shared" with the user.
1858
+ */
1859
+ declare const userHasSharedTemplate: (session: TSession, template: ITemplate | ITemplateSummary) => boolean | null;
1860
+ /**
1861
+ * Check to see if the user can create a personal/private template.
1862
+ */
1863
+ declare const userCanCreatePersonalTemplate: (session: TSession) => boolean;
1864
+ /**
1865
+ * Check to see if the user can create an org-shared template.
1866
+ */
1867
+ declare const userCanCreateOrgTemplate: (session: TSession) => boolean;
1868
+ /**
1869
+ * Check to see if the user can create a public template.
1870
+ */
1871
+ declare const userCanCreatePublicTemplate: (session: TSession) => boolean;
1872
+ /**
1873
+ * Check to see if the user can read/view a template.
1874
+ */
1875
+ declare const userCanReadTemplate: (session: TSession, template: ITemplate | ITemplateSummary) => boolean | null;
1876
+ /**
1877
+ * Check to see if the user can update a tempate.
1878
+ */
1879
+ declare const userCanUpdateTemplate: (session: TSession, template: ITemplate | ITemplateSummary) => boolean | null;
1880
+ /**
1881
+ * Check to see if the user can change whether a template is personal vs org-shared.
1882
+ */
1883
+ declare const userCanMakeTemplatePrivate: (session: TSession, template: ITemplate | ITemplateSummary) => boolean;
1884
+ /**
1885
+ * Check to see if the user can change whether a template is personal vs org-shared.
1886
+ */
1887
+ declare const userCanMakeTemplateShared: (session: TSession, template: ITemplate | ITemplateSummary) => boolean;
1888
+ /**
1889
+ * Check to see if the user can change whether a template is personal vs org-shared.
1890
+ */
1891
+ declare const userCanMakeTemplatePublic: (session: TSession, template: ITemplate | ITemplateSummary) => boolean;
1892
+ /**
1893
+ * Check to see if the user can change whether a template is personal vs org-shared.
1894
+ */
1895
+ declare const userCanChangeOrgVisibility: (session: TSession, template: ITemplate | ITemplateSummary) => boolean | null;
1896
+ /**
1897
+ * Check to see if the user can change whether a template is personal vs org-shared.
1898
+ */
1899
+ declare const userCanDeleteTemplate: (session: TSession, template: ITemplate | ITemplateSummary) => boolean;
1900
+ /**
1901
+ * Confirm whether the user can create an envelope using the specified template.
1902
+ */
1903
+ declare const userCanSendTemplate: (session: TSession, template: ITemplate | ITemplateSummary) => boolean | null;
1904
+ /**
1905
+ * Confirm whether the user can create a new template.
1906
+ */
1907
+ declare const userCanCreateTemplate: (session: TSession) => boolean;
1908
+ /**
1909
+ * Check to see if the user can "build" the template (use the field builder). The user must have write access to the
1910
+ * template, and the template must have at least one signer role.
1911
+ */
1912
+ declare const userCanBuildTemplate: (session: TSession, template: ITemplate) => boolean | null;
1913
+ declare const getFieldsForRole: (template: ITemplate, role_name: string) => ITemplateField[];
1914
+ /**
1915
+ * Check to see if the user can preview the template. The user must have read access to the template, the template must
1916
+ * have at least one signer, and every signer must have at least one field.
1917
+ */
1918
+ declare const userCanPreviewTemplate: (session: TSession, template: ITemplate) => boolean | null;
1866
1919
  interface ICreateTemplateReminderRequest {
1867
1920
  setup_time: number;
1868
1921
  interval_time: number;
@@ -2285,15 +2338,6 @@ interface IAuthenticateResponse {
2285
2338
  accessToken: string;
2286
2339
  refreshToken: string;
2287
2340
  }
2288
- interface TokenValidationRequest {
2289
- token: string;
2290
- }
2291
- interface TokenValidationResponse {
2292
- /** True if the token is valid */
2293
- valid: boolean;
2294
- /** The decoded and validated body of the JWT */
2295
- payload: any;
2296
- }
2297
2341
  interface IUpdatePasswordRequest {
2298
2342
  email: string;
2299
2343
  oldPassword: string;
@@ -2304,26 +2348,13 @@ interface UpdatePasswordResponse {
2304
2348
  /** Success or failure message */
2305
2349
  message: string;
2306
2350
  }
2307
- interface UpdateEmailRequest {
2308
- email: string;
2309
- }
2310
- interface UpdateEmailResponse {
2311
- profiles: IProfile[];
2312
- }
2313
- interface ICreateBusinessAccountRequest {
2351
+ interface ICreateAccountRequest {
2314
2352
  email: string;
2315
2353
  password: string;
2316
2354
  firstName: string;
2317
2355
  lastName: string;
2318
2356
  orgName: string;
2319
2357
  }
2320
- interface ICreateUserRequest {
2321
- firstName: string;
2322
- lastName: string;
2323
- email: string;
2324
- password: string;
2325
- fromInviteCode: string;
2326
- }
2327
2358
  /**
2328
2359
  * Authenticate to Verdocs via user/password authentication
2329
2360
  *
@@ -2341,7 +2372,7 @@ declare const authenticateUser: (endpoint: VerdocsEndpoint, params: IAuthenticat
2341
2372
  * NodeJS server-side applications. Never expose your Client Secret in a Web or Mobile app!** Also note
2342
2373
  * that access tokens may be cached by server-side apps (and this is recommended) but do expire after 2
2343
2374
  * hours. This expiration may change based on future security needs. Application developers are encouraged
2344
- * to check the `exp` expiration field in the response accessToken and renew tokens after they expire.
2375
+ * to check the `exp` expiration field in the response, and renew tokens after they expire.
2345
2376
  *
2346
2377
  * ```typescript
2347
2378
  * import {Auth} from '@verdocs/js-sdk/Auth';
@@ -2352,21 +2383,6 @@ declare const authenticateUser: (endpoint: VerdocsEndpoint, params: IAuthenticat
2352
2383
  * ```
2353
2384
  */
2354
2385
  declare const authenticateApp: (endpoint: VerdocsEndpoint, params: IAuthenticateAppRequest) => Promise<IAuthenticateResponse>;
2355
- /**
2356
- * Validate a token. Only Verdocs tokens will be accepted. Most applications can decode tokens locally,
2357
- * because tokens will be validated when API calls are made anyway. However, high-security applications
2358
- * may use this endpoint to check if a token has been revoked.
2359
- *
2360
- * ```typescript
2361
- * import {Auth} from '@verdocs/js-sdk/Auth';
2362
- *
2363
- * const {valid} = await Auth.validateToken({ token });
2364
- * if (!valid) {
2365
- * window.alert('Session invalid or expired. Please re-authenticate.');
2366
- * }
2367
- * ```
2368
- */
2369
- declare const validateToken: (endpoint: VerdocsEndpoint, params: TokenValidationRequest) => Promise<TokenValidationResponse>;
2370
2386
  /**
2371
2387
  * If called before the session expires, this will refresh the caller's session and tokens.
2372
2388
  *
@@ -2380,7 +2396,7 @@ declare const validateToken: (endpoint: VerdocsEndpoint, params: TokenValidation
2380
2396
  */
2381
2397
  declare const refreshTokens: (endpoint: VerdocsEndpoint) => Promise<IAuthenticateResponse>;
2382
2398
  /**
2383
- * Update the caller's password. To help prevent CSRF attack vectors, the user's old password and email address are required.
2399
+ * Update the caller's password when the old password is known (typically for logged-in users).
2384
2400
  *
2385
2401
  * ```typescript
2386
2402
  * import {Auth} from '@verdocs/js-sdk/Auth';
@@ -2391,9 +2407,9 @@ declare const refreshTokens: (endpoint: VerdocsEndpoint) => Promise<IAuthenticat
2391
2407
  * }
2392
2408
  * ```
2393
2409
  */
2394
- declare const updatePassword: (endpoint: VerdocsEndpoint, params: IUpdatePasswordRequest) => Promise<UpdatePasswordResponse>;
2410
+ declare const changePassword: (endpoint: VerdocsEndpoint, params: IUpdatePasswordRequest) => Promise<UpdatePasswordResponse>;
2395
2411
  /**
2396
- * Reset the caller's password.
2412
+ * Request a password reset, when the old password is not known (typically in login forms).
2397
2413
  *
2398
2414
  * ```typescript
2399
2415
  * import {Auth} from '@verdocs/js-sdk/Auth';
@@ -2409,16 +2425,6 @@ declare const resetPassword: (endpoint: VerdocsEndpoint, params: {
2409
2425
  }) => Promise<{
2410
2426
  success: boolean;
2411
2427
  }>;
2412
- /**
2413
- * Update the caller's email address.
2414
- *
2415
- * ```typescript
2416
- * import {Auth} from '@verdocs/js-sdk/Auth';
2417
- *
2418
- * const {profiles} = await Auth.updateEmail({ email: newEmail });
2419
- * ```
2420
- */
2421
- declare const updateEmail: (endpoint: VerdocsEndpoint, params: UpdateEmailRequest) => Promise<UpdateEmailResponse>;
2422
2428
  /**
2423
2429
  * Resend the email verification request. Note that to prevent certain forms of abuse, the email address is not
2424
2430
  * a parameter here. Instead, the caller must be authenticated as the (unverified) user. To simplify this process,
@@ -2435,9 +2441,6 @@ declare const updateEmail: (endpoint: VerdocsEndpoint, params: UpdateEmailReques
2435
2441
  declare const resendVerification: (endpoint: VerdocsEndpoint, accessToken?: string) => Promise<{
2436
2442
  result: "done";
2437
2443
  }>;
2438
- declare const createUser: (endpoint: VerdocsEndpoint, params: ICreateUserRequest) => Promise<IProfile>;
2439
- // TODO
2440
- declare const billingPlaceholder: {};
2441
2444
  declare const getNotifications: (endpoint: VerdocsEndpoint) => Promise<any>;
2442
2445
  /**
2443
2446
  * Get the user's available profiles. The current profile will be marked with `current: true`.
@@ -2459,16 +2462,6 @@ declare const getProfiles: (endpoint: VerdocsEndpoint) => Promise<IProfile[]>;
2459
2462
  * ```
2460
2463
  */
2461
2464
  declare const getCurrentProfile: (endpoint: VerdocsEndpoint) => Promise<IProfile | undefined>;
2462
- /**
2463
- * Get a list of system roles.
2464
- *
2465
- * ```typescript
2466
- * import {Profiles} from '@verdocs/js-sdk/Users';
2467
- *
2468
- * const roles = await Profiles.getRoles();
2469
- * ```
2470
- */
2471
- declare const getRoles: (endpoint: VerdocsEndpoint) => Promise<TRole[]>;
2472
2465
  /**
2473
2466
  * Create a profile. If the caller does not have a "current" profile set, the new profile will be made current.
2474
2467
  *
@@ -2490,16 +2483,6 @@ declare const createProfile: (endpoint: VerdocsEndpoint, params: ICreateProfileR
2490
2483
  * ```
2491
2484
  */
2492
2485
  declare const getProfile: (endpoint: VerdocsEndpoint, profileId: string) => Promise<IProfile>;
2493
- /**
2494
- * Get a profile's groups.
2495
- *
2496
- * ```typescript
2497
- * import {Profiles} from '@verdocs/js-sdk/Users';
2498
- *
2499
- * const groups = await Profiles.getProfileGroups('PROFILEID');
2500
- * ```
2501
- */
2502
- declare const getProfileGroups: (endpoint: VerdocsEndpoint, profileId: string) => Promise<IGroup[]>;
2503
2486
  /**
2504
2487
  * Switch the caller's "current" profile. The current profile is used for permissions checking and profile_id field settings
2505
2488
  * for most operations in Verdocs. It is important to select the appropropriate profile before calling other API functions.
@@ -2522,9 +2505,6 @@ declare const switchProfile: (endpoint: VerdocsEndpoint, profileId: string) => P
2522
2505
  * ```
2523
2506
  */
2524
2507
  declare const updateProfile: (endpoint: VerdocsEndpoint, profileId: string, params: IUpdateProfileRequest) => Promise<IProfile>;
2525
- // endpoint.api //
2526
- // .post<IEnvelopeSummaries>('/envelopes/list', params, {baseURL: endpoint.getBaseURLv2()})
2527
- // .then((r) => r.data);
2528
2508
  /**
2529
2509
  * Delete a profile. If the requested profile is the caller's curent profile, the next available profile will be selected.
2530
2510
  *
@@ -2547,7 +2527,7 @@ declare const deleteProfile: (endpoint: VerdocsEndpoint, profileId: string) => P
2547
2527
  * });
2548
2528
  * ```
2549
2529
  */
2550
- declare const createBusinessAccount: (endpoint: VerdocsEndpoint, params: ICreateBusinessAccountRequest) => Promise<{
2530
+ declare const createAccount: (endpoint: VerdocsEndpoint, params: ICreateAccountRequest) => Promise<{
2551
2531
  profile: IProfile;
2552
2532
  organization: IOrganization;
2553
2533
  }>;
@@ -2563,4 +2543,4 @@ interface ISignupSurvey {
2563
2543
  declare const recordSignupSurvey: (endpoint: VerdocsEndpoint, params: ISignupSurvey) => Promise<{
2564
2544
  status: "OK";
2565
2545
  }>;
2566
- export { TRequestStatus, TTemplateSenderType, TTemplatePermission, TTemplateAction, TAccountPermission, TOrgPermission, TApiKeyPermission, TPermission, TRecipientAction, TEnvelopeStatus, TRecipientStatus, TRecipientType, TPlan, 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, getGroupByName, getGroup, getGroupMembers, addGroupMembers, deleteGroupMembers, addGroupPermission, deleteGroupPermission, getOrganizationInvitations, createOrganizationInvitation, deleteOrganizationInvitation, updateOrganizationInvitation, resendOrganizationInvitation, getOrganizationInvitation, acceptOrganizationInvitation, declineOrganizationInvitation, claimNewUser, getOrganizationMembers, deleteOrganizationMember, addOrganizationMemberRole, deleteOrganizationMemberRole, getOrganizationMemberPlans, getOrganizations, createOrganization, deleteOrganization, getOrganization, updateOrganization, ICreateApiKeyRequest, IUpdateApiKeyRequest, ICreateInvitationRequest, ISetWebhookRequest, getWebhooks, setWebhooks, userHasPermissions, ISigningSessionRequest, ISigningSession, IUserSession, TSessionType, TSession, TActiveSession, canPerformTemplateAction, hasRequiredPermissions, createField, updateField, deleteField, 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, validateToken, refreshTokens, updatePassword, resetPassword, updateEmail, resendVerification, createUser, billingPlaceholder, getNotifications, getProfiles, getCurrentProfile, getRoles, createProfile, getProfile, getProfileGroups, switchProfile, updateProfile, deleteProfile, createBusinessAccount, ISignupSurvey, recordSignupSurvey, ICreateProfileRequest, ISwitchProfileResponse, IUpdateProfileRequest, IAuthenticateUserRequest, IAuthenticateAppRequest, IAuthenticateResponse, TokenValidationRequest, TokenValidationResponse, IUpdatePasswordRequest, UpdatePasswordResponse, UpdateEmailRequest, UpdateEmailResponse, ICreateBusinessAccountRequest, ICreateUserRequest, 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 };
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 };