@verdocs/js-sdk 4.2.44 → 4.2.46

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.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
+ .patch(`/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
  /**