@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
@@ -149,23 +149,6 @@ 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
|
-
};
|
169
152
|
// export interface IListTemplatesParams {
|
170
153
|
// name?: string;
|
171
154
|
// sharing?: 'all' | 'personal' | 'shared' | 'public';
|
@@ -217,10 +200,10 @@ var ALLOWED_CREATE_FIELDS = [
|
|
217
200
|
* ```typescript
|
218
201
|
* import {Templates} from '@verdocs/js-sdk/Templates';
|
219
202
|
*
|
220
|
-
* const newTemplate = await Templates.
|
203
|
+
* const newTemplate = await Templates.createTemplatev2((VerdocsEndpoint.getDefault(), {...});
|
221
204
|
* ```
|
222
205
|
*/
|
223
|
-
var
|
206
|
+
var createTemplatev2 = function (endpoint, params, onUploadProgress) {
|
224
207
|
var options = {
|
225
208
|
timeout: 120000,
|
226
209
|
onUploadProgress: function (event) {
|
@@ -230,22 +213,19 @@ var createTemplate = function (endpoint, params, onUploadProgress) {
|
|
230
213
|
},
|
231
214
|
};
|
232
215
|
if (params.documents && params.documents[0] instanceof File) {
|
233
|
-
|
234
|
-
throw new Error('createTemplate() has a maximum of 10 documents that can be attached.');
|
235
|
-
}
|
236
|
-
var formData_1 = new FormData();
|
216
|
+
var formData_2 = new FormData();
|
237
217
|
ALLOWED_CREATE_FIELDS.forEach(function (allowedKey) {
|
238
218
|
if (params[allowedKey] !== undefined) {
|
239
|
-
|
219
|
+
formData_2.append(allowedKey, params[allowedKey]);
|
240
220
|
}
|
241
221
|
});
|
242
222
|
params.documents.forEach(function (file) {
|
243
|
-
|
223
|
+
formData_2.append('documents', file, file.name);
|
244
224
|
});
|
245
|
-
return endpoint.api.post('/templates',
|
225
|
+
return endpoint.api.post('/v2/templates', formData_2, options).then(function (r) { return r.data; });
|
246
226
|
}
|
247
227
|
else {
|
248
|
-
return endpoint.api.post('/templates', params, options).then(function (r) { return r.data; });
|
228
|
+
return endpoint.api.post('/v2/templates', params, options).then(function (r) { return r.data; });
|
249
229
|
}
|
250
230
|
};
|
251
231
|
/**
|
@@ -382,322 +362,6 @@ var Roles;
|
|
382
362
|
Roles["MEMBER"] = "member";
|
383
363
|
})(Roles || (Roles = {}));
|
384
364
|
|
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
|
-
|
701
365
|
function bind(fn, thisArg) {
|
702
366
|
return function wrap() {
|
703
367
|
return fn.apply(thisArg, arguments);
|
@@ -1370,7 +1034,7 @@ const isAsyncFn = kindOfTest('AsyncFunction');
|
|
1370
1034
|
const isThenable = (thing) =>
|
1371
1035
|
thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);
|
1372
1036
|
|
1373
|
-
const utils = {
|
1037
|
+
const utils$1 = {
|
1374
1038
|
isArray,
|
1375
1039
|
isArrayBuffer,
|
1376
1040
|
isBuffer,
|
@@ -1452,7 +1116,7 @@ function AxiosError(message, code, config, request, response) {
|
|
1452
1116
|
response && (this.response = response);
|
1453
1117
|
}
|
1454
1118
|
|
1455
|
-
utils.inherits(AxiosError, Error, {
|
1119
|
+
utils$1.inherits(AxiosError, Error, {
|
1456
1120
|
toJSON: function toJSON() {
|
1457
1121
|
return {
|
1458
1122
|
// Standard
|
@@ -1467,7 +1131,7 @@ utils.inherits(AxiosError, Error, {
|
|
1467
1131
|
columnNumber: this.columnNumber,
|
1468
1132
|
stack: this.stack,
|
1469
1133
|
// Axios
|
1470
|
-
config: utils.toJSONObject(this.config),
|
1134
|
+
config: utils$1.toJSONObject(this.config),
|
1471
1135
|
code: this.code,
|
1472
1136
|
status: this.response && this.response.status ? this.response.status : null
|
1473
1137
|
};
|
@@ -1502,7 +1166,7 @@ Object.defineProperty(prototype$1, 'isAxiosError', {value: true});
|
|
1502
1166
|
AxiosError.from = (error, code, config, request, response, customProps) => {
|
1503
1167
|
const axiosError = Object.create(prototype$1);
|
1504
1168
|
|
1505
|
-
utils.toFlatObject(error, axiosError, function filter(obj) {
|
1169
|
+
utils$1.toFlatObject(error, axiosError, function filter(obj) {
|
1506
1170
|
return obj !== Error.prototype;
|
1507
1171
|
}, prop => {
|
1508
1172
|
return prop !== 'isAxiosError';
|
@@ -1530,7 +1194,7 @@ const httpAdapter = null;
|
|
1530
1194
|
* @returns {boolean}
|
1531
1195
|
*/
|
1532
1196
|
function isVisitable(thing) {
|
1533
|
-
return utils.isPlainObject(thing) || utils.isArray(thing);
|
1197
|
+
return utils$1.isPlainObject(thing) || utils$1.isArray(thing);
|
1534
1198
|
}
|
1535
1199
|
|
1536
1200
|
/**
|
@@ -1541,7 +1205,7 @@ function isVisitable(thing) {
|
|
1541
1205
|
* @returns {string} the key without the brackets.
|
1542
1206
|
*/
|
1543
1207
|
function removeBrackets(key) {
|
1544
|
-
return utils.endsWith(key, '[]') ? key.slice(0, -2) : key;
|
1208
|
+
return utils$1.endsWith(key, '[]') ? key.slice(0, -2) : key;
|
1545
1209
|
}
|
1546
1210
|
|
1547
1211
|
/**
|
@@ -1570,10 +1234,10 @@ function renderKey(path, key, dots) {
|
|
1570
1234
|
* @returns {boolean}
|
1571
1235
|
*/
|
1572
1236
|
function isFlatArray(arr) {
|
1573
|
-
return utils.isArray(arr) && !arr.some(isVisitable);
|
1237
|
+
return utils$1.isArray(arr) && !arr.some(isVisitable);
|
1574
1238
|
}
|
1575
1239
|
|
1576
|
-
const predicates = utils.toFlatObject(utils, {}, null, function filter(prop) {
|
1240
|
+
const predicates = utils$1.toFlatObject(utils$1, {}, null, function filter(prop) {
|
1577
1241
|
return /^is[A-Z]/.test(prop);
|
1578
1242
|
});
|
1579
1243
|
|
@@ -1601,7 +1265,7 @@ const predicates = utils.toFlatObject(utils, {}, null, function filter(prop) {
|
|
1601
1265
|
* @returns
|
1602
1266
|
*/
|
1603
1267
|
function toFormData(obj, formData, options) {
|
1604
|
-
if (!utils.isObject(obj)) {
|
1268
|
+
if (!utils$1.isObject(obj)) {
|
1605
1269
|
throw new TypeError('target must be an object');
|
1606
1270
|
}
|
1607
1271
|
|
@@ -1609,13 +1273,13 @@ function toFormData(obj, formData, options) {
|
|
1609
1273
|
formData = formData || new (FormData)();
|
1610
1274
|
|
1611
1275
|
// eslint-disable-next-line no-param-reassign
|
1612
|
-
options = utils.toFlatObject(options, {
|
1276
|
+
options = utils$1.toFlatObject(options, {
|
1613
1277
|
metaTokens: true,
|
1614
1278
|
dots: false,
|
1615
1279
|
indexes: false
|
1616
1280
|
}, false, function defined(option, source) {
|
1617
1281
|
// eslint-disable-next-line no-eq-null,eqeqeq
|
1618
|
-
return !utils.isUndefined(source[option]);
|
1282
|
+
return !utils$1.isUndefined(source[option]);
|
1619
1283
|
});
|
1620
1284
|
|
1621
1285
|
const metaTokens = options.metaTokens;
|
@@ -1624,24 +1288,24 @@ function toFormData(obj, formData, options) {
|
|
1624
1288
|
const dots = options.dots;
|
1625
1289
|
const indexes = options.indexes;
|
1626
1290
|
const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;
|
1627
|
-
const useBlob = _Blob && utils.isSpecCompliantForm(formData);
|
1291
|
+
const useBlob = _Blob && utils$1.isSpecCompliantForm(formData);
|
1628
1292
|
|
1629
|
-
if (!utils.isFunction(visitor)) {
|
1293
|
+
if (!utils$1.isFunction(visitor)) {
|
1630
1294
|
throw new TypeError('visitor must be a function');
|
1631
1295
|
}
|
1632
1296
|
|
1633
1297
|
function convertValue(value) {
|
1634
1298
|
if (value === null) return '';
|
1635
1299
|
|
1636
|
-
if (utils.isDate(value)) {
|
1300
|
+
if (utils$1.isDate(value)) {
|
1637
1301
|
return value.toISOString();
|
1638
1302
|
}
|
1639
1303
|
|
1640
|
-
if (!useBlob && utils.isBlob(value)) {
|
1304
|
+
if (!useBlob && utils$1.isBlob(value)) {
|
1641
1305
|
throw new AxiosError('Blob is not supported. Use a Buffer instead.');
|
1642
1306
|
}
|
1643
1307
|
|
1644
|
-
if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {
|
1308
|
+
if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {
|
1645
1309
|
return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);
|
1646
1310
|
}
|
1647
1311
|
|
@@ -1662,20 +1326,20 @@ function toFormData(obj, formData, options) {
|
|
1662
1326
|
let arr = value;
|
1663
1327
|
|
1664
1328
|
if (value && !path && typeof value === 'object') {
|
1665
|
-
if (utils.endsWith(key, '{}')) {
|
1329
|
+
if (utils$1.endsWith(key, '{}')) {
|
1666
1330
|
// eslint-disable-next-line no-param-reassign
|
1667
1331
|
key = metaTokens ? key : key.slice(0, -2);
|
1668
1332
|
// eslint-disable-next-line no-param-reassign
|
1669
1333
|
value = JSON.stringify(value);
|
1670
1334
|
} else if (
|
1671
|
-
(utils.isArray(value) && isFlatArray(value)) ||
|
1672
|
-
((utils.isFileList(value) || utils.endsWith(key, '[]')) && (arr = utils.toArray(value))
|
1335
|
+
(utils$1.isArray(value) && isFlatArray(value)) ||
|
1336
|
+
((utils$1.isFileList(value) || utils$1.endsWith(key, '[]')) && (arr = utils$1.toArray(value))
|
1673
1337
|
)) {
|
1674
1338
|
// eslint-disable-next-line no-param-reassign
|
1675
1339
|
key = removeBrackets(key);
|
1676
1340
|
|
1677
1341
|
arr.forEach(function each(el, index) {
|
1678
|
-
!(utils.isUndefined(el) || el === null) && formData.append(
|
1342
|
+
!(utils$1.isUndefined(el) || el === null) && formData.append(
|
1679
1343
|
// eslint-disable-next-line no-nested-ternary
|
1680
1344
|
indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),
|
1681
1345
|
convertValue(el)
|
@@ -1703,7 +1367,7 @@ function toFormData(obj, formData, options) {
|
|
1703
1367
|
});
|
1704
1368
|
|
1705
1369
|
function build(value, path) {
|
1706
|
-
if (utils.isUndefined(value)) return;
|
1370
|
+
if (utils$1.isUndefined(value)) return;
|
1707
1371
|
|
1708
1372
|
if (stack.indexOf(value) !== -1) {
|
1709
1373
|
throw Error('Circular reference detected in ' + path.join('.'));
|
@@ -1711,9 +1375,9 @@ function toFormData(obj, formData, options) {
|
|
1711
1375
|
|
1712
1376
|
stack.push(value);
|
1713
1377
|
|
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
|
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
|
1717
1381
|
);
|
1718
1382
|
|
1719
1383
|
if (result === true) {
|
@@ -1724,7 +1388,7 @@ function toFormData(obj, formData, options) {
|
|
1724
1388
|
stack.pop();
|
1725
1389
|
}
|
1726
1390
|
|
1727
|
-
if (!utils.isObject(obj)) {
|
1391
|
+
if (!utils$1.isObject(obj)) {
|
1728
1392
|
throw new TypeError('data must be an object');
|
1729
1393
|
}
|
1730
1394
|
|
@@ -1828,7 +1492,7 @@ function buildURL(url, params, options) {
|
|
1828
1492
|
if (serializeFn) {
|
1829
1493
|
serializedParams = serializeFn(params, options);
|
1830
1494
|
} else {
|
1831
|
-
serializedParams = utils.isURLSearchParams(params) ?
|
1495
|
+
serializedParams = utils$1.isURLSearchParams(params) ?
|
1832
1496
|
params.toString() :
|
1833
1497
|
new AxiosURLSearchParams(params, options).toString(_encode);
|
1834
1498
|
}
|
@@ -1903,7 +1567,7 @@ class InterceptorManager {
|
|
1903
1567
|
* @returns {void}
|
1904
1568
|
*/
|
1905
1569
|
forEach(fn) {
|
1906
|
-
utils.forEach(this.handlers, function forEachHandler(h) {
|
1570
|
+
utils$1.forEach(this.handlers, function forEachHandler(h) {
|
1907
1571
|
if (h !== null) {
|
1908
1572
|
fn(h);
|
1909
1573
|
}
|
@@ -1923,6 +1587,18 @@ const FormData$1 = typeof FormData !== 'undefined' ? FormData : null;
|
|
1923
1587
|
|
1924
1588
|
const Blob$1 = typeof Blob !== 'undefined' ? Blob : null;
|
1925
1589
|
|
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
|
+
|
1926
1602
|
/**
|
1927
1603
|
* Determine if we're running in a standard browser environment
|
1928
1604
|
*
|
@@ -1940,18 +1616,10 @@ const Blob$1 = typeof Blob !== 'undefined' ? Blob : null;
|
|
1940
1616
|
*
|
1941
1617
|
* @returns {boolean}
|
1942
1618
|
*/
|
1943
|
-
const
|
1944
|
-
|
1945
|
-
|
1946
|
-
|
1947
|
-
product === 'NativeScript' ||
|
1948
|
-
product === 'NS')
|
1949
|
-
) {
|
1950
|
-
return false;
|
1951
|
-
}
|
1952
|
-
|
1953
|
-
return typeof window !== 'undefined' && typeof document !== 'undefined';
|
1954
|
-
})();
|
1619
|
+
const hasStandardBrowserEnv = (
|
1620
|
+
(product) => {
|
1621
|
+
return hasBrowserEnv && ['ReactNative', 'NativeScript', 'NS'].indexOf(product) < 0
|
1622
|
+
})(typeof navigator !== 'undefined' && navigator.product);
|
1955
1623
|
|
1956
1624
|
/**
|
1957
1625
|
* Determine if we're running in a standard browser webWorker environment
|
@@ -1962,7 +1630,7 @@ const isStandardBrowserEnv = (() => {
|
|
1962
1630
|
* `typeof window !== 'undefined' && typeof document !== 'undefined'`.
|
1963
1631
|
* This leads to a problem when axios post `FormData` in webWorker
|
1964
1632
|
*/
|
1965
|
-
|
1633
|
+
const hasStandardBrowserWebWorkerEnv = (() => {
|
1966
1634
|
return (
|
1967
1635
|
typeof WorkerGlobalScope !== 'undefined' &&
|
1968
1636
|
// eslint-disable-next-line no-undef
|
@@ -1971,22 +1639,25 @@ const isStandardBrowserEnv = (() => {
|
|
1971
1639
|
);
|
1972
1640
|
})();
|
1973
1641
|
|
1642
|
+
const utils = /*#__PURE__*/Object.freeze({
|
1643
|
+
__proto__: null,
|
1644
|
+
hasBrowserEnv: hasBrowserEnv,
|
1645
|
+
hasStandardBrowserWebWorkerEnv: hasStandardBrowserWebWorkerEnv,
|
1646
|
+
hasStandardBrowserEnv: hasStandardBrowserEnv
|
1647
|
+
});
|
1974
1648
|
|
1975
1649
|
const platform = {
|
1976
|
-
|
1977
|
-
|
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']
|
1650
|
+
...utils,
|
1651
|
+
...platform$1
|
1985
1652
|
};
|
1986
1653
|
|
1987
1654
|
function toURLEncodedForm(data, options) {
|
1988
1655
|
return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({
|
1989
1656
|
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
|
+
}
|
1990
1661
|
|
1991
1662
|
return helpers.defaultVisitor.apply(this, arguments);
|
1992
1663
|
}
|
@@ -2005,7 +1676,7 @@ function parsePropPath(name) {
|
|
2005
1676
|
// foo.x.y.z
|
2006
1677
|
// foo-x-y-z
|
2007
1678
|
// foo x y z
|
2008
|
-
return utils.matchAll(/\w+|\[(\w*)]/g, name).map(match => {
|
1679
|
+
return utils$1.matchAll(/\w+|\[(\w*)]/g, name).map(match => {
|
2009
1680
|
return match[0] === '[]' ? '' : match[1] || match[0];
|
2010
1681
|
});
|
2011
1682
|
}
|
@@ -2042,10 +1713,10 @@ function formDataToJSON(formData) {
|
|
2042
1713
|
let name = path[index++];
|
2043
1714
|
const isNumericKey = Number.isFinite(+name);
|
2044
1715
|
const isLast = index >= path.length;
|
2045
|
-
name = !name && utils.isArray(target) ? target.length : name;
|
1716
|
+
name = !name && utils$1.isArray(target) ? target.length : name;
|
2046
1717
|
|
2047
1718
|
if (isLast) {
|
2048
|
-
if (utils.hasOwnProp(target, name)) {
|
1719
|
+
if (utils$1.hasOwnProp(target, name)) {
|
2049
1720
|
target[name] = [target[name], value];
|
2050
1721
|
} else {
|
2051
1722
|
target[name] = value;
|
@@ -2054,23 +1725,23 @@ function formDataToJSON(formData) {
|
|
2054
1725
|
return !isNumericKey;
|
2055
1726
|
}
|
2056
1727
|
|
2057
|
-
if (!target[name] || !utils.isObject(target[name])) {
|
1728
|
+
if (!target[name] || !utils$1.isObject(target[name])) {
|
2058
1729
|
target[name] = [];
|
2059
1730
|
}
|
2060
1731
|
|
2061
1732
|
const result = buildPath(path, value, target[name], index);
|
2062
1733
|
|
2063
|
-
if (result && utils.isArray(target[name])) {
|
1734
|
+
if (result && utils$1.isArray(target[name])) {
|
2064
1735
|
target[name] = arrayToObject(target[name]);
|
2065
1736
|
}
|
2066
1737
|
|
2067
1738
|
return !isNumericKey;
|
2068
1739
|
}
|
2069
1740
|
|
2070
|
-
if (utils.isFormData(formData) && utils.isFunction(formData.entries)) {
|
1741
|
+
if (utils$1.isFormData(formData) && utils$1.isFunction(formData.entries)) {
|
2071
1742
|
const obj = {};
|
2072
1743
|
|
2073
|
-
utils.forEachEntry(formData, (name, value) => {
|
1744
|
+
utils$1.forEachEntry(formData, (name, value) => {
|
2074
1745
|
buildPath(parsePropPath(name), value, obj, 0);
|
2075
1746
|
});
|
2076
1747
|
|
@@ -2091,10 +1762,10 @@ function formDataToJSON(formData) {
|
|
2091
1762
|
* @returns {string} A stringified version of the rawValue.
|
2092
1763
|
*/
|
2093
1764
|
function stringifySafely(rawValue, parser, encoder) {
|
2094
|
-
if (utils.isString(rawValue)) {
|
1765
|
+
if (utils$1.isString(rawValue)) {
|
2095
1766
|
try {
|
2096
1767
|
(parser || JSON.parse)(rawValue);
|
2097
|
-
return utils.trim(rawValue);
|
1768
|
+
return utils$1.trim(rawValue);
|
2098
1769
|
} catch (e) {
|
2099
1770
|
if (e.name !== 'SyntaxError') {
|
2100
1771
|
throw e;
|
@@ -2114,13 +1785,13 @@ const defaults = {
|
|
2114
1785
|
transformRequest: [function transformRequest(data, headers) {
|
2115
1786
|
const contentType = headers.getContentType() || '';
|
2116
1787
|
const hasJSONContentType = contentType.indexOf('application/json') > -1;
|
2117
|
-
const isObjectPayload = utils.isObject(data);
|
1788
|
+
const isObjectPayload = utils$1.isObject(data);
|
2118
1789
|
|
2119
|
-
if (isObjectPayload && utils.isHTMLForm(data)) {
|
1790
|
+
if (isObjectPayload && utils$1.isHTMLForm(data)) {
|
2120
1791
|
data = new FormData(data);
|
2121
1792
|
}
|
2122
1793
|
|
2123
|
-
const isFormData = utils.isFormData(data);
|
1794
|
+
const isFormData = utils$1.isFormData(data);
|
2124
1795
|
|
2125
1796
|
if (isFormData) {
|
2126
1797
|
if (!hasJSONContentType) {
|
@@ -2129,18 +1800,18 @@ const defaults = {
|
|
2129
1800
|
return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
|
2130
1801
|
}
|
2131
1802
|
|
2132
|
-
if (utils.isArrayBuffer(data) ||
|
2133
|
-
utils.isBuffer(data) ||
|
2134
|
-
utils.isStream(data) ||
|
2135
|
-
utils.isFile(data) ||
|
2136
|
-
utils.isBlob(data)
|
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)
|
2137
1808
|
) {
|
2138
1809
|
return data;
|
2139
1810
|
}
|
2140
|
-
if (utils.isArrayBufferView(data)) {
|
1811
|
+
if (utils$1.isArrayBufferView(data)) {
|
2141
1812
|
return data.buffer;
|
2142
1813
|
}
|
2143
|
-
if (utils.isURLSearchParams(data)) {
|
1814
|
+
if (utils$1.isURLSearchParams(data)) {
|
2144
1815
|
headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);
|
2145
1816
|
return data.toString();
|
2146
1817
|
}
|
@@ -2152,7 +1823,7 @@ const defaults = {
|
|
2152
1823
|
return toURLEncodedForm(data, this.formSerializer).toString();
|
2153
1824
|
}
|
2154
1825
|
|
2155
|
-
if ((isFileList = utils.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {
|
1826
|
+
if ((isFileList = utils$1.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {
|
2156
1827
|
const _FormData = this.env && this.env.FormData;
|
2157
1828
|
|
2158
1829
|
return toFormData(
|
@@ -2176,7 +1847,7 @@ const defaults = {
|
|
2176
1847
|
const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
|
2177
1848
|
const JSONRequested = this.responseType === 'json';
|
2178
1849
|
|
2179
|
-
if (data && utils.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {
|
1850
|
+
if (data && utils$1.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {
|
2180
1851
|
const silentJSONParsing = transitional && transitional.silentJSONParsing;
|
2181
1852
|
const strictJSONParsing = !silentJSONParsing && JSONRequested;
|
2182
1853
|
|
@@ -2224,13 +1895,13 @@ const defaults = {
|
|
2224
1895
|
}
|
2225
1896
|
};
|
2226
1897
|
|
2227
|
-
utils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {
|
1898
|
+
utils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {
|
2228
1899
|
defaults.headers[method] = {};
|
2229
1900
|
});
|
2230
1901
|
|
2231
1902
|
// RawAxiosHeaders whose duplicates are ignored by node
|
2232
1903
|
// c.f. https://nodejs.org/api/http.html#http_message_headers
|
2233
|
-
const ignoreDuplicateOf = utils.toObjectSet([
|
1904
|
+
const ignoreDuplicateOf = utils$1.toObjectSet([
|
2234
1905
|
'age', 'authorization', 'content-length', 'content-type', 'etag',
|
2235
1906
|
'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',
|
2236
1907
|
'last-modified', 'location', 'max-forwards', 'proxy-authorization',
|
@@ -2291,7 +1962,7 @@ function normalizeValue(value) {
|
|
2291
1962
|
return value;
|
2292
1963
|
}
|
2293
1964
|
|
2294
|
-
return utils.isArray(value) ? value.map(normalizeValue) : String(value);
|
1965
|
+
return utils$1.isArray(value) ? value.map(normalizeValue) : String(value);
|
2295
1966
|
}
|
2296
1967
|
|
2297
1968
|
function parseTokens(str) {
|
@@ -2309,7 +1980,7 @@ function parseTokens(str) {
|
|
2309
1980
|
const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
|
2310
1981
|
|
2311
1982
|
function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
|
2312
|
-
if (utils.isFunction(filter)) {
|
1983
|
+
if (utils$1.isFunction(filter)) {
|
2313
1984
|
return filter.call(this, value, header);
|
2314
1985
|
}
|
2315
1986
|
|
@@ -2317,13 +1988,13 @@ function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
|
|
2317
1988
|
value = header;
|
2318
1989
|
}
|
2319
1990
|
|
2320
|
-
if (!utils.isString(value)) return;
|
1991
|
+
if (!utils$1.isString(value)) return;
|
2321
1992
|
|
2322
|
-
if (utils.isString(filter)) {
|
1993
|
+
if (utils$1.isString(filter)) {
|
2323
1994
|
return value.indexOf(filter) !== -1;
|
2324
1995
|
}
|
2325
1996
|
|
2326
|
-
if (utils.isRegExp(filter)) {
|
1997
|
+
if (utils$1.isRegExp(filter)) {
|
2327
1998
|
return filter.test(value);
|
2328
1999
|
}
|
2329
2000
|
}
|
@@ -2336,7 +2007,7 @@ function formatHeader(header) {
|
|
2336
2007
|
}
|
2337
2008
|
|
2338
2009
|
function buildAccessors(obj, header) {
|
2339
|
-
const accessorName = utils.toCamelCase(' ' + header);
|
2010
|
+
const accessorName = utils$1.toCamelCase(' ' + header);
|
2340
2011
|
|
2341
2012
|
['get', 'set', 'has'].forEach(methodName => {
|
2342
2013
|
Object.defineProperty(obj, methodName + accessorName, {
|
@@ -2363,7 +2034,7 @@ class AxiosHeaders {
|
|
2363
2034
|
throw new Error('header name must be a non-empty string');
|
2364
2035
|
}
|
2365
2036
|
|
2366
|
-
const key = utils.findKey(self, lHeader);
|
2037
|
+
const key = utils$1.findKey(self, lHeader);
|
2367
2038
|
|
2368
2039
|
if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {
|
2369
2040
|
self[key || _header] = normalizeValue(_value);
|
@@ -2371,11 +2042,11 @@ class AxiosHeaders {
|
|
2371
2042
|
}
|
2372
2043
|
|
2373
2044
|
const setHeaders = (headers, _rewrite) =>
|
2374
|
-
utils.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
|
2045
|
+
utils$1.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
|
2375
2046
|
|
2376
|
-
if (utils.isPlainObject(header) || header instanceof this.constructor) {
|
2047
|
+
if (utils$1.isPlainObject(header) || header instanceof this.constructor) {
|
2377
2048
|
setHeaders(header, valueOrRewrite);
|
2378
|
-
} else if(utils.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
|
2049
|
+
} else if(utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
|
2379
2050
|
setHeaders(parseHeaders(header), valueOrRewrite);
|
2380
2051
|
} else {
|
2381
2052
|
header != null && setHeader(valueOrRewrite, header, rewrite);
|
@@ -2388,7 +2059,7 @@ class AxiosHeaders {
|
|
2388
2059
|
header = normalizeHeader(header);
|
2389
2060
|
|
2390
2061
|
if (header) {
|
2391
|
-
const key = utils.findKey(this, header);
|
2062
|
+
const key = utils$1.findKey(this, header);
|
2392
2063
|
|
2393
2064
|
if (key) {
|
2394
2065
|
const value = this[key];
|
@@ -2401,11 +2072,11 @@ class AxiosHeaders {
|
|
2401
2072
|
return parseTokens(value);
|
2402
2073
|
}
|
2403
2074
|
|
2404
|
-
if (utils.isFunction(parser)) {
|
2075
|
+
if (utils$1.isFunction(parser)) {
|
2405
2076
|
return parser.call(this, value, key);
|
2406
2077
|
}
|
2407
2078
|
|
2408
|
-
if (utils.isRegExp(parser)) {
|
2079
|
+
if (utils$1.isRegExp(parser)) {
|
2409
2080
|
return parser.exec(value);
|
2410
2081
|
}
|
2411
2082
|
|
@@ -2418,7 +2089,7 @@ class AxiosHeaders {
|
|
2418
2089
|
header = normalizeHeader(header);
|
2419
2090
|
|
2420
2091
|
if (header) {
|
2421
|
-
const key = utils.findKey(this, header);
|
2092
|
+
const key = utils$1.findKey(this, header);
|
2422
2093
|
|
2423
2094
|
return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
|
2424
2095
|
}
|
@@ -2434,7 +2105,7 @@ class AxiosHeaders {
|
|
2434
2105
|
_header = normalizeHeader(_header);
|
2435
2106
|
|
2436
2107
|
if (_header) {
|
2437
|
-
const key = utils.findKey(self, _header);
|
2108
|
+
const key = utils$1.findKey(self, _header);
|
2438
2109
|
|
2439
2110
|
if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {
|
2440
2111
|
delete self[key];
|
@@ -2444,7 +2115,7 @@ class AxiosHeaders {
|
|
2444
2115
|
}
|
2445
2116
|
}
|
2446
2117
|
|
2447
|
-
if (utils.isArray(header)) {
|
2118
|
+
if (utils$1.isArray(header)) {
|
2448
2119
|
header.forEach(deleteHeader);
|
2449
2120
|
} else {
|
2450
2121
|
deleteHeader(header);
|
@@ -2473,8 +2144,8 @@ class AxiosHeaders {
|
|
2473
2144
|
const self = this;
|
2474
2145
|
const headers = {};
|
2475
2146
|
|
2476
|
-
utils.forEach(this, (value, header) => {
|
2477
|
-
const key = utils.findKey(headers, header);
|
2147
|
+
utils$1.forEach(this, (value, header) => {
|
2148
|
+
const key = utils$1.findKey(headers, header);
|
2478
2149
|
|
2479
2150
|
if (key) {
|
2480
2151
|
self[key] = normalizeValue(value);
|
@@ -2503,8 +2174,8 @@ class AxiosHeaders {
|
|
2503
2174
|
toJSON(asStrings) {
|
2504
2175
|
const obj = Object.create(null);
|
2505
2176
|
|
2506
|
-
utils.forEach(this, (value, header) => {
|
2507
|
-
value != null && value !== false && (obj[header] = asStrings && utils.isArray(value) ? value.join(', ') : value);
|
2177
|
+
utils$1.forEach(this, (value, header) => {
|
2178
|
+
value != null && value !== false && (obj[header] = asStrings && utils$1.isArray(value) ? value.join(', ') : value);
|
2508
2179
|
});
|
2509
2180
|
|
2510
2181
|
return obj;
|
@@ -2551,7 +2222,7 @@ class AxiosHeaders {
|
|
2551
2222
|
}
|
2552
2223
|
}
|
2553
2224
|
|
2554
|
-
utils.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
|
2225
|
+
utils$1.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
|
2555
2226
|
|
2556
2227
|
return this;
|
2557
2228
|
}
|
@@ -2560,7 +2231,7 @@ class AxiosHeaders {
|
|
2560
2231
|
AxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);
|
2561
2232
|
|
2562
2233
|
// reserved names hotfix
|
2563
|
-
utils.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {
|
2234
|
+
utils$1.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {
|
2564
2235
|
let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`
|
2565
2236
|
return {
|
2566
2237
|
get: () => value,
|
@@ -2570,7 +2241,7 @@ utils.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {
|
|
2570
2241
|
}
|
2571
2242
|
});
|
2572
2243
|
|
2573
|
-
utils.freezeMethods(AxiosHeaders);
|
2244
|
+
utils$1.freezeMethods(AxiosHeaders);
|
2574
2245
|
|
2575
2246
|
/**
|
2576
2247
|
* Transform the data for a request or a response
|
@@ -2586,7 +2257,7 @@ function transformData(fns, response) {
|
|
2586
2257
|
const headers = AxiosHeaders.from(context.headers);
|
2587
2258
|
let data = context.data;
|
2588
2259
|
|
2589
|
-
utils.forEach(fns, function transform(fn) {
|
2260
|
+
utils$1.forEach(fns, function transform(fn) {
|
2590
2261
|
data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);
|
2591
2262
|
});
|
2592
2263
|
|
@@ -2614,7 +2285,7 @@ function CanceledError(message, config, request) {
|
|
2614
2285
|
this.name = 'CanceledError';
|
2615
2286
|
}
|
2616
2287
|
|
2617
|
-
utils.inherits(CanceledError, AxiosError, {
|
2288
|
+
utils$1.inherits(CanceledError, AxiosError, {
|
2618
2289
|
__CANCEL__: true
|
2619
2290
|
});
|
2620
2291
|
|
@@ -2642,53 +2313,44 @@ function settle(resolve, reject, response) {
|
|
2642
2313
|
}
|
2643
2314
|
}
|
2644
2315
|
|
2645
|
-
const cookies = platform.
|
2316
|
+
const cookies = platform.hasStandardBrowserEnv ?
|
2646
2317
|
|
2647
|
-
// Standard browser envs support document.cookie
|
2648
|
-
|
2649
|
-
|
2650
|
-
|
2651
|
-
const cookie = [];
|
2652
|
-
cookie.push(name + '=' + encodeURIComponent(value));
|
2318
|
+
// Standard browser envs support document.cookie
|
2319
|
+
{
|
2320
|
+
write(name, value, expires, path, domain, secure) {
|
2321
|
+
const cookie = [name + '=' + encodeURIComponent(value)];
|
2653
2322
|
|
2654
|
-
|
2655
|
-
cookie.push('expires=' + new Date(expires).toGMTString());
|
2656
|
-
}
|
2323
|
+
utils$1.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());
|
2657
2324
|
|
2658
|
-
|
2659
|
-
cookie.push('path=' + path);
|
2660
|
-
}
|
2325
|
+
utils$1.isString(path) && cookie.push('path=' + path);
|
2661
2326
|
|
2662
|
-
|
2663
|
-
cookie.push('domain=' + domain);
|
2664
|
-
}
|
2327
|
+
utils$1.isString(domain) && cookie.push('domain=' + domain);
|
2665
2328
|
|
2666
|
-
|
2667
|
-
cookie.push('secure');
|
2668
|
-
}
|
2329
|
+
secure === true && cookie.push('secure');
|
2669
2330
|
|
2670
|
-
|
2671
|
-
|
2331
|
+
document.cookie = cookie.join('; ');
|
2332
|
+
},
|
2672
2333
|
|
2673
|
-
|
2674
|
-
|
2675
|
-
|
2676
|
-
|
2334
|
+
read(name) {
|
2335
|
+
const match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
|
2336
|
+
return (match ? decodeURIComponent(match[3]) : null);
|
2337
|
+
},
|
2677
2338
|
|
2678
|
-
|
2679
|
-
|
2680
|
-
|
2681
|
-
|
2682
|
-
})() :
|
2339
|
+
remove(name) {
|
2340
|
+
this.write(name, '', Date.now() - 86400000);
|
2341
|
+
}
|
2342
|
+
}
|
2683
2343
|
|
2684
|
-
|
2685
|
-
|
2686
|
-
|
2687
|
-
|
2688
|
-
|
2689
|
-
|
2690
|
-
|
2691
|
-
|
2344
|
+
:
|
2345
|
+
|
2346
|
+
// Non-standard browser env (web workers, react-native) lack needed support.
|
2347
|
+
{
|
2348
|
+
write() {},
|
2349
|
+
read() {
|
2350
|
+
return null;
|
2351
|
+
},
|
2352
|
+
remove() {}
|
2353
|
+
};
|
2692
2354
|
|
2693
2355
|
/**
|
2694
2356
|
* Determines whether the specified URL is absolute
|
@@ -2735,7 +2397,7 @@ function buildFullPath(baseURL, requestedURL) {
|
|
2735
2397
|
return requestedURL;
|
2736
2398
|
}
|
2737
2399
|
|
2738
|
-
const isURLSameOrigin = platform.
|
2400
|
+
const isURLSameOrigin = platform.hasStandardBrowserEnv ?
|
2739
2401
|
|
2740
2402
|
// Standard browser envs have full support of the APIs needed to test
|
2741
2403
|
// whether the request URL is of the same origin as current location.
|
@@ -2745,7 +2407,7 @@ const isURLSameOrigin = platform.isStandardBrowserEnv ?
|
|
2745
2407
|
let originURL;
|
2746
2408
|
|
2747
2409
|
/**
|
2748
|
-
* Parse a URL to discover
|
2410
|
+
* Parse a URL to discover its components
|
2749
2411
|
*
|
2750
2412
|
* @param {String} url The URL to be parsed
|
2751
2413
|
* @returns {Object}
|
@@ -2785,7 +2447,7 @@ const isURLSameOrigin = platform.isStandardBrowserEnv ?
|
|
2785
2447
|
* @returns {boolean} True if URL shares the same origin, otherwise false
|
2786
2448
|
*/
|
2787
2449
|
return function isURLSameOrigin(requestURL) {
|
2788
|
-
const parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;
|
2450
|
+
const parsed = (utils$1.isString(requestURL)) ? resolveURL(requestURL) : requestURL;
|
2789
2451
|
return (parsed.protocol === originURL.protocol &&
|
2790
2452
|
parsed.host === originURL.host);
|
2791
2453
|
};
|
@@ -2890,7 +2552,7 @@ const xhrAdapter = isXHRAdapterSupported && function (config) {
|
|
2890
2552
|
return new Promise(function dispatchXhrRequest(resolve, reject) {
|
2891
2553
|
let requestData = config.data;
|
2892
2554
|
const requestHeaders = AxiosHeaders.from(config.headers).normalize();
|
2893
|
-
|
2555
|
+
let {responseType, withXSRFToken} = config;
|
2894
2556
|
let onCanceled;
|
2895
2557
|
function done() {
|
2896
2558
|
if (config.cancelToken) {
|
@@ -2904,14 +2566,13 @@ const xhrAdapter = isXHRAdapterSupported && function (config) {
|
|
2904
2566
|
|
2905
2567
|
let contentType;
|
2906
2568
|
|
2907
|
-
if (utils.isFormData(requestData)) {
|
2908
|
-
if (platform.
|
2569
|
+
if (utils$1.isFormData(requestData)) {
|
2570
|
+
if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
|
2909
2571
|
requestHeaders.setContentType(false); // Let the browser set it
|
2910
|
-
} else if(
|
2911
|
-
requestHeaders.setContentType('multipart/form-data'); // mobile/desktop app frameworks
|
2912
|
-
} else if(utils.isString(contentType = requestHeaders.getContentType())){
|
2572
|
+
} else if ((contentType = requestHeaders.getContentType()) !== false) {
|
2913
2573
|
// fix semicolon duplication issue for ReactNative FormData implementation
|
2914
|
-
|
2574
|
+
const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];
|
2575
|
+
requestHeaders.setContentType([type || 'multipart/form-data', ...tokens].join('; '));
|
2915
2576
|
}
|
2916
2577
|
}
|
2917
2578
|
|
@@ -3027,13 +2688,16 @@ const xhrAdapter = isXHRAdapterSupported && function (config) {
|
|
3027
2688
|
// Add xsrf header
|
3028
2689
|
// This is only done if running in a standard browser environment.
|
3029
2690
|
// Specifically not if we're in a web worker, or react-native.
|
3030
|
-
if
|
3031
|
-
|
3032
|
-
|
3033
|
-
|
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);
|
3034
2697
|
|
3035
|
-
|
3036
|
-
|
2698
|
+
if (xsrfValue) {
|
2699
|
+
requestHeaders.set(config.xsrfHeaderName, xsrfValue);
|
2700
|
+
}
|
3037
2701
|
}
|
3038
2702
|
}
|
3039
2703
|
|
@@ -3042,13 +2706,13 @@ const xhrAdapter = isXHRAdapterSupported && function (config) {
|
|
3042
2706
|
|
3043
2707
|
// Add headers to the request
|
3044
2708
|
if ('setRequestHeader' in request) {
|
3045
|
-
utils.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
|
2709
|
+
utils$1.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
|
3046
2710
|
request.setRequestHeader(key, val);
|
3047
2711
|
});
|
3048
2712
|
}
|
3049
2713
|
|
3050
2714
|
// Add withCredentials to request if needed
|
3051
|
-
if (!utils.isUndefined(config.withCredentials)) {
|
2715
|
+
if (!utils$1.isUndefined(config.withCredentials)) {
|
3052
2716
|
request.withCredentials = !!config.withCredentials;
|
3053
2717
|
}
|
3054
2718
|
|
@@ -3103,7 +2767,7 @@ const knownAdapters = {
|
|
3103
2767
|
xhr: xhrAdapter
|
3104
2768
|
};
|
3105
2769
|
|
3106
|
-
utils.forEach(knownAdapters, (fn, value) => {
|
2770
|
+
utils$1.forEach(knownAdapters, (fn, value) => {
|
3107
2771
|
if (fn) {
|
3108
2772
|
try {
|
3109
2773
|
Object.defineProperty(fn, 'name', {value});
|
@@ -3116,11 +2780,11 @@ utils.forEach(knownAdapters, (fn, value) => {
|
|
3116
2780
|
|
3117
2781
|
const renderReason = (reason) => `- ${reason}`;
|
3118
2782
|
|
3119
|
-
const isResolvedHandle = (adapter) => utils.isFunction(adapter) || adapter === null || adapter === false;
|
2783
|
+
const isResolvedHandle = (adapter) => utils$1.isFunction(adapter) || adapter === null || adapter === false;
|
3120
2784
|
|
3121
2785
|
const adapters = {
|
3122
2786
|
getAdapter: (adapters) => {
|
3123
|
-
adapters = utils.isArray(adapters) ? adapters : [adapters];
|
2787
|
+
adapters = utils$1.isArray(adapters) ? adapters : [adapters];
|
3124
2788
|
|
3125
2789
|
const {length} = adapters;
|
3126
2790
|
let nameOrAdapter;
|
@@ -3261,11 +2925,11 @@ function mergeConfig(config1, config2) {
|
|
3261
2925
|
const config = {};
|
3262
2926
|
|
3263
2927
|
function getMergedValue(target, source, caseless) {
|
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)) {
|
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)) {
|
3269
2933
|
return source.slice();
|
3270
2934
|
}
|
3271
2935
|
return source;
|
@@ -3273,25 +2937,25 @@ function mergeConfig(config1, config2) {
|
|
3273
2937
|
|
3274
2938
|
// eslint-disable-next-line consistent-return
|
3275
2939
|
function mergeDeepProperties(a, b, caseless) {
|
3276
|
-
if (!utils.isUndefined(b)) {
|
2940
|
+
if (!utils$1.isUndefined(b)) {
|
3277
2941
|
return getMergedValue(a, b, caseless);
|
3278
|
-
} else if (!utils.isUndefined(a)) {
|
2942
|
+
} else if (!utils$1.isUndefined(a)) {
|
3279
2943
|
return getMergedValue(undefined, a, caseless);
|
3280
2944
|
}
|
3281
2945
|
}
|
3282
2946
|
|
3283
2947
|
// eslint-disable-next-line consistent-return
|
3284
2948
|
function valueFromConfig2(a, b) {
|
3285
|
-
if (!utils.isUndefined(b)) {
|
2949
|
+
if (!utils$1.isUndefined(b)) {
|
3286
2950
|
return getMergedValue(undefined, b);
|
3287
2951
|
}
|
3288
2952
|
}
|
3289
2953
|
|
3290
2954
|
// eslint-disable-next-line consistent-return
|
3291
2955
|
function defaultToConfig2(a, b) {
|
3292
|
-
if (!utils.isUndefined(b)) {
|
2956
|
+
if (!utils$1.isUndefined(b)) {
|
3293
2957
|
return getMergedValue(undefined, b);
|
3294
|
-
} else if (!utils.isUndefined(a)) {
|
2958
|
+
} else if (!utils$1.isUndefined(a)) {
|
3295
2959
|
return getMergedValue(undefined, a);
|
3296
2960
|
}
|
3297
2961
|
}
|
@@ -3316,6 +2980,7 @@ function mergeConfig(config1, config2) {
|
|
3316
2980
|
timeout: defaultToConfig2,
|
3317
2981
|
timeoutMessage: defaultToConfig2,
|
3318
2982
|
withCredentials: defaultToConfig2,
|
2983
|
+
withXSRFToken: defaultToConfig2,
|
3319
2984
|
adapter: defaultToConfig2,
|
3320
2985
|
responseType: defaultToConfig2,
|
3321
2986
|
xsrfCookieName: defaultToConfig2,
|
@@ -3336,16 +3001,16 @@ function mergeConfig(config1, config2) {
|
|
3336
3001
|
headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)
|
3337
3002
|
};
|
3338
3003
|
|
3339
|
-
utils.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
|
3004
|
+
utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
|
3340
3005
|
const merge = mergeMap[prop] || mergeDeepProperties;
|
3341
3006
|
const configValue = merge(config1[prop], config2[prop], prop);
|
3342
|
-
(utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
|
3007
|
+
(utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
|
3343
3008
|
});
|
3344
3009
|
|
3345
3010
|
return config;
|
3346
3011
|
}
|
3347
3012
|
|
3348
|
-
const VERSION = "1.
|
3013
|
+
const VERSION = "1.6.2";
|
3349
3014
|
|
3350
3015
|
const validators$1 = {};
|
3351
3016
|
|
@@ -3483,7 +3148,7 @@ class Axios {
|
|
3483
3148
|
}
|
3484
3149
|
|
3485
3150
|
if (paramsSerializer != null) {
|
3486
|
-
if (utils.isFunction(paramsSerializer)) {
|
3151
|
+
if (utils$1.isFunction(paramsSerializer)) {
|
3487
3152
|
config.paramsSerializer = {
|
3488
3153
|
serialize: paramsSerializer
|
3489
3154
|
};
|
@@ -3499,12 +3164,12 @@ class Axios {
|
|
3499
3164
|
config.method = (config.method || this.defaults.method || 'get').toLowerCase();
|
3500
3165
|
|
3501
3166
|
// Flatten headers
|
3502
|
-
let contextHeaders = headers && utils.merge(
|
3167
|
+
let contextHeaders = headers && utils$1.merge(
|
3503
3168
|
headers.common,
|
3504
3169
|
headers[config.method]
|
3505
3170
|
);
|
3506
3171
|
|
3507
|
-
headers && utils.forEach(
|
3172
|
+
headers && utils$1.forEach(
|
3508
3173
|
['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
|
3509
3174
|
(method) => {
|
3510
3175
|
delete headers[method];
|
@@ -3591,7 +3256,7 @@ class Axios {
|
|
3591
3256
|
}
|
3592
3257
|
|
3593
3258
|
// Provide aliases for supported request methods
|
3594
|
-
utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
|
3259
|
+
utils$1.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
|
3595
3260
|
/*eslint func-names:0*/
|
3596
3261
|
Axios.prototype[method] = function(url, config) {
|
3597
3262
|
return this.request(mergeConfig(config || {}, {
|
@@ -3602,7 +3267,7 @@ utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData
|
|
3602
3267
|
};
|
3603
3268
|
});
|
3604
3269
|
|
3605
|
-
utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
|
3270
|
+
utils$1.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
|
3606
3271
|
/*eslint func-names:0*/
|
3607
3272
|
|
3608
3273
|
function generateHTTPMethod(isForm) {
|
@@ -3774,7 +3439,7 @@ function spread(callback) {
|
|
3774
3439
|
* @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
|
3775
3440
|
*/
|
3776
3441
|
function isAxiosError(payload) {
|
3777
|
-
return utils.isObject(payload) && (payload.isAxiosError === true);
|
3442
|
+
return utils$1.isObject(payload) && (payload.isAxiosError === true);
|
3778
3443
|
}
|
3779
3444
|
|
3780
3445
|
const HttpStatusCode = {
|
@@ -3859,10 +3524,10 @@ function createInstance(defaultConfig) {
|
|
3859
3524
|
const instance = bind(Axios.prototype.request, context);
|
3860
3525
|
|
3861
3526
|
// Copy axios.prototype to instance
|
3862
|
-
utils.extend(instance, Axios.prototype, context, {allOwnKeys: true});
|
3527
|
+
utils$1.extend(instance, Axios.prototype, context, {allOwnKeys: true});
|
3863
3528
|
|
3864
3529
|
// Copy context to instance
|
3865
|
-
utils.extend(instance, context, null, {allOwnKeys: true});
|
3530
|
+
utils$1.extend(instance, context, null, {allOwnKeys: true});
|
3866
3531
|
|
3867
3532
|
// Factory for creating new instances
|
3868
3533
|
instance.create = function create(instanceConfig) {
|
@@ -3906,7 +3571,7 @@ axios.mergeConfig = mergeConfig;
|
|
3906
3571
|
|
3907
3572
|
axios.AxiosHeaders = AxiosHeaders;
|
3908
3573
|
|
3909
|
-
axios.formToJSON = thing => formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);
|
3574
|
+
axios.formToJSON = thing => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing);
|
3910
3575
|
|
3911
3576
|
axios.getAdapter = adapters.getAdapter;
|
3912
3577
|
|
@@ -3992,7 +3657,7 @@ var requestLogger = function (r) {
|
|
3992
3657
|
* .setSessionType('signing')
|
3993
3658
|
* .logRequests(true)
|
3994
3659
|
* .setClientID('1234)
|
3995
|
-
* .setTimeout(
|
3660
|
+
* .setTimeout(30000);
|
3996
3661
|
* ```
|
3997
3662
|
*/
|
3998
3663
|
var VerdocsEndpoint = /** @class */ (function () {
|
@@ -4007,8 +3672,9 @@ var VerdocsEndpoint = /** @class */ (function () {
|
|
4007
3672
|
function VerdocsEndpoint(options) {
|
4008
3673
|
this.environment = 'verdocs';
|
4009
3674
|
this.sessionType = 'user';
|
4010
|
-
this.baseURL = 'https://
|
4011
|
-
|
3675
|
+
this.baseURL = (window.location.origin === 'https://beta.verdocs.com'
|
3676
|
+
? 'https://stage-api.verdocs.com'
|
3677
|
+
: 'https://api.verdocs.com');
|
4012
3678
|
this.clientID = 'not-set';
|
4013
3679
|
this.timeout = 60000;
|
4014
3680
|
this.token = null;
|
@@ -4021,21 +3687,12 @@ var VerdocsEndpoint = /** @class */ (function () {
|
|
4021
3687
|
* with Envelopes.
|
4022
3688
|
*/
|
4023
3689
|
this.session = null;
|
4024
|
-
this.baseURL = (options === null || options === void 0 ? void 0 : options.baseURL) ||
|
4025
|
-
this.
|
4026
|
-
this.
|
4027
|
-
this.
|
4028
|
-
this.
|
4029
|
-
this.clientID = (options === null || options === void 0 ? void 0 : options.clientID) || 'not-set';
|
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;
|
4030
3695
|
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
|
-
});
|
4039
3696
|
}
|
4040
3697
|
VerdocsEndpoint.prototype.setDefault = function () {
|
4041
3698
|
globalThis_1[ENDPOINT_KEY] = this;
|
@@ -4043,7 +3700,7 @@ var VerdocsEndpoint = /** @class */ (function () {
|
|
4043
3700
|
VerdocsEndpoint.getDefault = function () {
|
4044
3701
|
if (!globalThis_1[ENDPOINT_KEY]) {
|
4045
3702
|
globalThis_1[ENDPOINT_KEY] = new VerdocsEndpoint();
|
4046
|
-
window.console.debug('[JS_SDK] Created default endpoint', globalThis_1[ENDPOINT_KEY]);
|
3703
|
+
window.console.debug('[JS_SDK] Created default endpoint', globalThis_1[ENDPOINT_KEY].baseURL);
|
4047
3704
|
}
|
4048
3705
|
return globalThis_1[ENDPOINT_KEY];
|
4049
3706
|
};
|
@@ -4065,13 +3722,6 @@ var VerdocsEndpoint = /** @class */ (function () {
|
|
4065
3722
|
VerdocsEndpoint.prototype.getBaseURL = function () {
|
4066
3723
|
return this.baseURL;
|
4067
3724
|
};
|
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
|
-
};
|
4075
3725
|
/**
|
4076
3726
|
* Get the current client ID, if set.
|
4077
3727
|
*/
|
@@ -4139,21 +3789,6 @@ var VerdocsEndpoint = /** @class */ (function () {
|
|
4139
3789
|
this.api.defaults.baseURL = url;
|
4140
3790
|
return this;
|
4141
3791
|
};
|
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
|
-
};
|
4157
3792
|
/**
|
4158
3793
|
* Set the Client ID for Verdocs API calls.
|
4159
3794
|
*
|
@@ -4314,9 +3949,8 @@ var VerdocsEndpoint = /** @class */ (function () {
|
|
4314
3949
|
|
4315
3950
|
exports.VerdocsEndpoint = VerdocsEndpoint;
|
4316
3951
|
exports.canPerformTemplateAction = canPerformTemplateAction;
|
4317
|
-
exports.
|
3952
|
+
exports.createTemplatev2 = createTemplatev2;
|
4318
3953
|
exports.deleteTemplate = deleteTemplate;
|
4319
3954
|
exports.getTemplate = getTemplate;
|
4320
|
-
exports.getTemplates = getTemplates;
|
4321
3955
|
exports.listTemplates = listTemplates;
|
4322
3956
|
exports.updateTemplate = updateTemplate;
|