@verdocs/js-sdk 6.6.0 → 6.6.2

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 CHANGED
@@ -433,10 +433,11 @@ interface IWebhook {
433
433
  id: string;
434
434
  organization_id: string;
435
435
  url: string;
436
- secret_key?: string;
437
- client_id?: string;
438
- client_secret?: string;
439
- token_endpoint?: string;
436
+ secret_key?: string | null;
437
+ client_id?: string | null;
438
+ client_secret?: string | null;
439
+ scope?: string | null;
440
+ token_endpoint?: string | null;
440
441
  auth_method: TWebhookAuthMethod;
441
442
  active: boolean;
442
443
  events: IWebhookEvents;
@@ -754,6 +755,7 @@ interface IRecipient {
754
755
  message: string | null;
755
756
  claimed: boolean;
756
757
  agreed: boolean;
758
+ name_locked: boolean;
757
759
  key_used_to_conclude?: string;
758
760
  environment?: string;
759
761
  created_at: string;
@@ -817,7 +819,10 @@ interface IRole {
817
819
  * arrange recipients to match related business processes so this field allows for that.
818
820
  */
819
821
  order: number;
822
+ // TODO: Most booleans should probably become non-nullable
820
823
  delegator: boolean | null;
824
+ /** If set, the recipient will not be allowed to change their legal name. */
825
+ name_locked: boolean;
821
826
  }
822
827
  interface ISignature {
823
828
  id: string;
@@ -1479,6 +1484,8 @@ interface IUpdateRecipientParams {
1479
1484
  dob?: string;
1480
1485
  /** If KBA-based authentication is used, the recipient's SSN-Last-4 to prefill. May only be changed if the recipient has not already completed KBA-based auth. */
1481
1486
  ssn_last_4?: string;
1487
+ /** If set, the recipient will not be allowed to change their legal name. */
1488
+ name_locked?: string;
1482
1489
  }
1483
1490
  interface ICreateEnvelopeDocumentFromData {
1484
1491
  /** The order in which the document should be displayed. */
@@ -1664,6 +1671,9 @@ type TAuthenticateRecipientRequest = IAuthenticateRecipientViaPasscodeRequest |
1664
1671
  * be applied at the Organization level before creating an envelope.
1665
1672
  */
1666
1673
  declare const DEFAULT_DISCLOSURES = "\n<ul>\n <li>\n Agree to use electronic records and signatures, and confirm you have read the\n <a href=\"https://verdocs.com/en/electronic-record-signature-disclosure/\" target=\"_blank\">\n Electronic Record and Signatures Disclosure</a>.</li>\n <li>\n Agree to Verdocs'\n <a href=\"https://verdocs.com/en/eula\" target=\"_blank\">\n End User License Agreement</a>\n and confirm you have read Verdocs'\n <a href=\"https://verdocs.com/en/privacy-policy/\" target=\"_blank\">\n Privacy Policy</a>.\n </li>\n</ul>";
1674
+ // TODO: We need to re-review all of the models and input types/docs to be sure they match the latest
1675
+ // API work.
1676
+ // INIT
1667
1677
  /**
1668
1678
  * Create an envelope
1669
1679
  *
@@ -2308,6 +2318,11 @@ interface IAcceptOrganizationInvitationRequest {
2308
2318
  interface ISetWebhookRequest {
2309
2319
  url: string;
2310
2320
  active: boolean;
2321
+ client_id?: string | null;
2322
+ client_secret?: string | null;
2323
+ scope?: string | null;
2324
+ token_endpoint?: string | null;
2325
+ auth_method: TWebhookAuthMethod;
2311
2326
  events: Record<TWebhookEvent, boolean>;
2312
2327
  }
2313
2328
  /**
@@ -2963,12 +2978,13 @@ declare const getOrganizationMembers: (endpoint: VerdocsEndpoint) => Promise<IPr
2963
2978
  * ```
2964
2979
  *
2965
2980
  * @group Organization Members
2981
+ * @apiParam string(format:uuid) profile_id The Profile ID to remove.
2966
2982
  * @api DELETE /v2/organization-members/:profile_id Delete a member from the organization
2967
2983
  * @apiSuccess string . Success
2968
2984
  */
2969
2985
  declare const deleteOrganizationMember: (endpoint: VerdocsEndpoint, profileId: string) => Promise<any>;
2970
2986
  /**
2971
- * Update a member.
2987
+ * Update an organization member.
2972
2988
  *
2973
2989
  * ```typescript
2974
2990
  * import {updateOrganizationMember} from '@verdocs/js-sdk';
@@ -2978,12 +2994,13 @@ declare const deleteOrganizationMember: (endpoint: VerdocsEndpoint, profileId: s
2978
2994
  *
2979
2995
  * @group Organization Members
2980
2996
  * @api PATCH /v2/organization-members/:profile_id Update an organization member.
2981
- * @apiBody array(items:TRole) roles URL to send Webhook events to. An empty or invalid URL will disable Webhook calls.
2982
- * @apiBody string first_name Set to true to enable Webhooks calls.
2983
- * @apiBody string last_name Record<TWebhookEvent, boolean> map of events to enable/disable.
2984
- * @apiSuccess array(items:IProfile) . List of caller's current organization's members
2997
+ * @apiParam string(format:uuid) profile_id The Profile ID to update.
2998
+ * @apiBody string first_name? First name for the member
2999
+ * @apiBody string last_name? Last name for the member
3000
+ * @apiBody array(items:TRole) roles? Roles (e.g. "member" or "admin") to assign to the user.
3001
+ * @apiSuccess IProfile . The updated profile for the member.
2985
3002
  */
2986
- declare const updateOrganizationMember: (endpoint: VerdocsEndpoint, profileId: string, params: Pick<IProfile, "roles" | "first_name" | "last_name">) => Promise<any>;
3003
+ declare const updateOrganizationMember: (endpoint: VerdocsEndpoint, profileId: string, params: Partial<Pick<IProfile, "roles" | "first_name" | "last_name">>) => Promise<IProfile>;
2987
3004
  /**
2988
3005
  * Get an organization by ID. Note that this endpoint will return only a subset of fields
2989
3006
  * if the caller is not a member of the organization (the public fields).
@@ -3158,7 +3175,8 @@ declare const getEntitlements: (endpoint: VerdocsEndpoint) => Promise<IEntitleme
3158
3175
  */
3159
3176
  declare const getActiveEntitlements: (endpoint: VerdocsEndpoint) => Promise<Partial<Record<TEntitlement, IEntitlement>>>;
3160
3177
  /**
3161
- * Get the registered Webhook configuration for the caller's organization.
3178
+ * Get the registered Webhook configuration for the caller's organization. Note that an organization
3179
+ * may only have a single Webhook configuration.
3162
3180
  *
3163
3181
  * ```typescript
3164
3182
  * import {getWebhooks} from '@verdocs/js-sdk';
@@ -3187,6 +3205,11 @@ declare const getWebhooks: (endpoint: VerdocsEndpoint) => Promise<IWebhook>;
3187
3205
  * @apiDescription Note that Webhooks cannot currently be deleted, but may be easily disabled by setting `active` to `false` and/or setting the `url` to an empty string.
3188
3206
  * @apiBody string url URL to send Webhook events to. An empty or invalid URL will disable Webhook calls.
3189
3207
  * @apiBody boolean active Set to true to enable Webhooks calls.
3208
+ * @apiBody string(enum:'none'|'hmac'|'client_credentials') auth_method? Enable HMAC or Client Credentials authentication for Webhooks calls.
3209
+ * @apiBody string token_endpoint? Required if `auth_method` is set to `client_credentials`. Token endpoint to use for authenticating Webhooks calls.
3210
+ * @apiBody string client_id? Required if `auth_method` is set to `client_credentials`. Client ID to use for authenticating Webhooks calls.
3211
+ * @apiBody string client_secret? Required if `auth_method` is set to `client_credentials`. Client secret to use for authenticating Webhooks calls.
3212
+ * @apiBody string scope? Optional scope to include in authentication calls if `auth_method` is set to `client_credentials`.
3190
3213
  * @apiBody object events Record<TWebhookEvent, boolean> map of events to enable/disable.
3191
3214
  * @apiSuccess IWebhook . The updated Webhooks config for the caller's organization.
3192
3215
  */
package/dist/index.d.ts CHANGED
@@ -433,10 +433,11 @@ interface IWebhook {
433
433
  id: string;
434
434
  organization_id: string;
435
435
  url: string;
436
- secret_key?: string;
437
- client_id?: string;
438
- client_secret?: string;
439
- token_endpoint?: string;
436
+ secret_key?: string | null;
437
+ client_id?: string | null;
438
+ client_secret?: string | null;
439
+ scope?: string | null;
440
+ token_endpoint?: string | null;
440
441
  auth_method: TWebhookAuthMethod;
441
442
  active: boolean;
442
443
  events: IWebhookEvents;
@@ -754,6 +755,7 @@ interface IRecipient {
754
755
  message: string | null;
755
756
  claimed: boolean;
756
757
  agreed: boolean;
758
+ name_locked: boolean;
757
759
  key_used_to_conclude?: string;
758
760
  environment?: string;
759
761
  created_at: string;
@@ -817,7 +819,10 @@ interface IRole {
817
819
  * arrange recipients to match related business processes so this field allows for that.
818
820
  */
819
821
  order: number;
822
+ // TODO: Most booleans should probably become non-nullable
820
823
  delegator: boolean | null;
824
+ /** If set, the recipient will not be allowed to change their legal name. */
825
+ name_locked: boolean;
821
826
  }
822
827
  interface ISignature {
823
828
  id: string;
@@ -1479,6 +1484,8 @@ interface IUpdateRecipientParams {
1479
1484
  dob?: string;
1480
1485
  /** If KBA-based authentication is used, the recipient's SSN-Last-4 to prefill. May only be changed if the recipient has not already completed KBA-based auth. */
1481
1486
  ssn_last_4?: string;
1487
+ /** If set, the recipient will not be allowed to change their legal name. */
1488
+ name_locked?: string;
1482
1489
  }
1483
1490
  interface ICreateEnvelopeDocumentFromData {
1484
1491
  /** The order in which the document should be displayed. */
@@ -1664,6 +1671,9 @@ type TAuthenticateRecipientRequest = IAuthenticateRecipientViaPasscodeRequest |
1664
1671
  * be applied at the Organization level before creating an envelope.
1665
1672
  */
1666
1673
  declare const DEFAULT_DISCLOSURES = "\n<ul>\n <li>\n Agree to use electronic records and signatures, and confirm you have read the\n <a href=\"https://verdocs.com/en/electronic-record-signature-disclosure/\" target=\"_blank\">\n Electronic Record and Signatures Disclosure</a>.</li>\n <li>\n Agree to Verdocs'\n <a href=\"https://verdocs.com/en/eula\" target=\"_blank\">\n End User License Agreement</a>\n and confirm you have read Verdocs'\n <a href=\"https://verdocs.com/en/privacy-policy/\" target=\"_blank\">\n Privacy Policy</a>.\n </li>\n</ul>";
1674
+ // TODO: We need to re-review all of the models and input types/docs to be sure they match the latest
1675
+ // API work.
1676
+ // INIT
1667
1677
  /**
1668
1678
  * Create an envelope
1669
1679
  *
@@ -2308,6 +2318,11 @@ interface IAcceptOrganizationInvitationRequest {
2308
2318
  interface ISetWebhookRequest {
2309
2319
  url: string;
2310
2320
  active: boolean;
2321
+ client_id?: string | null;
2322
+ client_secret?: string | null;
2323
+ scope?: string | null;
2324
+ token_endpoint?: string | null;
2325
+ auth_method: TWebhookAuthMethod;
2311
2326
  events: Record<TWebhookEvent, boolean>;
2312
2327
  }
2313
2328
  /**
@@ -2963,12 +2978,13 @@ declare const getOrganizationMembers: (endpoint: VerdocsEndpoint) => Promise<IPr
2963
2978
  * ```
2964
2979
  *
2965
2980
  * @group Organization Members
2981
+ * @apiParam string(format:uuid) profile_id The Profile ID to remove.
2966
2982
  * @api DELETE /v2/organization-members/:profile_id Delete a member from the organization
2967
2983
  * @apiSuccess string . Success
2968
2984
  */
2969
2985
  declare const deleteOrganizationMember: (endpoint: VerdocsEndpoint, profileId: string) => Promise<any>;
2970
2986
  /**
2971
- * Update a member.
2987
+ * Update an organization member.
2972
2988
  *
2973
2989
  * ```typescript
2974
2990
  * import {updateOrganizationMember} from '@verdocs/js-sdk';
@@ -2978,12 +2994,13 @@ declare const deleteOrganizationMember: (endpoint: VerdocsEndpoint, profileId: s
2978
2994
  *
2979
2995
  * @group Organization Members
2980
2996
  * @api PATCH /v2/organization-members/:profile_id Update an organization member.
2981
- * @apiBody array(items:TRole) roles URL to send Webhook events to. An empty or invalid URL will disable Webhook calls.
2982
- * @apiBody string first_name Set to true to enable Webhooks calls.
2983
- * @apiBody string last_name Record<TWebhookEvent, boolean> map of events to enable/disable.
2984
- * @apiSuccess array(items:IProfile) . List of caller's current organization's members
2997
+ * @apiParam string(format:uuid) profile_id The Profile ID to update.
2998
+ * @apiBody string first_name? First name for the member
2999
+ * @apiBody string last_name? Last name for the member
3000
+ * @apiBody array(items:TRole) roles? Roles (e.g. "member" or "admin") to assign to the user.
3001
+ * @apiSuccess IProfile . The updated profile for the member.
2985
3002
  */
2986
- declare const updateOrganizationMember: (endpoint: VerdocsEndpoint, profileId: string, params: Pick<IProfile, "roles" | "first_name" | "last_name">) => Promise<any>;
3003
+ declare const updateOrganizationMember: (endpoint: VerdocsEndpoint, profileId: string, params: Partial<Pick<IProfile, "roles" | "first_name" | "last_name">>) => Promise<IProfile>;
2987
3004
  /**
2988
3005
  * Get an organization by ID. Note that this endpoint will return only a subset of fields
2989
3006
  * if the caller is not a member of the organization (the public fields).
@@ -3158,7 +3175,8 @@ declare const getEntitlements: (endpoint: VerdocsEndpoint) => Promise<IEntitleme
3158
3175
  */
3159
3176
  declare const getActiveEntitlements: (endpoint: VerdocsEndpoint) => Promise<Partial<Record<TEntitlement, IEntitlement>>>;
3160
3177
  /**
3161
- * Get the registered Webhook configuration for the caller's organization.
3178
+ * Get the registered Webhook configuration for the caller's organization. Note that an organization
3179
+ * may only have a single Webhook configuration.
3162
3180
  *
3163
3181
  * ```typescript
3164
3182
  * import {getWebhooks} from '@verdocs/js-sdk';
@@ -3187,6 +3205,11 @@ declare const getWebhooks: (endpoint: VerdocsEndpoint) => Promise<IWebhook>;
3187
3205
  * @apiDescription Note that Webhooks cannot currently be deleted, but may be easily disabled by setting `active` to `false` and/or setting the `url` to an empty string.
3188
3206
  * @apiBody string url URL to send Webhook events to. An empty or invalid URL will disable Webhook calls.
3189
3207
  * @apiBody boolean active Set to true to enable Webhooks calls.
3208
+ * @apiBody string(enum:'none'|'hmac'|'client_credentials') auth_method? Enable HMAC or Client Credentials authentication for Webhooks calls.
3209
+ * @apiBody string token_endpoint? Required if `auth_method` is set to `client_credentials`. Token endpoint to use for authenticating Webhooks calls.
3210
+ * @apiBody string client_id? Required if `auth_method` is set to `client_credentials`. Client ID to use for authenticating Webhooks calls.
3211
+ * @apiBody string client_secret? Required if `auth_method` is set to `client_credentials`. Client secret to use for authenticating Webhooks calls.
3212
+ * @apiBody string scope? Optional scope to include in authentication calls if `auth_method` is set to `client_credentials`.
3190
3213
  * @apiBody object events Record<TWebhookEvent, boolean> map of events to enable/disable.
3191
3214
  * @apiSuccess IWebhook . The updated Webhooks config for the caller's organization.
3192
3215
  */
package/dist/index.js CHANGED
@@ -1529,6 +1529,9 @@ class VerdocsEndpoint {
1529
1529
  }
1530
1530
  }
1531
1531
 
1532
+ // TODO: We need to re-review all of the models and input types/docs to be sure they match the latest
1533
+ // API work.
1534
+ // INIT
1532
1535
  /**
1533
1536
  * Create an envelope
1534
1537
  *
@@ -3446,6 +3449,7 @@ const getOrganizationMembers = (endpoint) => endpoint.api //
3446
3449
  * ```
3447
3450
  *
3448
3451
  * @group Organization Members
3452
+ * @apiParam string(format:uuid) profile_id The Profile ID to remove.
3449
3453
  * @api DELETE /v2/organization-members/:profile_id Delete a member from the organization
3450
3454
  * @apiSuccess string . Success
3451
3455
  */
@@ -3453,7 +3457,7 @@ const deleteOrganizationMember = (endpoint, profileId) => endpoint.api //
3453
3457
  .delete(`/v2/organization-members/${profileId}`)
3454
3458
  .then((r) => r.data);
3455
3459
  /**
3456
- * Update a member.
3460
+ * Update an organization member.
3457
3461
  *
3458
3462
  * ```typescript
3459
3463
  * import {updateOrganizationMember} from '@verdocs/js-sdk';
@@ -3463,10 +3467,11 @@ const deleteOrganizationMember = (endpoint, profileId) => endpoint.api //
3463
3467
  *
3464
3468
  * @group Organization Members
3465
3469
  * @api PATCH /v2/organization-members/:profile_id Update an organization member.
3466
- * @apiBody array(items:TRole) roles URL to send Webhook events to. An empty or invalid URL will disable Webhook calls.
3467
- * @apiBody string first_name Set to true to enable Webhooks calls.
3468
- * @apiBody string last_name Record<TWebhookEvent, boolean> map of events to enable/disable.
3469
- * @apiSuccess array(items:IProfile) . List of caller's current organization's members
3470
+ * @apiParam string(format:uuid) profile_id The Profile ID to update.
3471
+ * @apiBody string first_name? First name for the member
3472
+ * @apiBody string last_name? Last name for the member
3473
+ * @apiBody array(items:TRole) roles? Roles (e.g. "member" or "admin") to assign to the user.
3474
+ * @apiSuccess IProfile . The updated profile for the member.
3470
3475
  */
3471
3476
  const updateOrganizationMember = (endpoint, profileId, params) => endpoint.api //
3472
3477
  .patch(`/v2/organization-members/${profileId}`, params)
@@ -3701,7 +3706,8 @@ const getActiveEntitlements = async (endpoint) => {
3701
3706
  * @module
3702
3707
  */
3703
3708
  /**
3704
- * Get the registered Webhook configuration for the caller's organization.
3709
+ * Get the registered Webhook configuration for the caller's organization. Note that an organization
3710
+ * may only have a single Webhook configuration.
3705
3711
  *
3706
3712
  * ```typescript
3707
3713
  * import {getWebhooks} from '@verdocs/js-sdk';
@@ -3732,6 +3738,11 @@ const getWebhooks = (endpoint) => endpoint.api //
3732
3738
  * @apiDescription Note that Webhooks cannot currently be deleted, but may be easily disabled by setting `active` to `false` and/or setting the `url` to an empty string.
3733
3739
  * @apiBody string url URL to send Webhook events to. An empty or invalid URL will disable Webhook calls.
3734
3740
  * @apiBody boolean active Set to true to enable Webhooks calls.
3741
+ * @apiBody string(enum:'none'|'hmac'|'client_credentials') auth_method? Enable HMAC or Client Credentials authentication for Webhooks calls.
3742
+ * @apiBody string token_endpoint? Required if `auth_method` is set to `client_credentials`. Token endpoint to use for authenticating Webhooks calls.
3743
+ * @apiBody string client_id? Required if `auth_method` is set to `client_credentials`. Client ID to use for authenticating Webhooks calls.
3744
+ * @apiBody string client_secret? Required if `auth_method` is set to `client_credentials`. Client secret to use for authenticating Webhooks calls.
3745
+ * @apiBody string scope? Optional scope to include in authentication calls if `auth_method` is set to `client_credentials`.
3735
3746
  * @apiBody object events Record<TWebhookEvent, boolean> map of events to enable/disable.
3736
3747
  * @apiSuccess IWebhook . The updated Webhooks config for the caller's organization.
3737
3748
  */