@verdocs/web-sdk 2.3.0 → 2.3.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.
Files changed (145) hide show
  1. package/dist/cjs/{TemplateStore-6110ad1f.js → TemplateStore-d5dd1621.js} +1 -1
  2. package/dist/cjs/{VerdocsEndpoint-6441c5c0.js → VerdocsEndpoint-8495a05a.js} +8 -11
  3. package/dist/cjs/ipc-test.cjs.entry.js +2 -2
  4. package/dist/cjs/verdocs-activity-box.cjs.entry.js +1 -1
  5. package/dist/cjs/verdocs-auth.cjs.entry.js +1 -1
  6. package/dist/cjs/verdocs-build.cjs.entry.js +2 -2
  7. package/dist/cjs/verdocs-button-panel_2.cjs.entry.js +2 -2
  8. package/dist/cjs/verdocs-contact-picker_2.cjs.entry.js +1 -1
  9. package/dist/cjs/verdocs-envelope-document-page.cjs.entry.js +1 -1
  10. package/dist/cjs/verdocs-envelope-recipient-link_2.cjs.entry.js +1 -1
  11. package/dist/cjs/verdocs-envelope-sidebar.cjs.entry.js +2 -1
  12. package/dist/cjs/verdocs-envelopes-list.cjs.entry.js +1 -1
  13. package/dist/cjs/verdocs-field-textarea.cjs.entry.js +1 -1
  14. package/dist/cjs/verdocs-field-textbox.cjs.entry.js +1 -1
  15. package/dist/cjs/verdocs-file-chooser_2.cjs.entry.js +1 -1
  16. package/dist/cjs/verdocs-preview_8.cjs.entry.js +3 -3
  17. package/dist/cjs/verdocs-quick-functions_3.cjs.entry.js +1 -1
  18. package/dist/cjs/verdocs-search.cjs.entry.js +1 -1
  19. package/dist/cjs/verdocs-settings-api-keys_4.cjs.entry.js +1 -1
  20. package/dist/cjs/verdocs-settings.cjs.entry.js +1 -1
  21. package/dist/cjs/verdocs-sign.cjs.entry.js +1 -1
  22. package/dist/cjs/verdocs-template-document-page_2.cjs.entry.js +1 -1
  23. package/dist/cjs/verdocs-template-fields_4.cjs.entry.js +2 -2
  24. package/dist/cjs/verdocs-template-star.cjs.entry.js +1 -1
  25. package/dist/cjs/verdocs-templates-list.cjs.entry.js +1 -1
  26. package/dist/cjs/verdocs-view.cjs.entry.js +1 -1
  27. package/dist/collection/components/envelopes/verdocs-envelope-sidebar/verdocs-envelope-sidebar.js +1 -0
  28. package/dist/collection/components/templates/verdocs-template-create/verdocs-template-create.js +2 -2
  29. package/dist/components/VerdocsEndpoint.js +8 -11
  30. package/dist/components/verdocs-envelope-sidebar.js +1 -0
  31. package/dist/components/verdocs-template-create2.js +2 -2
  32. package/dist/docs.json +1 -1
  33. package/dist/esm/{TemplateStore-03608883.js → TemplateStore-18b6dbe3.js} +1 -1
  34. package/dist/esm/{VerdocsEndpoint-6f42e6a8.js → VerdocsEndpoint-140b14d7.js} +8 -11
  35. package/dist/esm/ipc-test.entry.js +2 -2
  36. package/dist/esm/verdocs-activity-box.entry.js +1 -1
  37. package/dist/esm/verdocs-auth.entry.js +1 -1
  38. package/dist/esm/verdocs-build.entry.js +2 -2
  39. package/dist/esm/verdocs-button-panel_2.entry.js +2 -2
  40. package/dist/esm/verdocs-contact-picker_2.entry.js +1 -1
  41. package/dist/esm/verdocs-envelope-document-page.entry.js +1 -1
  42. package/dist/esm/verdocs-envelope-recipient-link_2.entry.js +1 -1
  43. package/dist/esm/verdocs-envelope-sidebar.entry.js +2 -1
  44. package/dist/esm/verdocs-envelopes-list.entry.js +1 -1
  45. package/dist/esm/verdocs-field-textarea.entry.js +1 -1
  46. package/dist/esm/verdocs-field-textbox.entry.js +1 -1
  47. package/dist/esm/verdocs-file-chooser_2.entry.js +1 -1
  48. package/dist/esm/verdocs-preview_8.entry.js +3 -3
  49. package/dist/esm/verdocs-quick-functions_3.entry.js +1 -1
  50. package/dist/esm/verdocs-search.entry.js +1 -1
  51. package/dist/esm/verdocs-settings-api-keys_4.entry.js +1 -1
  52. package/dist/esm/verdocs-settings.entry.js +1 -1
  53. package/dist/esm/verdocs-sign.entry.js +1 -1
  54. package/dist/esm/verdocs-template-document-page_2.entry.js +1 -1
  55. package/dist/esm/verdocs-template-fields_4.entry.js +2 -2
  56. package/dist/esm/verdocs-template-star.entry.js +1 -1
  57. package/dist/esm/verdocs-templates-list.entry.js +1 -1
  58. package/dist/esm/verdocs-view.entry.js +1 -1
  59. package/dist/esm-es5/{TemplateStore-03608883.js → TemplateStore-18b6dbe3.js} +1 -1
  60. package/dist/esm-es5/VerdocsEndpoint-140b14d7.js +1 -0
  61. package/dist/esm-es5/ipc-test.entry.js +1 -1
  62. package/dist/esm-es5/verdocs-activity-box.entry.js +1 -1
  63. package/dist/esm-es5/verdocs-auth.entry.js +1 -1
  64. package/dist/esm-es5/verdocs-build.entry.js +1 -1
  65. package/dist/esm-es5/verdocs-button-panel_2.entry.js +1 -1
  66. package/dist/esm-es5/verdocs-contact-picker_2.entry.js +1 -1
  67. package/dist/esm-es5/verdocs-envelope-document-page.entry.js +1 -1
  68. package/dist/esm-es5/verdocs-envelope-recipient-link_2.entry.js +1 -1
  69. package/dist/esm-es5/verdocs-envelope-sidebar.entry.js +1 -1
  70. package/dist/esm-es5/verdocs-envelopes-list.entry.js +1 -1
  71. package/dist/esm-es5/verdocs-field-textarea.entry.js +1 -1
  72. package/dist/esm-es5/verdocs-field-textbox.entry.js +1 -1
  73. package/dist/esm-es5/verdocs-file-chooser_2.entry.js +1 -1
  74. package/dist/esm-es5/verdocs-preview_8.entry.js +1 -1
  75. package/dist/esm-es5/verdocs-quick-functions_3.entry.js +1 -1
  76. package/dist/esm-es5/verdocs-search.entry.js +1 -1
  77. package/dist/esm-es5/verdocs-settings-api-keys_4.entry.js +1 -1
  78. package/dist/esm-es5/verdocs-settings.entry.js +1 -1
  79. package/dist/esm-es5/verdocs-sign.entry.js +1 -1
  80. package/dist/esm-es5/verdocs-template-document-page_2.entry.js +1 -1
  81. package/dist/esm-es5/verdocs-template-fields_4.entry.js +1 -1
  82. package/dist/esm-es5/verdocs-template-star.entry.js +1 -1
  83. package/dist/esm-es5/verdocs-templates-list.entry.js +1 -1
  84. package/dist/esm-es5/verdocs-view.entry.js +1 -1
  85. package/dist/verdocs-web-sdk/{p-3eb191fd.system.entry.js → p-0002c8d5.system.entry.js} +1 -1
  86. package/dist/verdocs-web-sdk/{p-99c10bba.system.entry.js → p-07432832.system.entry.js} +1 -1
  87. package/dist/verdocs-web-sdk/p-16724702.js +1 -0
  88. package/dist/verdocs-web-sdk/{p-3b96b2c9.entry.js → p-1bb86e1a.entry.js} +1 -1
  89. package/dist/verdocs-web-sdk/{p-1831cb38.entry.js → p-1cd6f713.entry.js} +1 -1
  90. package/dist/verdocs-web-sdk/{p-8b1b3ffd.system.entry.js → p-1df623d7.system.entry.js} +1 -1
  91. package/dist/verdocs-web-sdk/{p-e1dc1460.system.entry.js → p-23ff8991.system.entry.js} +1 -1
  92. package/dist/verdocs-web-sdk/{p-82b74dc0.entry.js → p-2ec00680.entry.js} +1 -1
  93. package/dist/verdocs-web-sdk/{p-a5ce0030.entry.js → p-32f1c0a6.entry.js} +1 -1
  94. package/dist/verdocs-web-sdk/{p-5c38d5cc.entry.js → p-38272a03.entry.js} +1 -1
  95. package/dist/verdocs-web-sdk/{p-75541556.entry.js → p-3a8c1133.entry.js} +1 -1
  96. package/dist/verdocs-web-sdk/{p-8a80d243.system.entry.js → p-4aeea02f.system.entry.js} +1 -1
  97. package/dist/verdocs-web-sdk/{p-c89bf71d.entry.js → p-4ddbb290.entry.js} +1 -1
  98. package/dist/verdocs-web-sdk/{p-208fd2e2.js → p-571f4e12.js} +1 -1
  99. package/dist/verdocs-web-sdk/{p-b88f9ff5.system.entry.js → p-576a4517.system.entry.js} +1 -1
  100. package/dist/verdocs-web-sdk/{p-7cbd2c3a.system.entry.js → p-59baf5ed.system.entry.js} +1 -1
  101. package/dist/verdocs-web-sdk/{p-965ec85a.entry.js → p-5c2b1e35.entry.js} +1 -1
  102. package/dist/verdocs-web-sdk/{p-87008226.system.entry.js → p-5cce8ddb.system.entry.js} +1 -1
  103. package/dist/verdocs-web-sdk/p-5ed0a61e.system.js +1 -0
  104. package/dist/verdocs-web-sdk/{p-6653aa42.system.entry.js → p-65b96820.system.entry.js} +1 -1
  105. package/dist/verdocs-web-sdk/p-66b2899b.entry.js +1 -0
  106. package/dist/verdocs-web-sdk/{p-fa0d27b1.entry.js → p-764045ab.entry.js} +1 -1
  107. package/dist/verdocs-web-sdk/{p-19f8d4eb.system.entry.js → p-7db74d5e.system.entry.js} +1 -1
  108. package/dist/verdocs-web-sdk/{p-83225bcb.entry.js → p-853a8c73.entry.js} +1 -1
  109. package/dist/verdocs-web-sdk/{p-947d60dc.system.entry.js → p-878edeb5.system.entry.js} +1 -1
  110. package/dist/verdocs-web-sdk/{p-0494ee4f.system.entry.js → p-8ad78ada.system.entry.js} +1 -1
  111. package/dist/verdocs-web-sdk/{p-5dfefab6.entry.js → p-8b28f85b.entry.js} +1 -1
  112. package/dist/verdocs-web-sdk/{p-5b70ff97.entry.js → p-8ceccd53.entry.js} +1 -1
  113. package/dist/verdocs-web-sdk/{p-de82e80e.entry.js → p-a8533019.entry.js} +1 -1
  114. package/dist/verdocs-web-sdk/{p-7c3a05f6.system.entry.js → p-aca795cb.system.entry.js} +1 -1
  115. package/dist/verdocs-web-sdk/{p-cdf1efe7.entry.js → p-acac85fc.entry.js} +1 -1
  116. package/dist/verdocs-web-sdk/{p-112cd2f5.entry.js → p-ad18bb44.entry.js} +1 -1
  117. package/dist/verdocs-web-sdk/{p-eea1dd87.entry.js → p-b10db51e.entry.js} +1 -1
  118. package/dist/verdocs-web-sdk/{p-a2531ddc.entry.js → p-b2139ec5.entry.js} +1 -1
  119. package/dist/verdocs-web-sdk/{p-1983855b.system.entry.js → p-be083d74.system.entry.js} +1 -1
  120. package/dist/verdocs-web-sdk/{p-d5e28045.system.entry.js → p-c01196f9.system.entry.js} +1 -1
  121. package/dist/verdocs-web-sdk/{p-7d6f7f4b.system.entry.js → p-c48b67ab.system.entry.js} +1 -1
  122. package/dist/verdocs-web-sdk/{p-d841fd4b.entry.js → p-c58e4861.entry.js} +1 -1
  123. package/dist/verdocs-web-sdk/{p-a75490f4.system.entry.js → p-c7f6bb1d.system.entry.js} +1 -1
  124. package/dist/verdocs-web-sdk/{p-80540240.entry.js → p-d0865aca.entry.js} +1 -1
  125. package/dist/verdocs-web-sdk/{p-b4238a4c.system.entry.js → p-dc37ce85.system.entry.js} +1 -1
  126. package/dist/verdocs-web-sdk/{p-c37f1a93.entry.js → p-e4432f87.entry.js} +1 -1
  127. package/dist/verdocs-web-sdk/{p-b8732502.system.entry.js → p-e7481777.system.entry.js} +1 -1
  128. package/dist/verdocs-web-sdk/{p-f6c3da25.system.entry.js → p-ed2d0a49.system.entry.js} +1 -1
  129. package/dist/verdocs-web-sdk/p-f04bf956.system.js +1 -1
  130. package/dist/verdocs-web-sdk/{p-262d513f.system.entry.js → p-f0b826a2.system.entry.js} +1 -1
  131. package/dist/verdocs-web-sdk/p-f0d2d9e1.entry.js +1 -0
  132. package/dist/verdocs-web-sdk/p-f0fbc822.system.entry.js +1 -0
  133. package/dist/verdocs-web-sdk/{p-aaf87ce4.system.entry.js → p-f1aa1551.system.entry.js} +1 -1
  134. package/dist/verdocs-web-sdk/{p-dab1e29a.entry.js → p-f269c7c4.entry.js} +1 -1
  135. package/dist/verdocs-web-sdk/{p-0ffb2c57.system.js → p-f83e5b8f.system.js} +1 -1
  136. package/dist/verdocs-web-sdk/{p-43d14a05.system.entry.js → p-fc6629e5.system.entry.js} +1 -1
  137. package/dist/verdocs-web-sdk/{p-d01e5b64.entry.js → p-fff35c6b.entry.js} +1 -1
  138. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  139. package/package.json +2 -2
  140. package/dist/esm-es5/VerdocsEndpoint-6f42e6a8.js +0 -1
  141. package/dist/verdocs-web-sdk/p-3a7fa389.js +0 -1
  142. package/dist/verdocs-web-sdk/p-4f08ceaf.system.js +0 -1
  143. package/dist/verdocs-web-sdk/p-8439bf7b.entry.js +0 -1
  144. package/dist/verdocs-web-sdk/p-dceba864.system.entry.js +0 -1
  145. package/dist/verdocs-web-sdk/p-f80b83e7.entry.js +0 -1
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  const index = require('./index-f712049c.js');
4
- const VerdocsEndpoint = require('./VerdocsEndpoint-6441c5c0.js');
4
+ const VerdocsEndpoint = require('./VerdocsEndpoint-8495a05a.js');
5
5
 
