@verdocs/web-sdk 2.3.12 → 2.3.14

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 (342) hide show
  1. package/dist/cjs/{EnvelopeStore-efc35530.js → EnvelopeStore-f8c301e1.js} +1 -1
  2. package/dist/cjs/{Envelopes-0b9deb2c.js → Envelopes-99ca79fe.js} +6 -2
  3. package/dist/cjs/{Profiles-1a26e4eb.js → Profiles-54271244.js} +34 -0
  4. package/dist/cjs/{TemplateStore-17b9fdfe.js → TemplateStore-d9936a68.js} +1 -1
  5. package/dist/cjs/{Types-fb95ed6b.js → Types-ee5afdf8.js} +1 -2
  6. package/dist/cjs/{VerdocsEndpoint-8f298664.js → VerdocsEndpoint-2d85658d.js} +563 -197
  7. package/dist/cjs/{_commonjsHelpers-1fbbf0eb.js → _commonjsHelpers-0c557e26.js} +5 -0
  8. package/dist/cjs/interact.min-ba5cc513.js +13 -0
  9. package/dist/cjs/ipc-test.cjs.entry.js +2 -2
  10. package/dist/cjs/loader.cjs.js +1 -1
  11. package/dist/cjs/{utils-0916d10f.js → utils-2ddfdf9e.js} +3 -3
  12. package/dist/cjs/verdocs-activity-box.cjs.entry.js +2 -2
  13. package/dist/cjs/verdocs-auth.cjs.entry.js +34 -8
  14. package/dist/cjs/verdocs-build.cjs.entry.js +2 -2
  15. package/dist/cjs/verdocs-button-panel_2.cjs.entry.js +3 -12
  16. package/dist/cjs/{verdocs-contact-picker_3.cjs.entry.js → verdocs-contact-picker_2.cjs.entry.js} +6 -78
  17. package/dist/cjs/verdocs-envelope-document-page.cjs.entry.js +5 -5
  18. package/dist/cjs/verdocs-envelope-recipient-link_2.cjs.entry.js +3 -3
  19. package/dist/cjs/verdocs-envelope-sidebar.cjs.entry.js +4 -5
  20. package/dist/cjs/verdocs-envelopes-list.cjs.entry.js +5 -5
  21. package/dist/cjs/verdocs-field-attachment.cjs.entry.js +4 -4
  22. package/dist/cjs/verdocs-field-checkbox.cjs.entry.js +4 -4
  23. package/dist/cjs/verdocs-field-date.cjs.entry.js +5 -5
  24. package/dist/cjs/verdocs-field-dropdown.cjs.entry.js +5 -4
  25. package/dist/cjs/verdocs-field-initial.cjs.entry.js +4 -4
  26. package/dist/cjs/verdocs-field-payment.cjs.entry.js +4 -4
  27. package/dist/cjs/verdocs-field-radio-button.cjs.entry.js +4 -4
  28. package/dist/cjs/verdocs-field-signature.cjs.entry.js +4 -4
  29. package/dist/cjs/verdocs-field-textarea.cjs.entry.js +9 -10
  30. package/dist/cjs/verdocs-field-textbox.cjs.entry.js +9 -9
  31. package/dist/cjs/verdocs-field-timestamp.cjs.entry.js +5 -5
  32. package/dist/cjs/verdocs-file-chooser_2.cjs.entry.js +1 -1
  33. package/dist/cjs/verdocs-ok-dialog.cjs.entry.js +1 -2
  34. package/dist/cjs/verdocs-pagination_2.cjs.entry.js +4 -4
  35. package/dist/cjs/verdocs-preview_8.cjs.entry.js +8 -9
  36. package/dist/cjs/verdocs-quick-functions_3.cjs.entry.js +220 -0
  37. package/dist/cjs/verdocs-search.cjs.entry.js +1 -1
  38. package/dist/cjs/verdocs-settings-api-keys_4.cjs.entry.js +37 -70
  39. package/dist/cjs/verdocs-settings.cjs.entry.js +1 -1
  40. package/dist/cjs/verdocs-sign.cjs.entry.js +9 -12
  41. package/dist/cjs/verdocs-template-document-page_2.cjs.entry.js +5 -5
  42. package/dist/cjs/verdocs-template-fields_4.cjs.entry.js +47 -55
  43. package/dist/cjs/verdocs-template-star.cjs.entry.js +1 -1
  44. package/dist/cjs/verdocs-templates-list.cjs.entry.js +1 -1
  45. package/dist/cjs/verdocs-view.cjs.entry.js +5 -5
  46. package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
  47. package/dist/collection/collection-manifest.json +1 -1
  48. package/dist/collection/components/dialogs/verdocs-ok-dialog/verdocs-ok-dialog.js +1 -20
  49. package/dist/collection/components/elements/verdocs-search-activity/verdocs-search-activity.css +66 -0
  50. package/dist/collection/components/elements/verdocs-search-activity/verdocs-search-activity.js +187 -0
  51. package/dist/collection/components/elements/verdocs-search-activity/verdocs-search-activity.stories.js +14 -0
  52. package/dist/collection/components/embeds/verdocs-auth/verdocs-auth.js +34 -6
  53. package/dist/collection/components/embeds/verdocs-send/verdocs-send.js +1 -2
  54. package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +4 -8
  55. package/dist/collection/components/envelopes/verdocs-contact-picker/verdocs-contact-picker.css +1 -4
  56. package/dist/collection/components/envelopes/verdocs-envelope-sidebar/verdocs-envelope-sidebar.js +0 -1
  57. package/dist/collection/components/fields/verdocs-field-date/verdocs-field-date.css +0 -1
  58. package/dist/collection/components/fields/verdocs-field-dropdown/verdocs-field-dropdown.js +1 -0
  59. package/dist/collection/components/fields/verdocs-field-textarea/verdocs-field-textarea.js +1 -2
  60. package/dist/collection/components/fields/verdocs-field-textbox/verdocs-field-textbox.css +1 -1
  61. package/dist/collection/components/fields/verdocs-field-timestamp/verdocs-field-timestamp.css +0 -1
  62. package/dist/collection/components/templates/verdocs-template-create/verdocs-template-create.js +2 -2
  63. package/dist/collection/components/templates/verdocs-template-field-properties/verdocs-template-field-properties.js +0 -10
  64. package/dist/collection/components/templates/verdocs-template-fields/verdocs-template-fields.js +35 -43
  65. package/dist/collection/utils/Types.js +1 -2
  66. package/dist/components/Envelopes.js +6 -2
  67. package/dist/components/Organizations.js +32 -0
  68. package/dist/components/TemplateStore.js +1 -1
  69. package/dist/components/Types2.js +1 -2
  70. package/dist/components/VerdocsEndpoint.js +562 -197
  71. package/dist/components/_commonjsHelpers.js +5 -1
  72. package/dist/components/index.d.ts +1 -1
  73. package/dist/components/index.js +1 -1
  74. package/dist/components/index3.js +29 -40
  75. package/dist/components/interact.min.js +6 -5
  76. package/dist/components/verdocs-auth.js +46 -12
  77. package/dist/components/verdocs-build.js +16 -22
  78. package/dist/components/verdocs-contact-picker2.js +1 -1
  79. package/dist/components/verdocs-envelope-sidebar.js +0 -1
  80. package/dist/components/verdocs-field-date.js +1 -1
  81. package/dist/components/verdocs-field-dropdown.js +1 -0
  82. package/dist/components/verdocs-field-textarea.js +4 -5
  83. package/dist/components/verdocs-field-textbox.js +4 -4
  84. package/dist/components/verdocs-field-timestamp.js +1 -1
  85. package/dist/components/verdocs-ok-dialog2.js +1 -3
  86. package/dist/components/verdocs-search-activity.d.ts +11 -0
  87. package/dist/components/verdocs-search-activity.js +6 -0
  88. package/dist/components/verdocs-search-activity2.js +170 -0
  89. package/dist/components/verdocs-search.js +8 -2
  90. package/dist/components/verdocs-send2.js +5 -12
  91. package/dist/components/verdocs-settings-organization2.js +1 -22
  92. package/dist/components/verdocs-sign.js +4 -8
  93. package/dist/components/verdocs-template-create2.js +2 -2
  94. package/dist/components/verdocs-template-field-properties2.js +0 -10
  95. package/dist/components/verdocs-template-fields2.js +38 -46
  96. package/dist/components/verdocs-template-roles2.js +4 -4
  97. package/dist/docs.json +108 -139
  98. package/dist/esm/{EnvelopeStore-17c0bc52.js → EnvelopeStore-15cc99ef.js} +1 -1
  99. package/dist/esm/{Envelopes-627c5239.js → Envelopes-21ffb899.js} +6 -2
  100. package/dist/esm/{Profiles-d4df4d1c.js → Profiles-4cc942ef.js} +32 -1
  101. package/dist/esm/{TemplateStore-ad77a294.js → TemplateStore-018fc1db.js} +1 -1
  102. package/dist/esm/Types-de18e225.js +4 -0
  103. package/dist/esm/{VerdocsEndpoint-56fa3371.js → VerdocsEndpoint-b011af25.js} +562 -197
  104. package/dist/esm/{_commonjsHelpers-8a9f3b18.js → _commonjsHelpers-5ec8f9b7.js} +5 -1
  105. package/dist/esm/interact.min-cf83fa88.js +11 -0
  106. package/dist/esm/ipc-test.entry.js +2 -2
  107. package/dist/esm/loader.js +1 -1
  108. package/dist/esm/{utils-ca3121df.js → utils-d269cea3.js} +3 -3
  109. package/dist/esm/verdocs-activity-box.entry.js +2 -2
  110. package/dist/esm/verdocs-auth.entry.js +34 -8
  111. package/dist/esm/verdocs-build.entry.js +2 -2
  112. package/dist/esm/verdocs-button-panel_2.entry.js +3 -12
  113. package/dist/esm/{verdocs-contact-picker_3.entry.js → verdocs-contact-picker_2.entry.js} +7 -78
  114. package/dist/esm/verdocs-envelope-document-page.entry.js +5 -5
  115. package/dist/esm/verdocs-envelope-recipient-link_2.entry.js +3 -3
  116. package/dist/esm/verdocs-envelope-sidebar.entry.js +4 -5
  117. package/dist/esm/verdocs-envelopes-list.entry.js +5 -5
  118. package/dist/esm/verdocs-field-attachment.entry.js +4 -4
  119. package/dist/esm/verdocs-field-checkbox.entry.js +4 -4
  120. package/dist/esm/verdocs-field-date.entry.js +5 -5
  121. package/dist/esm/verdocs-field-dropdown.entry.js +5 -4
  122. package/dist/esm/verdocs-field-initial.entry.js +4 -4
  123. package/dist/esm/verdocs-field-payment.entry.js +4 -4
  124. package/dist/esm/verdocs-field-radio-button.entry.js +4 -4
  125. package/dist/esm/verdocs-field-signature.entry.js +4 -4
  126. package/dist/esm/verdocs-field-textarea.entry.js +9 -10
  127. package/dist/esm/verdocs-field-textbox.entry.js +9 -9
  128. package/dist/esm/verdocs-field-timestamp.entry.js +5 -5
  129. package/dist/esm/verdocs-file-chooser_2.entry.js +1 -1
  130. package/dist/esm/verdocs-ok-dialog.entry.js +1 -2
  131. package/dist/esm/verdocs-pagination_2.entry.js +4 -4
  132. package/dist/esm/verdocs-preview_8.entry.js +8 -9
  133. package/dist/esm/verdocs-quick-functions_3.entry.js +214 -0
  134. package/dist/esm/verdocs-search.entry.js +1 -1
  135. package/dist/esm/verdocs-settings-api-keys_4.entry.js +35 -68
  136. package/dist/esm/verdocs-settings.entry.js +1 -1
  137. package/dist/esm/verdocs-sign.entry.js +9 -12
  138. package/dist/esm/verdocs-template-document-page_2.entry.js +5 -5
  139. package/dist/esm/verdocs-template-fields_4.entry.js +47 -55
  140. package/dist/esm/verdocs-template-star.entry.js +1 -1
  141. package/dist/esm/verdocs-templates-list.entry.js +1 -1
  142. package/dist/esm/verdocs-view.entry.js +5 -5
  143. package/dist/esm/verdocs-web-sdk.js +1 -1
  144. package/dist/esm-es5/{EnvelopeStore-17c0bc52.js → EnvelopeStore-15cc99ef.js} +1 -1
  145. package/dist/esm-es5/Envelopes-21ffb899.js +1 -0
  146. package/dist/esm-es5/Profiles-4cc942ef.js +1 -0
  147. package/dist/esm-es5/{TemplateStore-ad77a294.js → TemplateStore-018fc1db.js} +1 -1
  148. package/dist/esm-es5/Types-de18e225.js +1 -0
  149. package/dist/esm-es5/VerdocsEndpoint-b011af25.js +1 -0
  150. package/dist/esm-es5/_commonjsHelpers-5ec8f9b7.js +1 -0
  151. package/dist/esm-es5/interact.min-cf83fa88.js +1 -0
  152. package/dist/esm-es5/ipc-test.entry.js +1 -1
  153. package/dist/esm-es5/loader.js +1 -1
  154. package/dist/esm-es5/{utils-ca3121df.js → utils-d269cea3.js} +2 -2
  155. package/dist/esm-es5/verdocs-activity-box.entry.js +1 -1
  156. package/dist/esm-es5/verdocs-auth.entry.js +1 -1
  157. package/dist/esm-es5/verdocs-build.entry.js +1 -1
  158. package/dist/esm-es5/verdocs-button-panel_2.entry.js +1 -1
  159. package/dist/esm-es5/verdocs-contact-picker_2.entry.js +1 -0
  160. package/dist/esm-es5/verdocs-envelope-document-page.entry.js +1 -1
  161. package/dist/esm-es5/verdocs-envelope-recipient-link_2.entry.js +1 -1
  162. package/dist/esm-es5/verdocs-envelope-sidebar.entry.js +1 -1
  163. package/dist/esm-es5/verdocs-envelopes-list.entry.js +1 -1
  164. package/dist/esm-es5/verdocs-field-attachment.entry.js +1 -1
  165. package/dist/esm-es5/verdocs-field-checkbox.entry.js +1 -1
  166. package/dist/esm-es5/verdocs-field-date.entry.js +1 -1
  167. package/dist/esm-es5/verdocs-field-dropdown.entry.js +1 -1
  168. package/dist/esm-es5/verdocs-field-initial.entry.js +1 -1
  169. package/dist/esm-es5/verdocs-field-payment.entry.js +1 -1
  170. package/dist/esm-es5/verdocs-field-radio-button.entry.js +1 -1
  171. package/dist/esm-es5/verdocs-field-signature.entry.js +1 -1
  172. package/dist/esm-es5/verdocs-field-textarea.entry.js +1 -1
  173. package/dist/esm-es5/verdocs-field-textbox.entry.js +1 -1
  174. package/dist/esm-es5/verdocs-field-timestamp.entry.js +1 -1
  175. package/dist/esm-es5/verdocs-file-chooser_2.entry.js +1 -1
  176. package/dist/esm-es5/verdocs-ok-dialog.entry.js +1 -1
  177. package/dist/esm-es5/verdocs-pagination_2.entry.js +1 -1
  178. package/dist/esm-es5/verdocs-preview_8.entry.js +1 -1
  179. package/dist/esm-es5/verdocs-quick-functions_3.entry.js +1 -0
  180. package/dist/esm-es5/verdocs-search.entry.js +1 -1
  181. package/dist/esm-es5/verdocs-settings-api-keys_4.entry.js +1 -1
  182. package/dist/esm-es5/verdocs-settings.entry.js +1 -1
  183. package/dist/esm-es5/verdocs-sign.entry.js +1 -1
  184. package/dist/esm-es5/verdocs-template-document-page_2.entry.js +1 -1
  185. package/dist/esm-es5/verdocs-template-fields_4.entry.js +1 -1
  186. package/dist/esm-es5/verdocs-template-star.entry.js +1 -1
  187. package/dist/esm-es5/verdocs-templates-list.entry.js +1 -1
  188. package/dist/esm-es5/verdocs-view.entry.js +1 -1
  189. package/dist/esm-es5/verdocs-web-sdk.js +1 -1
  190. package/dist/types/components/dialogs/verdocs-ok-dialog/verdocs-ok-dialog.d.ts +0 -4
  191. package/dist/types/components/elements/verdocs-search-activity/verdocs-search-activity.d.ts +33 -0
  192. package/dist/types/components/{controls/verdocs-portal/verdocs-portal.stories.d.ts → elements/verdocs-search-activity/verdocs-search-activity.stories.d.ts} +6 -3
  193. package/dist/types/components/embeds/verdocs-auth/verdocs-auth.d.ts +2 -0
  194. package/dist/types/components/embeds/verdocs-sign/verdocs-sign.d.ts +0 -1
  195. package/dist/types/components/templates/verdocs-template-field-properties/verdocs-template-field-properties.d.ts +0 -1
  196. package/dist/types/components.d.ts +34 -50
  197. package/dist/types/utils/Types.d.ts +1 -1
  198. package/dist/types/utils/utils.d.ts +2 -2
  199. package/dist/verdocs-web-sdk/p-01166179.system.entry.js +1 -0
  200. package/dist/verdocs-web-sdk/{p-d1ea580b.system.entry.js → p-013d1556.system.entry.js} +1 -1
  201. package/dist/verdocs-web-sdk/p-04580be0.entry.js +1 -0
  202. package/dist/verdocs-web-sdk/{p-17bf98f2.system.entry.js → p-04d7d759.system.entry.js} +1 -1
  203. package/dist/verdocs-web-sdk/{p-da3faf4a.entry.js → p-0ad1fd33.entry.js} +1 -1
  204. package/dist/verdocs-web-sdk/p-0d28cf05.js +1 -0
  205. package/dist/verdocs-web-sdk/{p-a40b3946.entry.js → p-0df58c57.entry.js} +1 -1
  206. package/dist/verdocs-web-sdk/{p-ba653c39.system.entry.js → p-0e5449d1.system.entry.js} +1 -1
  207. package/dist/verdocs-web-sdk/{p-dd2c2edc.entry.js → p-0f94d635.entry.js} +1 -1
  208. package/dist/verdocs-web-sdk/{p-0685d939.system.entry.js → p-10af7aec.system.entry.js} +1 -1
  209. package/dist/verdocs-web-sdk/{p-b467d981.system.entry.js → p-126ba5d2.system.entry.js} +1 -1
  210. package/dist/verdocs-web-sdk/{p-d59b6988.entry.js → p-137cedc8.entry.js} +1 -1
  211. package/dist/verdocs-web-sdk/{p-05e6bc91.entry.js → p-1406ffd2.entry.js} +1 -1
  212. package/dist/verdocs-web-sdk/{p-8af68516.system.entry.js → p-14aefeb2.system.entry.js} +1 -1
  213. package/dist/verdocs-web-sdk/p-15cb963a.system.entry.js +1 -0
  214. package/dist/verdocs-web-sdk/p-17d0e5f4.entry.js +1 -0
  215. package/dist/verdocs-web-sdk/p-23be436b.entry.js +1 -0
  216. package/dist/verdocs-web-sdk/{p-1e38b22f.system.entry.js → p-261d376e.system.entry.js} +1 -1
  217. package/dist/verdocs-web-sdk/p-2ccbcfeb.system.js +1 -0
  218. package/dist/verdocs-web-sdk/{p-1cb878c8.system.entry.js → p-2f04fb38.system.entry.js} +1 -1
  219. package/dist/verdocs-web-sdk/p-30b4bd45.js +1 -0
  220. package/dist/verdocs-web-sdk/p-3305a941.system.js +1 -0
  221. package/dist/verdocs-web-sdk/{p-fe67b620.system.entry.js → p-343672f5.system.entry.js} +1 -1
  222. package/dist/verdocs-web-sdk/{p-ac98f6f1.system.entry.js → p-35769d0c.system.entry.js} +1 -1
  223. package/dist/verdocs-web-sdk/{p-d39e4a26.system.entry.js → p-37187046.system.entry.js} +1 -1
  224. package/dist/verdocs-web-sdk/{p-6331d113.entry.js → p-39cbfe15.entry.js} +1 -1
  225. package/dist/verdocs-web-sdk/{p-46624bec.entry.js → p-3a702f79.entry.js} +1 -1
  226. package/dist/verdocs-web-sdk/{p-c80237f9.entry.js → p-3abfff14.entry.js} +1 -1
  227. package/dist/verdocs-web-sdk/{p-f42c84f1.entry.js → p-3f9fbf94.entry.js} +1 -1
  228. package/dist/verdocs-web-sdk/p-409e992a.entry.js +1 -0
  229. package/dist/verdocs-web-sdk/p-4a94ee00.system.entry.js +1 -0
  230. package/dist/verdocs-web-sdk/{p-2ccbf54d.entry.js → p-4f439363.entry.js} +1 -1
  231. package/dist/verdocs-web-sdk/{p-b6231fd3.system.entry.js → p-50ac71f3.system.entry.js} +1 -1
  232. package/dist/verdocs-web-sdk/p-51756c1b.system.entry.js +1 -0
  233. package/dist/verdocs-web-sdk/p-5a91bf23.js +1 -0
  234. package/dist/verdocs-web-sdk/{p-9ceff040.system.entry.js → p-5c50a778.system.entry.js} +1 -1
  235. package/dist/verdocs-web-sdk/{p-79168c6a.system.entry.js → p-5df0fa7a.system.entry.js} +1 -1
  236. package/dist/verdocs-web-sdk/{p-b648ab63.system.entry.js → p-609c7fab.system.entry.js} +1 -1
  237. package/dist/verdocs-web-sdk/{p-870707e8.system.entry.js → p-62f090c7.system.entry.js} +1 -1
  238. package/dist/verdocs-web-sdk/p-6307e6ae.entry.js +1 -0
  239. package/dist/verdocs-web-sdk/p-66d66e2b.entry.js +1 -0
  240. package/dist/verdocs-web-sdk/{p-cf703fe4.entry.js → p-6bda7dce.entry.js} +1 -1
  241. package/dist/verdocs-web-sdk/p-76907130.entry.js +1 -0
  242. package/dist/verdocs-web-sdk/{p-37dfdc84.entry.js → p-77abc3ce.entry.js} +1 -1
  243. package/dist/verdocs-web-sdk/{p-035a3ce2.entry.js → p-7805f0e0.entry.js} +1 -1
  244. package/dist/verdocs-web-sdk/{p-e1bc55f8.entry.js → p-79dc4f76.entry.js} +1 -1
  245. package/dist/verdocs-web-sdk/{p-f3dde708.js → p-7b63017c.js} +1 -1
  246. package/dist/verdocs-web-sdk/{p-9615b087.system.js → p-7e8d64fb.system.js} +1 -1
  247. package/dist/verdocs-web-sdk/p-7fd7152d.system.js +1 -0
  248. package/dist/verdocs-web-sdk/p-89aa696c.system.entry.js +1 -0
  249. package/dist/verdocs-web-sdk/{p-410c63e6.entry.js → p-8da1555a.entry.js} +1 -1
  250. package/dist/verdocs-web-sdk/p-961708ac.entry.js +1 -0
  251. package/dist/verdocs-web-sdk/p-983da2f6.js +1 -0
  252. package/dist/verdocs-web-sdk/p-9934f3ec.system.entry.js +1 -0
  253. package/dist/verdocs-web-sdk/{p-637187de.entry.js → p-9b07a2a7.entry.js} +1 -1
  254. package/dist/verdocs-web-sdk/{p-4d98f194.system.entry.js → p-a0b02d83.system.entry.js} +1 -1
  255. package/dist/verdocs-web-sdk/{p-3f3807b0.system.entry.js → p-a171983b.system.entry.js} +1 -1
  256. package/dist/verdocs-web-sdk/{p-94009f45.entry.js → p-a310f65b.entry.js} +1 -1
  257. package/dist/verdocs-web-sdk/{p-02a71e03.js → p-a35314fe.js} +1 -1
  258. package/dist/verdocs-web-sdk/{p-b7a815e9.system.entry.js → p-a52a832b.system.entry.js} +1 -1
  259. package/dist/verdocs-web-sdk/p-a5425a9b.entry.js +1 -0
  260. package/dist/verdocs-web-sdk/{p-9360b085.system.entry.js → p-aa51514f.system.entry.js} +1 -1
  261. package/dist/verdocs-web-sdk/{p-8b0a5309.entry.js → p-ace35be6.entry.js} +1 -1
  262. package/dist/verdocs-web-sdk/{p-4e47ed1c.entry.js → p-af3e9624.entry.js} +1 -1
  263. package/dist/verdocs-web-sdk/{p-e760f894.entry.js → p-b17a20b8.entry.js} +1 -1
  264. package/dist/verdocs-web-sdk/p-b2d698f7.system.entry.js +1 -0
  265. package/dist/verdocs-web-sdk/{p-d99a05e4.system.entry.js → p-b73415c3.system.entry.js} +1 -1
  266. package/dist/verdocs-web-sdk/p-bb2c866b.system.entry.js +1 -0
  267. package/dist/verdocs-web-sdk/p-bbee73c8.system.js +1 -0
  268. package/dist/verdocs-web-sdk/{p-acc873cf.system.entry.js → p-bd0bc3dd.system.entry.js} +1 -1
  269. package/dist/verdocs-web-sdk/p-bfcf8ad2.entry.js +1 -0
  270. package/dist/verdocs-web-sdk/{p-840827b7.system.js → p-c694cf93.system.js} +1 -1
  271. package/dist/verdocs-web-sdk/p-cbbf849f.system.js +1 -0
  272. package/dist/verdocs-web-sdk/p-cbd0802f.entry.js +1 -0
  273. package/dist/verdocs-web-sdk/{p-eeca4c30.entry.js → p-cf765153.entry.js} +1 -1
  274. package/dist/verdocs-web-sdk/{p-f6b7439f.system.entry.js → p-dd8845d4.system.entry.js} +1 -1
  275. package/dist/verdocs-web-sdk/p-de60d3a8.js +1 -0
  276. package/dist/verdocs-web-sdk/{p-6685ff29.system.entry.js → p-df6a373e.system.entry.js} +1 -1
  277. package/dist/verdocs-web-sdk/{p-59769c39.system.entry.js → p-e3a9d167.system.entry.js} +1 -1
  278. package/dist/verdocs-web-sdk/p-eab67c09.js +1 -0
  279. package/dist/verdocs-web-sdk/{p-82b5e475.system.js → p-eb595245.system.js} +1 -1
  280. package/dist/verdocs-web-sdk/{p-1f78be32.js → p-ebc4142c.js} +1 -1
  281. package/dist/verdocs-web-sdk/p-ecf04564.system.entry.js +1 -0
  282. package/dist/verdocs-web-sdk/p-ee195e5e.entry.js +1 -0
  283. package/dist/verdocs-web-sdk/{p-82d4afbf.entry.js → p-eef694e8.entry.js} +1 -1
  284. package/dist/verdocs-web-sdk/p-f04bf956.system.js +1 -1
  285. package/dist/verdocs-web-sdk/{p-ab98a02d.system.entry.js → p-f1257cd0.system.entry.js} +1 -1
  286. package/dist/verdocs-web-sdk/p-f65a1b9e.system.js +1 -0
  287. package/dist/verdocs-web-sdk/{p-9d2995a9.entry.js → p-fde6b724.entry.js} +1 -1
  288. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  289. package/package.json +7 -8
  290. package/dist/cjs/interact.min-a61b43b3.js +0 -12
  291. package/dist/cjs/verdocs-quick-functions_2.cjs.entry.js +0 -79
  292. package/dist/collection/components/controls/verdocs-portal/verdocs-portal.css +0 -0
  293. package/dist/collection/components/controls/verdocs-portal/verdocs-portal.js +0 -181
  294. package/dist/collection/components/controls/verdocs-portal/verdocs-portal.stories.js +0 -20
  295. package/dist/components/verdocs-portal.d.ts +0 -11
  296. package/dist/components/verdocs-portal.js +0 -6
  297. package/dist/components/verdocs-portal2.js +0 -93
  298. package/dist/esm/Types-1628dc71.js +0 -5
  299. package/dist/esm/interact.min-6a7b19a1.js +0 -10
  300. package/dist/esm/verdocs-quick-functions_2.entry.js +0 -74
  301. package/dist/esm-es5/Envelopes-627c5239.js +0 -1
  302. package/dist/esm-es5/Profiles-d4df4d1c.js +0 -1
  303. package/dist/esm-es5/Types-1628dc71.js +0 -1
  304. package/dist/esm-es5/VerdocsEndpoint-56fa3371.js +0 -1
  305. package/dist/esm-es5/_commonjsHelpers-8a9f3b18.js +0 -1
  306. package/dist/esm-es5/interact.min-6a7b19a1.js +0 -1
  307. package/dist/esm-es5/verdocs-contact-picker_3.entry.js +0 -1
  308. package/dist/esm-es5/verdocs-quick-functions_2.entry.js +0 -1
  309. package/dist/types/components/controls/verdocs-portal/verdocs-portal.d.ts +0 -37
  310. package/dist/verdocs-web-sdk/p-035f6b38.js +0 -1
  311. package/dist/verdocs-web-sdk/p-0abf0058.system.entry.js +0 -1
  312. package/dist/verdocs-web-sdk/p-17598002.system.entry.js +0 -1
  313. package/dist/verdocs-web-sdk/p-1a7aa04b.entry.js +0 -1
  314. package/dist/verdocs-web-sdk/p-1ba9f457.system.js +0 -1
  315. package/dist/verdocs-web-sdk/p-1c08edf7.system.entry.js +0 -1
  316. package/dist/verdocs-web-sdk/p-22e0d2bc.entry.js +0 -1
  317. package/dist/verdocs-web-sdk/p-319c00bd.entry.js +0 -1
  318. package/dist/verdocs-web-sdk/p-3e607686.js +0 -1
  319. package/dist/verdocs-web-sdk/p-6dd69d82.system.entry.js +0 -1
  320. package/dist/verdocs-web-sdk/p-736fbb87.system.entry.js +0 -1
  321. package/dist/verdocs-web-sdk/p-746fce21.entry.js +0 -1
  322. package/dist/verdocs-web-sdk/p-76f8c30a.entry.js +0 -1
  323. package/dist/verdocs-web-sdk/p-7b30c523.system.entry.js +0 -1
  324. package/dist/verdocs-web-sdk/p-7d5dbd9a.js +0 -1
  325. package/dist/verdocs-web-sdk/p-839f6f0d.js +0 -1
  326. package/dist/verdocs-web-sdk/p-85df0da6.entry.js +0 -1
  327. package/dist/verdocs-web-sdk/p-8aae8d16.system.js +0 -1
  328. package/dist/verdocs-web-sdk/p-915883e6.js +0 -1
  329. package/dist/verdocs-web-sdk/p-9a5c0882.system.entry.js +0 -1
  330. package/dist/verdocs-web-sdk/p-9bf2d124.system.js +0 -1
  331. package/dist/verdocs-web-sdk/p-9fc06f7b.entry.js +0 -1
  332. package/dist/verdocs-web-sdk/p-ae83f4a0.entry.js +0 -1
  333. package/dist/verdocs-web-sdk/p-b91de346.entry.js +0 -1
  334. package/dist/verdocs-web-sdk/p-cd20fb77.system.js +0 -1
  335. package/dist/verdocs-web-sdk/p-d0a09719.entry.js +0 -1
  336. package/dist/verdocs-web-sdk/p-d61fda4b.entry.js +0 -1
  337. package/dist/verdocs-web-sdk/p-d8cd6b59.system.js +0 -1
  338. package/dist/verdocs-web-sdk/p-dc2ad047.js +0 -1
  339. package/dist/verdocs-web-sdk/p-e28878eb.system.entry.js +0 -1
  340. package/dist/verdocs-web-sdk/p-e2ae3679.entry.js +0 -1
  341. package/dist/verdocs-web-sdk/p-e2ff37fb.system.js +0 -1
  342. package/dist/verdocs-web-sdk/p-e4dc3264.system.entry.js +0 -1
