@verdocs/js-sdk 4.2.43 → 4.2.45

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
@@ -463,18 +463,18 @@ interface IEnvelope {
463
463
  organization_id: string;
464
464
  reminder_id: string | null;
465
465
  name: string;
466
- no_contact: boolean;
466
+ no_contact?: boolean;
467
467
  created_at: string;
468
468
  updated_at: string;
469
469
  canceled_at: string;
470
470
  /** Defaults to 'private'. If set to 'shared', this envelope will be visible to other users in the same organization. Ignored for personal profiles. */
471
471
  visibility: "private" | "shared";
472
- search_key: string | null;
472
+ search_key?: string | null;
473
473
  /**
474
474
  * Storage for arbitrary data that may be used e.g. to track source database/record IDs to relate Envelopes back to
475
475
  * internal systems/applications.
476
476
  */
477
- data: Record<string, any> | null;
477
+ data?: Record<string, any> | null;
478
478
  profile?: IProfile;
479
479
  template?: ITemplate | null;
480
480
  organization?: IOrganization;
@@ -607,6 +607,8 @@ interface IKbaPINRequired {
607
607
  type: "pin";
608
608
  }
609
609
  interface IRecipient {
610
+ /** Used only by the Web SDK during builder processes. Not stored in the backend. */
611
+ id?: string | null;
610
612
  envelope_id: string;
611
613
  role_name: string;
612
614
  profile_id: string;
@@ -686,6 +688,8 @@ interface IReminder {
686
688
  * "Unknown" roles are dynamic, and will be filled in later when the envelope is created.
687
689
  */
688
690
  interface IRole {
691
+ /** Used only by the Web SDK during builder processes. Not stored in the backend. */
692
+ id?: string | null;
689
693
  template_id: string;
690
694
  // The name of the recipient. Note that recipients do not have a separate ID - they are uniquely identified by name.
691
695
  name: string;
package/dist/index.d.ts CHANGED
@@ -463,18 +463,18 @@ interface IEnvelope {
463
463
  organization_id: string;
464
464
  reminder_id: string | null;
465
465
  name: string;
466
- no_contact: boolean;
466
+ no_contact?: boolean;
467
467
  created_at: string;
468
468
  updated_at: string;
469
469
  canceled_at: string;
470
470
  /** Defaults to 'private'. If set to 'shared', this envelope will be visible to other users in the same organization. Ignored for personal profiles. */
471
471
  visibility: "private" | "shared";
472
- search_key: string | null;
472
+ search_key?: string | null;
473
473
  /**
474
474
  * Storage for arbitrary data that may be used e.g. to track source database/record IDs to relate Envelopes back to
475
475
  * internal systems/applications.
476
476
  */
477
- data: Record<string, any> | null;
477
+ data?: Record<string, any> | null;
478
478
  profile?: IProfile;
479
479
  template?: ITemplate | null;
480
480
  organization?: IOrganization;
@@ -607,6 +607,8 @@ interface IKbaPINRequired {
607
607
  type: "pin";
608
608
  }
609
609
  interface IRecipient {
610
+ /** Used only by the Web SDK during builder processes. Not stored in the backend. */
611
+ id?: string | null;
610
612
  envelope_id: string;
611
613
  role_name: string;
612
614
  profile_id: string;
@@ -686,6 +688,8 @@ interface IReminder {
686
688
  * "Unknown" roles are dynamic, and will be filled in later when the envelope is created.
687
689
  */
688
690
  interface IRole {
691
+ /** Used only by the Web SDK during builder processes. Not stored in the backend. */
692
+ id?: string | null;
689
693
  template_id: string;
690
694
  // The name of the recipient. Note that recipients do not have a separate ID - they are uniquely identified by name.
691
695
  name: string;
package/dist/index.js CHANGED
@@ -2298,7 +2298,7 @@ const createField = (endpoint, templateId, params) => endpoint.api //
2298
2298
  * ```
2299
2299
  */
2300
2300
  const updateField = (endpoint, templateId, name, params) => endpoint.api //
2301
- .patch(`/v2/fields/${templateId}/${name}`, params)
2301
+ .patch(`/v2/fields/${templateId}/${encodeURIComponent(name)}`, params)
2302
2302
  .then((r) => r.data);
2303
2303
  /**
2304
2304
  * Remove a field from a template.
@@ -2310,7 +2310,7 @@ const updateField = (endpoint, templateId, name, params) => endpoint.api //
2310
2310
  * ```
2311
2311
  */
2312
2312
  const deleteField = (endpoint, templateId, name) => endpoint.api //
2313
- .delete(`/v2/fields/${templateId}/${name}`)
2313
+ .delete(`/v2/fields/${templateId}/${encodeURIComponent(name)}`)
2314
2314
  .then((r) => r.data);
2315
2315
 
2316
2316
  /**
@@ -2463,7 +2463,7 @@ const deleteTemplateReminder = (endpoint, templateId, reminderId) => endpoint.ap
2463
2463
  * ```
2464
2464
  */
2465
2465
  const createTemplateRole = (endpoint, template_id, params) => endpoint.api //
2466
- .post(`/v2/templates/${template_id}/roles`, params)
2466
+ .post(`/v2/roles/${template_id}`, params)
2467
2467
  .then((r) => r.data);
2468
2468
  /**
2469
2469
  * Update a role.
@@ -2475,7 +2475,7 @@ const createTemplateRole = (endpoint, template_id, params) => endpoint.api //
2475
2475
  * ```
2476
2476
  */
2477
2477
  const updateTemplateRole = (endpoint, template_id, name, params) => endpoint.api //
2478
- .put(`/v2/templates/${template_id}/roles/${name}`, params)
2478
+ .put(`/v2/roles/${template_id}/${encodeURIComponent(name)}`, params)
2479
2479
  .then((r) => r.data);
2480
2480
  /**
2481
2481
  * Delete a role.
@@ -2487,7 +2487,7 @@ const updateTemplateRole = (endpoint, template_id, name, params) => endpoint.api
2487
2487
  * ```
2488
2488
  */
2489
2489
  const deleteTemplateRole = (endpoint, template_id, name) => endpoint.api //
2490
- .delete(`/v2/templates/${template_id}/roles/${name}`)
2490
+ .delete(`/v2/roles/${template_id}/${encodeURIComponent(name)}`)
2491
2491
  .then((r) => r.data);
2492
2492
 
2493
2493
  /**