@verdocs/web-sdk 2.3.14 → 2.3.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{EnvelopeStore-f8c301e1.js → EnvelopeStore-efc35530.js} +1 -1
- package/dist/cjs/{Envelopes-99ca79fe.js → Envelopes-0b9deb2c.js} +2 -6
- package/dist/cjs/{Profiles-54271244.js → Profiles-1a26e4eb.js} +0 -34
- package/dist/cjs/TemplateFieldStore-7449e5ff.js +24 -0
- package/dist/cjs/{TemplateStore-d9936a68.js → TemplateStore-0074c71d.js} +3 -1
- package/dist/cjs/{Types-ee5afdf8.js → Types-fb95ed6b.js} +2 -1
- package/dist/cjs/{VerdocsEndpoint-2d85658d.js → VerdocsEndpoint-8f298664.js} +197 -563
- package/dist/cjs/{_commonjsHelpers-0c557e26.js → _commonjsHelpers-1fbbf0eb.js} +0 -5
- package/dist/cjs/interact.min-a61b43b3.js +12 -0
- package/dist/cjs/ipc-test.cjs.entry.js +3 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{utils-2ddfdf9e.js → utils-0916d10f.js} +3 -3
- package/dist/cjs/verdocs-activity-box.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-auth.cjs.entry.js +8 -34
- package/dist/cjs/verdocs-build.cjs.entry.js +3 -2
- package/dist/cjs/verdocs-button-panel_2.cjs.entry.js +71 -45
- package/dist/cjs/{verdocs-contact-picker_2.cjs.entry.js → verdocs-contact-picker_3.cjs.entry.js} +78 -6
- package/dist/cjs/verdocs-envelope-document-page.cjs.entry.js +5 -5
- package/dist/cjs/verdocs-envelope-recipient-link_2.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-envelope-sidebar.cjs.entry.js +5 -4
- package/dist/cjs/verdocs-envelopes-list.cjs.entry.js +5 -5
- package/dist/cjs/verdocs-field-attachment.cjs.entry.js +4 -4
- package/dist/cjs/verdocs-field-checkbox.cjs.entry.js +4 -4
- package/dist/cjs/verdocs-field-date.cjs.entry.js +5 -5
- package/dist/cjs/verdocs-field-dropdown.cjs.entry.js +4 -5
- package/dist/cjs/verdocs-field-initial.cjs.entry.js +4 -4
- package/dist/cjs/verdocs-field-payment.cjs.entry.js +4 -4
- package/dist/cjs/verdocs-field-radio-button.cjs.entry.js +4 -4
- package/dist/cjs/verdocs-field-signature.cjs.entry.js +4 -4
- package/dist/cjs/verdocs-field-textarea.cjs.entry.js +10 -9
- package/dist/cjs/verdocs-field-textbox.cjs.entry.js +19 -10
- package/dist/cjs/verdocs-field-timestamp.cjs.entry.js +5 -5
- package/dist/cjs/verdocs-file-chooser_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-ok-dialog.cjs.entry.js +2 -1
- package/dist/cjs/verdocs-pagination_2.cjs.entry.js +4 -4
- package/dist/cjs/verdocs-preview_8.cjs.entry.js +10 -8
- package/dist/cjs/verdocs-quick-functions_2.cjs.entry.js +79 -0
- package/dist/cjs/verdocs-search.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-settings-api-keys_4.cjs.entry.js +70 -37
- package/dist/cjs/verdocs-settings.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-sign.cjs.entry.js +12 -9
- package/dist/cjs/verdocs-template-document-page_2.cjs.entry.js +5 -5
- package/dist/cjs/verdocs-template-fields_4.cjs.entry.js +92 -80
- package/dist/cjs/verdocs-template-star.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-templates-list.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-view.cjs.entry.js +5 -5
- package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/controls/verdocs-portal/verdocs-portal.css +0 -0
- package/dist/collection/components/controls/verdocs-portal/verdocs-portal.js +181 -0
- package/dist/collection/components/controls/verdocs-portal/verdocs-portal.stories.js +20 -0
- package/dist/collection/components/dialogs/verdocs-ok-dialog/verdocs-ok-dialog.js +20 -1
- package/dist/collection/components/embeds/verdocs-auth/verdocs-auth.js +6 -34
- package/dist/collection/components/embeds/verdocs-send/verdocs-send.js +2 -1
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +8 -4
- package/dist/collection/components/envelopes/verdocs-contact-picker/verdocs-contact-picker.css +4 -1
- package/dist/collection/components/envelopes/verdocs-envelope-sidebar/verdocs-envelope-sidebar.js +1 -0
- package/dist/collection/components/fields/verdocs-field-date/verdocs-field-date.css +1 -0
- package/dist/collection/components/fields/verdocs-field-dropdown/verdocs-field-dropdown.js +0 -1
- package/dist/collection/components/fields/verdocs-field-textarea/verdocs-field-textarea.js +2 -1
- package/dist/collection/components/fields/verdocs-field-textbox/verdocs-field-textbox.css +1 -1
- package/dist/collection/components/fields/verdocs-field-textbox/verdocs-field-textbox.js +27 -1
- package/dist/collection/components/fields/verdocs-field-timestamp/verdocs-field-timestamp.css +1 -0
- package/dist/collection/components/templates/verdocs-template-create/verdocs-template-create.js +2 -2
- package/dist/collection/components/templates/verdocs-template-field-properties/verdocs-template-field-properties.js +71 -44
- package/dist/collection/components/templates/verdocs-template-fields/verdocs-template-fields.js +80 -68
- package/dist/collection/utils/TemplateFieldStore.js +18 -0
- package/dist/collection/utils/TemplateStore.js +2 -0
- package/dist/collection/utils/Types.js +2 -1
- package/dist/components/Envelopes.js +2 -6
- package/dist/components/TemplateStore.js +21 -2
- package/dist/components/Types2.js +2 -1
- package/dist/components/VerdocsEndpoint.js +197 -562
- package/dist/components/_commonjsHelpers.js +1 -5
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/index3.js +40 -29
- package/dist/components/interact.min.js +5 -6
- package/dist/components/verdocs-auth.js +12 -46
- package/dist/components/verdocs-build.js +22 -16
- package/dist/components/verdocs-contact-picker2.js +1 -1
- package/dist/components/verdocs-envelope-sidebar.js +1 -0
- package/dist/components/verdocs-field-date.js +1 -1
- package/dist/components/verdocs-field-dropdown.js +0 -1
- package/dist/components/verdocs-field-textarea.js +5 -4
- package/dist/components/verdocs-field-textbox.js +14 -5
- package/dist/components/verdocs-field-timestamp.js +1 -1
- package/dist/components/verdocs-ok-dialog2.js +3 -1
- package/dist/components/verdocs-portal.d.ts +11 -0
- package/dist/components/verdocs-portal.js +6 -0
- package/dist/components/verdocs-portal2.js +93 -0
- package/dist/components/verdocs-preview2.js +1 -1
- package/dist/components/verdocs-search.js +2 -8
- package/dist/components/verdocs-send2.js +12 -5
- package/dist/components/verdocs-settings-organization2.js +22 -1
- package/dist/components/verdocs-sign.js +8 -4
- package/dist/components/verdocs-template-create2.js +2 -2
- package/dist/components/verdocs-template-field-properties2.js +71 -45
- package/dist/components/verdocs-template-fields2.js +83 -72
- package/dist/components/verdocs-template-roles2.js +4 -4
- package/dist/docs.json +156 -108
- package/dist/esm/{EnvelopeStore-15cc99ef.js → EnvelopeStore-17c0bc52.js} +1 -1
- package/dist/esm/{Envelopes-21ffb899.js → Envelopes-627c5239.js} +2 -6
- package/dist/esm/{Profiles-4cc942ef.js → Profiles-d4df4d1c.js} +1 -32
- package/dist/esm/TemplateFieldStore-4f1b6332.js +21 -0
- package/dist/esm/{TemplateStore-018fc1db.js → TemplateStore-a2ebdaca.js} +3 -1
- package/dist/esm/Types-1628dc71.js +5 -0
- package/dist/esm/{VerdocsEndpoint-b011af25.js → VerdocsEndpoint-56fa3371.js} +197 -562
- package/dist/esm/{_commonjsHelpers-5ec8f9b7.js → _commonjsHelpers-8a9f3b18.js} +1 -5
- package/dist/esm/interact.min-6a7b19a1.js +10 -0
- package/dist/esm/ipc-test.entry.js +3 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{utils-d269cea3.js → utils-ca3121df.js} +3 -3
- package/dist/esm/verdocs-activity-box.entry.js +2 -2
- package/dist/esm/verdocs-auth.entry.js +8 -34
- package/dist/esm/verdocs-build.entry.js +3 -2
- package/dist/esm/verdocs-button-panel_2.entry.js +71 -45
- package/dist/esm/{verdocs-contact-picker_2.entry.js → verdocs-contact-picker_3.entry.js} +78 -7
- package/dist/esm/verdocs-envelope-document-page.entry.js +5 -5
- package/dist/esm/verdocs-envelope-recipient-link_2.entry.js +3 -3
- package/dist/esm/verdocs-envelope-sidebar.entry.js +5 -4
- package/dist/esm/verdocs-envelopes-list.entry.js +5 -5
- package/dist/esm/verdocs-field-attachment.entry.js +4 -4
- package/dist/esm/verdocs-field-checkbox.entry.js +4 -4
- package/dist/esm/verdocs-field-date.entry.js +5 -5
- package/dist/esm/verdocs-field-dropdown.entry.js +4 -5
- package/dist/esm/verdocs-field-initial.entry.js +4 -4
- package/dist/esm/verdocs-field-payment.entry.js +4 -4
- package/dist/esm/verdocs-field-radio-button.entry.js +4 -4
- package/dist/esm/verdocs-field-signature.entry.js +4 -4
- package/dist/esm/verdocs-field-textarea.entry.js +10 -9
- package/dist/esm/verdocs-field-textbox.entry.js +19 -10
- package/dist/esm/verdocs-field-timestamp.entry.js +5 -5
- package/dist/esm/verdocs-file-chooser_2.entry.js +1 -1
- package/dist/esm/verdocs-ok-dialog.entry.js +2 -1
- package/dist/esm/verdocs-pagination_2.entry.js +4 -4
- package/dist/esm/verdocs-preview_8.entry.js +10 -8
- package/dist/esm/verdocs-quick-functions_2.entry.js +74 -0
- package/dist/esm/verdocs-search.entry.js +1 -1
- package/dist/esm/verdocs-settings-api-keys_4.entry.js +68 -35
- package/dist/esm/verdocs-settings.entry.js +1 -1
- package/dist/esm/verdocs-sign.entry.js +12 -9
- package/dist/esm/verdocs-template-document-page_2.entry.js +5 -5
- package/dist/esm/verdocs-template-fields_4.entry.js +92 -80
- package/dist/esm/verdocs-template-star.entry.js +1 -1
- package/dist/esm/verdocs-templates-list.entry.js +1 -1
- package/dist/esm/verdocs-view.entry.js +5 -5
- package/dist/esm/verdocs-web-sdk.js +1 -1
- package/dist/esm-es5/{EnvelopeStore-15cc99ef.js → EnvelopeStore-17c0bc52.js} +1 -1
- package/dist/esm-es5/Envelopes-627c5239.js +1 -0
- package/dist/esm-es5/Profiles-d4df4d1c.js +1 -0
- package/dist/esm-es5/TemplateFieldStore-4f1b6332.js +1 -0
- package/dist/esm-es5/TemplateStore-a2ebdaca.js +1 -0
- package/dist/esm-es5/Types-1628dc71.js +1 -0
- package/dist/esm-es5/VerdocsEndpoint-56fa3371.js +1 -0
- package/dist/esm-es5/_commonjsHelpers-8a9f3b18.js +1 -0
- package/dist/esm-es5/interact.min-6a7b19a1.js +1 -0
- package/dist/esm-es5/ipc-test.entry.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{utils-d269cea3.js → utils-ca3121df.js} +2 -2
- package/dist/esm-es5/verdocs-activity-box.entry.js +1 -1
- package/dist/esm-es5/verdocs-auth.entry.js +1 -1
- package/dist/esm-es5/verdocs-build.entry.js +1 -1
- package/dist/esm-es5/verdocs-button-panel_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-contact-picker_3.entry.js +1 -0
- package/dist/esm-es5/verdocs-envelope-document-page.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelope-recipient-link_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelope-sidebar.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelopes-list.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-attachment.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-checkbox.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-date.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-dropdown.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-initial.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-payment.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-radio-button.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-signature.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-textarea.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-textbox.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-timestamp.entry.js +1 -1
- package/dist/esm-es5/verdocs-file-chooser_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-ok-dialog.entry.js +1 -1
- package/dist/esm-es5/verdocs-pagination_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-preview_8.entry.js +1 -1
- package/dist/esm-es5/verdocs-quick-functions_2.entry.js +1 -0
- package/dist/esm-es5/verdocs-search.entry.js +1 -1
- package/dist/esm-es5/verdocs-settings-api-keys_4.entry.js +1 -1
- package/dist/esm-es5/verdocs-settings.entry.js +1 -1
- package/dist/esm-es5/verdocs-sign.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-document-page_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-fields_4.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-star.entry.js +1 -1
- package/dist/esm-es5/verdocs-templates-list.entry.js +1 -1
- package/dist/esm-es5/verdocs-view.entry.js +1 -1
- package/dist/esm-es5/verdocs-web-sdk.js +1 -1
- package/dist/types/components/controls/verdocs-portal/verdocs-portal.d.ts +37 -0
- package/dist/types/components/{elements/verdocs-search-activity/verdocs-search-activity.stories.d.ts → controls/verdocs-portal/verdocs-portal.stories.d.ts} +3 -6
- package/dist/types/components/dialogs/verdocs-ok-dialog/verdocs-ok-dialog.d.ts +4 -0
- package/dist/types/components/embeds/verdocs-auth/verdocs-auth.d.ts +0 -2
- package/dist/types/components/embeds/verdocs-sign/verdocs-sign.d.ts +1 -0
- package/dist/types/components/fields/verdocs-field-textbox/verdocs-field-textbox.d.ts +7 -0
- package/dist/types/components/templates/verdocs-template-field-properties/verdocs-template-field-properties.d.ts +8 -5
- package/dist/types/components/templates/verdocs-template-fields/verdocs-template-fields.d.ts +4 -2
- package/dist/types/components.d.ts +58 -34
- package/dist/types/utils/TemplateFieldStore.d.ts +6 -0
- package/dist/types/utils/TemplateStore.d.ts +1 -1
- package/dist/types/utils/Types.d.ts +1 -1
- package/dist/types/utils/utils.d.ts +2 -2
- package/dist/verdocs-web-sdk/{p-a35314fe.js → p-02a71e03.js} +1 -1
- package/dist/verdocs-web-sdk/{p-7805f0e0.entry.js → p-035a3ce2.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-035f6b38.js +1 -0
- package/dist/verdocs-web-sdk/{p-1406ffd2.entry.js → p-05e6bc91.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-10af7aec.system.entry.js → p-0685d939.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-084c23e4.system.js +1 -0
- package/dist/verdocs-web-sdk/p-0abf0058.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-12d00a0f.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-17598002.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-04d7d759.system.entry.js → p-17bf98f2.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-1a7aa04b.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-1ba9f457.system.js +1 -0
- package/dist/verdocs-web-sdk/{p-2f04fb38.system.entry.js → p-1cb878c8.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-261d376e.system.entry.js → p-1e38b22f.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-ebc4142c.js → p-1f78be32.js} +1 -1
- package/dist/verdocs-web-sdk/p-22e0d2bc.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-4f439363.entry.js → p-2ccbf54d.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-319c00bd.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-32c40388.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-358aef29.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-77abc3ce.entry.js → p-37dfdc84.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-3cd0d440.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-3e607686.js +1 -0
- package/dist/verdocs-web-sdk/{p-a171983b.system.entry.js → p-3f3807b0.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-8da1555a.entry.js → p-410c63e6.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-429cad70.js +1 -0
- package/dist/verdocs-web-sdk/{p-3a702f79.entry.js → p-46624bec.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a0b02d83.system.entry.js → p-4d98f194.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-af3e9624.entry.js → p-4e47ed1c.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-4e74bb3c.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-588d6cea.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-e3a9d167.system.entry.js → p-59769c39.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-126ba5d2.system.entry.js → p-5aa77f6d.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-5bf12ef8.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-39cbfe15.entry.js → p-6331d113.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-9b07a2a7.entry.js → p-637187de.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-df6a373e.system.entry.js → p-6685ff29.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-6dd69d82.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-72978ba3.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-736fbb87.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-76f8c30a.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-7b30c523.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-7d5dbd9a.js +1 -0
- package/dist/verdocs-web-sdk/{p-eef694e8.entry.js → p-82d4afbf.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-839f6f0d.js +1 -0
- package/dist/verdocs-web-sdk/{p-c694cf93.system.js → p-840827b7.system.js} +1 -1
- package/dist/verdocs-web-sdk/{p-62f090c7.system.entry.js → p-870707e8.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-8aae8d16.system.js +1 -0
- package/dist/verdocs-web-sdk/{p-14aefeb2.system.entry.js → p-8af68516.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-ace35be6.entry.js → p-8b0a5309.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-8dc15d33.js +1 -0
- package/dist/verdocs-web-sdk/p-915883e6.js +1 -0
- package/dist/verdocs-web-sdk/{p-aa51514f.system.entry.js → p-9360b085.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a310f65b.entry.js → p-94009f45.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-7e8d64fb.system.js → p-9615b087.system.js} +1 -1
- package/dist/verdocs-web-sdk/p-9bf2d124.system.js +1 -0
- package/dist/verdocs-web-sdk/{p-5c50a778.system.entry.js → p-9ceff040.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-9fc06f7b.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-0df58c57.entry.js → p-a40b3946.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-a627881e.system.js +1 -0
- package/dist/verdocs-web-sdk/p-aae6b4e0.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-35769d0c.system.entry.js → p-ac98f6f1.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-bd0bc3dd.system.entry.js → p-acc873cf.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-50ac71f3.system.entry.js → p-b6231fd3.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-609c7fab.system.entry.js → p-b648ab63.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a52a832b.system.entry.js → p-b7a815e9.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-b91de346.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-0e5449d1.system.entry.js → p-ba653c39.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-bd9ba3b3.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-3abfff14.entry.js → p-c80237f9.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-cd20fb77.system.js +1 -0
- package/dist/verdocs-web-sdk/{p-6bda7dce.entry.js → p-cf703fe4.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-d0a09719.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-013d1556.system.entry.js → p-d1ea580b.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-37187046.system.entry.js → p-d39e4a26.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-137cedc8.entry.js → p-d59b6988.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-d61fda4b.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-d8cd6b59.system.js +1 -0
- package/dist/verdocs-web-sdk/{p-b73415c3.system.entry.js → p-d99a05e4.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-dc2ad047.js +1 -0
- package/dist/verdocs-web-sdk/{p-0f94d635.entry.js → p-dd2c2edc.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-79dc4f76.entry.js → p-e1bc55f8.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-e28878eb.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-e2ae3679.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-e2ff37fb.system.js +1 -0
- package/dist/verdocs-web-sdk/p-e3ffc00f.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-e4dc3264.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-cf765153.entry.js → p-eeca4c30.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-f04bf956.system.js +1 -1
- package/dist/verdocs-web-sdk/{p-3f9fbf94.entry.js → p-f42c84f1.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-dd8845d4.system.entry.js → p-f6b7439f.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/package.json +8 -7
- package/dist/cjs/interact.min-ba5cc513.js +0 -13
- package/dist/cjs/verdocs-quick-functions_3.cjs.entry.js +0 -220
- package/dist/collection/components/elements/verdocs-search-activity/verdocs-search-activity.css +0 -66
- package/dist/collection/components/elements/verdocs-search-activity/verdocs-search-activity.js +0 -187
- package/dist/collection/components/elements/verdocs-search-activity/verdocs-search-activity.stories.js +0 -14
- package/dist/components/Organizations.js +0 -32
- package/dist/components/verdocs-search-activity.d.ts +0 -11
- package/dist/components/verdocs-search-activity.js +0 -6
- package/dist/components/verdocs-search-activity2.js +0 -170
- package/dist/esm/Types-de18e225.js +0 -4
- package/dist/esm/interact.min-cf83fa88.js +0 -11
- package/dist/esm/verdocs-quick-functions_3.entry.js +0 -214
- package/dist/esm-es5/Envelopes-21ffb899.js +0 -1
- package/dist/esm-es5/Profiles-4cc942ef.js +0 -1
- package/dist/esm-es5/TemplateStore-018fc1db.js +0 -1
- package/dist/esm-es5/Types-de18e225.js +0 -1
- package/dist/esm-es5/VerdocsEndpoint-b011af25.js +0 -1
- package/dist/esm-es5/_commonjsHelpers-5ec8f9b7.js +0 -1
- package/dist/esm-es5/interact.min-cf83fa88.js +0 -1
- package/dist/esm-es5/verdocs-contact-picker_2.entry.js +0 -1
- package/dist/esm-es5/verdocs-quick-functions_3.entry.js +0 -1
- package/dist/types/components/elements/verdocs-search-activity/verdocs-search-activity.d.ts +0 -33
- package/dist/verdocs-web-sdk/p-01166179.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-04580be0.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-0ad1fd33.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-0d28cf05.js +0 -1
- package/dist/verdocs-web-sdk/p-15cb963a.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-17d0e5f4.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-23be436b.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-2ccbcfeb.system.js +0 -1
- package/dist/verdocs-web-sdk/p-30b4bd45.js +0 -1
- package/dist/verdocs-web-sdk/p-3305a941.system.js +0 -1
- package/dist/verdocs-web-sdk/p-343672f5.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-409e992a.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-4a94ee00.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-51756c1b.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-5a91bf23.js +0 -1
- package/dist/verdocs-web-sdk/p-5df0fa7a.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-6307e6ae.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-66d66e2b.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-76907130.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-7b63017c.js +0 -1
- package/dist/verdocs-web-sdk/p-7fd7152d.system.js +0 -1
- package/dist/verdocs-web-sdk/p-89aa696c.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-961708ac.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-983da2f6.js +0 -1
- package/dist/verdocs-web-sdk/p-9934f3ec.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-a5425a9b.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-b17a20b8.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-b2d698f7.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-bb2c866b.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-bbee73c8.system.js +0 -1
- package/dist/verdocs-web-sdk/p-bfcf8ad2.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-cbbf849f.system.js +0 -1
- package/dist/verdocs-web-sdk/p-cbd0802f.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-de60d3a8.js +0 -1
- package/dist/verdocs-web-sdk/p-eab67c09.js +0 -1
- package/dist/verdocs-web-sdk/p-eb595245.system.js +0 -1
- package/dist/verdocs-web-sdk/p-ecf04564.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-ee195e5e.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-f1257cd0.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-f65a1b9e.system.js +0 -1
- package/dist/verdocs-web-sdk/p-fde6b724.entry.js +0 -1
@@ -147,23 +147,6 @@ var __generator = (undefined && undefined.__generator) || function (thisArg, bod
|
|
147
147
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
148
148
|
}
|
149
149
|
};
|
150
|
-
/**
|
151
|
-
* Get all templates accessible by the caller, with optional filters.
|
152
|
-
*
|
153
|
-
* ```typescript
|
154
|
-
* import {Templates} from '@verdocs/js-sdk/Templates';
|
155
|
-
*
|
156
|
-
* await Templates.getTemplates((VerdocsEndpoint.getDefault());
|
157
|
-
* await Templates.getTemplates((VerdocsEndpoint.getDefault(), { is_starred: true });
|
158
|
-
* await Templates.getTemplates((VerdocsEndpoint.getDefault(), { is_creator: true });
|
159
|
-
* await Templates.getTemplates((VerdocsEndpoint.getDefault(), { is_organization: true });
|
160
|
-
* ```
|
161
|
-
*/
|
162
|
-
var getTemplates = function (endpoint, params) {
|
163
|
-
return endpoint.api //
|
164
|
-
.post('/templates', { params: params })
|
165
|
-
.then(function (r) { return r.data; });
|
166
|
-
};
|
167
150
|
// export interface IListTemplatesParams {
|
168
151
|
// name?: string;
|
169
152
|
// sharing?: 'all' | 'personal' | 'shared' | 'public';
|
@@ -215,10 +198,10 @@ var ALLOWED_CREATE_FIELDS = [
|
|
215
198
|
* ```typescript
|
216
199
|
* import {Templates} from '@verdocs/js-sdk/Templates';
|
217
200
|
*
|
218
|
-
* const newTemplate = await Templates.
|
201
|
+
* const newTemplate = await Templates.createTemplatev2((VerdocsEndpoint.getDefault(), {...});
|
219
202
|
* ```
|
220
203
|
*/
|
221
|
-
var
|
204
|
+
var createTemplatev2 = function (endpoint, params, onUploadProgress) {
|
222
205
|
var options = {
|
223
206
|
timeout: 120000,
|
224
207
|
onUploadProgress: function (event) {
|
@@ -228,22 +211,19 @@ var createTemplate = function (endpoint, params, onUploadProgress) {
|
|
228
211
|
},
|
229
212
|
};
|
230
213
|
if (params.documents && params.documents[0] instanceof File) {
|
231
|
-
|
232
|
-
throw new Error('createTemplate() has a maximum of 10 documents that can be attached.');
|
233
|
-
}
|
234
|
-
var formData_1 = new FormData();
|
214
|
+
var formData_2 = new FormData();
|
235
215
|
ALLOWED_CREATE_FIELDS.forEach(function (allowedKey) {
|
236
216
|
if (params[allowedKey] !== undefined) {
|
237
|
-
|
217
|
+
formData_2.append(allowedKey, params[allowedKey]);
|
238
218
|
}
|
239
219
|
});
|
240
220
|
params.documents.forEach(function (file) {
|
241
|
-
|
221
|
+
formData_2.append('documents', file, file.name);
|
242
222
|
});
|
243
|
-
return endpoint.api.post('/templates',
|
223
|
+
return endpoint.api.post('/v2/templates', formData_2, options).then(function (r) { return r.data; });
|
244
224
|
}
|
245
225
|
else {
|
246
|
-
return endpoint.api.post('/templates', params, options).then(function (r) { return r.data; });
|
226
|
+
return endpoint.api.post('/v2/templates', params, options).then(function (r) { return r.data; });
|
247
227
|
}
|
248
228
|
};
|
249
229
|
/**
|
@@ -380,322 +360,6 @@ var Roles;
|
|
380
360
|
Roles["MEMBER"] = "member";
|
381
361
|
})(Roles || (Roles = {}));
|
382
362
|
|
383
|
-
const denyList = new Set([
|
384
|
-
'ENOTFOUND',
|
385
|
-
'ENETUNREACH',
|
386
|
-
|
387
|
-
// SSL errors from https://github.com/nodejs/node/blob/fc8e3e2cdc521978351de257030db0076d79e0ab/src/crypto/crypto_common.cc#L301-L328
|
388
|
-
'UNABLE_TO_GET_ISSUER_CERT',
|
389
|
-
'UNABLE_TO_GET_CRL',
|
390
|
-
'UNABLE_TO_DECRYPT_CERT_SIGNATURE',
|
391
|
-
'UNABLE_TO_DECRYPT_CRL_SIGNATURE',
|
392
|
-
'UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY',
|
393
|
-
'CERT_SIGNATURE_FAILURE',
|
394
|
-
'CRL_SIGNATURE_FAILURE',
|
395
|
-
'CERT_NOT_YET_VALID',
|
396
|
-
'CERT_HAS_EXPIRED',
|
397
|
-
'CRL_NOT_YET_VALID',
|
398
|
-
'CRL_HAS_EXPIRED',
|
399
|
-
'ERROR_IN_CERT_NOT_BEFORE_FIELD',
|
400
|
-
'ERROR_IN_CERT_NOT_AFTER_FIELD',
|
401
|
-
'ERROR_IN_CRL_LAST_UPDATE_FIELD',
|
402
|
-
'ERROR_IN_CRL_NEXT_UPDATE_FIELD',
|
403
|
-
'OUT_OF_MEM',
|
404
|
-
'DEPTH_ZERO_SELF_SIGNED_CERT',
|
405
|
-
'SELF_SIGNED_CERT_IN_CHAIN',
|
406
|
-
'UNABLE_TO_GET_ISSUER_CERT_LOCALLY',
|
407
|
-
'UNABLE_TO_VERIFY_LEAF_SIGNATURE',
|
408
|
-
'CERT_CHAIN_TOO_LONG',
|
409
|
-
'CERT_REVOKED',
|
410
|
-
'INVALID_CA',
|
411
|
-
'PATH_LENGTH_EXCEEDED',
|
412
|
-
'INVALID_PURPOSE',
|
413
|
-
'CERT_UNTRUSTED',
|
414
|
-
'CERT_REJECTED',
|
415
|
-
'HOSTNAME_MISMATCH'
|
416
|
-
]);
|
417
|
-
|
418
|
-
// TODO: Use `error?.code` when targeting Node.js 14
|
419
|
-
var isRetryAllowed = error => !denyList.has(error && error.code);
|
420
|
-
|
421
|
-
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); } }
|
422
|
-
|
423
|
-
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); }); }; }
|
424
|
-
|
425
|
-
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; }
|
426
|
-
|
427
|
-
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; }
|
428
|
-
|
429
|
-
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; }
|
430
|
-
var namespace = 'axios-retry';
|
431
|
-
/**
|
432
|
-
* @param {Error} error
|
433
|
-
* @return {boolean}
|
434
|
-
*/
|
435
|
-
|
436
|
-
function isNetworkError(error) {
|
437
|
-
return !error.response && Boolean(error.code) && // Prevents retrying cancelled requests
|
438
|
-
error.code !== 'ECONNABORTED' && // Prevents retrying timed out requests
|
439
|
-
isRetryAllowed(error); // Prevents retrying unsafe errors
|
440
|
-
}
|
441
|
-
var SAFE_HTTP_METHODS = ['get', 'head', 'options'];
|
442
|
-
var IDEMPOTENT_HTTP_METHODS = SAFE_HTTP_METHODS.concat(['put', 'delete']);
|
443
|
-
/**
|
444
|
-
* @param {Error} error
|
445
|
-
* @return {boolean}
|
446
|
-
*/
|
447
|
-
|
448
|
-
function isRetryableError(error) {
|
449
|
-
return error.code !== 'ECONNABORTED' && (!error.response || error.response.status >= 500 && error.response.status <= 599);
|
450
|
-
}
|
451
|
-
/**
|
452
|
-
* @param {Error} error
|
453
|
-
* @return {boolean}
|
454
|
-
*/
|
455
|
-
|
456
|
-
function isSafeRequestError(error) {
|
457
|
-
if (!error.config) {
|
458
|
-
// Cannot determine if the request can be retried
|
459
|
-
return false;
|
460
|
-
}
|
461
|
-
|
462
|
-
return isRetryableError(error) && SAFE_HTTP_METHODS.indexOf(error.config.method) !== -1;
|
463
|
-
}
|
464
|
-
/**
|
465
|
-
* @param {Error} error
|
466
|
-
* @return {boolean}
|
467
|
-
*/
|
468
|
-
|
469
|
-
function isIdempotentRequestError(error) {
|
470
|
-
if (!error.config) {
|
471
|
-
// Cannot determine if the request can be retried
|
472
|
-
return false;
|
473
|
-
}
|
474
|
-
|
475
|
-
return isRetryableError(error) && IDEMPOTENT_HTTP_METHODS.indexOf(error.config.method) !== -1;
|
476
|
-
}
|
477
|
-
/**
|
478
|
-
* @param {Error} error
|
479
|
-
* @return {boolean}
|
480
|
-
*/
|
481
|
-
|
482
|
-
function isNetworkOrIdempotentRequestError(error) {
|
483
|
-
return isNetworkError(error) || isIdempotentRequestError(error);
|
484
|
-
}
|
485
|
-
/**
|
486
|
-
* @return {number} - delay in milliseconds, always 0
|
487
|
-
*/
|
488
|
-
|
489
|
-
function noDelay() {
|
490
|
-
return 0;
|
491
|
-
}
|
492
|
-
/**
|
493
|
-
* @param {number} [retryNumber=0]
|
494
|
-
* @return {number} - delay in milliseconds
|
495
|
-
*/
|
496
|
-
|
497
|
-
|
498
|
-
function exponentialDelay() {
|
499
|
-
var retryNumber = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
500
|
-
var delay = Math.pow(2, retryNumber) * 100;
|
501
|
-
var randomSum = delay * 0.2 * Math.random(); // 0-20% of the delay
|
502
|
-
|
503
|
-
return delay + randomSum;
|
504
|
-
}
|
505
|
-
/**
|
506
|
-
* Initializes and returns the retry state for the given request/config
|
507
|
-
* @param {AxiosRequestConfig} config
|
508
|
-
* @return {Object}
|
509
|
-
*/
|
510
|
-
|
511
|
-
function getCurrentState(config) {
|
512
|
-
var currentState = config[namespace] || {};
|
513
|
-
currentState.retryCount = currentState.retryCount || 0;
|
514
|
-
config[namespace] = currentState;
|
515
|
-
return currentState;
|
516
|
-
}
|
517
|
-
/**
|
518
|
-
* Returns the axios-retry options for the current request
|
519
|
-
* @param {AxiosRequestConfig} config
|
520
|
-
* @param {AxiosRetryConfig} defaultOptions
|
521
|
-
* @return {AxiosRetryConfig}
|
522
|
-
*/
|
523
|
-
|
524
|
-
|
525
|
-
function getRequestOptions(config, defaultOptions) {
|
526
|
-
return _objectSpread(_objectSpread({}, defaultOptions), config[namespace]);
|
527
|
-
}
|
528
|
-
/**
|
529
|
-
* @param {Axios} axios
|
530
|
-
* @param {AxiosRequestConfig} config
|
531
|
-
*/
|
532
|
-
|
533
|
-
|
534
|
-
function fixConfig(axios, config) {
|
535
|
-
if (axios.defaults.agent === config.agent) {
|
536
|
-
delete config.agent;
|
537
|
-
}
|
538
|
-
|
539
|
-
if (axios.defaults.httpAgent === config.httpAgent) {
|
540
|
-
delete config.httpAgent;
|
541
|
-
}
|
542
|
-
|
543
|
-
if (axios.defaults.httpsAgent === config.httpsAgent) {
|
544
|
-
delete config.httpsAgent;
|
545
|
-
}
|
546
|
-
}
|
547
|
-
/**
|
548
|
-
* Checks retryCondition if request can be retried. Handles it's retruning value or Promise.
|
549
|
-
* @param {number} retries
|
550
|
-
* @param {Function} retryCondition
|
551
|
-
* @param {Object} currentState
|
552
|
-
* @param {Error} error
|
553
|
-
* @return {boolean}
|
554
|
-
*/
|
555
|
-
|
556
|
-
|
557
|
-
function shouldRetry(_x, _x2, _x3, _x4) {
|
558
|
-
return _shouldRetry.apply(this, arguments);
|
559
|
-
}
|
560
|
-
/**
|
561
|
-
* Adds response interceptors to an axios instance to retry requests failed due to network issues
|
562
|
-
*
|
563
|
-
* @example
|
564
|
-
*
|
565
|
-
* import axios from 'axios';
|
566
|
-
*
|
567
|
-
* axiosRetry(axios, { retries: 3 });
|
568
|
-
*
|
569
|
-
* axios.get('http://example.com/test') // The first request fails and the second returns 'ok'
|
570
|
-
* .then(result => {
|
571
|
-
* result.data; // 'ok'
|
572
|
-
* });
|
573
|
-
*
|
574
|
-
* // Exponential back-off retry delay between requests
|
575
|
-
* axiosRetry(axios, { retryDelay : axiosRetry.exponentialDelay});
|
576
|
-
*
|
577
|
-
* // Custom retry delay
|
578
|
-
* axiosRetry(axios, { retryDelay : (retryCount) => {
|
579
|
-
* return retryCount * 1000;
|
580
|
-
* }});
|
581
|
-
*
|
582
|
-
* // Also works with custom axios instances
|
583
|
-
* const client = axios.create({ baseURL: 'http://example.com' });
|
584
|
-
* axiosRetry(client, { retries: 3 });
|
585
|
-
*
|
586
|
-
* client.get('/test') // The first request fails and the second returns 'ok'
|
587
|
-
* .then(result => {
|
588
|
-
* result.data; // 'ok'
|
589
|
-
* });
|
590
|
-
*
|
591
|
-
* // Allows request-specific configuration
|
592
|
-
* client
|
593
|
-
* .get('/test', {
|
594
|
-
* 'axios-retry': {
|
595
|
-
* retries: 0
|
596
|
-
* }
|
597
|
-
* })
|
598
|
-
* .catch(error => { // The first request fails
|
599
|
-
* error !== undefined
|
600
|
-
* });
|
601
|
-
*
|
602
|
-
* @param {Axios} axios An axios instance (the axios object or one created from axios.create)
|
603
|
-
* @param {Object} [defaultOptions]
|
604
|
-
* @param {number} [defaultOptions.retries=3] Number of retries
|
605
|
-
* @param {boolean} [defaultOptions.shouldResetTimeout=false]
|
606
|
-
* Defines if the timeout should be reset between retries
|
607
|
-
* @param {Function} [defaultOptions.retryCondition=isNetworkOrIdempotentRequestError]
|
608
|
-
* A function to determine if the error can be retried
|
609
|
-
* @param {Function} [defaultOptions.retryDelay=noDelay]
|
610
|
-
* A function to determine the delay between retry requests
|
611
|
-
* @param {Function} [defaultOptions.onRetry=()=>{}]
|
612
|
-
* A function to get notified when a retry occurs
|
613
|
-
*/
|
614
|
-
|
615
|
-
|
616
|
-
function _shouldRetry() {
|
617
|
-
_shouldRetry = _asyncToGenerator(function* (retries, retryCondition, currentState, error) {
|
618
|
-
var shouldRetryOrPromise = currentState.retryCount < retries && retryCondition(error); // This could be a promise
|
619
|
-
|
620
|
-
if (typeof shouldRetryOrPromise === 'object') {
|
621
|
-
try {
|
622
|
-
var shouldRetryPromiseResult = yield shouldRetryOrPromise; // keep return true unless shouldRetryPromiseResult return false for compatibility
|
623
|
-
|
624
|
-
return shouldRetryPromiseResult !== false;
|
625
|
-
} catch (_err) {
|
626
|
-
return false;
|
627
|
-
}
|
628
|
-
}
|
629
|
-
|
630
|
-
return shouldRetryOrPromise;
|
631
|
-
});
|
632
|
-
return _shouldRetry.apply(this, arguments);
|
633
|
-
}
|
634
|
-
|
635
|
-
function axiosRetry(axios, defaultOptions) {
|
636
|
-
axios.interceptors.request.use(config => {
|
637
|
-
var currentState = getCurrentState(config);
|
638
|
-
currentState.lastRequestTime = Date.now();
|
639
|
-
return config;
|
640
|
-
});
|
641
|
-
axios.interceptors.response.use(null, /*#__PURE__*/function () {
|
642
|
-
var _ref = _asyncToGenerator(function* (error) {
|
643
|
-
var {
|
644
|
-
config
|
645
|
-
} = error; // If we have no information to retry the request
|
646
|
-
|
647
|
-
if (!config) {
|
648
|
-
return Promise.reject(error);
|
649
|
-
}
|
650
|
-
|
651
|
-
var {
|
652
|
-
retries = 3,
|
653
|
-
retryCondition = isNetworkOrIdempotentRequestError,
|
654
|
-
retryDelay = noDelay,
|
655
|
-
shouldResetTimeout = false,
|
656
|
-
onRetry = () => {}
|
657
|
-
} = getRequestOptions(config, defaultOptions);
|
658
|
-
var currentState = getCurrentState(config);
|
659
|
-
|
660
|
-
if (yield shouldRetry(retries, retryCondition, currentState, error)) {
|
661
|
-
currentState.retryCount += 1;
|
662
|
-
var delay = retryDelay(currentState.retryCount, error); // Axios fails merging this configuration to the default configuration because it has an issue
|
663
|
-
// with circular structures: https://github.com/mzabriskie/axios/issues/370
|
664
|
-
|
665
|
-
fixConfig(axios, config);
|
666
|
-
|
667
|
-
if (!shouldResetTimeout && config.timeout && currentState.lastRequestTime) {
|
668
|
-
var lastRequestDuration = Date.now() - currentState.lastRequestTime;
|
669
|
-
var timeout = config.timeout - lastRequestDuration - delay;
|
670
|
-
|
671
|
-
if (timeout <= 0) {
|
672
|
-
return Promise.reject(error);
|
673
|
-
}
|
674
|
-
|
675
|
-
config.timeout = timeout;
|
676
|
-
}
|
677
|
-
|
678
|
-
config.transformRequest = [data => data];
|
679
|
-
onRetry(currentState.retryCount, error, config);
|
680
|
-
return new Promise(resolve => setTimeout(() => resolve(axios(config)), delay));
|
681
|
-
}
|
682
|
-
|
683
|
-
return Promise.reject(error);
|
684
|
-
});
|
685
|
-
|
686
|
-
return function (_x5) {
|
687
|
-
return _ref.apply(this, arguments);
|
688
|
-
};
|
689
|
-
}());
|
690
|
-
} // Compatibility with CommonJS
|
691
|
-
|
692
|
-
axiosRetry.isNetworkError = isNetworkError;
|
693
|
-
axiosRetry.isSafeRequestError = isSafeRequestError;
|
694
|
-
axiosRetry.isIdempotentRequestError = isIdempotentRequestError;
|
695
|
-
axiosRetry.isNetworkOrIdempotentRequestError = isNetworkOrIdempotentRequestError;
|
696
|
-
axiosRetry.exponentialDelay = exponentialDelay;
|
697
|
-
axiosRetry.isRetryableError = isRetryableError;
|
698
|
-
|
699
363
|
function bind(fn, thisArg) {
|
700
364
|
return function wrap() {
|
701
365
|
return fn.apply(thisArg, arguments);
|
@@ -1368,7 +1032,7 @@ const isAsyncFn = kindOfTest('AsyncFunction');
|
|
1368
1032
|
const isThenable = (thing) =>
|
1369
1033
|
thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);
|
1370
1034
|
|
1371
|
-
const utils = {
|
1035
|
+
const utils$1 = {
|
1372
1036
|
isArray,
|
1373
1037
|
isArrayBuffer,
|
1374
1038
|
isBuffer,
|
@@ -1450,7 +1114,7 @@ function AxiosError(message, code, config, request, response) {
|
|
1450
1114
|
response && (this.response = response);
|
1451
1115
|
}
|
1452
1116
|
|
1453
|
-
utils.inherits(AxiosError, Error, {
|
1117
|
+
utils$1.inherits(AxiosError, Error, {
|
1454
1118
|
toJSON: function toJSON() {
|
1455
1119
|
return {
|
1456
1120
|
// Standard
|
@@ -1465,7 +1129,7 @@ utils.inherits(AxiosError, Error, {
|
|
1465
1129
|
columnNumber: this.columnNumber,
|
1466
1130
|
stack: this.stack,
|
1467
1131
|
// Axios
|
1468
|
-
config: utils.toJSONObject(this.config),
|
1132
|
+
config: utils$1.toJSONObject(this.config),
|
1469
1133
|
code: this.code,
|
1470
1134
|
status: this.response && this.response.status ? this.response.status : null
|
1471
1135
|
};
|
@@ -1500,7 +1164,7 @@ Object.defineProperty(prototype$1, 'isAxiosError', {value: true});
|
|
1500
1164
|
AxiosError.from = (error, code, config, request, response, customProps) => {
|
1501
1165
|
const axiosError = Object.create(prototype$1);
|
1502
1166
|
|
1503
|
-
utils.toFlatObject(error, axiosError, function filter(obj) {
|
1167
|
+
utils$1.toFlatObject(error, axiosError, function filter(obj) {
|
1504
1168
|
return obj !== Error.prototype;
|
1505
1169
|
}, prop => {
|
1506
1170
|
return prop !== 'isAxiosError';
|
@@ -1528,7 +1192,7 @@ const httpAdapter = null;
|
|
1528
1192
|
* @returns {boolean}
|
1529
1193
|
*/
|
1530
1194
|
function isVisitable(thing) {
|
1531
|
-
return utils.isPlainObject(thing) || utils.isArray(thing);
|
1195
|
+
return utils$1.isPlainObject(thing) || utils$1.isArray(thing);
|
1532
1196
|
}
|
1533
1197
|
|
1534
1198
|
/**
|
@@ -1539,7 +1203,7 @@ function isVisitable(thing) {
|
|
1539
1203
|
* @returns {string} the key without the brackets.
|
1540
1204
|
*/
|
1541
1205
|
function removeBrackets(key) {
|
1542
|
-
return utils.endsWith(key, '[]') ? key.slice(0, -2) : key;
|
1206
|
+
return utils$1.endsWith(key, '[]') ? key.slice(0, -2) : key;
|
1543
1207
|
}
|
1544
1208
|
|
1545
1209
|
/**
|
@@ -1568,10 +1232,10 @@ function renderKey(path, key, dots) {
|
|
1568
1232
|
* @returns {boolean}
|
1569
1233
|
*/
|
1570
1234
|
function isFlatArray(arr) {
|
1571
|
-
return utils.isArray(arr) && !arr.some(isVisitable);
|
1235
|
+
return utils$1.isArray(arr) && !arr.some(isVisitable);
|
1572
1236
|
}
|
1573
1237
|
|
1574
|
-
const predicates = utils.toFlatObject(utils, {}, null, function filter(prop) {
|
1238
|
+
const predicates = utils$1.toFlatObject(utils$1, {}, null, function filter(prop) {
|
1575
1239
|
return /^is[A-Z]/.test(prop);
|
1576
1240
|
});
|
1577
1241
|
|
@@ -1599,7 +1263,7 @@ const predicates = utils.toFlatObject(utils, {}, null, function filter(prop) {
|
|
1599
1263
|
* @returns
|
1600
1264
|
*/
|
1601
1265
|
function toFormData(obj, formData, options) {
|
1602
|
-
if (!utils.isObject(obj)) {
|
1266
|
+
if (!utils$1.isObject(obj)) {
|
1603
1267
|
throw new TypeError('target must be an object');
|
1604
1268
|
}
|
1605
1269
|
|
@@ -1607,13 +1271,13 @@ function toFormData(obj, formData, options) {
|
|
1607
1271
|
formData = formData || new (FormData)();
|
1608
1272
|
|
1609
1273
|
// eslint-disable-next-line no-param-reassign
|
1610
|
-
options = utils.toFlatObject(options, {
|
1274
|
+
options = utils$1.toFlatObject(options, {
|
1611
1275
|
metaTokens: true,
|
1612
1276
|
dots: false,
|
1613
1277
|
indexes: false
|
1614
1278
|
}, false, function defined(option, source) {
|
1615
1279
|
// eslint-disable-next-line no-eq-null,eqeqeq
|
1616
|
-
return !utils.isUndefined(source[option]);
|
1280
|
+
return !utils$1.isUndefined(source[option]);
|
1617
1281
|
});
|
1618
1282
|
|
1619
1283
|
const metaTokens = options.metaTokens;
|
@@ -1622,24 +1286,24 @@ function toFormData(obj, formData, options) {
|
|
1622
1286
|
const dots = options.dots;
|
1623
1287
|
const indexes = options.indexes;
|
1624
1288
|
const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;
|
1625
|
-
const useBlob = _Blob && utils.isSpecCompliantForm(formData);
|
1289
|
+
const useBlob = _Blob && utils$1.isSpecCompliantForm(formData);
|
1626
1290
|
|
1627
|
-
if (!utils.isFunction(visitor)) {
|
1291
|
+
if (!utils$1.isFunction(visitor)) {
|
1628
1292
|
throw new TypeError('visitor must be a function');
|
1629
1293
|
}
|
1630
1294
|
|
1631
1295
|
function convertValue(value) {
|
1632
1296
|
if (value === null) return '';
|
1633
1297
|
|
1634
|
-
if (utils.isDate(value)) {
|
1298
|
+
if (utils$1.isDate(value)) {
|
1635
1299
|
return value.toISOString();
|
1636
1300
|
}
|
1637
1301
|
|
1638
|
-
if (!useBlob && utils.isBlob(value)) {
|
1302
|
+
if (!useBlob && utils$1.isBlob(value)) {
|
1639
1303
|
throw new AxiosError('Blob is not supported. Use a Buffer instead.');
|
1640
1304
|
}
|
1641
1305
|
|
1642
|
-
if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {
|
1306
|
+
if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {
|
1643
1307
|
return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);
|
1644
1308
|
}
|
1645
1309
|
|
@@ -1660,20 +1324,20 @@ function toFormData(obj, formData, options) {
|
|
1660
1324
|
let arr = value;
|
1661
1325
|
|
1662
1326
|
if (value && !path && typeof value === 'object') {
|
1663
|
-
if (utils.endsWith(key, '{}')) {
|
1327
|
+
if (utils$1.endsWith(key, '{}')) {
|
1664
1328
|
// eslint-disable-next-line no-param-reassign
|
1665
1329
|
key = metaTokens ? key : key.slice(0, -2);
|
1666
1330
|
// eslint-disable-next-line no-param-reassign
|
1667
1331
|
value = JSON.stringify(value);
|
1668
1332
|
} else if (
|
1669
|
-
(utils.isArray(value) && isFlatArray(value)) ||
|
1670
|
-
((utils.isFileList(value) || utils.endsWith(key, '[]')) && (arr = utils.toArray(value))
|
1333
|
+
(utils$1.isArray(value) && isFlatArray(value)) ||
|
1334
|
+
((utils$1.isFileList(value) || utils$1.endsWith(key, '[]')) && (arr = utils$1.toArray(value))
|
1671
1335
|
)) {
|
1672
1336
|
// eslint-disable-next-line no-param-reassign
|
1673
1337
|
key = removeBrackets(key);
|
1674
1338
|
|
1675
1339
|
arr.forEach(function each(el, index) {
|
1676
|
-
!(utils.isUndefined(el) || el === null) && formData.append(
|
1340
|
+
!(utils$1.isUndefined(el) || el === null) && formData.append(
|
1677
1341
|
// eslint-disable-next-line no-nested-ternary
|
1678
1342
|
indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),
|
1679
1343
|
convertValue(el)
|
@@ -1701,7 +1365,7 @@ function toFormData(obj, formData, options) {
|
|
1701
1365
|
});
|
1702
1366
|
|
1703
1367
|
function build(value, path) {
|
1704
|
-
if (utils.isUndefined(value)) return;
|
1368
|
+
if (utils$1.isUndefined(value)) return;
|
1705
1369
|
|
1706
1370
|
if (stack.indexOf(value) !== -1) {
|
1707
1371
|
throw Error('Circular reference detected in ' + path.join('.'));
|
@@ -1709,9 +1373,9 @@ function toFormData(obj, formData, options) {
|
|
1709
1373
|
|
1710
1374
|
stack.push(value);
|
1711
1375
|
|
1712
|
-
utils.forEach(value, function each(el, key) {
|
1713
|
-
const result = !(utils.isUndefined(el) || el === null) && visitor.call(
|
1714
|
-
formData, el, utils.isString(key) ? key.trim() : key, path, exposedHelpers
|
1376
|
+
utils$1.forEach(value, function each(el, key) {
|
1377
|
+
const result = !(utils$1.isUndefined(el) || el === null) && visitor.call(
|
1378
|
+
formData, el, utils$1.isString(key) ? key.trim() : key, path, exposedHelpers
|
1715
1379
|
);
|
1716
1380
|
|
1717
1381
|
if (result === true) {
|
@@ -1722,7 +1386,7 @@ function toFormData(obj, formData, options) {
|
|
1722
1386
|
stack.pop();
|
1723
1387
|
}
|
1724
1388
|
|
1725
|
-
if (!utils.isObject(obj)) {
|
1389
|
+
if (!utils$1.isObject(obj)) {
|
1726
1390
|
throw new TypeError('data must be an object');
|
1727
1391
|
}
|
1728
1392
|
|
@@ -1826,7 +1490,7 @@ function buildURL(url, params, options) {
|
|
1826
1490
|
if (serializeFn) {
|
1827
1491
|
serializedParams = serializeFn(params, options);
|
1828
1492
|
} else {
|
1829
|
-
serializedParams = utils.isURLSearchParams(params) ?
|
1493
|
+
serializedParams = utils$1.isURLSearchParams(params) ?
|
1830
1494
|
params.toString() :
|
1831
1495
|
new AxiosURLSearchParams(params, options).toString(_encode);
|
1832
1496
|
}
|
@@ -1901,7 +1565,7 @@ class InterceptorManager {
|
|
1901
1565
|
* @returns {void}
|
1902
1566
|
*/
|
1903
1567
|
forEach(fn) {
|
1904
|
-
utils.forEach(this.handlers, function forEachHandler(h) {
|
1568
|
+
utils$1.forEach(this.handlers, function forEachHandler(h) {
|
1905
1569
|
if (h !== null) {
|
1906
1570
|
fn(h);
|
1907
1571
|
}
|
@@ -1921,6 +1585,18 @@ const FormData$1 = typeof FormData !== 'undefined' ? FormData : null;
|
|
1921
1585
|
|
1922
1586
|
const Blob$1 = typeof Blob !== 'undefined' ? Blob : null;
|
1923
1587
|
|
1588
|
+
const platform$1 = {
|
1589
|
+
isBrowser: true,
|
1590
|
+
classes: {
|
1591
|
+
URLSearchParams: URLSearchParams$1,
|
1592
|
+
FormData: FormData$1,
|
1593
|
+
Blob: Blob$1
|
1594
|
+
},
|
1595
|
+
protocols: ['http', 'https', 'file', 'blob', 'url', 'data']
|
1596
|
+
};
|
1597
|
+
|
1598
|
+
const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';
|
1599
|
+
|
1924
1600
|
/**
|
1925
1601
|
* Determine if we're running in a standard browser environment
|
1926
1602
|
*
|
@@ -1938,18 +1614,10 @@ const Blob$1 = typeof Blob !== 'undefined' ? Blob : null;
|
|
1938
1614
|
*
|
1939
1615
|
* @returns {boolean}
|
1940
1616
|
*/
|
1941
|
-
const
|
1942
|
-
|
1943
|
-
|
1944
|
-
|
1945
|
-
product === 'NativeScript' ||
|
1946
|
-
product === 'NS')
|
1947
|
-
) {
|
1948
|
-
return false;
|
1949
|
-
}
|
1950
|
-
|
1951
|
-
return typeof window !== 'undefined' && typeof document !== 'undefined';
|
1952
|
-
})();
|
1617
|
+
const hasStandardBrowserEnv = (
|
1618
|
+
(product) => {
|
1619
|
+
return hasBrowserEnv && ['ReactNative', 'NativeScript', 'NS'].indexOf(product) < 0
|
1620
|
+
})(typeof navigator !== 'undefined' && navigator.product);
|
1953
1621
|
|
1954
1622
|
/**
|
1955
1623
|
* Determine if we're running in a standard browser webWorker environment
|
@@ -1960,7 +1628,7 @@ const isStandardBrowserEnv = (() => {
|
|
1960
1628
|
* `typeof window !== 'undefined' && typeof document !== 'undefined'`.
|
1961
1629
|
* This leads to a problem when axios post `FormData` in webWorker
|
1962
1630
|
*/
|
1963
|
-
|
1631
|
+
const hasStandardBrowserWebWorkerEnv = (() => {
|
1964
1632
|
return (
|
1965
1633
|
typeof WorkerGlobalScope !== 'undefined' &&
|
1966
1634
|
// eslint-disable-next-line no-undef
|
@@ -1969,22 +1637,25 @@ const isStandardBrowserEnv = (() => {
|
|
1969
1637
|
);
|
1970
1638
|
})();
|
1971
1639
|
|
1640
|
+
const utils = /*#__PURE__*/Object.freeze({
|
1641
|
+
__proto__: null,
|
1642
|
+
hasBrowserEnv: hasBrowserEnv,
|
1643
|
+
hasStandardBrowserWebWorkerEnv: hasStandardBrowserWebWorkerEnv,
|
1644
|
+
hasStandardBrowserEnv: hasStandardBrowserEnv
|
1645
|
+
});
|
1972
1646
|
|
1973
1647
|
const platform = {
|
1974
|
-
|
1975
|
-
|
1976
|
-
URLSearchParams: URLSearchParams$1,
|
1977
|
-
FormData: FormData$1,
|
1978
|
-
Blob: Blob$1
|
1979
|
-
},
|
1980
|
-
isStandardBrowserEnv,
|
1981
|
-
isStandardBrowserWebWorkerEnv,
|
1982
|
-
protocols: ['http', 'https', 'file', 'blob', 'url', 'data']
|
1648
|
+
...utils,
|
1649
|
+
...platform$1
|
1983
1650
|
};
|
1984
1651
|
|
1985
1652
|
function toURLEncodedForm(data, options) {
|
1986
1653
|
return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({
|
1987
1654
|
visitor: function(value, key, path, helpers) {
|
1655
|
+
if (platform.isNode && utils$1.isBuffer(value)) {
|
1656
|
+
this.append(key, value.toString('base64'));
|
1657
|
+
return false;
|
1658
|
+
}
|
1988
1659
|
|
1989
1660
|
return helpers.defaultVisitor.apply(this, arguments);
|
1990
1661
|
}
|
@@ -2003,7 +1674,7 @@ function parsePropPath(name) {
|
|
2003
1674
|
// foo.x.y.z
|
2004
1675
|
// foo-x-y-z
|
2005
1676
|
// foo x y z
|
2006
|
-
return utils.matchAll(/\w+|\[(\w*)]/g, name).map(match => {
|
1677
|
+
return utils$1.matchAll(/\w+|\[(\w*)]/g, name).map(match => {
|
2007
1678
|
return match[0] === '[]' ? '' : match[1] || match[0];
|
2008
1679
|
});
|
2009
1680
|
}
|
@@ -2040,10 +1711,10 @@ function formDataToJSON(formData) {
|
|
2040
1711
|
let name = path[index++];
|
2041
1712
|
const isNumericKey = Number.isFinite(+name);
|
2042
1713
|
const isLast = index >= path.length;
|
2043
|
-
name = !name && utils.isArray(target) ? target.length : name;
|
1714
|
+
name = !name && utils$1.isArray(target) ? target.length : name;
|
2044
1715
|
|
2045
1716
|
if (isLast) {
|
2046
|
-
if (utils.hasOwnProp(target, name)) {
|
1717
|
+
if (utils$1.hasOwnProp(target, name)) {
|
2047
1718
|
target[name] = [target[name], value];
|
2048
1719
|
} else {
|
2049
1720
|
target[name] = value;
|
@@ -2052,23 +1723,23 @@ function formDataToJSON(formData) {
|
|
2052
1723
|
return !isNumericKey;
|
2053
1724
|
}
|
2054
1725
|
|
2055
|
-
if (!target[name] || !utils.isObject(target[name])) {
|
1726
|
+
if (!target[name] || !utils$1.isObject(target[name])) {
|
2056
1727
|
target[name] = [];
|
2057
1728
|
}
|
2058
1729
|
|
2059
1730
|
const result = buildPath(path, value, target[name], index);
|
2060
1731
|
|
2061
|
-
if (result && utils.isArray(target[name])) {
|
1732
|
+
if (result && utils$1.isArray(target[name])) {
|
2062
1733
|
target[name] = arrayToObject(target[name]);
|
2063
1734
|
}
|
2064
1735
|
|
2065
1736
|
return !isNumericKey;
|
2066
1737
|
}
|
2067
1738
|
|
2068
|
-
if (utils.isFormData(formData) && utils.isFunction(formData.entries)) {
|
1739
|
+
if (utils$1.isFormData(formData) && utils$1.isFunction(formData.entries)) {
|
2069
1740
|
const obj = {};
|
2070
1741
|
|
2071
|
-
utils.forEachEntry(formData, (name, value) => {
|
1742
|
+
utils$1.forEachEntry(formData, (name, value) => {
|
2072
1743
|
buildPath(parsePropPath(name), value, obj, 0);
|
2073
1744
|
});
|
2074
1745
|
|
@@ -2089,10 +1760,10 @@ function formDataToJSON(formData) {
|
|
2089
1760
|
* @returns {string} A stringified version of the rawValue.
|
2090
1761
|
*/
|
2091
1762
|
function stringifySafely(rawValue, parser, encoder) {
|
2092
|
-
if (utils.isString(rawValue)) {
|
1763
|
+
if (utils$1.isString(rawValue)) {
|
2093
1764
|
try {
|
2094
1765
|
(parser || JSON.parse)(rawValue);
|
2095
|
-
return utils.trim(rawValue);
|
1766
|
+
return utils$1.trim(rawValue);
|
2096
1767
|
} catch (e) {
|
2097
1768
|
if (e.name !== 'SyntaxError') {
|
2098
1769
|
throw e;
|
@@ -2112,13 +1783,13 @@ const defaults = {
|
|
2112
1783
|
transformRequest: [function transformRequest(data, headers) {
|
2113
1784
|
const contentType = headers.getContentType() || '';
|
2114
1785
|
const hasJSONContentType = contentType.indexOf('application/json') > -1;
|
2115
|
-
const isObjectPayload = utils.isObject(data);
|
1786
|
+
const isObjectPayload = utils$1.isObject(data);
|
2116
1787
|
|
2117
|
-
if (isObjectPayload && utils.isHTMLForm(data)) {
|
1788
|
+
if (isObjectPayload && utils$1.isHTMLForm(data)) {
|
2118
1789
|
data = new FormData(data);
|
2119
1790
|
}
|
2120
1791
|
|
2121
|
-
const isFormData = utils.isFormData(data);
|
1792
|
+
const isFormData = utils$1.isFormData(data);
|
2122
1793
|
|
2123
1794
|
if (isFormData) {
|
2124
1795
|
if (!hasJSONContentType) {
|
@@ -2127,18 +1798,18 @@ const defaults = {
|
|
2127
1798
|
return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
|
2128
1799
|
}
|
2129
1800
|
|
2130
|
-
if (utils.isArrayBuffer(data) ||
|
2131
|
-
utils.isBuffer(data) ||
|
2132
|
-
utils.isStream(data) ||
|
2133
|
-
utils.isFile(data) ||
|
2134
|
-
utils.isBlob(data)
|
1801
|
+
if (utils$1.isArrayBuffer(data) ||
|
1802
|
+
utils$1.isBuffer(data) ||
|
1803
|
+
utils$1.isStream(data) ||
|
1804
|
+
utils$1.isFile(data) ||
|
1805
|
+
utils$1.isBlob(data)
|
2135
1806
|
) {
|
2136
1807
|
return data;
|
2137
1808
|
}
|
2138
|
-
if (utils.isArrayBufferView(data)) {
|
1809
|
+
if (utils$1.isArrayBufferView(data)) {
|
2139
1810
|
return data.buffer;
|
2140
1811
|
}
|
2141
|
-
if (utils.isURLSearchParams(data)) {
|
1812
|
+
if (utils$1.isURLSearchParams(data)) {
|
2142
1813
|
headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);
|
2143
1814
|
return data.toString();
|
2144
1815
|
}
|
@@ -2150,7 +1821,7 @@ const defaults = {
|
|
2150
1821
|
return toURLEncodedForm(data, this.formSerializer).toString();
|
2151
1822
|
}
|
2152
1823
|
|
2153
|
-
if ((isFileList = utils.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {
|
1824
|
+
if ((isFileList = utils$1.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {
|
2154
1825
|
const _FormData = this.env && this.env.FormData;
|
2155
1826
|
|
2156
1827
|
return toFormData(
|
@@ -2174,7 +1845,7 @@ const defaults = {
|
|
2174
1845
|
const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
|
2175
1846
|
const JSONRequested = this.responseType === 'json';
|
2176
1847
|
|
2177
|
-
if (data && utils.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {
|
1848
|
+
if (data && utils$1.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {
|
2178
1849
|
const silentJSONParsing = transitional && transitional.silentJSONParsing;
|
2179
1850
|
const strictJSONParsing = !silentJSONParsing && JSONRequested;
|
2180
1851
|
|
@@ -2222,13 +1893,13 @@ const defaults = {
|
|
2222
1893
|
}
|
2223
1894
|
};
|
2224
1895
|
|
2225
|
-
utils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {
|
1896
|
+
utils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {
|
2226
1897
|
defaults.headers[method] = {};
|
2227
1898
|
});
|
2228
1899
|
|
2229
1900
|
// RawAxiosHeaders whose duplicates are ignored by node
|
2230
1901
|
// c.f. https://nodejs.org/api/http.html#http_message_headers
|
2231
|
-
const ignoreDuplicateOf = utils.toObjectSet([
|
1902
|
+
const ignoreDuplicateOf = utils$1.toObjectSet([
|
2232
1903
|
'age', 'authorization', 'content-length', 'content-type', 'etag',
|
2233
1904
|
'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',
|
2234
1905
|
'last-modified', 'location', 'max-forwards', 'proxy-authorization',
|
@@ -2289,7 +1960,7 @@ function normalizeValue(value) {
|
|
2289
1960
|
return value;
|
2290
1961
|
}
|
2291
1962
|
|
2292
|
-
return utils.isArray(value) ? value.map(normalizeValue) : String(value);
|
1963
|
+
return utils$1.isArray(value) ? value.map(normalizeValue) : String(value);
|
2293
1964
|
}
|
2294
1965
|
|
2295
1966
|
function parseTokens(str) {
|
@@ -2307,7 +1978,7 @@ function parseTokens(str) {
|
|
2307
1978
|
const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
|
2308
1979
|
|
2309
1980
|
function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
|
2310
|
-
if (utils.isFunction(filter)) {
|
1981
|
+
if (utils$1.isFunction(filter)) {
|
2311
1982
|
return filter.call(this, value, header);
|
2312
1983
|
}
|
2313
1984
|
|
@@ -2315,13 +1986,13 @@ function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
|
|
2315
1986
|
value = header;
|
2316
1987
|
}
|
2317
1988
|
|
2318
|
-
if (!utils.isString(value)) return;
|
1989
|
+
if (!utils$1.isString(value)) return;
|
2319
1990
|
|
2320
|
-
if (utils.isString(filter)) {
|
1991
|
+
if (utils$1.isString(filter)) {
|
2321
1992
|
return value.indexOf(filter) !== -1;
|
2322
1993
|
}
|
2323
1994
|
|
2324
|
-
if (utils.isRegExp(filter)) {
|
1995
|
+
if (utils$1.isRegExp(filter)) {
|
2325
1996
|
return filter.test(value);
|
2326
1997
|
}
|
2327
1998
|
}
|
@@ -2334,7 +2005,7 @@ function formatHeader(header) {
|
|
2334
2005
|
}
|
2335
2006
|
|
2336
2007
|
function buildAccessors(obj, header) {
|
2337
|
-
const accessorName = utils.toCamelCase(' ' + header);
|
2008
|
+
const accessorName = utils$1.toCamelCase(' ' + header);
|
2338
2009
|
|
2339
2010
|
['get', 'set', 'has'].forEach(methodName => {
|
2340
2011
|
Object.defineProperty(obj, methodName + accessorName, {
|
@@ -2361,7 +2032,7 @@ class AxiosHeaders {
|
|
2361
2032
|
throw new Error('header name must be a non-empty string');
|
2362
2033
|
}
|
2363
2034
|
|
2364
|
-
const key = utils.findKey(self, lHeader);
|
2035
|
+
const key = utils$1.findKey(self, lHeader);
|
2365
2036
|
|
2366
2037
|
if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {
|
2367
2038
|
self[key || _header] = normalizeValue(_value);
|
@@ -2369,11 +2040,11 @@ class AxiosHeaders {
|
|
2369
2040
|
}
|
2370
2041
|
|
2371
2042
|
const setHeaders = (headers, _rewrite) =>
|
2372
|
-
utils.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
|
2043
|
+
utils$1.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
|
2373
2044
|
|
2374
|
-
if (utils.isPlainObject(header) || header instanceof this.constructor) {
|
2045
|
+
if (utils$1.isPlainObject(header) || header instanceof this.constructor) {
|
2375
2046
|
setHeaders(header, valueOrRewrite);
|
2376
|
-
} else if(utils.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
|
2047
|
+
} else if(utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
|
2377
2048
|
setHeaders(parseHeaders(header), valueOrRewrite);
|
2378
2049
|
} else {
|
2379
2050
|
header != null && setHeader(valueOrRewrite, header, rewrite);
|
@@ -2386,7 +2057,7 @@ class AxiosHeaders {
|
|
2386
2057
|
header = normalizeHeader(header);
|
2387
2058
|
|
2388
2059
|
if (header) {
|
2389
|
-
const key = utils.findKey(this, header);
|
2060
|
+
const key = utils$1.findKey(this, header);
|
2390
2061
|
|
2391
2062
|
if (key) {
|
2392
2063
|
const value = this[key];
|
@@ -2399,11 +2070,11 @@ class AxiosHeaders {
|
|
2399
2070
|
return parseTokens(value);
|
2400
2071
|
}
|
2401
2072
|
|
2402
|
-
if (utils.isFunction(parser)) {
|
2073
|
+
if (utils$1.isFunction(parser)) {
|
2403
2074
|
return parser.call(this, value, key);
|
2404
2075
|
}
|
2405
2076
|
|
2406
|
-
if (utils.isRegExp(parser)) {
|
2077
|
+
if (utils$1.isRegExp(parser)) {
|
2407
2078
|
return parser.exec(value);
|
2408
2079
|
}
|
2409
2080
|
|
@@ -2416,7 +2087,7 @@ class AxiosHeaders {
|
|
2416
2087
|
header = normalizeHeader(header);
|
2417
2088
|
|
2418
2089
|
if (header) {
|
2419
|
-
const key = utils.findKey(this, header);
|
2090
|
+
const key = utils$1.findKey(this, header);
|
2420
2091
|
|
2421
2092
|
return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
|
2422
2093
|
}
|
@@ -2432,7 +2103,7 @@ class AxiosHeaders {
|
|
2432
2103
|
_header = normalizeHeader(_header);
|
2433
2104
|
|
2434
2105
|
if (_header) {
|
2435
|
-
const key = utils.findKey(self, _header);
|
2106
|
+
const key = utils$1.findKey(self, _header);
|
2436
2107
|
|
2437
2108
|
if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {
|
2438
2109
|
delete self[key];
|
@@ -2442,7 +2113,7 @@ class AxiosHeaders {
|
|
2442
2113
|
}
|
2443
2114
|
}
|
2444
2115
|
|
2445
|
-
if (utils.isArray(header)) {
|
2116
|
+
if (utils$1.isArray(header)) {
|
2446
2117
|
header.forEach(deleteHeader);
|
2447
2118
|
} else {
|
2448
2119
|
deleteHeader(header);
|
@@ -2471,8 +2142,8 @@ class AxiosHeaders {
|
|
2471
2142
|
const self = this;
|
2472
2143
|
const headers = {};
|
2473
2144
|
|
2474
|
-
utils.forEach(this, (value, header) => {
|
2475
|
-
const key = utils.findKey(headers, header);
|
2145
|
+
utils$1.forEach(this, (value, header) => {
|
2146
|
+
const key = utils$1.findKey(headers, header);
|
2476
2147
|
|
2477
2148
|
if (key) {
|
2478
2149
|
self[key] = normalizeValue(value);
|
@@ -2501,8 +2172,8 @@ class AxiosHeaders {
|
|
2501
2172
|
toJSON(asStrings) {
|
2502
2173
|
const obj = Object.create(null);
|
2503
2174
|
|
2504
|
-
utils.forEach(this, (value, header) => {
|
2505
|
-
value != null && value !== false && (obj[header] = asStrings && utils.isArray(value) ? value.join(', ') : value);
|
2175
|
+
utils$1.forEach(this, (value, header) => {
|
2176
|
+
value != null && value !== false && (obj[header] = asStrings && utils$1.isArray(value) ? value.join(', ') : value);
|
2506
2177
|
});
|
2507
2178
|
|
2508
2179
|
return obj;
|
@@ -2549,7 +2220,7 @@ class AxiosHeaders {
|
|
2549
2220
|
}
|
2550
2221
|
}
|
2551
2222
|
|
2552
|
-
utils.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
|
2223
|
+
utils$1.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
|
2553
2224
|
|
2554
2225
|
return this;
|
2555
2226
|
}
|
@@ -2558,7 +2229,7 @@ class AxiosHeaders {
|
|
2558
2229
|
AxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);
|
2559
2230
|
|
2560
2231
|
// reserved names hotfix
|
2561
|
-
utils.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {
|
2232
|
+
utils$1.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {
|
2562
2233
|
let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`
|
2563
2234
|
return {
|
2564
2235
|
get: () => value,
|
@@ -2568,7 +2239,7 @@ utils.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {
|
|
2568
2239
|
}
|
2569
2240
|
});
|
2570
2241
|
|
2571
|
-
utils.freezeMethods(AxiosHeaders);
|
2242
|
+
utils$1.freezeMethods(AxiosHeaders);
|
2572
2243
|
|
2573
2244
|
/**
|
2574
2245
|
* Transform the data for a request or a response
|
@@ -2584,7 +2255,7 @@ function transformData(fns, response) {
|
|
2584
2255
|
const headers = AxiosHeaders.from(context.headers);
|
2585
2256
|
let data = context.data;
|
2586
2257
|
|
2587
|
-
utils.forEach(fns, function transform(fn) {
|
2258
|
+
utils$1.forEach(fns, function transform(fn) {
|
2588
2259
|
data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);
|
2589
2260
|
});
|
2590
2261
|
|
@@ -2612,7 +2283,7 @@ function CanceledError(message, config, request) {
|
|
2612
2283
|
this.name = 'CanceledError';
|
2613
2284
|
}
|
2614
2285
|
|
2615
|
-
utils.inherits(CanceledError, AxiosError, {
|
2286
|
+
utils$1.inherits(CanceledError, AxiosError, {
|
2616
2287
|
__CANCEL__: true
|
2617
2288
|
});
|
2618
2289
|
|
@@ -2640,53 +2311,44 @@ function settle(resolve, reject, response) {
|
|
2640
2311
|
}
|
2641
2312
|
}
|
2642
2313
|
|
2643
|
-
const cookies = platform.
|
2314
|
+
const cookies = platform.hasStandardBrowserEnv ?
|
2644
2315
|
|
2645
|
-
// Standard browser envs support document.cookie
|
2646
|
-
|
2647
|
-
|
2648
|
-
|
2649
|
-
const cookie = [];
|
2650
|
-
cookie.push(name + '=' + encodeURIComponent(value));
|
2316
|
+
// Standard browser envs support document.cookie
|
2317
|
+
{
|
2318
|
+
write(name, value, expires, path, domain, secure) {
|
2319
|
+
const cookie = [name + '=' + encodeURIComponent(value)];
|
2651
2320
|
|
2652
|
-
|
2653
|
-
cookie.push('expires=' + new Date(expires).toGMTString());
|
2654
|
-
}
|
2321
|
+
utils$1.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());
|
2655
2322
|
|
2656
|
-
|
2657
|
-
cookie.push('path=' + path);
|
2658
|
-
}
|
2323
|
+
utils$1.isString(path) && cookie.push('path=' + path);
|
2659
2324
|
|
2660
|
-
|
2661
|
-
cookie.push('domain=' + domain);
|
2662
|
-
}
|
2325
|
+
utils$1.isString(domain) && cookie.push('domain=' + domain);
|
2663
2326
|
|
2664
|
-
|
2665
|
-
cookie.push('secure');
|
2666
|
-
}
|
2327
|
+
secure === true && cookie.push('secure');
|
2667
2328
|
|
2668
|
-
|
2669
|
-
|
2329
|
+
document.cookie = cookie.join('; ');
|
2330
|
+
},
|
2670
2331
|
|
2671
|
-
|
2672
|
-
|
2673
|
-
|
2674
|
-
|
2332
|
+
read(name) {
|
2333
|
+
const match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
|
2334
|
+
return (match ? decodeURIComponent(match[3]) : null);
|
2335
|
+
},
|
2675
2336
|
|
2676
|
-
|
2677
|
-
|
2678
|
-
|
2679
|
-
|
2680
|
-
})() :
|
2337
|
+
remove(name) {
|
2338
|
+
this.write(name, '', Date.now() - 86400000);
|
2339
|
+
}
|
2340
|
+
}
|
2681
2341
|
|
2682
|
-
|
2683
|
-
|
2684
|
-
|
2685
|
-
|
2686
|
-
|
2687
|
-
|
2688
|
-
|
2689
|
-
|
2342
|
+
:
|
2343
|
+
|
2344
|
+
// Non-standard browser env (web workers, react-native) lack needed support.
|
2345
|
+
{
|
2346
|
+
write() {},
|
2347
|
+
read() {
|
2348
|
+
return null;
|
2349
|
+
},
|
2350
|
+
remove() {}
|
2351
|
+
};
|
2690
2352
|
|
2691
2353
|
/**
|
2692
2354
|
* Determines whether the specified URL is absolute
|
@@ -2733,7 +2395,7 @@ function buildFullPath(baseURL, requestedURL) {
|
|
2733
2395
|
return requestedURL;
|
2734
2396
|
}
|
2735
2397
|
|
2736
|
-
const isURLSameOrigin = platform.
|
2398
|
+
const isURLSameOrigin = platform.hasStandardBrowserEnv ?
|
2737
2399
|
|
2738
2400
|
// Standard browser envs have full support of the APIs needed to test
|
2739
2401
|
// whether the request URL is of the same origin as current location.
|
@@ -2743,7 +2405,7 @@ const isURLSameOrigin = platform.isStandardBrowserEnv ?
|
|
2743
2405
|
let originURL;
|
2744
2406
|
|
2745
2407
|
/**
|
2746
|
-
* Parse a URL to discover
|
2408
|
+
* Parse a URL to discover its components
|
2747
2409
|
*
|
2748
2410
|
* @param {String} url The URL to be parsed
|
2749
2411
|
* @returns {Object}
|
@@ -2783,7 +2445,7 @@ const isURLSameOrigin = platform.isStandardBrowserEnv ?
|
|
2783
2445
|
* @returns {boolean} True if URL shares the same origin, otherwise false
|
2784
2446
|
*/
|
2785
2447
|
return function isURLSameOrigin(requestURL) {
|
2786
|
-
const parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;
|
2448
|
+
const parsed = (utils$1.isString(requestURL)) ? resolveURL(requestURL) : requestURL;
|
2787
2449
|
return (parsed.protocol === originURL.protocol &&
|
2788
2450
|
parsed.host === originURL.host);
|
2789
2451
|
};
|
@@ -2888,7 +2550,7 @@ const xhrAdapter = isXHRAdapterSupported && function (config) {
|
|
2888
2550
|
return new Promise(function dispatchXhrRequest(resolve, reject) {
|
2889
2551
|
let requestData = config.data;
|
2890
2552
|
const requestHeaders = AxiosHeaders.from(config.headers).normalize();
|
2891
|
-
|
2553
|
+
let {responseType, withXSRFToken} = config;
|
2892
2554
|
let onCanceled;
|
2893
2555
|
function done() {
|
2894
2556
|
if (config.cancelToken) {
|
@@ -2902,14 +2564,13 @@ const xhrAdapter = isXHRAdapterSupported && function (config) {
|
|
2902
2564
|
|
2903
2565
|
let contentType;
|
2904
2566
|
|
2905
|
-
if (utils.isFormData(requestData)) {
|
2906
|
-
if (platform.
|
2567
|
+
if (utils$1.isFormData(requestData)) {
|
2568
|
+
if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
|
2907
2569
|
requestHeaders.setContentType(false); // Let the browser set it
|
2908
|
-
} else if(
|
2909
|
-
requestHeaders.setContentType('multipart/form-data'); // mobile/desktop app frameworks
|
2910
|
-
} else if(utils.isString(contentType = requestHeaders.getContentType())){
|
2570
|
+
} else if ((contentType = requestHeaders.getContentType()) !== false) {
|
2911
2571
|
// fix semicolon duplication issue for ReactNative FormData implementation
|
2912
|
-
|
2572
|
+
const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];
|
2573
|
+
requestHeaders.setContentType([type || 'multipart/form-data', ...tokens].join('; '));
|
2913
2574
|
}
|
2914
2575
|
}
|
2915
2576
|
|
@@ -3025,13 +2686,16 @@ const xhrAdapter = isXHRAdapterSupported && function (config) {
|
|
3025
2686
|
// Add xsrf header
|
3026
2687
|
// This is only done if running in a standard browser environment.
|
3027
2688
|
// Specifically not if we're in a web worker, or react-native.
|
3028
|
-
if
|
3029
|
-
|
3030
|
-
|
3031
|
-
|
2689
|
+
if(platform.hasStandardBrowserEnv) {
|
2690
|
+
withXSRFToken && utils$1.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config));
|
2691
|
+
|
2692
|
+
if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(fullPath))) {
|
2693
|
+
// Add xsrf header
|
2694
|
+
const xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && cookies.read(config.xsrfCookieName);
|
3032
2695
|
|
3033
|
-
|
3034
|
-
|
2696
|
+
if (xsrfValue) {
|
2697
|
+
requestHeaders.set(config.xsrfHeaderName, xsrfValue);
|
2698
|
+
}
|
3035
2699
|
}
|
3036
2700
|
}
|
3037
2701
|
|
@@ -3040,13 +2704,13 @@ const xhrAdapter = isXHRAdapterSupported && function (config) {
|
|
3040
2704
|
|
3041
2705
|
// Add headers to the request
|
3042
2706
|
if ('setRequestHeader' in request) {
|
3043
|
-
utils.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
|
2707
|
+
utils$1.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
|
3044
2708
|
request.setRequestHeader(key, val);
|
3045
2709
|
});
|
3046
2710
|
}
|
3047
2711
|
|
3048
2712
|
// Add withCredentials to request if needed
|
3049
|
-
if (!utils.isUndefined(config.withCredentials)) {
|
2713
|
+
if (!utils$1.isUndefined(config.withCredentials)) {
|
3050
2714
|
request.withCredentials = !!config.withCredentials;
|
3051
2715
|
}
|
3052
2716
|
|
@@ -3101,7 +2765,7 @@ const knownAdapters = {
|
|
3101
2765
|
xhr: xhrAdapter
|
3102
2766
|
};
|
3103
2767
|
|
3104
|
-
utils.forEach(knownAdapters, (fn, value) => {
|
2768
|
+
utils$1.forEach(knownAdapters, (fn, value) => {
|
3105
2769
|
if (fn) {
|
3106
2770
|
try {
|
3107
2771
|
Object.defineProperty(fn, 'name', {value});
|
@@ -3114,11 +2778,11 @@ utils.forEach(knownAdapters, (fn, value) => {
|
|
3114
2778
|
|
3115
2779
|
const renderReason = (reason) => `- ${reason}`;
|
3116
2780
|
|
3117
|
-
const isResolvedHandle = (adapter) => utils.isFunction(adapter) || adapter === null || adapter === false;
|
2781
|
+
const isResolvedHandle = (adapter) => utils$1.isFunction(adapter) || adapter === null || adapter === false;
|
3118
2782
|
|
3119
2783
|
const adapters = {
|
3120
2784
|
getAdapter: (adapters) => {
|
3121
|
-
adapters = utils.isArray(adapters) ? adapters : [adapters];
|
2785
|
+
adapters = utils$1.isArray(adapters) ? adapters : [adapters];
|
3122
2786
|
|
3123
2787
|
const {length} = adapters;
|
3124
2788
|
let nameOrAdapter;
|
@@ -3259,11 +2923,11 @@ function mergeConfig(config1, config2) {
|
|
3259
2923
|
const config = {};
|
3260
2924
|
|
3261
2925
|
function getMergedValue(target, source, caseless) {
|
3262
|
-
if (utils.isPlainObject(target) && utils.isPlainObject(source)) {
|
3263
|
-
return utils.merge.call({caseless}, target, source);
|
3264
|
-
} else if (utils.isPlainObject(source)) {
|
3265
|
-
return utils.merge({}, source);
|
3266
|
-
} else if (utils.isArray(source)) {
|
2926
|
+
if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {
|
2927
|
+
return utils$1.merge.call({caseless}, target, source);
|
2928
|
+
} else if (utils$1.isPlainObject(source)) {
|
2929
|
+
return utils$1.merge({}, source);
|
2930
|
+
} else if (utils$1.isArray(source)) {
|
3267
2931
|
return source.slice();
|
3268
2932
|
}
|
3269
2933
|
return source;
|
@@ -3271,25 +2935,25 @@ function mergeConfig(config1, config2) {
|
|
3271
2935
|
|
3272
2936
|
// eslint-disable-next-line consistent-return
|
3273
2937
|
function mergeDeepProperties(a, b, caseless) {
|
3274
|
-
if (!utils.isUndefined(b)) {
|
2938
|
+
if (!utils$1.isUndefined(b)) {
|
3275
2939
|
return getMergedValue(a, b, caseless);
|
3276
|
-
} else if (!utils.isUndefined(a)) {
|
2940
|
+
} else if (!utils$1.isUndefined(a)) {
|
3277
2941
|
return getMergedValue(undefined, a, caseless);
|
3278
2942
|
}
|
3279
2943
|
}
|
3280
2944
|
|
3281
2945
|
// eslint-disable-next-line consistent-return
|
3282
2946
|
function valueFromConfig2(a, b) {
|
3283
|
-
if (!utils.isUndefined(b)) {
|
2947
|
+
if (!utils$1.isUndefined(b)) {
|
3284
2948
|
return getMergedValue(undefined, b);
|
3285
2949
|
}
|
3286
2950
|
}
|
3287
2951
|
|
3288
2952
|
// eslint-disable-next-line consistent-return
|
3289
2953
|
function defaultToConfig2(a, b) {
|
3290
|
-
if (!utils.isUndefined(b)) {
|
2954
|
+
if (!utils$1.isUndefined(b)) {
|
3291
2955
|
return getMergedValue(undefined, b);
|
3292
|
-
} else if (!utils.isUndefined(a)) {
|
2956
|
+
} else if (!utils$1.isUndefined(a)) {
|
3293
2957
|
return getMergedValue(undefined, a);
|
3294
2958
|
}
|
3295
2959
|
}
|
@@ -3314,6 +2978,7 @@ function mergeConfig(config1, config2) {
|
|
3314
2978
|
timeout: defaultToConfig2,
|
3315
2979
|
timeoutMessage: defaultToConfig2,
|
3316
2980
|
withCredentials: defaultToConfig2,
|
2981
|
+
withXSRFToken: defaultToConfig2,
|
3317
2982
|
adapter: defaultToConfig2,
|
3318
2983
|
responseType: defaultToConfig2,
|
3319
2984
|
xsrfCookieName: defaultToConfig2,
|
@@ -3334,16 +2999,16 @@ function mergeConfig(config1, config2) {
|
|
3334
2999
|
headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)
|
3335
3000
|
};
|
3336
3001
|
|
3337
|
-
utils.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
|
3002
|
+
utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
|
3338
3003
|
const merge = mergeMap[prop] || mergeDeepProperties;
|
3339
3004
|
const configValue = merge(config1[prop], config2[prop], prop);
|
3340
|
-
(utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
|
3005
|
+
(utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
|
3341
3006
|
});
|
3342
3007
|
|
3343
3008
|
return config;
|
3344
3009
|
}
|
3345
3010
|
|
3346
|
-
const VERSION = "1.
|
3011
|
+
const VERSION = "1.6.2";
|
3347
3012
|
|
3348
3013
|
const validators$1 = {};
|
3349
3014
|
|
@@ -3481,7 +3146,7 @@ class Axios {
|
|
3481
3146
|
}
|
3482
3147
|
|
3483
3148
|
if (paramsSerializer != null) {
|
3484
|
-
if (utils.isFunction(paramsSerializer)) {
|
3149
|
+
if (utils$1.isFunction(paramsSerializer)) {
|
3485
3150
|
config.paramsSerializer = {
|
3486
3151
|
serialize: paramsSerializer
|
3487
3152
|
};
|
@@ -3497,12 +3162,12 @@ class Axios {
|
|
3497
3162
|
config.method = (config.method || this.defaults.method || 'get').toLowerCase();
|
3498
3163
|
|
3499
3164
|
// Flatten headers
|
3500
|
-
let contextHeaders = headers && utils.merge(
|
3165
|
+
let contextHeaders = headers && utils$1.merge(
|
3501
3166
|
headers.common,
|
3502
3167
|
headers[config.method]
|
3503
3168
|
);
|
3504
3169
|
|
3505
|
-
headers && utils.forEach(
|
3170
|
+
headers && utils$1.forEach(
|
3506
3171
|
['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
|
3507
3172
|
(method) => {
|
3508
3173
|
delete headers[method];
|
@@ -3589,7 +3254,7 @@ class Axios {
|
|
3589
3254
|
}
|
3590
3255
|
|
3591
3256
|
// Provide aliases for supported request methods
|
3592
|
-
utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
|
3257
|
+
utils$1.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
|
3593
3258
|
/*eslint func-names:0*/
|
3594
3259
|
Axios.prototype[method] = function(url, config) {
|
3595
3260
|
return this.request(mergeConfig(config || {}, {
|
@@ -3600,7 +3265,7 @@ utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData
|
|
3600
3265
|
};
|
3601
3266
|
});
|
3602
3267
|
|
3603
|
-
utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
|
3268
|
+
utils$1.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
|
3604
3269
|
/*eslint func-names:0*/
|
3605
3270
|
|
3606
3271
|
function generateHTTPMethod(isForm) {
|
@@ -3772,7 +3437,7 @@ function spread(callback) {
|
|
3772
3437
|
* @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
|
3773
3438
|
*/
|
3774
3439
|
function isAxiosError(payload) {
|
3775
|
-
return utils.isObject(payload) && (payload.isAxiosError === true);
|
3440
|
+
return utils$1.isObject(payload) && (payload.isAxiosError === true);
|
3776
3441
|
}
|
3777
3442
|
|
3778
3443
|
const HttpStatusCode = {
|
@@ -3857,10 +3522,10 @@ function createInstance(defaultConfig) {
|
|
3857
3522
|
const instance = bind(Axios.prototype.request, context);
|
3858
3523
|
|
3859
3524
|
// Copy axios.prototype to instance
|
3860
|
-
utils.extend(instance, Axios.prototype, context, {allOwnKeys: true});
|
3525
|
+
utils$1.extend(instance, Axios.prototype, context, {allOwnKeys: true});
|
3861
3526
|
|
3862
3527
|
// Copy context to instance
|
3863
|
-
utils.extend(instance, context, null, {allOwnKeys: true});
|
3528
|
+
utils$1.extend(instance, context, null, {allOwnKeys: true});
|
3864
3529
|
|
3865
3530
|
// Factory for creating new instances
|
3866
3531
|
instance.create = function create(instanceConfig) {
|
@@ -3904,7 +3569,7 @@ axios.mergeConfig = mergeConfig;
|
|
3904
3569
|
|
3905
3570
|
axios.AxiosHeaders = AxiosHeaders;
|
3906
3571
|
|
3907
|
-
axios.formToJSON = thing => formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);
|
3572
|
+
axios.formToJSON = thing => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing);
|
3908
3573
|
|
3909
3574
|
axios.getAdapter = adapters.getAdapter;
|
3910
3575
|
|
@@ -3990,7 +3655,7 @@ var requestLogger = function (r) {
|
|
3990
3655
|
* .setSessionType('signing')
|
3991
3656
|
* .logRequests(true)
|
3992
3657
|
* .setClientID('1234)
|
3993
|
-
* .setTimeout(
|
3658
|
+
* .setTimeout(30000);
|
3994
3659
|
* ```
|
3995
3660
|
*/
|
3996
3661
|
var VerdocsEndpoint = /** @class */ (function () {
|
@@ -4005,8 +3670,9 @@ var VerdocsEndpoint = /** @class */ (function () {
|
|
4005
3670
|
function VerdocsEndpoint(options) {
|
4006
3671
|
this.environment = 'verdocs';
|
4007
3672
|
this.sessionType = 'user';
|
4008
|
-
this.baseURL = 'https://
|
4009
|
-
|
3673
|
+
this.baseURL = (window.location.origin === 'https://beta.verdocs.com'
|
3674
|
+
? 'https://stage-api.verdocs.com'
|
3675
|
+
: 'https://api.verdocs.com');
|
4010
3676
|
this.clientID = 'not-set';
|
4011
3677
|
this.timeout = 60000;
|
4012
3678
|
this.token = null;
|
@@ -4019,21 +3685,12 @@ var VerdocsEndpoint = /** @class */ (function () {
|
|
4019
3685
|
* with Envelopes.
|
4020
3686
|
*/
|
4021
3687
|
this.session = null;
|
4022
|
-
this.baseURL = (options === null || options === void 0 ? void 0 : options.baseURL) ||
|
4023
|
-
this.
|
4024
|
-
this.
|
4025
|
-
this.
|
4026
|
-
this.
|
4027
|
-
this.clientID = (options === null || options === void 0 ? void 0 : options.clientID) || 'not-set';
|
3688
|
+
this.baseURL = (options === null || options === void 0 ? void 0 : options.baseURL) || this.baseURL;
|
3689
|
+
this.timeout = (options === null || options === void 0 ? void 0 : options.timeout) || this.timeout;
|
3690
|
+
this.environment = (options === null || options === void 0 ? void 0 : options.environment) || this.environment;
|
3691
|
+
this.sessionType = (options === null || options === void 0 ? void 0 : options.sessionType) || this.sessionType;
|
3692
|
+
this.clientID = (options === null || options === void 0 ? void 0 : options.clientID) || this.clientID;
|
4028
3693
|
this.api = axios.create({ baseURL: this.baseURL, timeout: this.timeout });
|
4029
|
-
// We set the default retries to zero because we only actually want this feature on certain calls for now
|
4030
|
-
axiosRetry(this.api, {
|
4031
|
-
retries: 0,
|
4032
|
-
retryDelay: axiosRetry.exponentialDelay,
|
4033
|
-
onRetry: function (retryCount, error, requestConfig) {
|
4034
|
-
window.console.debug("[JS_SDK] Retrying request (".concat(retryCount, ")"), error.message, requestConfig.url);
|
4035
|
-
},
|
4036
|
-
});
|
4037
3694
|
}
|
4038
3695
|
VerdocsEndpoint.prototype.setDefault = function () {
|
4039
3696
|
globalThis_1[ENDPOINT_KEY] = this;
|
@@ -4041,7 +3698,7 @@ var VerdocsEndpoint = /** @class */ (function () {
|
|
4041
3698
|
VerdocsEndpoint.getDefault = function () {
|
4042
3699
|
if (!globalThis_1[ENDPOINT_KEY]) {
|
4043
3700
|
globalThis_1[ENDPOINT_KEY] = new VerdocsEndpoint();
|
4044
|
-
window.console.debug('[JS_SDK] Created default endpoint', globalThis_1[ENDPOINT_KEY]);
|
3701
|
+
window.console.debug('[JS_SDK] Created default endpoint', globalThis_1[ENDPOINT_KEY].baseURL);
|
4045
3702
|
}
|
4046
3703
|
return globalThis_1[ENDPOINT_KEY];
|
4047
3704
|
};
|
@@ -4063,13 +3720,6 @@ var VerdocsEndpoint = /** @class */ (function () {
|
|
4063
3720
|
VerdocsEndpoint.prototype.getBaseURL = function () {
|
4064
3721
|
return this.baseURL;
|
4065
3722
|
};
|
4066
|
-
/**
|
4067
|
-
* Get the current base URL for the v2 APIs.
|
4068
|
-
* This should rarely be anything other than 'https://api-v2.verdocs.com'.
|
4069
|
-
*/
|
4070
|
-
VerdocsEndpoint.prototype.getBaseURLv2 = function () {
|
4071
|
-
return this.baseURLv2;
|
4072
|
-
};
|
4073
3723
|
/**
|
4074
3724
|
* Get the current client ID, if set.
|
4075
3725
|
*/
|
@@ -4137,21 +3787,6 @@ var VerdocsEndpoint = /** @class */ (function () {
|
|
4137
3787
|
this.api.defaults.baseURL = url;
|
4138
3788
|
return this;
|
4139
3789
|
};
|
4140
|
-
/**
|
4141
|
-
* Set the base URL for API calls. Should be called only upon direction from Verdocs Customer Solutions Engineering.
|
4142
|
-
*
|
4143
|
-
* ```typescript
|
4144
|
-
* import {VerdocsEndpoint} from '@verdocs/js-sdk/HTTP';
|
4145
|
-
*
|
4146
|
-
* const endpoint = new VerdocsEndpoint();
|
4147
|
-
* endpoint.setBaseURL('https://api.verdocs.com');
|
4148
|
-
* ```
|
4149
|
-
*/
|
4150
|
-
VerdocsEndpoint.prototype.setBaseURLv2 = function (url) {
|
4151
|
-
this.baseURLv2 = url;
|
4152
|
-
// NOTE: We do not set this on the Axios instance because v1 is still the standard.
|
4153
|
-
return this;
|
4154
|
-
};
|
4155
3790
|
/**
|
4156
3791
|
* Set the Client ID for Verdocs API calls.
|
4157
3792
|
*
|
@@ -4310,4 +3945,4 @@ var VerdocsEndpoint = /** @class */ (function () {
|
|
4310
3945
|
return VerdocsEndpoint;
|
4311
3946
|
}());
|
4312
3947
|
|
4313
|
-
export { TemplateSenderTypes as T, VerdocsEndpoint as V, TemplateActions as a,
|
3948
|
+
export { TemplateSenderTypes as T, VerdocsEndpoint as V, TemplateActions as a, createTemplatev2 as b, canPerformTemplateAction as c, deleteTemplate as d, getTemplate as g, listTemplates as l, updateTemplate as u };
|