@@ -149,6 +149,23 @@ var __generator = (undefined && undefined.__generator) || function (thisArg, bod
149
149
  if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
150
150
  }
151
151
  };
152
+ /**
153
+ * Get all templates accessible by the caller, with optional filters.
154
+ *
155
+ * ```typescript
156
+ * import {Templates} from '@verdocs/js-sdk/Templates';
157
+ *
158
+ * await Templates.getTemplates((VerdocsEndpoint.getDefault());
159
+ * await Templates.getTemplates((VerdocsEndpoint.getDefault(), { is_starred: true });
160
+ * await Templates.getTemplates((VerdocsEndpoint.getDefault(), { is_creator: true });
161
+ * await Templates.getTemplates((VerdocsEndpoint.getDefault(), { is_organization: true });
162
+ * ```
163
+ */
164
+ var getTemplates = function (endpoint, params) {
165
+ return endpoint.api //
166
+ .post('/templates', { params: params })
167
+ .then(function (r) { return r.data; });
168
+ };
152
169
  // export interface IListTemplatesParams {
153
170
  // name?: string;
154
171
  // sharing?: 'all' | 'personal' | 'shared' | 'public';
@@ -200,10 +217,10 @@ var ALLOWED_CREATE_FIELDS = [
200
217
  * ```typescript
201
218
  * import {Templates} from '@verdocs/js-sdk/Templates';
202
219
  *
203
- * const newTemplate = await Templates.createTemplatev2((VerdocsEndpoint.getDefault(), {...});
220
+ * const newTemplate = await Templates.createTemplate((VerdocsEndpoint.getDefault(), {...});
204
221
  * ```
205
222
  */
206
- var createTemplatev2 = function (endpoint, params, onUploadProgress) {
223
+ var createTemplate = function (endpoint, params, onUploadProgress) {
207
224
  var options = {
208
225
  timeout: 120000,
209
226
  onUploadProgress: function (event) {
@@ -213,19 +230,22 @@ var createTemplatev2 = function (endpoint, params, onUploadProgress) {
213
230
  },
214
231
  };
215
232
  if (params.documents && params.documents[0] instanceof File) {
216
- var formData_2 = new FormData();
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();
217
237
  ALLOWED_CREATE_FIELDS.forEach(function (allowedKey) {
218
238
  if (params[allowedKey] !== undefined) {
219
- formData_2.append(allowedKey, params[allowedKey]);
239
+ formData_1.append(allowedKey, params[allowedKey]);
220
240
  }
221
241
  });
222
242
  params.documents.forEach(function (file) {
223
- formData_2.append('documents', file, file.name);
243
+ formData_1.append('documents', file, file.name);
224
244
  });
225
- return endpoint.api.post('/v2/templates', formData_2, options).then(function (r) { return r.data; });
245
+ return endpoint.api.post('/templates', formData_1, options).then(function (r) { return r.data; });
226
246
  }
227
247
  else {
228
- return endpoint.api.post('/v2/templates', params, options).then(function (r) { return r.data; });
248
+ return endpoint.api.post('/templates', params, options).then(function (r) { return r.data; });
229
249
  }
230
250
  };
231
251
  /**
@@ -362,6 +382,322 @@ var Roles;
362
382
  Roles["MEMBER"] = "member";
363
383
  })(Roles || (Roles = {}));
364
384
 
385
+ const denyList = new Set([
386
+ 'ENOTFOUND',
387
+ 'ENETUNREACH',
388
+
389
+ // SSL errors from https://github.com/nodejs/node/blob/fc8e3e2cdc521978351de257030db0076d79e0ab/src/crypto/crypto_common.cc#L301-L328
390
+ 'UNABLE_TO_GET_ISSUER_CERT',
391
+ 'UNABLE_TO_GET_CRL',
392
+ 'UNABLE_TO_DECRYPT_CERT_SIGNATURE',
393
+ 'UNABLE_TO_DECRYPT_CRL_SIGNATURE',
394
+ 'UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY',
395
+ 'CERT_SIGNATURE_FAILURE',
396
+ 'CRL_SIGNATURE_FAILURE',
397
+ 'CERT_NOT_YET_VALID',
398
+ 'CERT_HAS_EXPIRED',
399
+ 'CRL_NOT_YET_VALID',
400
+ 'CRL_HAS_EXPIRED',
401
+ 'ERROR_IN_CERT_NOT_BEFORE_FIELD',
402
+ 'ERROR_IN_CERT_NOT_AFTER_FIELD',
403
+ 'ERROR_IN_CRL_LAST_UPDATE_FIELD',
404
+ 'ERROR_IN_CRL_NEXT_UPDATE_FIELD',
405
+ 'OUT_OF_MEM',
406
+ 'DEPTH_ZERO_SELF_SIGNED_CERT',
407
+ 'SELF_SIGNED_CERT_IN_CHAIN',
408
+ 'UNABLE_TO_GET_ISSUER_CERT_LOCALLY',
409
+ 'UNABLE_TO_VERIFY_LEAF_SIGNATURE',
410
+ 'CERT_CHAIN_TOO_LONG',
411
+ 'CERT_REVOKED',
412
+ 'INVALID_CA',
413
+ 'PATH_LENGTH_EXCEEDED',
414
+ 'INVALID_PURPOSE',
415
+ 'CERT_UNTRUSTED',
416
+ 'CERT_REJECTED',
417
+ 'HOSTNAME_MISMATCH'
418
+ ]);
419
+
420
+ // TODO: Use `error?.code` when targeting Node.js 14
421
+ var isRetryAllowed = error => !denyList.has(error && error.code);
422
+
423
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
424
+
425
+ function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
426
+
427
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
428
+
429
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
430
+
431
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
432
+ var namespace = 'axios-retry';
433
+ /**
434
+ * @param {Error} error
435
+ * @return {boolean}
436
+ */
437
+
438
+ function isNetworkError(error) {
439
+ return !error.response && Boolean(error.code) && // Prevents retrying cancelled requests
440
+ error.code !== 'ECONNABORTED' && // Prevents retrying timed out requests
441
+ isRetryAllowed(error); // Prevents retrying unsafe errors
442
+ }
443
+ var SAFE_HTTP_METHODS = ['get', 'head', 'options'];
444
+ var IDEMPOTENT_HTTP_METHODS = SAFE_HTTP_METHODS.concat(['put', 'delete']);
445
+ /**
446
+ * @param {Error} error
447
+ * @return {boolean}
448
+ */
449
+
450
+ function isRetryableError(error) {
451
+ return error.code !== 'ECONNABORTED' && (!error.response || error.response.status >= 500 && error.response.status <= 599);
452
+ }
453
+ /**
454
+ * @param {Error} error
455
+ * @return {boolean}
456
+ */
457
+
458
+ function isSafeRequestError(error) {
459
+ if (!error.config) {
460
+ // Cannot determine if the request can be retried
461
+ return false;
462
+ }
463
+
464
+ return isRetryableError(error) && SAFE_HTTP_METHODS.indexOf(error.config.method) !== -1;
465
+ }
466
+ /**
467
+ * @param {Error} error
468
+ * @return {boolean}
469
+ */
470
+
471
+ function isIdempotentRequestError(error) {
472
+ if (!error.config) {
473
+ // Cannot determine if the request can be retried
474
+ return false;
475
+ }
476
+
477
+ return isRetryableError(error) && IDEMPOTENT_HTTP_METHODS.indexOf(error.config.method) !== -1;
478
+ }
479
+ /**
480
+ * @param {Error} error
481
+ * @return {boolean}
482
+ */
483
+
484
+ function isNetworkOrIdempotentRequestError(error) {
485
+ return isNetworkError(error) || isIdempotentRequestError(error);
486
+ }
487
+ /**
488
+ * @return {number} - delay in milliseconds, always 0
489
+ */
490
+
491
+ function noDelay() {
492
+ return 0;
493
+ }
494
+ /**
495
+ * @param {number} [retryNumber=0]
496
+ * @return {number} - delay in milliseconds
497
+ */
498
+
499
+
500
+ function exponentialDelay() {
501
+ var retryNumber = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
502
+ var delay = Math.pow(2, retryNumber) * 100;
503
+ var randomSum = delay * 0.2 * Math.random(); // 0-20% of the delay
504
+
505
+ return delay + randomSum;
506
+ }
507
+ /**
508
+ * Initializes and returns the retry state for the given request/config
509
+ * @param {AxiosRequestConfig} config
510
+ * @return {Object}
511
+ */
512
+
513
+ function getCurrentState(config) {
514
+ var currentState = config[namespace] || {};
515
+ currentState.retryCount = currentState.retryCount || 0;
516
+ config[namespace] = currentState;
517
+ return currentState;
518
+ }
519
+ /**
520
+ * Returns the axios-retry options for the current request
521
+ * @param {AxiosRequestConfig} config
522
+ * @param {AxiosRetryConfig} defaultOptions
523
+ * @return {AxiosRetryConfig}
524
+ */
525
+
526
+
527
+ function getRequestOptions(config, defaultOptions) {
528
+ return _objectSpread(_objectSpread({}, defaultOptions), config[namespace]);
529
+ }
530
+ /**
531
+ * @param {Axios} axios
532
+ * @param {AxiosRequestConfig} config
533
+ */
534
+
535
+
536
+ function fixConfig(axios, config) {
537
+ if (axios.defaults.agent === config.agent) {
538
+ delete config.agent;
539
+ }
540
+
541
+ if (axios.defaults.httpAgent === config.httpAgent) {
542
+ delete config.httpAgent;
543
+ }
544
+
545
+ if (axios.defaults.httpsAgent === config.httpsAgent) {
546
+ delete config.httpsAgent;
547
+ }
548
+ }
549
+ /**
550
+ * Checks retryCondition if request can be retried. Handles it's retruning value or Promise.
551
+ * @param {number} retries
552
+ * @param {Function} retryCondition
553
+ * @param {Object} currentState
554
+ * @param {Error} error
555
+ * @return {boolean}
556
+ */
557
+
558
+
559
+ function shouldRetry(_x, _x2, _x3, _x4) {
560
+ return _shouldRetry.apply(this, arguments);
561
+ }
562
+ /**
563
+ * Adds response interceptors to an axios instance to retry requests failed due to network issues
564
+ *
565
+ * @example
566
+ *
567
+ * import axios from 'axios';
568
+ *
569
+ * axiosRetry(axios, { retries: 3 });
570
+ *
571
+ * axios.get('http://example.com/test') // The first request fails and the second returns 'ok'
572
+ * .then(result => {
573
+ * result.data; // 'ok'
574
+ * });
575
+ *
576
+ * // Exponential back-off retry delay between requests
577
+ * axiosRetry(axios, { retryDelay : axiosRetry.exponentialDelay});
578
+ *
579
+ * // Custom retry delay
580
+ * axiosRetry(axios, { retryDelay : (retryCount) => {
581
+ * return retryCount * 1000;
582
+ * }});
583
+ *
584
+ * // Also works with custom axios instances
585
+ * const client = axios.create({ baseURL: 'http://example.com' });
586
+ * axiosRetry(client, { retries: 3 });
587
+ *
588
+ * client.get('/test') // The first request fails and the second returns 'ok'
589
+ * .then(result => {
590
+ * result.data; // 'ok'
591
+ * });
592
+ *
593
+ * // Allows request-specific configuration
594
+ * client
595
+ * .get('/test', {
596
+ * 'axios-retry': {
597
+ * retries: 0
598
+ * }
599
+ * })
600
+ * .catch(error => { // The first request fails
601
+ * error !== undefined
602
+ * });
603
+ *
604
+ * @param {Axios} axios An axios instance (the axios object or one created from axios.create)
605
+ * @param {Object} [defaultOptions]
606
+ * @param {number} [defaultOptions.retries=3] Number of retries
607
+ * @param {boolean} [defaultOptions.shouldResetTimeout=false]
608
+ * Defines if the timeout should be reset between retries
609
+ * @param {Function} [defaultOptions.retryCondition=isNetworkOrIdempotentRequestError]
610
+ * A function to determine if the error can be retried
611
+ * @param {Function} [defaultOptions.retryDelay=noDelay]
612
+ * A function to determine the delay between retry requests
613
+ * @param {Function} [defaultOptions.onRetry=()=>{}]
614
+ * A function to get notified when a retry occurs
615
+ */
616
+
617
+
618
+ function _shouldRetry() {
619
+ _shouldRetry = _asyncToGenerator(function* (retries, retryCondition, currentState, error) {
620
+ var shouldRetryOrPromise = currentState.retryCount < retries && retryCondition(error); // This could be a promise
621
+
622
+ if (typeof shouldRetryOrPromise === 'object') {
623
+ try {
624
+ var shouldRetryPromiseResult = yield shouldRetryOrPromise; // keep return true unless shouldRetryPromiseResult return false for compatibility
625
+
626
+ return shouldRetryPromiseResult !== false;
627
+ } catch (_err) {
628
+ return false;
629
+ }
630
+ }
631
+
632
+ return shouldRetryOrPromise;
633
+ });
634
+ return _shouldRetry.apply(this, arguments);
635
+ }
636
+
637
+ function axiosRetry(axios, defaultOptions) {
638
+ axios.interceptors.request.use(config => {
639
+ var currentState = getCurrentState(config);
640
+ currentState.lastRequestTime = Date.now();
641
+ return config;
642
+ });
643
+ axios.interceptors.response.use(null, /*#__PURE__*/function () {
644
+ var _ref = _asyncToGenerator(function* (error) {
645
+ var {
646
+ config
647
+ } = error; // If we have no information to retry the request
648
+
649
+ if (!config) {
650
+ return Promise.reject(error);
651
+ }
652
+
653
+ var {
654
+ retries = 3,
655
+ retryCondition = isNetworkOrIdempotentRequestError,
656
+ retryDelay = noDelay,
657
+ shouldResetTimeout = false,
658
+ onRetry = () => {}
659
+ } = getRequestOptions(config, defaultOptions);
660
+ var currentState = getCurrentState(config);
661
+
662
+ if (yield shouldRetry(retries, retryCondition, currentState, error)) {
663
+ currentState.retryCount += 1;
664
+ var delay = retryDelay(currentState.retryCount, error); // Axios fails merging this configuration to the default configuration because it has an issue
665
+ // with circular structures: https://github.com/mzabriskie/axios/issues/370
666
+
667
+ fixConfig(axios, config);
668
+
669
+ if (!shouldResetTimeout && config.timeout && currentState.lastRequestTime) {
670
+ var lastRequestDuration = Date.now() - currentState.lastRequestTime;
671
+ var timeout = config.timeout - lastRequestDuration - delay;
672
+
673
+ if (timeout <= 0) {
674
+ return Promise.reject(error);
675
+ }
676
+
677
+ config.timeout = timeout;
678
+ }
679
+
680
+ config.transformRequest = [data => data];
681
+ onRetry(currentState.retryCount, error, config);
682
+ return new Promise(resolve => setTimeout(() => resolve(axios(config)), delay));
683
+ }
684
+
685
+ return Promise.reject(error);
686
+ });
687
+
688
+ return function (_x5) {
689
+ return _ref.apply(this, arguments);
690
+ };
691
+ }());
692
+ } // Compatibility with CommonJS
693
+
694
+ axiosRetry.isNetworkError = isNetworkError;
695
+ axiosRetry.isSafeRequestError = isSafeRequestError;
696
+ axiosRetry.isIdempotentRequestError = isIdempotentRequestError;
697
+ axiosRetry.isNetworkOrIdempotentRequestError = isNetworkOrIdempotentRequestError;
698
+ axiosRetry.exponentialDelay = exponentialDelay;
699
+ axiosRetry.isRetryableError = isRetryableError;
700
+
365
701
  function bind(fn, thisArg) {
366
702
  return function wrap() {
367
703
  return fn.apply(thisArg, arguments);
@@ -1034,7 +1370,7 @@ const isAsyncFn = kindOfTest('AsyncFunction');
1034
1370
  const isThenable = (thing) =>
1035
1371
  thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);
1036
1372
 
1037
- const utils$1 = {
1373
+ const utils = {
1038
1374
  isArray,
1039
1375
  isArrayBuffer,
1040
1376
  isBuffer,
@@ -1116,7 +1452,7 @@ function AxiosError(message, code, config, request, response) {
1116
1452
  response && (this.response = response);
1117
1453
  }
1118
1454
 
1119
- utils$1.inherits(AxiosError, Error, {
1455
+ utils.inherits(AxiosError, Error, {
1120
1456
  toJSON: function toJSON() {
1121
1457
  return {
1122
1458
  // Standard
@@ -1131,7 +1467,7 @@ utils$1.inherits(AxiosError, Error, {
1131
1467
  columnNumber: this.columnNumber,
1132
1468
  stack: this.stack,
1133
1469
  // Axios
1134
- config: utils$1.toJSONObject(this.config),
1470
+ config: utils.toJSONObject(this.config),
1135
1471
  code: this.code,
1136
1472
  status: this.response && this.response.status ? this.response.status : null
1137
1473
  };
@@ -1166,7 +1502,7 @@ Object.defineProperty(prototype$1, 'isAxiosError', {value: true});
1166
1502
  AxiosError.from = (error, code, config, request, response, customProps) => {
1167
1503
  const axiosError = Object.create(prototype$1);
1168
1504
 
1169
- utils$1.toFlatObject(error, axiosError, function filter(obj) {
1505
+ utils.toFlatObject(error, axiosError, function filter(obj) {
1170
1506
  return obj !== Error.prototype;
1171
1507
  }, prop => {
1172
1508
  return prop !== 'isAxiosError';
@@ -1194,7 +1530,7 @@ const httpAdapter = null;
1194
1530
  * @returns {boolean}
1195
1531
  */
1196
1532
  function isVisitable(thing) {
1197
- return utils$1.isPlainObject(thing) || utils$1.isArray(thing);
1533
+ return utils.isPlainObject(thing) || utils.isArray(thing);
1198
1534
  }
1199
1535
 
1200
1536
  /**
@@ -1205,7 +1541,7 @@ function isVisitable(thing) {
1205
1541
  * @returns {string} the key without the brackets.
1206
1542
  */
1207
1543
  function removeBrackets(key) {
1208
- return utils$1.endsWith(key, '[]') ? key.slice(0, -2) : key;
1544
+ return utils.endsWith(key, '[]') ? key.slice(0, -2) : key;
1209
1545
  }
1210
1546
 
1211
1547
  /**
@@ -1234,10 +1570,10 @@ function renderKey(path, key, dots) {
1234
1570
  * @returns {boolean}
1235
1571
  */
1236
1572
  function isFlatArray(arr) {
1237
- return utils$1.isArray(arr) && !arr.some(isVisitable);
1573
+ return utils.isArray(arr) && !arr.some(isVisitable);
1238
1574
  }
1239
1575
 
1240
- const predicates = utils$1.toFlatObject(utils$1, {}, null, function filter(prop) {
1576
+ const predicates = utils.toFlatObject(utils, {}, null, function filter(prop) {
1241
1577
  return /^is[A-Z]/.test(prop);
1242
1578
  });
1243
1579
 
@@ -1265,7 +1601,7 @@ const predicates = utils$1.toFlatObject(utils$1, {}, null, function filter(prop)
1265
1601
  * @returns
1266
1602
  */
1267
1603
  function toFormData(obj, formData, options) {
1268
- if (!utils$1.isObject(obj)) {
1604
+ if (!utils.isObject(obj)) {
1269
1605
  throw new TypeError('target must be an object');
1270
1606
  }
1271
1607
 
@@ -1273,13 +1609,13 @@ function toFormData(obj, formData, options) {
1273
1609
  formData = formData || new (FormData)();
1274
1610
 
1275
1611
  // eslint-disable-next-line no-param-reassign
1276
- options = utils$1.toFlatObject(options, {
1612
+ options = utils.toFlatObject(options, {
1277
1613
  metaTokens: true,
1278
1614
  dots: false,
1279
1615
  indexes: false
1280
1616
  }, false, function defined(option, source) {
1281
1617
  // eslint-disable-next-line no-eq-null,eqeqeq
1282
- return !utils$1.isUndefined(source[option]);
1618
+ return !utils.isUndefined(source[option]);
1283
1619
  });
1284
1620
 
1285
1621
  const metaTokens = options.metaTokens;
@@ -1288,24 +1624,24 @@ function toFormData(obj, formData, options) {
1288
1624
  const dots = options.dots;
1289
1625
  const indexes = options.indexes;
1290
1626
  const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;
1291
- const useBlob = _Blob && utils$1.isSpecCompliantForm(formData);
1627
+ const useBlob = _Blob && utils.isSpecCompliantForm(formData);
1292
1628
 
1293
- if (!utils$1.isFunction(visitor)) {
1629
+ if (!utils.isFunction(visitor)) {
1294
1630
  throw new TypeError('visitor must be a function');
1295
1631
  }
1296
1632
 
1297
1633
  function convertValue(value) {
1298
1634
  if (value === null) return '';
1299
1635
 
1300
- if (utils$1.isDate(value)) {
1636
+ if (utils.isDate(value)) {
1301
1637
  return value.toISOString();
1302
1638
  }
1303
1639
 
1304
- if (!useBlob && utils$1.isBlob(value)) {
1640
+ if (!useBlob && utils.isBlob(value)) {
1305
1641
  throw new AxiosError('Blob is not supported. Use a Buffer instead.');
1306
1642
  }
1307
1643
 
1308
- if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {
1644
+ if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {
1309
1645
  return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);
1310
1646
  }
1311
1647
 
@@ -1326,20 +1662,20 @@ function toFormData(obj, formData, options) {
1326
1662
  let arr = value;
1327
1663
 
1328
1664
  if (value && !path && typeof value === 'object') {
1329
- if (utils$1.endsWith(key, '{}')) {
1665
+ if (utils.endsWith(key, '{}')) {
1330
1666
  // eslint-disable-next-line no-param-reassign
1331
1667
  key = metaTokens ? key : key.slice(0, -2);
1332
1668
  // eslint-disable-next-line no-param-reassign
1333
1669
  value = JSON.stringify(value);
1334
1670
  } else if (
1335
- (utils$1.isArray(value) && isFlatArray(value)) ||
1336
- ((utils$1.isFileList(value) || utils$1.endsWith(key, '[]')) && (arr = utils$1.toArray(value))
1671
+ (utils.isArray(value) && isFlatArray(value)) ||
1672
+ ((utils.isFileList(value) || utils.endsWith(key, '[]')) && (arr = utils.toArray(value))
1337
1673
  )) {
1338
1674
  // eslint-disable-next-line no-param-reassign
1339
1675
  key = removeBrackets(key);
1340
1676
 
1341
1677
  arr.forEach(function each(el, index) {
1342
- !(utils$1.isUndefined(el) || el === null) && formData.append(
1678
+ !(utils.isUndefined(el) || el === null) && formData.append(
1343
1679
  // eslint-disable-next-line no-nested-ternary
1344
1680
  indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),
1345
1681
  convertValue(el)
@@ -1367,7 +1703,7 @@ function toFormData(obj, formData, options) {
1367
1703
  });
1368
1704
 
1369
1705
  function build(value, path) {
1370
- if (utils$1.isUndefined(value)) return;
1706
+ if (utils.isUndefined(value)) return;
1371
1707
 
1372
1708
  if (stack.indexOf(value) !== -1) {
1373
1709
  throw Error('Circular reference detected in ' + path.join('.'));
@@ -1375,9 +1711,9 @@ function toFormData(obj, formData, options) {
1375
1711
 
1376
1712
  stack.push(value);
1377
1713
 
1378
- utils$1.forEach(value, function each(el, key) {
1379
- const result = !(utils$1.isUndefined(el) || el === null) && visitor.call(
1380
- formData, el, utils$1.isString(key) ? key.trim() : key, path, exposedHelpers
1714
+ utils.forEach(value, function each(el, key) {
1715
+ const result = !(utils.isUndefined(el) || el === null) && visitor.call(
1716
+ formData, el, utils.isString(key) ? key.trim() : key, path, exposedHelpers
1381
1717
  );
1382
1718
 
1383
1719
  if (result === true) {
@@ -1388,7 +1724,7 @@ function toFormData(obj, formData, options) {
1388
1724
  stack.pop();
1389
1725
  }
1390
1726
 
1391
- if (!utils$1.isObject(obj)) {
1727
+ if (!utils.isObject(obj)) {
1392
1728
  throw new TypeError('data must be an object');
1393
1729
  }
1394
1730
 
@@ -1492,7 +1828,7 @@ function buildURL(url, params, options) {
1492
1828
  if (serializeFn) {
1493
1829
  serializedParams = serializeFn(params, options);
1494
1830
  } else {
1495
- serializedParams = utils$1.isURLSearchParams(params) ?
1831
+ serializedParams = utils.isURLSearchParams(params) ?
1496
1832
  params.toString() :
1497
1833
  new AxiosURLSearchParams(params, options).toString(_encode);
1498
1834
  }
@@ -1567,7 +1903,7 @@ class InterceptorManager {
1567
1903
  * @returns {void}
1568
1904
  */
1569
1905
  forEach(fn) {
1570
- utils$1.forEach(this.handlers, function forEachHandler(h) {
1906
+ utils.forEach(this.handlers, function forEachHandler(h) {
1571
1907
  if (h !== null) {
1572
1908
  fn(h);
1573
1909
  }
@@ -1587,18 +1923,6 @@ const FormData$1 = typeof FormData !== 'undefined' ? FormData : null;
1587
1923
 
1588
1924
  const Blob$1 = typeof Blob !== 'undefined' ? Blob : null;
1589
1925
 
1590
- const platform$1 = {
1591
- isBrowser: true,
1592
- classes: {
1593
- URLSearchParams: URLSearchParams$1,
1594
- FormData: FormData$1,
1595
- Blob: Blob$1
1596
- },
1597
- protocols: ['http', 'https', 'file', 'blob', 'url', 'data']
1598
- };
1599
-
1600
- const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';
1601
-
1602
1926
  /**
1603
1927
  * Determine if we're running in a standard browser environment
1604
1928
  *
@@ -1616,10 +1940,18 @@ const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'unde
1616
1940
  *
1617
1941
  * @returns {boolean}
1618
1942
  */
1619
- const hasStandardBrowserEnv = (
1620
- (product) => {
1621
- return hasBrowserEnv && ['ReactNative', 'NativeScript', 'NS'].indexOf(product) < 0
1622
- })(typeof navigator !== 'undefined' && navigator.product);
1943
+ const isStandardBrowserEnv = (() => {
1944
+ let product;
1945
+ if (typeof navigator !== 'undefined' && (
1946
+ (product = navigator.product) === 'ReactNative' ||
1947
+ product === 'NativeScript' ||
1948
+ product === 'NS')
1949
+ ) {
1950
+ return false;
1951
+ }
1952
+
1953
+ return typeof window !== 'undefined' && typeof document !== 'undefined';
1954
+ })();
1623
1955
 
1624
1956
  /**
1625
1957
  * Determine if we're running in a standard browser webWorker environment
@@ -1630,7 +1962,7 @@ const hasStandardBrowserEnv = (
1630
1962
  * `typeof window !== 'undefined' && typeof document !== 'undefined'`.
1631
1963
  * This leads to a problem when axios post `FormData` in webWorker
1632
1964
  */
1633
- const hasStandardBrowserWebWorkerEnv = (() => {
1965
+ const isStandardBrowserWebWorkerEnv = (() => {
1634
1966
  return (
1635
1967
  typeof WorkerGlobalScope !== 'undefined' &&
1636
1968
  // eslint-disable-next-line no-undef
@@ -1639,25 +1971,22 @@ const hasStandardBrowserWebWorkerEnv = (() => {
1639
1971
  );
1640
1972
  })();
1641
1973
 
1642
- const utils = /*#__PURE__*/Object.freeze({
1643
- __proto__: null,
1644
- hasBrowserEnv: hasBrowserEnv,
1645
- hasStandardBrowserWebWorkerEnv: hasStandardBrowserWebWorkerEnv,
1646
- hasStandardBrowserEnv: hasStandardBrowserEnv
1647
- });
1648
1974
 
1649
1975
  const platform = {
1650
- ...utils,
1651
- ...platform$1
1976
+ isBrowser: true,
1977
+ classes: {
1978
+ URLSearchParams: URLSearchParams$1,
1979
+ FormData: FormData$1,
1980
+ Blob: Blob$1
1981
+ },
1982
+ isStandardBrowserEnv,
1983
+ isStandardBrowserWebWorkerEnv,
1984
+ protocols: ['http', 'https', 'file', 'blob', 'url', 'data']
1652
1985
  };
1653
1986
 
1654
1987
  function toURLEncodedForm(data, options) {
1655
1988
  return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({
1656
1989
  visitor: function(value, key, path, helpers) {
1657
- if (platform.isNode && utils$1.isBuffer(value)) {
1658
- this.append(key, value.toString('base64'));
1659
- return false;
1660
- }
1661
1990
 
1662
1991
  return helpers.defaultVisitor.apply(this, arguments);
1663
1992
  }
@@ -1676,7 +2005,7 @@ function parsePropPath(name) {
1676
2005
  // foo.x.y.z
1677
2006
  // foo-x-y-z
1678
2007
  // foo x y z
1679
- return utils$1.matchAll(/\w+|\[(\w*)]/g, name).map(match => {
2008
+ return utils.matchAll(/\w+|\[(\w*)]/g, name).map(match => {
1680
2009
  return match[0] === '[]' ? '' : match[1] || match[0];
1681
2010
  });
1682
2011
  }
@@ -1713,10 +2042,10 @@ function formDataToJSON(formData) {
1713
2042
  let name = path[index++];
1714
2043
  const isNumericKey = Number.isFinite(+name);
1715
2044
  const isLast = index >= path.length;
1716
- name = !name && utils$1.isArray(target) ? target.length : name;
2045
+ name = !name && utils.isArray(target) ? target.length : name;
1717
2046
 
1718
2047
  if (isLast) {
1719
- if (utils$1.hasOwnProp(target, name)) {
2048
+ if (utils.hasOwnProp(target, name)) {
1720
2049
  target[name] = [target[name], value];
1721
2050
  } else {
1722
2051
  target[name] = value;
@@ -1725,23 +2054,23 @@ function formDataToJSON(formData) {
1725
2054
  return !isNumericKey;
1726
2055
  }
1727
2056
 
1728
- if (!target[name] || !utils$1.isObject(target[name])) {
2057
+ if (!target[name] || !utils.isObject(target[name])) {
1729
2058
  target[name] = [];
1730
2059
  }
1731
2060
 
1732
2061
  const result = buildPath(path, value, target[name], index);
1733
2062
 
1734
- if (result && utils$1.isArray(target[name])) {
2063
+ if (result && utils.isArray(target[name])) {
1735
2064
  target[name] = arrayToObject(target[name]);
1736
2065
  }
1737
2066
 
1738
2067
  return !isNumericKey;
1739
2068
  }
1740
2069
 
1741
- if (utils$1.isFormData(formData) && utils$1.isFunction(formData.entries)) {
2070
+ if (utils.isFormData(formData) && utils.isFunction(formData.entries)) {
1742
2071
  const obj = {};
1743
2072
 
1744
- utils$1.forEachEntry(formData, (name, value) => {
2073
+ utils.forEachEntry(formData, (name, value) => {
1745
2074
  buildPath(parsePropPath(name), value, obj, 0);
1746
2075
  });
1747
2076
 
@@ -1762,10 +2091,10 @@ function formDataToJSON(formData) {
1762
2091
  * @returns {string} A stringified version of the rawValue.
1763
2092
  */
1764
2093
  function stringifySafely(rawValue, parser, encoder) {
1765
- if (utils$1.isString(rawValue)) {
2094
+ if (utils.isString(rawValue)) {
1766
2095
  try {
1767
2096
  (parser || JSON.parse)(rawValue);
1768
- return utils$1.trim(rawValue);
2097
+ return utils.trim(rawValue);
1769
2098
  } catch (e) {
1770
2099
  if (e.name !== 'SyntaxError') {
1771
2100
  throw e;
@@ -1785,13 +2114,13 @@ const defaults = {
1785
2114
  transformRequest: [function transformRequest(data, headers) {
1786
2115
  const contentType = headers.getContentType() || '';
1787
2116
  const hasJSONContentType = contentType.indexOf('application/json') > -1;
1788
- const isObjectPayload = utils$1.isObject(data);
2117
+ const isObjectPayload = utils.isObject(data);
1789
2118
 
1790
- if (isObjectPayload && utils$1.isHTMLForm(data)) {
2119
+ if (isObjectPayload && utils.isHTMLForm(data)) {
1791
2120
  data = new FormData(data);
1792
2121
  }
1793
2122
 
1794
- const isFormData = utils$1.isFormData(data);
2123
+ const isFormData = utils.isFormData(data);
1795
2124
 
1796
2125
  if (isFormData) {
1797
2126
  if (!hasJSONContentType) {
@@ -1800,18 +2129,18 @@ const defaults = {
1800
2129
  return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
1801
2130
  }
1802
2131
 
1803
- if (utils$1.isArrayBuffer(data) ||
1804
- utils$1.isBuffer(data) ||
1805
- utils$1.isStream(data) ||
1806
- utils$1.isFile(data) ||
1807
- utils$1.isBlob(data)
2132
+ if (utils.isArrayBuffer(data) ||
2133
+ utils.isBuffer(data) ||
2134
+ utils.isStream(data) ||
2135
+ utils.isFile(data) ||
2136
+ utils.isBlob(data)
1808
2137
  ) {
1809
2138
  return data;
1810
2139
  }
1811
- if (utils$1.isArrayBufferView(data)) {
2140
+ if (utils.isArrayBufferView(data)) {
1812
2141
  return data.buffer;
1813
2142
  }
1814
- if (utils$1.isURLSearchParams(data)) {
2143
+ if (utils.isURLSearchParams(data)) {
1815
2144
  headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);
1816
2145
  return data.toString();
1817
2146
  }
@@ -1823,7 +2152,7 @@ const defaults = {
1823
2152
  return toURLEncodedForm(data, this.formSerializer).toString();
1824
2153
  }
1825
2154
 
1826
- if ((isFileList = utils$1.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {
2155
+ if ((isFileList = utils.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {
1827
2156
  const _FormData = this.env && this.env.FormData;
1828
2157
 
1829
2158
  return toFormData(
@@ -1847,7 +2176,7 @@ const defaults = {
1847
2176
  const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
1848
2177
  const JSONRequested = this.responseType === 'json';
1849
2178
 
1850
- if (data && utils$1.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {
2179
+ if (data && utils.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {
1851
2180
  const silentJSONParsing = transitional && transitional.silentJSONParsing;
1852
2181
  const strictJSONParsing = !silentJSONParsing && JSONRequested;
1853
2182
 
@@ -1895,13 +2224,13 @@ const defaults = {
1895
2224
  }
1896
2225
  };
1897
2226
 
1898
- utils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {
2227
+ utils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {
1899
2228
  defaults.headers[method] = {};
1900
2229
  });
1901
2230
 
1902
2231
  // RawAxiosHeaders whose duplicates are ignored by node
1903
2232
  // c.f. https://nodejs.org/api/http.html#http_message_headers
1904
- const ignoreDuplicateOf = utils$1.toObjectSet([
2233
+ const ignoreDuplicateOf = utils.toObjectSet([
1905
2234
  'age', 'authorization', 'content-length', 'content-type', 'etag',
1906
2235
  'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',
1907
2236
  'last-modified', 'location', 'max-forwards', 'proxy-authorization',
@@ -1962,7 +2291,7 @@ function normalizeValue(value) {
1962
2291
  return value;
1963
2292
  }
1964
2293
 
1965
- return utils$1.isArray(value) ? value.map(normalizeValue) : String(value);
2294
+ return utils.isArray(value) ? value.map(normalizeValue) : String(value);
1966
2295
  }
1967
2296
 
1968
2297
  function parseTokens(str) {
@@ -1980,7 +2309,7 @@ function parseTokens(str) {
1980
2309
  const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
1981
2310
 
1982
2311
  function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
1983
- if (utils$1.isFunction(filter)) {
2312
+ if (utils.isFunction(filter)) {
1984
2313
  return filter.call(this, value, header);
1985
2314
  }
1986
2315
 
@@ -1988,13 +2317,13 @@ function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
1988
2317
  value = header;
1989
2318
  }
1990
2319
 
1991
- if (!utils$1.isString(value)) return;
2320
+ if (!utils.isString(value)) return;
1992
2321
 
1993
- if (utils$1.isString(filter)) {
2322
+ if (utils.isString(filter)) {
1994
2323
  return value.indexOf(filter) !== -1;
1995
2324
  }
1996
2325
 
1997
- if (utils$1.isRegExp(filter)) {
2326
+ if (utils.isRegExp(filter)) {
1998
2327
  return filter.test(value);
1999
2328
  }
2000
2329
  }
@@ -2007,7 +2336,7 @@ function formatHeader(header) {
2007
2336
  }
2008
2337
 
2009
2338
  function buildAccessors(obj, header) {
2010
- const accessorName = utils$1.toCamelCase(' ' + header);
2339
+ const accessorName = utils.toCamelCase(' ' + header);
2011
2340
 
2012
2341
  ['get', 'set', 'has'].forEach(methodName => {
2013
2342
  Object.defineProperty(obj, methodName + accessorName, {
@@ -2034,7 +2363,7 @@ class AxiosHeaders {
2034
2363
  throw new Error('header name must be a non-empty string');
2035
2364
  }
2036
2365
 
2037
- const key = utils$1.findKey(self, lHeader);
2366
+ const key = utils.findKey(self, lHeader);
2038
2367
 
2039
2368
  if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {
2040
2369
  self[key || _header] = normalizeValue(_value);
@@ -2042,11 +2371,11 @@ class AxiosHeaders {
2042
2371
  }
2043
2372
 
2044
2373
  const setHeaders = (headers, _rewrite) =>
2045
- utils$1.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
2374
+ utils.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
2046
2375
 
2047
- if (utils$1.isPlainObject(header) || header instanceof this.constructor) {
2376
+ if (utils.isPlainObject(header) || header instanceof this.constructor) {
2048
2377
  setHeaders(header, valueOrRewrite);
2049
- } else if(utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
2378
+ } else if(utils.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
2050
2379
  setHeaders(parseHeaders(header), valueOrRewrite);
2051
2380
  } else {
2052
2381
  header != null && setHeader(valueOrRewrite, header, rewrite);
@@ -2059,7 +2388,7 @@ class AxiosHeaders {
2059
2388
  header = normalizeHeader(header);
2060
2389
 
2061
2390
  if (header) {
2062
- const key = utils$1.findKey(this, header);
2391
+ const key = utils.findKey(this, header);
2063
2392
 
2064
2393
  if (key) {
2065
2394
  const value = this[key];
@@ -2072,11 +2401,11 @@ class AxiosHeaders {
2072
2401
  return parseTokens(value);
2073
2402
  }
2074
2403
 
2075
- if (utils$1.isFunction(parser)) {
2404
+ if (utils.isFunction(parser)) {
2076
2405
  return parser.call(this, value, key);
2077
2406
  }
2078
2407
 
2079
- if (utils$1.isRegExp(parser)) {
2408
+ if (utils.isRegExp(parser)) {
2080
2409
  return parser.exec(value);
2081
2410
  }
2082
2411
 
@@ -2089,7 +2418,7 @@ class AxiosHeaders {
2089
2418
  header = normalizeHeader(header);
2090
2419
 
2091
2420
  if (header) {
2092
- const key = utils$1.findKey(this, header);
2421
+ const key = utils.findKey(this, header);
2093
2422
 
2094
2423
  return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
2095
2424
  }
@@ -2105,7 +2434,7 @@ class AxiosHeaders {
2105
2434
  _header = normalizeHeader(_header);
2106
2435
 
2107
2436
  if (_header) {
2108
- const key = utils$1.findKey(self, _header);
2437
+ const key = utils.findKey(self, _header);
2109
2438
 
2110
2439
  if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {
2111
2440
  delete self[key];
@@ -2115,7 +2444,7 @@ class AxiosHeaders {
2115
2444
  }
2116
2445
  }
2117
2446
 
2118
- if (utils$1.isArray(header)) {
2447
+ if (utils.isArray(header)) {
2119
2448
  header.forEach(deleteHeader);
2120
2449
  } else {
2121
2450
  deleteHeader(header);
@@ -2144,8 +2473,8 @@ class AxiosHeaders {
2144
2473
  const self = this;
2145
2474
  const headers = {};
2146
2475
 
2147
- utils$1.forEach(this, (value, header) => {
2148
- const key = utils$1.findKey(headers, header);
2476
+ utils.forEach(this, (value, header) => {
2477
+ const key = utils.findKey(headers, header);
2149
2478
 
2150
2479
  if (key) {
2151
2480
  self[key] = normalizeValue(value);
@@ -2174,8 +2503,8 @@ class AxiosHeaders {
2174
2503
  toJSON(asStrings) {
2175
2504
  const obj = Object.create(null);
2176
2505
 
2177
- utils$1.forEach(this, (value, header) => {
2178
- value != null && value !== false && (obj[header] = asStrings && utils$1.isArray(value) ? value.join(', ') : value);
2506
+ utils.forEach(this, (value, header) => {
2507
+ value != null && value !== false && (obj[header] = asStrings && utils.isArray(value) ? value.join(', ') : value);
2179
2508
  });
2180
2509
 
2181
2510
  return obj;
@@ -2222,7 +2551,7 @@ class AxiosHeaders {
2222
2551
  }
2223
2552
  }
2224
2553
 
2225
- utils$1.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
2554
+ utils.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
2226
2555
 
2227
2556
  return this;
2228
2557
  }
@@ -2231,7 +2560,7 @@ class AxiosHeaders {
2231
2560
  AxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);
2232
2561
 
2233
2562
  // reserved names hotfix
2234
- utils$1.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {
2563
+ utils.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {
2235
2564
  let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`
2236
2565
  return {
2237
2566
  get: () => value,
@@ -2241,7 +2570,7 @@ utils$1.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {
2241
2570
  }
2242
2571
  });
2243
2572
 
2244
- utils$1.freezeMethods(AxiosHeaders);
2573
+ utils.freezeMethods(AxiosHeaders);
2245
2574
 
2246
2575
  /**
2247
2576
  * Transform the data for a request or a response
@@ -2257,7 +2586,7 @@ function transformData(fns, response) {
2257
2586
  const headers = AxiosHeaders.from(context.headers);
2258
2587
  let data = context.data;
2259
2588
 
2260
- utils$1.forEach(fns, function transform(fn) {
2589
+ utils.forEach(fns, function transform(fn) {
2261
2590
  data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);
2262
2591
  });
2263
2592
 
@@ -2285,7 +2614,7 @@ function CanceledError(message, config, request) {
2285
2614
  this.name = 'CanceledError';
2286
2615
  }
2287
2616
 
2288
- utils$1.inherits(CanceledError, AxiosError, {
2617
+ utils.inherits(CanceledError, AxiosError, {
2289
2618
  __CANCEL__: true
2290
2619
  });
2291
2620
 
@@ -2313,44 +2642,53 @@ function settle(resolve, reject, response) {
2313
2642
  }
2314
2643
  }
2315
2644
 
2316
- const cookies = platform.hasStandardBrowserEnv ?
2317
-
2318
- // Standard browser envs support document.cookie
2319
- {
2320
- write(name, value, expires, path, domain, secure) {
2321
- const cookie = [name + '=' + encodeURIComponent(value)];
2645
+ const cookies = platform.isStandardBrowserEnv ?
2322
2646
 
2323
- utils$1.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());
2647
+ // Standard browser envs support document.cookie
2648
+ (function standardBrowserEnv() {
2649
+ return {
2650
+ write: function write(name, value, expires, path, domain, secure) {
2651
+ const cookie = [];
2652
+ cookie.push(name + '=' + encodeURIComponent(value));
2324
2653
 
2325
- utils$1.isString(path) && cookie.push('path=' + path);
2654
+ if (utils.isNumber(expires)) {
2655
+ cookie.push('expires=' + new Date(expires).toGMTString());
2656
+ }
2326
2657
 
2327
- utils$1.isString(domain) && cookie.push('domain=' + domain);
2658
+ if (utils.isString(path)) {
2659
+ cookie.push('path=' + path);
2660
+ }
2328
2661
 
2329
- secure === true && cookie.push('secure');
2662
+ if (utils.isString(domain)) {
2663
+ cookie.push('domain=' + domain);
2664
+ }
2330
2665
 
2331
- document.cookie = cookie.join('; ');
2332
- },
2666
+ if (secure === true) {
2667
+ cookie.push('secure');
2668
+ }
2333
2669
 
2334
- read(name) {
2335
- const match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
2336
- return (match ? decodeURIComponent(match[3]) : null);
2337
- },
2670
+ document.cookie = cookie.join('; ');
2671
+ },
2338
2672
 
2339
- remove(name) {
2340
- this.write(name, '', Date.now() - 86400000);
2341
- }
2342
- }
2673
+ read: function read(name) {
2674
+ const match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
2675
+ return (match ? decodeURIComponent(match[3]) : null);
2676
+ },
2343
2677
 
2344
- :
2678
+ remove: function remove(name) {
2679
+ this.write(name, '', Date.now() - 86400000);
2680
+ }
2681
+ };
2682
+ })() :
2345
2683
 
2346
- // Non-standard browser env (web workers, react-native) lack needed support.
2347
- {
2348
- write() {},
2349
- read() {
2350
- return null;
2351
- },
2352
- remove() {}
2353
- };
2684
+ // Non standard browser env (web workers, react-native) lack needed support.
2685
+ (function nonStandardBrowserEnv() {
2686
+ return {
2687
+ write: function write() {},
2688
+ read: function read() { return null; },
2689
+ remove: function remove() {}
2690
+ };
2691
+ })();
2354
2692
 
2355
2693
  /**
2356
2694
  * Determines whether the specified URL is absolute
@@ -2397,7 +2735,7 @@ function buildFullPath(baseURL, requestedURL) {
2397
2735
  return requestedURL;
2398
2736
  }
2399
2737
 
2400
- const isURLSameOrigin = platform.hasStandardBrowserEnv ?
2738
+ const isURLSameOrigin = platform.isStandardBrowserEnv ?
2401
2739
 
2402
2740
  // Standard browser envs have full support of the APIs needed to test
2403
2741
  // whether the request URL is of the same origin as current location.
@@ -2407,7 +2745,7 @@ const isURLSameOrigin = platform.hasStandardBrowserEnv ?
2407
2745
  let originURL;
2408
2746
 
2409
2747
  /**
2410
- * Parse a URL to discover its components
2748
+ * Parse a URL to discover it's components
2411
2749
  *
2412
2750
  * @param {String} url The URL to be parsed
2413
2751
  * @returns {Object}
@@ -2447,7 +2785,7 @@ const isURLSameOrigin = platform.hasStandardBrowserEnv ?
2447
2785
  * @returns {boolean} True if URL shares the same origin, otherwise false
2448
2786
  */
2449
2787
  return function isURLSameOrigin(requestURL) {
2450
- const parsed = (utils$1.isString(requestURL)) ? resolveURL(requestURL) : requestURL;
2788
+ const parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;
2451
2789
  return (parsed.protocol === originURL.protocol &&
2452
2790
  parsed.host === originURL.host);
2453
2791
  };
@@ -2552,7 +2890,7 @@ const xhrAdapter = isXHRAdapterSupported && function (config) {
2552
2890
  return new Promise(function dispatchXhrRequest(resolve, reject) {
2553
2891
  let requestData = config.data;
2554
2892
  const requestHeaders = AxiosHeaders.from(config.headers).normalize();
2555
- let {responseType, withXSRFToken} = config;
2893
+ const responseType = config.responseType;
2556
2894
  let onCanceled;
2557
2895
  function done() {
2558
2896
  if (config.cancelToken) {
@@ -2566,13 +2904,14 @@ const xhrAdapter = isXHRAdapterSupported && function (config) {
2566
2904
 
2567
2905
  let contentType;
2568
2906
 
2569
- if (utils$1.isFormData(requestData)) {
2570
- if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
2907
+ if (utils.isFormData(requestData)) {
2908
+ if (platform.isStandardBrowserEnv || platform.isStandardBrowserWebWorkerEnv) {
2571
2909
  requestHeaders.setContentType(false); // Let the browser set it
2572
- } else if ((contentType = requestHeaders.getContentType()) !== false) {
2910
+ } else if(!requestHeaders.getContentType(/^\s*multipart\/form-data/)){
2911
+ requestHeaders.setContentType('multipart/form-data'); // mobile/desktop app frameworks
2912
+ } else if(utils.isString(contentType = requestHeaders.getContentType())){
2573
2913
  // fix semicolon duplication issue for ReactNative FormData implementation
2574
- const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];
2575
- requestHeaders.setContentType([type || 'multipart/form-data', ...tokens].join('; '));
2914
+ requestHeaders.setContentType(contentType.replace(/^\s*(multipart\/form-data);+/, '$1'));
2576
2915
  }
2577
2916
  }
2578
2917
 
@@ -2688,16 +3027,13 @@ const xhrAdapter = isXHRAdapterSupported && function (config) {
2688
3027
  // Add xsrf header
2689
3028
  // This is only done if running in a standard browser environment.
2690
3029
  // Specifically not if we're in a web worker, or react-native.
2691
- if(platform.hasStandardBrowserEnv) {
2692
- withXSRFToken && utils$1.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config));
2693
-
2694
- if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(fullPath))) {
2695
- // Add xsrf header
2696
- const xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && cookies.read(config.xsrfCookieName);
3030
+ if (platform.isStandardBrowserEnv) {
3031
+ // Add xsrf header
3032
+ const xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath))
3033
+ && config.xsrfCookieName && cookies.read(config.xsrfCookieName);
2697
3034
 
2698
- if (xsrfValue) {
2699
- requestHeaders.set(config.xsrfHeaderName, xsrfValue);
2700
- }
3035
+ if (xsrfValue) {
3036
+ requestHeaders.set(config.xsrfHeaderName, xsrfValue);
2701
3037
  }
2702
3038
  }
2703
3039
 
@@ -2706,13 +3042,13 @@ const xhrAdapter = isXHRAdapterSupported && function (config) {
2706
3042
 
2707
3043
  // Add headers to the request
2708
3044
  if ('setRequestHeader' in request) {
2709
- utils$1.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
3045
+ utils.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
2710
3046
  request.setRequestHeader(key, val);
2711
3047
  });
2712
3048
  }
2713
3049
 
2714
3050
  // Add withCredentials to request if needed
2715
- if (!utils$1.isUndefined(config.withCredentials)) {
3051
+ if (!utils.isUndefined(config.withCredentials)) {
2716
3052
  request.withCredentials = !!config.withCredentials;
2717
3053
  }
2718
3054
 
@@ -2767,7 +3103,7 @@ const knownAdapters = {
2767
3103
  xhr: xhrAdapter
2768
3104
  };
2769
3105
 
2770
- utils$1.forEach(knownAdapters, (fn, value) => {
3106
+ utils.forEach(knownAdapters, (fn, value) => {
2771
3107
  if (fn) {
2772
3108
  try {
2773
3109
  Object.defineProperty(fn, 'name', {value});
@@ -2780,11 +3116,11 @@ utils$1.forEach(knownAdapters, (fn, value) => {
2780
3116
 
2781
3117
  const renderReason = (reason) => `- ${reason}`;
2782
3118
 
2783
- const isResolvedHandle = (adapter) => utils$1.isFunction(adapter) || adapter === null || adapter === false;
3119
+ const isResolvedHandle = (adapter) => utils.isFunction(adapter) || adapter === null || adapter === false;
2784
3120
 
2785
3121
  const adapters = {
2786
3122
  getAdapter: (adapters) => {
2787
- adapters = utils$1.isArray(adapters) ? adapters : [adapters];
3123
+ adapters = utils.isArray(adapters) ? adapters : [adapters];
2788
3124
 
2789
3125
  const {length} = adapters;
2790
3126
  let nameOrAdapter;
@@ -2925,11 +3261,11 @@ function mergeConfig(config1, config2) {
2925
3261
  const config = {};
2926
3262
 
2927
3263
  function getMergedValue(target, source, caseless) {
2928
- if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {
2929
- return utils$1.merge.call({caseless}, target, source);
2930
- } else if (utils$1.isPlainObject(source)) {
2931
- return utils$1.merge({}, source);
2932
- } else if (utils$1.isArray(source)) {
3264
+ if (utils.isPlainObject(target) && utils.isPlainObject(source)) {
3265
+ return utils.merge.call({caseless}, target, source);
3266
+ } else if (utils.isPlainObject(source)) {
3267
+ return utils.merge({}, source);
3268
+ } else if (utils.isArray(source)) {
2933
3269
  return source.slice();
2934
3270
  }
2935
3271
  return source;
@@ -2937,25 +3273,25 @@ function mergeConfig(config1, config2) {
2937
3273
 
2938
3274
  // eslint-disable-next-line consistent-return
2939
3275
  function mergeDeepProperties(a, b, caseless) {
2940
- if (!utils$1.isUndefined(b)) {
3276
+ if (!utils.isUndefined(b)) {
2941
3277
  return getMergedValue(a, b, caseless);
2942
- } else if (!utils$1.isUndefined(a)) {
3278
+ } else if (!utils.isUndefined(a)) {
2943
3279
  return getMergedValue(undefined, a, caseless);
2944
3280
  }
2945
3281
  }
2946
3282
 
2947
3283
  // eslint-disable-next-line consistent-return
2948
3284
  function valueFromConfig2(a, b) {
2949
- if (!utils$1.isUndefined(b)) {
3285
+ if (!utils.isUndefined(b)) {
2950
3286
  return getMergedValue(undefined, b);
2951
3287
  }
2952
3288
  }
2953
3289
 
2954
3290
  // eslint-disable-next-line consistent-return
2955
3291
  function defaultToConfig2(a, b) {
2956
- if (!utils$1.isUndefined(b)) {
3292
+ if (!utils.isUndefined(b)) {
2957
3293
  return getMergedValue(undefined, b);
2958
- } else if (!utils$1.isUndefined(a)) {
3294
+ } else if (!utils.isUndefined(a)) {
2959
3295
  return getMergedValue(undefined, a);
2960
3296
  }
2961
3297
  }
@@ -2980,7 +3316,6 @@ function mergeConfig(config1, config2) {
2980
3316
  timeout: defaultToConfig2,
2981
3317
  timeoutMessage: defaultToConfig2,
2982
3318
  withCredentials: defaultToConfig2,
2983
- withXSRFToken: defaultToConfig2,
2984
3319
  adapter: defaultToConfig2,
2985
3320
  responseType: defaultToConfig2,
2986
3321
  xsrfCookieName: defaultToConfig2,
@@ -3001,16 +3336,16 @@ function mergeConfig(config1, config2) {
3001
3336
  headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)
3002
3337
  };
3003
3338
 
3004
- utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
3339
+ utils.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
3005
3340
  const merge = mergeMap[prop] || mergeDeepProperties;
3006
3341
  const configValue = merge(config1[prop], config2[prop], prop);
3007
- (utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
3342
+ (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
3008
3343
  });
3009
3344
 
3010
3345
  return config;
3011
3346
  }
3012
3347
 
3013
- const VERSION = "1.6.2";
3348
+ const VERSION = "1.5.1";
3014
3349
 
3015
3350
  const validators$1 = {};
3016
3351
 
@@ -3148,7 +3483,7 @@ class Axios {
3148
3483
  }
3149
3484
 
3150
3485
  if (paramsSerializer != null) {
3151
- if (utils$1.isFunction(paramsSerializer)) {
3486
+ if (utils.isFunction(paramsSerializer)) {
3152
3487
  config.paramsSerializer = {
3153
3488
  serialize: paramsSerializer
3154
3489
  };
@@ -3164,12 +3499,12 @@ class Axios {
3164
3499
  config.method = (config.method || this.defaults.method || 'get').toLowerCase();
3165
3500
 
3166
3501
  // Flatten headers
3167
- let contextHeaders = headers && utils$1.merge(
3502
+ let contextHeaders = headers && utils.merge(
3168
3503
  headers.common,
3169
3504
  headers[config.method]
3170
3505
  );
3171
3506
 
3172
- headers && utils$1.forEach(
3507
+ headers && utils.forEach(
3173
3508
  ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
3174
3509
  (method) => {
3175
3510
  delete headers[method];
@@ -3256,7 +3591,7 @@ class Axios {
3256
3591
  }
3257
3592
 
3258
3593
  // Provide aliases for supported request methods
3259
- utils$1.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
3594
+ utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
3260
3595
  /*eslint func-names:0*/
3261
3596
  Axios.prototype[method] = function(url, config) {
3262
3597
  return this.request(mergeConfig(config || {}, {
@@ -3267,7 +3602,7 @@ utils$1.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoDa
3267
3602
  };
3268
3603
  });
3269
3604
 
3270
- utils$1.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
3605
+ utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
3271
3606
  /*eslint func-names:0*/
3272
3607
 
3273
3608
  function generateHTTPMethod(isForm) {
@@ -3439,7 +3774,7 @@ function spread(callback) {
3439
3774
  * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
3440
3775
  */
3441
3776
  function isAxiosError(payload) {
3442
- return utils$1.isObject(payload) && (payload.isAxiosError === true);
3777
+ return utils.isObject(payload) && (payload.isAxiosError === true);
3443
3778
  }
3444
3779
 
3445
3780
  const HttpStatusCode = {
@@ -3524,10 +3859,10 @@ function createInstance(defaultConfig) {
3524
3859
  const instance = bind(Axios.prototype.request, context);
3525
3860
 
3526
3861
  // Copy axios.prototype to instance
3527
- utils$1.extend(instance, Axios.prototype, context, {allOwnKeys: true});
3862
+ utils.extend(instance, Axios.prototype, context, {allOwnKeys: true});
3528
3863
 
3529
3864
  // Copy context to instance
3530
- utils$1.extend(instance, context, null, {allOwnKeys: true});
3865
+ utils.extend(instance, context, null, {allOwnKeys: true});
3531
3866
 
3532
3867
  // Factory for creating new instances
3533
3868
  instance.create = function create(instanceConfig) {
@@ -3571,7 +3906,7 @@ axios.mergeConfig = mergeConfig;
3571
3906
 
3572
3907
  axios.AxiosHeaders = AxiosHeaders;
3573
3908
 
3574
- axios.formToJSON = thing => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing);
3909
+ axios.formToJSON = thing => formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);
3575
3910
 
3576
3911
  axios.getAdapter = adapters.getAdapter;
3577
3912
 
@@ -3657,7 +3992,7 @@ var requestLogger = function (r) {
3657
3992
  * .setSessionType('signing')
3658
3993
  * .logRequests(true)
3659
3994
  * .setClientID('1234)
3660
- * .setTimeout(30000);
3995
+ * .setTimeout(5000);
3661
3996
  * ```
3662
3997
  */
3663
3998
  var VerdocsEndpoint = /** @class */ (function () {
@@ -3672,9 +4007,8 @@ var VerdocsEndpoint = /** @class */ (function () {
3672
4007
  function VerdocsEndpoint(options) {
3673
4008
  this.environment = 'verdocs';
3674
4009
  this.sessionType = 'user';
3675
- this.baseURL = (window.location.origin === 'https://beta.verdocs.com'
3676
- ? 'https://stage-api.verdocs.com'
3677
- : 'https://api.verdocs.com');
4010
+ this.baseURL = 'https://api.verdocs.com';
4011
+ this.baseURLv2 = 'https://api-v2.verdocs.com';
3678
4012
  this.clientID = 'not-set';
3679
4013
  this.timeout = 60000;
3680
4014
  this.token = null;
@@ -3687,12 +4021,21 @@ var VerdocsEndpoint = /** @class */ (function () {
3687
4021
  * with Envelopes.
3688
4022
  */
3689
4023
  this.session = null;
3690
- this.baseURL = (options === null || options === void 0 ? void 0 : options.baseURL) || this.baseURL;
3691
- this.timeout = (options === null || options === void 0 ? void 0 : options.timeout) || this.timeout;
3692
- this.environment = (options === null || options === void 0 ? void 0 : options.environment) || this.environment;
3693
- this.sessionType = (options === null || options === void 0 ? void 0 : options.sessionType) || this.sessionType;
3694
- this.clientID = (options === null || options === void 0 ? void 0 : options.clientID) || this.clientID;
4024
+ this.baseURL = (options === null || options === void 0 ? void 0 : options.baseURL) || 'https://api.verdocs.com';
4025
+ this.baseURLv2 = (options === null || options === void 0 ? void 0 : options.baseURLv2) || 'https://api-v2.verdocs.com';
4026
+ this.timeout = (options === null || options === void 0 ? void 0 : options.timeout) || 60000;
4027
+ this.environment = (options === null || options === void 0 ? void 0 : options.environment) || 'verdocs';
4028
+ this.sessionType = (options === null || options === void 0 ? void 0 : options.sessionType) || 'user';
4029
+ this.clientID = (options === null || options === void 0 ? void 0 : options.clientID) || 'not-set';
3695
4030
  this.api = axios.create({ baseURL: this.baseURL, timeout: this.timeout });
4031
+ // We set the default retries to zero because we only actually want this feature on certain calls for now
4032
+ axiosRetry(this.api, {
4033
+ retries: 0,
4034
+ retryDelay: axiosRetry.exponentialDelay,
4035
+ onRetry: function (retryCount, error, requestConfig) {
4036
+ window.console.debug("[JS_SDK] Retrying request (".concat(retryCount, ")"), error.message, requestConfig.url);
4037
+ },
4038
+ });
3696
4039
  }
3697
4040
  VerdocsEndpoint.prototype.setDefault = function () {
3698
4041
  globalThis_1[ENDPOINT_KEY] = this;
@@ -3700,7 +4043,7 @@ var VerdocsEndpoint = /** @class */ (function () {
3700
4043
  VerdocsEndpoint.getDefault = function () {
3701
4044
  if (!globalThis_1[ENDPOINT_KEY]) {
3702
4045
  globalThis_1[ENDPOINT_KEY] = new VerdocsEndpoint();
3703
- window.console.debug('[JS_SDK] Created default endpoint', globalThis_1[ENDPOINT_KEY].baseURL);
4046
+ window.console.debug('[JS_SDK] Created default endpoint', globalThis_1[ENDPOINT_KEY]);
3704
4047
  }
3705
4048
  return globalThis_1[ENDPOINT_KEY];
3706
4049
  };
@@ -3722,6 +4065,13 @@ var VerdocsEndpoint = /** @class */ (function () {
3722
4065
  VerdocsEndpoint.prototype.getBaseURL = function () {
3723
4066
  return this.baseURL;
3724
4067
  };
4068
+ /**
4069
+ * Get the current base URL for the v2 APIs.
4070
+ * This should rarely be anything other than 'https://api-v2.verdocs.com'.
4071
+ */
4072
+ VerdocsEndpoint.prototype.getBaseURLv2 = function () {
4073
+ return this.baseURLv2;
4074
+ };
3725
4075
  /**
3726
4076
  * Get the current client ID, if set.
3727
4077
  */
@@ -3789,6 +4139,21 @@ var VerdocsEndpoint = /** @class */ (function () {
3789
4139
  this.api.defaults.baseURL = url;
3790
4140
  return this;
3791
4141
  };
4142
+ /**
4143
+ * Set the base URL for API calls. Should be called only upon direction from Verdocs Customer Solutions Engineering.
4144
+ *
4145
+ * ```typescript
4146
+ * import {VerdocsEndpoint} from '@verdocs/js-sdk/HTTP';
4147
+ *
4148
+ * const endpoint = new VerdocsEndpoint();
4149
+ * endpoint.setBaseURL('https://api.verdocs.com');
4150
+ * ```
4151
+ */
4152
+ VerdocsEndpoint.prototype.setBaseURLv2 = function (url) {
4153
+ this.baseURLv2 = url;
4154
+ // NOTE: We do not set this on the Axios instance because v1 is still the standard.
4155
+ return this;
4156
+ };
3792
4157
  /**
3793
4158
  * Set the Client ID for Verdocs API calls.
3794
4159
  *
@@ -3949,8 +4314,9 @@ var VerdocsEndpoint = /** @class */ (function () {
3949
4314
 
3950
4315
  exports.VerdocsEndpoint = VerdocsEndpoint;
3951
4316
  exports.canPerformTemplateAction = canPerformTemplateAction;
3952
- exports.createTemplatev2 = createTemplatev2;
4317
+ exports.createTemplate = createTemplate;
3953
4318
  exports.deleteTemplate = deleteTemplate;
3954
4319
  exports.getTemplate = getTemplate;
4320
+ exports.getTemplates = getTemplates;
3955
4321
  exports.listTemplates = listTemplates;
3956
4322
  exports.updateTemplate = updateTemplate;