6
6
  const createTemplateStore = (templateId) => {
7
7
  const now = new Date().toISOString();
@@ -217,10 +217,10 @@ var ALLOWED_CREATE_FIELDS = [
217
217
  * ```typescript
218
218
  * import {Templates} from '@verdocs/js-sdk/Templates';
219
219
  *
220
- * const newTemplate = await Templates.createTemplate((VerdocsEndpoint.getDefault(), {...});
220
+ * const newTemplate = await Templates.createTemplatev2((VerdocsEndpoint.getDefault(), {...});
221
221
  * ```
222
222
  */
223
- var createTemplate = function (endpoint, params, onUploadProgress) {
223
+ var createTemplatev2 = function (endpoint, params, onUploadProgress) {
224
224
  var options = {
225
225
  timeout: 120000,
226
226
  onUploadProgress: function (event) {
@@ -230,22 +230,19 @@ var createTemplate = function (endpoint, params, onUploadProgress) {
230
230
  },
231
231
  };
232
232
  if (params.documents && params.documents[0] instanceof File) {
233
- if (params.documents.length > 10) {
234
- throw new Error('createTemplate() has a maximum of 10 documents that can be attached.');
235
- }
236
- var formData_1 = new FormData();
233
+ var formData_2 = new FormData();
237
234
  ALLOWED_CREATE_FIELDS.forEach(function (allowedKey) {
238
235
  if (params[allowedKey] !== undefined) {
239
- formData_1.append(allowedKey, params[allowedKey]);
236
+ formData_2.append(allowedKey, params[allowedKey]);
240
237
  }
241
238
  });
242
239
  params.documents.forEach(function (file) {
243
- formData_1.append('documents', file, file.name);
240
+ formData_2.append('documents', file, file.name);
244
241
  });
245
- return endpoint.api.post('/templates', formData_1, options).then(function (r) { return r.data; });
242
+ return endpoint.api.post('/v2/templates', formData_2, options).then(function (r) { return r.data; });
246
243
  }
247
244
  else {
248
- return endpoint.api.post('/templates', params, options).then(function (r) { return r.data; });
245
+ return endpoint.api.post('/v2/templates', params, options).then(function (r) { return r.data; });
249
246
  }
250
247
  };
251
248
  /**
@@ -4175,7 +4172,7 @@ var VerdocsEndpoint = /** @class */ (function () {
4175
4172
 
4176
4173
  exports.VerdocsEndpoint = VerdocsEndpoint;
4177
4174
  exports.canPerformTemplateAction = canPerformTemplateAction;
4178
- exports.createTemplate = createTemplate;
4175
+ exports.createTemplatev2 = createTemplatev2;
4179
4176
  exports.deleteTemplate = deleteTemplate;
4180
4177
  exports.getTemplate = getTemplate;
4181
4178
  exports.getTemplates = getTemplates;
@@ -4,8 +4,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-5463795e.js');
6
6
  require('./Types-f89f9116.js');
7
- const VerdocsEndpoint = require('./VerdocsEndpoint-6441c5c0.js');
8
- const TemplateStore = require('./TemplateStore-6110ad1f.js');
7
+ const VerdocsEndpoint = require('./VerdocsEndpoint-8495a05a.js');
8
+ const TemplateStore = require('./TemplateStore-d5dd1621.js');
9
9
  require('./index-f712049c.js');
10
10
 
11
11
  const ipcTestCss = "ipc-test{max-width:800px;display:block}";
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-5463795e.js');
6
6
  const Envelopes = require('./Envelopes-99ca79fe.js');
7
7
  require('./Types-f89f9116.js');
8
- const VerdocsEndpoint = require('./VerdocsEndpoint-6441c5c0.js');
8
+ const VerdocsEndpoint = require('./VerdocsEndpoint-8495a05a.js');
9
9
  const Primitives = require('./Primitives-a59870a2.js');
10
10
  const errors = require('./errors-0396da3d.js');
11
11
 
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-5463795e.js');
6
6
  const Types = require('./Types-f89f9116.js');
7
7
  const Profiles = require('./Profiles-54271244.js');
8
- const VerdocsEndpoint = require('./VerdocsEndpoint-6441c5c0.js');
8
+ const VerdocsEndpoint = require('./VerdocsEndpoint-8495a05a.js');
9
9
  const Toast = require('./Toast-06880504.js');
10
10
  const errors = require('./errors-0396da3d.js');
11
11
 
@@ -4,8 +4,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-5463795e.js');
6
6
  require('./Types-f89f9116.js');
7
- const VerdocsEndpoint = require('./VerdocsEndpoint-6441c5c0.js');
8
- const TemplateStore = require('./TemplateStore-6110ad1f.js');
7
+ const VerdocsEndpoint = require('./VerdocsEndpoint-8495a05a.js');
8
+ const TemplateStore = require('./TemplateStore-d5dd1621.js');
9
9
  const errors = require('./errors-0396da3d.js');
10
10
  require('./index-f712049c.js');
11
11
 
@@ -6,9 +6,9 @@ const index = require('./index-5463795e.js');
6
6
  const popper = require('./popper-d7adcfc6.js');
7
7
  const _commonjsHelpers = require('./_commonjsHelpers-1fbbf0eb.js');
8
8
  require('./Types-f89f9116.js');
9
- const VerdocsEndpoint = require('./VerdocsEndpoint-6441c5c0.js');
9
+ const VerdocsEndpoint = require('./VerdocsEndpoint-8495a05a.js');
10
10
  const Fields = require('./Fields-705a2168.js');
11
- const TemplateStore = require('./TemplateStore-6110ad1f.js');
11
+ const TemplateStore = require('./TemplateStore-d5dd1621.js');
12
12
  const errors = require('./errors-0396da3d.js');
13
13
  require('./index-f712049c.js');
14
14
 
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-5463795e.js');
6
6
  require('./Types-f89f9116.js');
7
- const VerdocsEndpoint = require('./VerdocsEndpoint-6441c5c0.js');
7
+ const VerdocsEndpoint = require('./VerdocsEndpoint-8495a05a.js');
8
8
  const utils = require('./utils-a3f0b70a.js');
9
9
  require('./_commonjsHelpers-1fbbf0eb.js');
10
10
  require('./Envelopes-99ca79fe.js');
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-5463795e.js');
6
6
  const Envelopes = require('./Envelopes-99ca79fe.js');
7
7
  require('./Types-f89f9116.js');
8
- const VerdocsEndpoint = require('./VerdocsEndpoint-6441c5c0.js');
8
+ const VerdocsEndpoint = require('./VerdocsEndpoint-8495a05a.js');
9
9
  const utils = require('./utils-a3f0b70a.js');
10
10
  require('./_commonjsHelpers-1fbbf0eb.js');
11
11
  require('./Files-4bdc0c0f.js');
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-5463795e.js');
6
6
  require('./Types-f89f9116.js');
7
7
  const Recipients = require('./Recipients-f3d6cf10.js');
8
- const VerdocsEndpoint = require('./VerdocsEndpoint-6441c5c0.js');
8
+ const VerdocsEndpoint = require('./VerdocsEndpoint-8495a05a.js');
9
9
  const EnvelopeStore = require('./EnvelopeStore-f8c301e1.js');
10
10
  const Toast = require('./Toast-06880504.js');
11
11
  const errors = require('./errors-0396da3d.js');
@@ -7,7 +7,7 @@ const Envelopes = require('./Envelopes-99ca79fe.js');
7
7
  const Permissions = require('./Permissions-1436f847.js');
8
8
  const Recipients = require('./Recipients-f3d6cf10.js');
9
9
  require('./Types-f89f9116.js');
10
- const VerdocsEndpoint = require('./VerdocsEndpoint-6441c5c0.js');
10
+ const VerdocsEndpoint = require('./VerdocsEndpoint-8495a05a.js');
11
11
  const EnvelopeStore = require('./EnvelopeStore-f8c301e1.js');
12
12
  const Types = require('./Types-fb95ed6b.js');
13
13
  const Toast = require('./Toast-06880504.js');
@@ -25,6 +25,7 @@ const ActivityIcons = {
25
25
  visibility: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path d="M12 15a3 3 0 100-6 3 3 0 000 6z" /><path fill-rule="evenodd" d="M1.323 11.447C2.811 6.976 7.028 3.75 12.001 3.75c4.97 0 9.185 3.223 10.675 7.69.12.362.12.752 0 1.113-1.487 4.471-5.705 7.697-10.677 7.697-4.97 0-9.186-3.223-10.675-7.69a1.762 1.762 0 010-1.113zM17.25 12a5.25 5.25 0 11-10.5 0 5.25 5.25 0 0110.5 0z" clip-rule="evenodd" /></svg>`,
26
26
  pencil: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path d="M21.731 2.269a2.625 2.625 0 00-3.712 0l-1.157 1.157 3.712 3.712 1.157-1.157a2.625 2.625 0 000-3.712zM19.513 8.199l-3.712-3.712-12.15 12.15a5.25 5.25 0 00-1.32 2.214l-.8 2.685a.75.75 0 00.933.933l2.685-.8a5.25 5.25 0 002.214-1.32L19.513 8.2z" /></svg>`,
27
27
  mail: `<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"/></svg>`,
28
+ contact_mail: `<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"/></svg>`,
28
29
  done: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path fill-rule="evenodd" d="M19.916 4.626a.75.75 0 01.208 1.04l-9 13.5a.75.75 0 01-1.154.114l-6-6a.75.75 0 011.06-1.06l5.353 5.353 8.493-12.739a.75.75 0 011.04-.208z" clip-rule="evenodd" /></svg>`,
29
30
  send: `<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M2.01 21L23 12 2.01 3 2 10l15 2-15 2z"/></svg>`,
30
31
  gesture: `<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M4.59 6.89c.7-.71 1.4-1.35 1.71-1.22.5.2 0 1.03-.3 1.52-.25.42-2.86 3.89-2.86 6.31 0 1.28.48 2.34 1.34 2.98.75.56 1.74.73 2.64.46 1.07-.31 1.95-1.4 3.06-2.77 1.21-1.49 2.83-3.44 4.08-3.44 1.63 0 1.65 1.01 1.76 1.79-3.78.64-5.38 3.67-5.38 5.37 0 1.7 1.44 3.09 3.21 3.09 1.63 0 4.29-1.33 4.69-6.1H21v-2.5h-2.47c-.15-1.65-1.09-4.2-4.03-4.2-2.25 0-4.18 1.91-4.94 2.84-.58.73-2.06 2.48-2.29 2.72-.25.3-.68.84-1.11.84-.45 0-.72-.83-.36-1.92.35-1.09 1.4-2.86 1.85-3.52.78-1.14 1.3-1.92 1.3-3.28C8.95 3.69 7.31 3 6.44 3 5.12 3 3.97 4 3.72 4.25c-.36.36-.66.66-.88.93l1.75 1.71zm9.29 11.66c-.31 0-.74-.26-.74-.72 0-.6.73-2.2 2.87-2.76-.3 2.69-1.43 3.48-2.13 3.48z"/></svg>`,
@@ -6,7 +6,7 @@ const index = require('./index-5463795e.js');
6
6
  const Envelopes = require('./Envelopes-99ca79fe.js');
7
7
  const Permissions = require('./Permissions-1436f847.js');
8
8
  require('./Types-f89f9116.js');
9
- const VerdocsEndpoint = require('./VerdocsEndpoint-6441c5c0.js');
9
+ const VerdocsEndpoint = require('./VerdocsEndpoint-8495a05a.js');
10
10
  const Primitives = require('./Primitives-a59870a2.js');
11
11
  const utils = require('./utils-a3f0b70a.js');
12
12
  const Toast = require('./Toast-06880504.js');
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-5463795e.js');
6
6
  const interact_min = require('./interact.min-7c05ff8a.js');
7
7
  require('./Types-f89f9116.js');
8
- const VerdocsEndpoint = require('./VerdocsEndpoint-6441c5c0.js');
8
+ const VerdocsEndpoint = require('./VerdocsEndpoint-8495a05a.js');
9
9
  const Fields = require('./Fields-705a2168.js');
10
10
  const Colors = require('./Colors-e809dcc9.js');
11
11
  const utils = require('./utils-a3f0b70a.js');
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-5463795e.js');
6
6
  const interact_min = require('./interact.min-7c05ff8a.js');
7
7
  require('./Types-f89f9116.js');
8
- const VerdocsEndpoint = require('./VerdocsEndpoint-6441c5c0.js');
8
+ const VerdocsEndpoint = require('./VerdocsEndpoint-8495a05a.js');
9
9
  const Fields = require('./Fields-705a2168.js');
10
10
  const Colors = require('./Colors-e809dcc9.js');
11
11
  const utils = require('./utils-a3f0b70a.js');
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-5463795e.js');
6
6
  require('./Types-f89f9116.js');
7
- const VerdocsEndpoint = require('./VerdocsEndpoint-6441c5c0.js');
7
+ const VerdocsEndpoint = require('./VerdocsEndpoint-8495a05a.js');
8
8
  const Icons = require('./Icons-a11fb3fc.js');
9
9
 
10
10
  const verdocsFileChooserCss = "verdocs-file-chooser{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;background-color:#ffffff;font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif}verdocs-file-chooser .upload-box{text-align:center;-webkit-box-sizing:border-box;box-sizing:border-box;padding:40px 15px;color:rgba(0, 0, 0, 0.54)}verdocs-file-chooser .upload-box svg{width:64px;height:64px;fill:#5c6575}verdocs-file-chooser .selected-filename{font-size:20px;font-weight:bold;overflow-wrap:anywhere}verdocs-file-chooser .or-prefer{height:20px;margin:20px 0;font-size:16px}";
@@ -4,9 +4,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-5463795e.js');
6
6
  require('./Types-f89f9116.js');
7
- const VerdocsEndpoint = require('./VerdocsEndpoint-6441c5c0.js');
7
+ const VerdocsEndpoint = require('./VerdocsEndpoint-8495a05a.js');
8
8
  const utils = require('./utils-a3f0b70a.js');
9
- const TemplateStore = require('./TemplateStore-6110ad1f.js');
9
+ const TemplateStore = require('./TemplateStore-d5dd1621.js');
10
10
  const errors = require('./errors-0396da3d.js');
11
11
  const Envelopes = require('./Envelopes-99ca79fe.js');
12
12
  const Validators = require('./Validators-16e6d7d1.js');
@@ -520,7 +520,7 @@ const VerdocsTemplateCreate = class {
520
520
  this.creating = true;
521
521
  this.progressLabel = 'Uploading...';
522
522
  try {
523
- const template = await VerdocsEndpoint.createTemplate(this.endpoint, { name: this.file.name, documents: [this.file] }, percent => {
523
+ const template = await VerdocsEndpoint.createTemplatev2(this.endpoint, { name: this.file.name, documents: [this.file] }, percent => {
524
524
  if (percent >= 99) {
525
525
  this.progressLabel = 'Processing...';
526
526
  this.progressPercent = 100;
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-5463795e.js');
6
6
  require('./Types-f89f9116.js');
7
- const VerdocsEndpoint = require('./VerdocsEndpoint-6441c5c0.js');
7
+ const VerdocsEndpoint = require('./VerdocsEndpoint-8495a05a.js');
8
8
 
9
9
  /**
10
10
  * Verdocs provides a range of search functions to help find and retrieve content. This module provides generic functions intended
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-5463795e.js');
6
6
  require('./Types-f89f9116.js');
7
- const VerdocsEndpoint = require('./VerdocsEndpoint-6441c5c0.js');
7
+ const VerdocsEndpoint = require('./VerdocsEndpoint-8495a05a.js');
8
8
 
9
9
  const verdocsSearchCss = "verdocs-search{font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif;display:-ms-flexbox;display:flex;background-color:#1e2031}verdocs-search search-box{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;margin:20px 10px}verdocs-search .boxes{-ms-flex-wrap:wrap;flex-wrap:wrap;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;margin:20px 0}verdocs-search search-recent,verdocs-search search-saved,verdocs-search search-quick-functions,verdocs-search search-starred{display:-ms-flexbox;display:flex;margin:0 20px 20px 0}";
10
10
 
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-5463795e.js');
6
6
  require('./Types-f89f9116.js');
7
- const VerdocsEndpoint = require('./VerdocsEndpoint-6441c5c0.js');
7
+ const VerdocsEndpoint = require('./VerdocsEndpoint-8495a05a.js');
8
8
  const Primitives = require('./Primitives-a59870a2.js');
9
9
  const Toast = require('./Toast-06880504.js');
10
10
  const errors = require('./errors-0396da3d.js');
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-5463795e.js');
6
6
  require('./Types-f89f9116.js');
7
- const VerdocsEndpoint = require('./VerdocsEndpoint-6441c5c0.js');
7
+ const VerdocsEndpoint = require('./VerdocsEndpoint-8495a05a.js');
8
8
  const errors = require('./errors-0396da3d.js');
9
9
 
10
10
  const verdocsSettingsCss = "verdocs-settings{font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif;display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;min-height:200px;position:relative;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-settings .tabs{gap:4px;width:100%;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-direction:row;flex-direction:row;border-bottom:1px solid #654dcb}verdocs-settings .tabs .tab{cursor:pointer;padding:5px 10px;color:#ffffff;background-color:#777777}verdocs-settings .tabs .tab.active{color:#ffffff;background-color:#654dcb}";
@@ -6,7 +6,7 @@ const index = require('./index-5463795e.js');
6
6
  const Envelopes = require('./Envelopes-99ca79fe.js');
7
7
  const Types$1 = require('./Types-f89f9116.js');
8
8
  const Recipients = require('./Recipients-f3d6cf10.js');
9
- const VerdocsEndpoint = require('./VerdocsEndpoint-6441c5c0.js');
9
+ const VerdocsEndpoint = require('./VerdocsEndpoint-8495a05a.js');
10
10
  const Validators = require('./Validators-16e6d7d1.js');
11
11
  const Primitives = require('./Primitives-a59870a2.js');
12
12
  const utils = require('./utils-a3f0b70a.js');
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-5463795e.js');
6
6
  require('./Types-f89f9116.js');
7
- const VerdocsEndpoint = require('./VerdocsEndpoint-6441c5c0.js');
7
+ const VerdocsEndpoint = require('./VerdocsEndpoint-8495a05a.js');
8
8
  const TemplateDocuments = require('./TemplateDocuments-e2e0e6b7.js');
9
9
  const utils = require('./utils-a3f0b70a.js');
10
10
  const popper = require('./popper-d7adcfc6.js');
@@ -5,11 +5,11 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-5463795e.js');
6
6
  const interact_min = require('./interact.min-7c05ff8a.js');
7
7
  require('./Types-f89f9116.js');
8
- const VerdocsEndpoint = require('./VerdocsEndpoint-6441c5c0.js');
8
+ const VerdocsEndpoint = require('./VerdocsEndpoint-8495a05a.js');
9
9
  const Fields = require('./Fields-705a2168.js');
10
10
  const Primitives = require('./Primitives-a59870a2.js');
11
11
  const utils = require('./utils-a3f0b70a.js');
12
- const TemplateStore = require('./TemplateStore-6110ad1f.js');
12
+ const TemplateStore = require('./TemplateStore-d5dd1621.js');
13
13
  const errors = require('./errors-0396da3d.js');
14
14
  const Colors = require('./Colors-e809dcc9.js');
15
15
  require('./_commonjsHelpers-1fbbf0eb.js');
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-5463795e.js');
6
- const VerdocsEndpoint = require('./VerdocsEndpoint-6441c5c0.js');
6
+ const VerdocsEndpoint = require('./VerdocsEndpoint-8495a05a.js');
7
7
  require('./Types-f89f9116.js');
8
8
 
9
9
  /**
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-5463795e.js');
6
6
  require('./Types-f89f9116.js');
7
- const VerdocsEndpoint = require('./VerdocsEndpoint-6441c5c0.js');
7
+ const VerdocsEndpoint = require('./VerdocsEndpoint-8495a05a.js');
8
8
  const Primitives = require('./Primitives-a59870a2.js');
9
9
  const errors = require('./errors-0396da3d.js');
10
10
  const index$1 = require('./index-7c19ba1d.js');
@@ -6,7 +6,7 @@ const index = require('./index-5463795e.js');
6
6
  const Envelopes = require('./Envelopes-99ca79fe.js');
7
7
  const Permissions = require('./Permissions-1436f847.js');
8
8
  require('./Types-f89f9116.js');
9
- const VerdocsEndpoint = require('./VerdocsEndpoint-6441c5c0.js');
9
+ const VerdocsEndpoint = require('./VerdocsEndpoint-8495a05a.js');
10
10
  const Primitives = require('./Primitives-a59870a2.js');
11
11
  const utils = require('./utils-a3f0b70a.js');
12
12
  const errors = require('./errors-0396da3d.js');
@@ -16,6 +16,7 @@ const ActivityIcons = {
16
16
  visibility: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path d="M12 15a3 3 0 100-6 3 3 0 000 6z" /><path fill-rule="evenodd" d="M1.323 11.447C2.811 6.976 7.028 3.75 12.001 3.75c4.97 0 9.185 3.223 10.675 7.69.12.362.12.752 0 1.113-1.487 4.471-5.705 7.697-10.677 7.697-4.97 0-9.186-3.223-10.675-7.69a1.762 1.762 0 010-1.113zM17.25 12a5.25 5.25 0 11-10.5 0 5.25 5.25 0 0110.5 0z" clip-rule="evenodd" /></svg>`,
17
17
  pencil: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path d="M21.731 2.269a2.625 2.625 0 00-3.712 0l-1.157 1.157 3.712 3.712 1.157-1.157a2.625 2.625 0 000-3.712zM19.513 8.199l-3.712-3.712-12.15 12.15a5.25 5.25 0 00-1.32 2.214l-.8 2.685a.75.75 0 00.933.933l2.685-.8a5.25 5.25 0 002.214-1.32L19.513 8.2z" /></svg>`,
18
18
  mail: `<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"/></svg>`,
19
+ contact_mail: `<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"/></svg>`,
19
20
  done: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path fill-rule="evenodd" d="M19.916 4.626a.75.75 0 01.208 1.04l-9 13.5a.75.75 0 01-1.154.114l-6-6a.75.75 0 011.06-1.06l5.353 5.353 8.493-12.739a.75.75 0 011.04-.208z" clip-rule="evenodd" /></svg>`,
20
21
  send: `<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M2.01 21L23 12 2.01 3 2 10l15 2-15 2z"/></svg>`,
21
22
  gesture: `<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M4.59 6.89c.7-.71 1.4-1.35 1.71-1.22.5.2 0 1.03-.3 1.52-.25.42-2.86 3.89-2.86 6.31 0 1.28.48 2.34 1.34 2.98.75.56 1.74.73 2.64.46 1.07-.31 1.95-1.4 3.06-2.77 1.21-1.49 2.83-3.44 4.08-3.44 1.63 0 1.65 1.01 1.76 1.79-3.78.64-5.38 3.67-5.38 5.37 0 1.7 1.44 3.09 3.21 3.09 1.63 0 4.29-1.33 4.69-6.1H21v-2.5h-2.47c-.15-1.65-1.09-4.2-4.03-4.2-2.25 0-4.18 1.91-4.94 2.84-.58.73-2.06 2.48-2.29 2.72-.25.3-.68.84-1.11.84-.45 0-.72-.83-.36-1.92.35-1.09 1.4-2.86 1.85-3.52.78-1.14 1.3-1.92 1.3-3.28C8.95 3.69 7.31 3 6.44 3 5.12 3 3.97 4 3.72 4.25c-.36.36-.66.66-.88.93l1.75 1.71zm9.29 11.66c-.31 0-.74-.26-.74-.72 0-.6.73-2.2 2.87-2.76-.3 2.69-1.43 3.48-2.13 3.48z"/></svg>`,
@@ -1,5 +1,5 @@
1
1
  import { VerdocsEndpoint } from '@verdocs/js-sdk';
2
- import { createTemplate } from '@verdocs/js-sdk/Templates/Templates';
2
+ import { createTemplatev2 } from '@verdocs/js-sdk/Templates/Templates';
3
3
  import { h, Host } from '@stencil/core';
4
4
  import { SDKError } from '../../../utils/errors';
5
5
  const unicodeNBSP = ' ';
@@ -46,7 +46,7 @@ export class VerdocsTemplateCreate {
46
46
  this.creating = true;
47
47
  this.progressLabel = 'Uploading...';
48
48
  try {
49
- const template = await createTemplate(this.endpoint, { name: this.file.name, documents: [this.file] }, percent => {
49
+ const template = await createTemplatev2(this.endpoint, { name: this.file.name, documents: [this.file] }, percent => {
50
50
  if (percent >= 99) {
51
51
  this.progressLabel = 'Processing...';
52
52
  this.progressPercent = 100;
@@ -215,10 +215,10 @@ var ALLOWED_CREATE_FIELDS = [
215
215
  * ```typescript
216
216
  * import {Templates} from '@verdocs/js-sdk/Templates';
217
217
  *
218
- * const newTemplate = await Templates.createTemplate((VerdocsEndpoint.getDefault(), {...});
218
+ * const newTemplate = await Templates.createTemplatev2((VerdocsEndpoint.getDefault(), {...});
219
219
  * ```
220
220
  */
221
- var createTemplate = function (endpoint, params, onUploadProgress) {
221
+ var createTemplatev2 = function (endpoint, params, onUploadProgress) {
222
222
  var options = {
223
223
  timeout: 120000,
224
224
  onUploadProgress: function (event) {
@@ -228,22 +228,19 @@ var createTemplate = function (endpoint, params, onUploadProgress) {
228
228
  },
229
229
  };
230
230
  if (params.documents && params.documents[0] instanceof File) {
231
- if (params.documents.length > 10) {
232
- throw new Error('createTemplate() has a maximum of 10 documents that can be attached.');
233
- }
234
- var formData_1 = new FormData();
231
+ var formData_2 = new FormData();
235
232
  ALLOWED_CREATE_FIELDS.forEach(function (allowedKey) {
236
233
  if (params[allowedKey] !== undefined) {
237
- formData_1.append(allowedKey, params[allowedKey]);
234
+ formData_2.append(allowedKey, params[allowedKey]);
238
235
  }
239
236
  });
240
237
  params.documents.forEach(function (file) {
241
- formData_1.append('documents', file, file.name);
238
+ formData_2.append('documents', file, file.name);
242
239
  });
243
- return endpoint.api.post('/templates', formData_1, options).then(function (r) { return r.data; });
240
+ return endpoint.api.post('/v2/templates', formData_2, options).then(function (r) { return r.data; });
244
241
  }
245
242
  else {
246
- return endpoint.api.post('/templates', params, options).then(function (r) { return r.data; });
243
+ return endpoint.api.post('/v2/templates', params, options).then(function (r) { return r.data; });
247
244
  }
248
245
  };
249
246
  /**
@@ -4171,4 +4168,4 @@ var VerdocsEndpoint = /** @class */ (function () {
4171
4168
  return VerdocsEndpoint;
4172
4169
  }());
4173
4170
 
4174
- export { TemplateActions as T, VerdocsEndpoint as V, createTemplate as a, TemplateSenderTypes as b, canPerformTemplateAction as c, deleteTemplate as d, getTemplate as e, getTemplates as g, listTemplates as l, updateTemplate as u };
4171
+ export { TemplateActions as T, VerdocsEndpoint as V, createTemplatev2 as a, TemplateSenderTypes as b, canPerformTemplateAction as c, deleteTemplate as d, getTemplate as e, getTemplates as g, listTemplates as l, updateTemplate as u };
@@ -25,6 +25,7 @@ const ActivityIcons = {
25
25
  visibility: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path d="M12 15a3 3 0 100-6 3 3 0 000 6z" /><path fill-rule="evenodd" d="M1.323 11.447C2.811 6.976 7.028 3.75 12.001 3.75c4.97 0 9.185 3.223 10.675 7.69.12.362.12.752 0 1.113-1.487 4.471-5.705 7.697-10.677 7.697-4.97 0-9.186-3.223-10.675-7.69a1.762 1.762 0 010-1.113zM17.25 12a5.25 5.25 0 11-10.5 0 5.25 5.25 0 0110.5 0z" clip-rule="evenodd" /></svg>`,
26
26
  pencil: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path d="M21.731 2.269a2.625 2.625 0 00-3.712 0l-1.157 1.157 3.712 3.712 1.157-1.157a2.625 2.625 0 000-3.712zM19.513 8.199l-3.712-3.712-12.15 12.15a5.25 5.25 0 00-1.32 2.214l-.8 2.685a.75.75 0 00.933.933l2.685-.8a5.25 5.25 0 002.214-1.32L19.513 8.2z" /></svg>`,
27
27
  mail: `<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"/></svg>`,
28
+ contact_mail: `<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"/></svg>`,
28
29
  done: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path fill-rule="evenodd" d="M19.916 4.626a.75.75 0 01.208 1.04l-9 13.5a.75.75 0 01-1.154.114l-6-6a.75.75 0 011.06-1.06l5.353 5.353 8.493-12.739a.75.75 0 011.04-.208z" clip-rule="evenodd" /></svg>`,
29
30
  send: `<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M2.01 21L23 12 2.01 3 2 10l15 2-15 2z"/></svg>`,
30
31
  gesture: `<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M4.59 6.89c.7-.71 1.4-1.35 1.71-1.22.5.2 0 1.03-.3 1.52-.25.42-2.86 3.89-2.86 6.31 0 1.28.48 2.34 1.34 2.98.75.56 1.74.73 2.64.46 1.07-.31 1.95-1.4 3.06-2.77 1.21-1.49 2.83-3.44 4.08-3.44 1.63 0 1.65 1.01 1.76 1.79-3.78.64-5.38 3.67-5.38 5.37 0 1.7 1.44 3.09 3.21 3.09 1.63 0 4.29-1.33 4.69-6.1H21v-2.5h-2.47c-.15-1.65-1.09-4.2-4.03-4.2-2.25 0-4.18 1.91-4.94 2.84-.58.73-2.06 2.48-2.29 2.72-.25.3-.68.84-1.11.84-.45 0-.72-.83-.36-1.92.35-1.09 1.4-2.86 1.85-3.52.78-1.14 1.3-1.92 1.3-3.28C8.95 3.69 7.31 3 6.44 3 5.12 3 3.97 4 3.72 4.25c-.36.36-.66.66-.88.93l1.75 1.71zm9.29 11.66c-.31 0-.74-.26-.74-.72 0-.6.73-2.2 2.87-2.76-.3 2.69-1.43 3.48-2.13 3.48z"/></svg>`,
@@ -1,6 +1,6 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
2
  import './Types.js';
3
- import { V as VerdocsEndpoint, a as createTemplate } from './VerdocsEndpoint.js';
3
+ import { V as VerdocsEndpoint, a as createTemplatev2 } from './VerdocsEndpoint.js';
4
4
  import { S as SDKError } from './errors.js';
5
5
  import { d as defineCustomElement$4 } from './verdocs-button2.js';
6
6
  import { d as defineCustomElement$3 } from './verdocs-component-error2.js';
@@ -55,7 +55,7 @@ const VerdocsTemplateCreate = /*@__PURE__*/ proxyCustomElement(class extends HTM
55
55
  this.creating = true;
56
56
  this.progressLabel = 'Uploading...';
57
57
  try {
58
- const template = await createTemplate(this.endpoint, { name: this.file.name, documents: [this.file] }, percent => {
58
+ const template = await createTemplatev2(this.endpoint, { name: this.file.name, documents: [this.file] }, percent => {
59
59
  if (percent >= 99) {
60
60
  this.progressLabel = 'Processing...';
61
61
  this.progressPercent = 100;
package/dist/docs.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2023-12-05T05:05:49",
2
+ "timestamp": "2023-12-11T17:19:26",
3
3
  "compiler": {
4
4
  "name": "@stencil/core",
5
5
  "version": "2.20.0",
@@ -1,5 +1,5 @@
1
1
  import { c as createStore } from './index-4439b0d1.js';
2
- import { g as getTemplate, T as TemplateSenderTypes } from './VerdocsEndpoint-6f42e6a8.js';
2
+ import { g as getTemplate, T as TemplateSenderTypes } from './VerdocsEndpoint-140b14d7.js';
3
3
 
4
4
  const createTemplateStore = (templateId) => {
5
5
  const now = new Date().toISOString();
@@ -215,10 +215,10 @@ var ALLOWED_CREATE_FIELDS = [
215
215
  * ```typescript
216
216
  * import {Templates} from '@verdocs/js-sdk/Templates';
217
217
  *
218
- * const newTemplate = await Templates.createTemplate((VerdocsEndpoint.getDefault(), {...});
218
+ * const newTemplate = await Templates.createTemplatev2((VerdocsEndpoint.getDefault(), {...});
219
219
  * ```
220
220
  */
221
- var createTemplate = function (endpoint, params, onUploadProgress) {
221
+ var createTemplatev2 = function (endpoint, params, onUploadProgress) {
222
222
  var options = {
223
223
  timeout: 120000,
224
224
  onUploadProgress: function (event) {
@@ -228,22 +228,19 @@ var createTemplate = function (endpoint, params, onUploadProgress) {
228
228
  },
229
229
  };
230
230
  if (params.documents && params.documents[0] instanceof File) {
231
- if (params.documents.length > 10) {
232
- throw new Error('createTemplate() has a maximum of 10 documents that can be attached.');
233
- }
234
- var formData_1 = new FormData();
231
+ var formData_2 = new FormData();
235
232
  ALLOWED_CREATE_FIELDS.forEach(function (allowedKey) {
236
233
  if (params[allowedKey] !== undefined) {
237
- formData_1.append(allowedKey, params[allowedKey]);
234
+ formData_2.append(allowedKey, params[allowedKey]);
238
235
  }
239
236
  });
240
237
  params.documents.forEach(function (file) {
241
- formData_1.append('documents', file, file.name);
238
+ formData_2.append('documents', file, file.name);
242
239
  });
243
- return endpoint.api.post('/templates', formData_1, options).then(function (r) { return r.data; });
240
+ return endpoint.api.post('/v2/templates', formData_2, options).then(function (r) { return r.data; });
244
241
  }
245
242
  else {
246
- return endpoint.api.post('/templates', params, options).then(function (r) { return r.data; });
243
+ return endpoint.api.post('/v2/templates', params, options).then(function (r) { return r.data; });
247
244
  }
248
245
  };
249
246
  /**
@@ -4171,4 +4168,4 @@ var VerdocsEndpoint = /** @class */ (function () {
4171
4168
  return VerdocsEndpoint;
4172
4169
  }());
4173
4170
 
4174
- export { TemplateSenderTypes as T, VerdocsEndpoint as V, TemplateActions as a, createTemplate as b, canPerformTemplateAction as c, deleteTemplate as d, getTemplates as e, getTemplate as g, listTemplates as l, updateTemplate as u };
4171
+ export { TemplateSenderTypes as T, VerdocsEndpoint as V, TemplateActions as a, createTemplatev2 as b, canPerformTemplateAction as c, deleteTemplate as d, getTemplates as e, getTemplate as g, listTemplates as l, updateTemplate as u };
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, h, H as Host } from './index-172625c5.js';
2
2
  import './Types-5f31149e.js';
3
- import { V as VerdocsEndpoint } from './VerdocsEndpoint-6f42e6a8.js';
4
- import { g as getTemplateStore } from './TemplateStore-03608883.js';
3
+ import { V as VerdocsEndpoint } from './VerdocsEndpoint-140b14d7.js';
4
+ import { g as getTemplateStore } from './TemplateStore-18b6dbe3.js';
5
5
  import './index-4439b0d1.js';
6
6
 
7
7
  const ipcTestCss = "ipc-test{max-width:800px;display:block}";
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host } from './index-172625c5.js';
2
2
  import { g as getSummary } from './Envelopes-21ffb899.js';
3
3
  import './Types-5f31149e.js';
4
- import { V as VerdocsEndpoint } from './VerdocsEndpoint-6f42e6a8.js';
4
+ import { V as VerdocsEndpoint } from './VerdocsEndpoint-140b14d7.js';
5
5
  import { i as integerSequence } from './Primitives-8fe93caf.js';
6
6
  import { S as SDKError } from './errors-9b5498c8.js';
7
7
 
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, c as createEvent, h } from './index-172625c5.js';
2
2
  import { d as decodeAccessTokenBody } from './Types-5f31149e.js';
3
3
  import { c as createBusinessAccount, i as isOrgAvailable } from './Profiles-4cc942ef.js';
4
- import { V as VerdocsEndpoint } from './VerdocsEndpoint-6f42e6a8.js';
4
+ import { V as VerdocsEndpoint } from './VerdocsEndpoint-140b14d7.js';
5
5
  import { V as VerdocsToast } from './Toast-f3b8fd46.js';
6
6
  import { S as SDKError } from './errors-9b5498c8.js';
7
7
 
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, c as createEvent, f as forceUpdate, h, H as Host, a as getElement } from './index-172625c5.js';
2
2
  import './Types-5f31149e.js';
3
- import { V as VerdocsEndpoint } from './VerdocsEndpoint-6f42e6a8.js';
4
- import { g as getTemplateStore } from './TemplateStore-03608883.js';
3
+ import { V as VerdocsEndpoint } from './VerdocsEndpoint-140b14d7.js';
4
+ import { g as getTemplateStore } from './TemplateStore-18b6dbe3.js';
5
5
  import { S as SDKError } from './errors-9b5498c8.js';
6
6
  import './index-4439b0d1.js';
7
7
 
@@ -2,9 +2,9 @@ import { r as registerInstance, h, H as Host, c as createEvent, a as getElement
2
2
  import { c as createPopper } from './popper-15e448b4.js';
3
3
  import { a as commonjsGlobal } from './_commonjsHelpers-8a9f3b18.js';
4
4
  import './Types-5f31149e.js';
5
- import { V as VerdocsEndpoint } from './VerdocsEndpoint-6f42e6a8.js';
5
+ import { V as VerdocsEndpoint } from './VerdocsEndpoint-140b14d7.js';
6
6
  import { u as updateField, d as deleteField } from './Fields-c82e6df3.js';
7
- import { g as getTemplateStore } from './TemplateStore-03608883.js';
7
+ import { g as getTemplateStore } from './TemplateStore-18b6dbe3.js';
8
8
  import { S as SDKError } from './errors-9b5498c8.js';
9
9
  import './index-4439b0d1.js';
10
10
 
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host } from './index-172625c5.js';
2
2
  import './Types-5f31149e.js';
3
- import { V as VerdocsEndpoint } from './VerdocsEndpoint-6f42e6a8.js';
3
+ import { V as VerdocsEndpoint } from './VerdocsEndpoint-140b14d7.js';
4
4
  import { d as convertToE164 } from './utils-e0ce2c22.js';
5
5
  import './_commonjsHelpers-8a9f3b18.js';
6
6
  import './Envelopes-21ffb899.js';
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-172625c5.js';
2
2
  import { m as getEnvelopeDocumentPageDisplayUri } from './Envelopes-21ffb899.js';
3
3
  import './Types-5f31149e.js';
4
- import { V as VerdocsEndpoint } from './VerdocsEndpoint-6f42e6a8.js';
4
+ import { V as VerdocsEndpoint } from './VerdocsEndpoint-140b14d7.js';
5
5
  import { t as throttle } from './utils-e0ce2c22.js';
6
6
  import './_commonjsHelpers-8a9f3b18.js';
7
7
  import './Files-70a192df.js';
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host } from './index-172625c5.js';
2
2
  import './Types-5f31149e.js';
3
3
  import { g as getInPersonLink } from './Recipients-4ec2138c.js';
4
- import { V as VerdocsEndpoint } from './VerdocsEndpoint-6f42e6a8.js';
4
+ import { V as VerdocsEndpoint } from './VerdocsEndpoint-140b14d7.js';
5
5
  import { g as getEnvelopeStore } from './EnvelopeStore-15cc99ef.js';
6
6
  import { V as VerdocsToast } from './Toast-f3b8fd46.js';
7
7
  import { S as SDKError } from './errors-9b5498c8.js';