@justifi/webcomponents 4.10.0 → 4.12.0
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/Business-f8e37adb.js +144 -0
- package/dist/cjs/{Payment-89a8bc21.js → Payment-eceed10f.js} +1 -0
- package/dist/cjs/{SubAccount-05867651.js → SubAccount-b3902202.js} +1 -1
- package/dist/cjs/additional-questions-details_5.cjs.entry.js +5 -6
- package/dist/cjs/business-additional-questions-schema-bdfd29c3.js +78 -0
- package/dist/cjs/business-details-core.cjs.entry.js +9 -4
- package/dist/cjs/{business-form-types-3cdd5447.js → business-form-types-61b8196a.js} +33 -0
- package/dist/cjs/{form-control-datepart_3.cjs.entry.js → form-control-date_4.cjs.entry.js} +70 -56
- package/dist/cjs/form-control-datepart.cjs.entry.js +80 -0
- package/dist/cjs/form-control-monetary.cjs.entry.js +1 -1
- package/dist/cjs/{form-control-number_3.cjs.entry.js → form-control-select_2.cjs.entry.js} +4 -46
- package/dist/cjs/{form-input-masks-e3bf2614.js → form-input-masks-baa06faf.js} +1 -1
- package/dist/cjs/gross-payment-chart-core.cjs.entry.js +10 -5
- package/dist/cjs/{index-69b9386b.js → index-5d5f2219.js} +3 -0
- package/dist/cjs/justifi-additional-questions-form-step_5.cjs.entry.js +38 -26
- package/dist/cjs/justifi-additional-questions_4.cjs.entry.js +20 -21
- package/dist/cjs/justifi-bank-account-form.cjs.entry.js +1 -1
- package/dist/cjs/justifi-billing-form_4.cjs.entry.js +5 -5
- package/dist/cjs/justifi-business-details.cjs.entry.js +23 -7
- package/dist/cjs/justifi-business-form.cjs.entry.js +71 -54
- package/dist/cjs/justifi-business-list.cjs.entry.js +4 -6
- package/dist/cjs/justifi-business-owners.cjs.entry.js +2 -2
- package/dist/cjs/justifi-card-form.cjs.entry.js +1 -1
- package/dist/cjs/justifi-checkout-core.cjs.entry.js +34 -24
- package/dist/cjs/justifi-checkout.cjs.entry.js +15 -11
- package/dist/cjs/justifi-details.cjs.entry.js +2 -2
- package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +30 -6
- package/dist/cjs/{justifi-new-payment-method_3.cjs.entry.js → justifi-new-payment-method_4.cjs.entry.js} +95 -11
- package/dist/cjs/justifi-owner-form.cjs.entry.js +42 -20
- package/dist/cjs/justifi-payment-balance-transactions.cjs.entry.js +3 -4
- package/dist/cjs/justifi-payment-details.cjs.entry.js +29 -8
- package/dist/cjs/justifi-payment-form.cjs.entry.js +19 -7
- package/dist/cjs/justifi-payment-method-selector.cjs.entry.js +2 -2
- package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +25 -18
- package/dist/cjs/justifi-payments-list.cjs.entry.js +29 -9
- package/dist/cjs/justifi-payout-details.cjs.entry.js +31 -11
- package/dist/cjs/justifi-payouts-list.cjs.entry.js +30 -10
- package/dist/cjs/justifi-proceeds-list.cjs.entry.js +3 -4
- package/dist/cjs/justifi-refund-form.cjs.entry.js +2 -2
- package/dist/cjs/justifi-subaccount-details.cjs.entry.js +5 -6
- package/dist/cjs/justifi-subaccounts-list.cjs.entry.js +4 -5
- package/dist/cjs/justifi-table_2.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/payload-parsers-32c43c76.js +144 -0
- package/dist/cjs/payment-details-core.cjs.entry.js +10 -5
- package/dist/cjs/{payment.service-0b0086dc.js → payment.service-9db24ab9.js} +1 -1
- package/dist/cjs/payments-list-core.cjs.entry.js +11 -6
- package/dist/cjs/payout-details-core.cjs.entry.js +11 -7
- package/dist/cjs/{payout.service-5cc3b4e9.js → payout.service-a0efb71a.js} +1 -1
- package/dist/cjs/payouts-list-core.cjs.entry.js +11 -6
- package/dist/cjs/subaccount-account-details_4.cjs.entry.js +5 -6
- package/dist/cjs/subaccount-bank-details.cjs.entry.js +2 -2
- package/dist/cjs/subaccount-terms-details.cjs.entry.js +2 -2
- package/dist/cjs/{utils-23e70ef2.js → utils-6e35fa70.js} +1 -1
- package/dist/cjs/{utils-2b9940e1.js → utils-6f62f7a1.js} +0 -7
- package/dist/cjs/utils-f8079741.js +41 -0
- package/dist/cjs/{utils-df5167a8.js → utils-fc72268d.js} +8 -1
- package/dist/cjs/webcomponents.cjs.js +2 -2
- package/dist/collection/api/Business.js +3 -20
- package/dist/collection/api/Checkout.js +6 -1
- package/dist/collection/api/ComponentError.js +14 -0
- package/dist/collection/api/Identity.js +7 -4
- package/dist/collection/api/Payment.js +1 -0
- package/dist/collection/api/services/checkout.service.js +7 -3
- package/dist/collection/api/services/utils.js +11 -0
- package/dist/collection/api/shared.js +11 -1
- package/dist/collection/collection-manifest.json +3 -2
- package/dist/collection/components/business-details/additional-questions-details/test/additional-questions.spec.js +1 -1
- package/dist/collection/components/business-details/business-details-core.js +30 -2
- package/dist/collection/components/business-details/business-details.js +30 -0
- package/dist/collection/components/business-details/generic-info-details/generic-info-details.js +2 -2
- package/dist/collection/components/business-details/generic-info-details/test/generic-info-details.spec.js +1 -1
- package/dist/collection/components/business-details/get-business.js +15 -3
- package/dist/collection/components/business-details/legal-address-details/test/legal-address-details.spec.js +1 -1
- package/dist/collection/components/business-details/owner-details/test/owner-details.spec.js +1 -1
- package/dist/collection/components/business-details/representative-details/test/representative-details.spec.js +1 -1
- package/dist/collection/components/business-details/test/busines-details-core.spec.js +56 -16
- package/dist/collection/components/business-details/test/business-details.spec.js +20 -4
- package/dist/collection/components/business-details/test/get-business.spec.js +13 -6
- package/dist/collection/components/business-forms/business-form/business-core-info/business-core-info.js +2 -2
- package/dist/collection/components/business-forms/business-form/business-form.js +124 -50
- package/dist/collection/components/business-forms/business-form/business-representative/business-representative.js +12 -12
- package/dist/collection/components/business-forms/business-form/legal-address-form/legal-address-form.js +4 -2
- package/dist/collection/components/business-forms/{business-form/business-address/business-address-form.js → owner-form/identity-address/identity-address-form.js} +13 -10
- package/dist/collection/components/business-forms/owner-form/identity-address/test/identity-address.e2e.js +9 -0
- package/dist/collection/components/business-forms/{business-form/business-address/test/business-address.spec.js → owner-form/identity-address/test/identity-address.spec.js} +21 -14
- package/dist/collection/components/business-forms/owner-form/owner-form.js +75 -13
- package/dist/collection/components/business-forms/payment-provisioning/additional-questions/business-additional-questions-form-step.js +20 -2
- package/dist/collection/components/business-forms/payment-provisioning/business-core-info/business-core-info-form-step.js +21 -4
- package/dist/collection/components/business-forms/payment-provisioning/business-owners/business-owners-form-step.js +44 -4
- package/dist/collection/components/business-forms/payment-provisioning/business-representative/business-representative-form-step.js +31 -6
- package/dist/collection/components/business-forms/payment-provisioning/legal-address-form/legal-address-form-step.js +23 -4
- package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning.js +74 -15
- package/dist/collection/components/business-forms/schemas/business-additional-questions-schema.js +15 -6
- package/dist/collection/components/business-forms/schemas/business-address-schema.js +40 -14
- package/dist/collection/components/business-forms/schemas/business-core-info-schema.js +55 -12
- package/dist/collection/components/business-forms/schemas/business-form-schema.js +4 -4
- package/dist/collection/components/business-forms/schemas/business-identity-schema.js +40 -34
- package/dist/collection/components/business-forms/schemas/schema-helpers.js +8 -0
- package/dist/collection/components/business-forms/utils/business-form-types.js +30 -0
- package/dist/collection/components/business-forms/utils/helpers.js +22 -0
- package/dist/collection/components/business-forms/utils/payload-parsers.js +1 -0
- package/dist/collection/components/business-list/business-list.js +0 -2
- package/dist/collection/components/checkout/checkout-actions.js +2 -2
- package/dist/collection/components/checkout/checkout-core.css +361 -0
- package/dist/collection/components/checkout/checkout-core.js +32 -27
- package/dist/collection/components/checkout/checkout.js +5 -5
- package/dist/collection/components/checkout/new-payment-method.js +12 -6
- package/dist/collection/components/checkout/payment-method-options.css +18 -2
- package/dist/collection/components/checkout/payment-method-options.js +62 -5
- package/dist/collection/components/checkout/payment-method-payload.js +1 -0
- package/dist/collection/components/checkout/saved-payment-method.js +11 -6
- package/dist/collection/components/checkout/sezzel-payment-method.js +247 -0
- package/dist/collection/components/form/form-control-date.css +1803 -0
- package/dist/collection/components/form/form-control-date.js +192 -0
- package/dist/collection/components/form/form-control-text.js +35 -1
- package/dist/collection/components/form/utils.js +6 -0
- package/dist/collection/components/gross-payment-chart/get-gross-payment-chart-data.js +17 -2
- package/dist/collection/components/gross-payment-chart/gross-payment-chart-core.js +30 -1
- package/dist/collection/components/gross-payment-chart/gross-payment-chart.js +35 -1
- package/dist/collection/components/gross-payment-chart/test/get-gross-payment-chart-data.spec.js +26 -8
- package/dist/collection/components/gross-payment-chart/test/gross-payment-chart-core.spec.js +51 -11
- package/dist/collection/components/gross-payment-chart/test/gross-payment-chart.spec.js +55 -3
- package/dist/collection/components/payment-details/get-payment-details.js +15 -3
- package/dist/collection/components/payment-details/payment-details-core.js +30 -1
- package/dist/collection/components/payment-details/payment-details.js +35 -1
- package/dist/collection/components/payment-details/test/get-payment-details.spec.js +11 -3
- package/dist/collection/components/payment-details/test/payment-details-core.spec.js +55 -12
- package/dist/collection/components/payment-details/test/payment-details.spec.js +69 -3
- package/dist/collection/components/payment-form/payment-form.js +54 -3
- package/dist/collection/components/payment-form/payment-method-selector.js +1 -1
- package/dist/collection/components/payment-form/test/payment-form.spec.js +60 -1
- package/dist/collection/components/payment-method-form/payment-method-form.js +1 -1
- package/dist/collection/components/payments-list/get-payments.js +15 -4
- package/dist/collection/components/payments-list/payments-list-core.js +28 -2
- package/dist/collection/components/payments-list/payments-list.js +35 -1
- package/dist/collection/components/payments-list/test/get-payments.spec.js +11 -3
- package/dist/collection/components/payments-list/test/payments-list-core.spec.js +43 -28
- package/dist/collection/components/payments-list/test/payments-list.spec.js +31 -3
- package/dist/collection/components/payout-details/get-payout-details.js +17 -6
- package/dist/collection/components/payout-details/payout-details-core.js +31 -3
- package/dist/collection/components/payout-details/payout-details.js +35 -1
- package/dist/collection/components/payout-details/test/get-payout-details.spec.js +15 -5
- package/dist/collection/components/payout-details/test/payout-details-core.spec.js +54 -16
- package/dist/collection/components/payout-details/test/payout-details.spec.js +50 -1
- package/dist/collection/components/payouts-list/get-payouts.js +17 -5
- package/dist/collection/components/payouts-list/payouts-list-core.js +28 -2
- package/dist/collection/components/payouts-list/payouts-list.js +34 -1
- package/dist/collection/components/payouts-list/test/get-payouts.spec.js +11 -3
- package/dist/collection/components/payouts-list/test/payouts-list-core.spec.js +42 -29
- package/dist/collection/components/payouts-list/test/payouts-list.spec.js +33 -0
- package/dist/collection/components/select-input/select-input.js +1 -1
- package/dist/collection/components/select-input/test/select-input.spec.js +4 -4
- package/dist/collection/components/subaccount-details/subaccount-merchant-details/subaccount-merchant-details.js +3 -3
- package/dist/collection/components/text-input/test/text-input.spec.js +4 -4
- package/dist/collection/components/text-input/text-input.js +1 -1
- package/dist/collection/utils/form-input-masks.js +1 -1
- package/dist/collection/utils/utils.js +0 -5
- package/dist/docs.json +1583 -607
- package/dist/esm/Business-2410f7e3.js +136 -0
- package/dist/esm/{Payment-55886c86.js → Payment-ef9fc1ae.js} +1 -0
- package/dist/esm/{SubAccount-61ac70eb.js → SubAccount-f4ae9809.js} +1 -1
- package/dist/esm/additional-questions-details_5.entry.js +5 -6
- package/dist/esm/business-additional-questions-schema-5571d40f.js +75 -0
- package/dist/esm/business-details-core.entry.js +9 -4
- package/dist/esm/business-form-types-46ecd908.js +50 -0
- package/dist/esm/{form-control-datepart_3.entry.js → form-control-date_4.entry.js} +68 -55
- package/dist/esm/form-control-datepart.entry.js +76 -0
- package/dist/esm/form-control-monetary.entry.js +1 -1
- package/dist/esm/{form-control-number_3.entry.js → form-control-select_2.entry.js} +5 -46
- package/dist/esm/{form-input-masks-a8187c77.js → form-input-masks-850c8cd4.js} +1 -1
- package/dist/esm/gross-payment-chart-core.entry.js +10 -5
- package/dist/esm/{index-df86d9a2.js → index-83dcf934.js} +3 -0
- package/dist/esm/justifi-additional-questions-form-step_5.entry.js +36 -24
- package/dist/esm/justifi-additional-questions_4.entry.js +20 -21
- package/dist/esm/justifi-bank-account-form.entry.js +1 -1
- package/dist/esm/justifi-billing-form_4.entry.js +5 -5
- package/dist/esm/justifi-business-details.entry.js +23 -7
- package/dist/esm/justifi-business-form.entry.js +71 -54
- package/dist/esm/justifi-business-list.entry.js +4 -6
- package/dist/esm/justifi-business-owners.entry.js +2 -2
- package/dist/esm/justifi-card-form.entry.js +1 -1
- package/dist/esm/justifi-checkout-core.entry.js +34 -24
- package/dist/esm/justifi-checkout.entry.js +15 -11
- package/dist/esm/justifi-details.entry.js +2 -2
- package/dist/esm/justifi-gross-payment-chart.entry.js +29 -5
- package/dist/esm/{justifi-new-payment-method_3.entry.js → justifi-new-payment-method_4.entry.js} +95 -12
- package/dist/esm/justifi-owner-form.entry.js +42 -20
- package/dist/esm/justifi-payment-balance-transactions.entry.js +3 -4
- package/dist/esm/justifi-payment-details.entry.js +29 -8
- package/dist/esm/justifi-payment-form.entry.js +19 -7
- package/dist/esm/justifi-payment-method-selector.entry.js +2 -2
- package/dist/esm/justifi-payment-provisioning.entry.js +25 -18
- package/dist/esm/justifi-payments-list.entry.js +29 -9
- package/dist/esm/justifi-payout-details.entry.js +31 -11
- package/dist/esm/justifi-payouts-list.entry.js +30 -10
- package/dist/esm/justifi-proceeds-list.entry.js +3 -4
- package/dist/esm/justifi-refund-form.entry.js +2 -2
- package/dist/esm/justifi-subaccount-details.entry.js +5 -6
- package/dist/esm/justifi-subaccounts-list.entry.js +4 -5
- package/dist/esm/justifi-table_2.entry.js +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/payload-parsers-192e0c3e.js +131 -0
- package/dist/esm/payment-details-core.entry.js +10 -5
- package/dist/esm/{payment.service-f274ef98.js → payment.service-ec28a959.js} +1 -1
- package/dist/esm/payments-list-core.entry.js +11 -6
- package/dist/esm/payout-details-core.entry.js +11 -7
- package/dist/esm/{payout.service-af293f61.js → payout.service-5fd5986c.js} +1 -1
- package/dist/esm/payouts-list-core.entry.js +11 -6
- package/dist/esm/subaccount-account-details_4.entry.js +5 -6
- package/dist/esm/subaccount-bank-details.entry.js +2 -2
- package/dist/esm/subaccount-terms-details.entry.js +2 -2
- package/dist/esm/{utils-d01c5f3a.js → utils-210fdf39.js} +1 -1
- package/dist/esm/{utils-d9e90399.js → utils-243abdb4.js} +1 -7
- package/dist/esm/utils-4609f32c.js +38 -0
- package/dist/esm/{utils-2828201a.js → utils-6f05d9d7.js} +8 -2
- package/dist/esm/webcomponents.js +3 -3
- package/dist/module/Business.js +48 -21
- package/dist/module/Payment.js +1 -0
- package/dist/module/SubAccount.js +1 -1
- package/dist/module/business-additional-questions-form-step.js +4 -2
- package/dist/module/business-additional-questions-schema.js +16 -7
- package/dist/module/business-address-schema.js +42 -16
- package/dist/module/business-core-info-form-step.js +5 -4
- package/dist/module/business-core-info-schema.js +56 -13
- package/dist/module/business-core-info.js +2 -2
- package/dist/module/business-details-core2.js +8 -3
- package/dist/module/business-form-types.js +32 -1
- package/dist/module/business-identity-schema.js +41 -35
- package/dist/module/business-owners-form-step.js +14 -10
- package/dist/module/business-representative-form-step.js +22 -13
- package/dist/module/business-representative.js +17 -17
- package/dist/module/checkout-core.js +50 -33
- package/dist/module/form-control-date.d.ts +11 -0
- package/dist/module/form-control-date.js +6 -0
- package/dist/module/form-control-date2.js +68 -0
- package/dist/module/form-control-text2.js +5 -1
- package/dist/module/form-input-masks.js +1 -1
- package/dist/module/generic-info-details2.js +2 -2
- package/dist/module/gross-payment-chart-core2.js +8 -2
- package/dist/module/helpers.js +25 -0
- package/dist/module/{business-address-form.js → identity-address-form.js} +17 -20
- package/dist/module/justifi-business-details.js +22 -5
- package/dist/module/justifi-business-form.js +81 -61
- package/dist/module/justifi-business-list.js +1 -3
- package/dist/module/justifi-checkout.js +31 -21
- package/dist/module/justifi-gross-payment-chart.js +28 -4
- package/dist/module/justifi-identity-address-form.d.ts +11 -0
- package/dist/module/justifi-identity-address-form.js +6 -0
- package/dist/module/justifi-payment-balance-transactions.js +1 -1
- package/dist/module/justifi-payment-details.js +26 -5
- package/dist/module/justifi-payment-form.js +18 -4
- package/dist/module/justifi-payment-provisioning.js +35 -27
- package/dist/module/justifi-payments-list.js +26 -6
- package/dist/module/justifi-payout-details.js +28 -8
- package/dist/module/justifi-payouts-list.js +27 -7
- package/dist/module/justifi-sezzel-payment-method.d.ts +11 -0
- package/dist/module/justifi-sezzel-payment-method.js +6 -0
- package/dist/module/justifi-subaccount-details.js +1 -1
- package/dist/module/justifi-subaccounts-list.js +1 -1
- package/dist/module/legal-address-form-step.js +10 -13
- package/dist/module/legal-address-form.js +5 -9
- package/dist/module/new-payment-method.js +5 -4
- package/dist/module/owner-form.js +46 -20
- package/dist/module/payload-parsers.js +11 -1
- package/dist/module/payment-details-core2.js +9 -3
- package/dist/module/payment-method-form.js +1 -1
- package/dist/module/payment-method-options.js +34 -12
- package/dist/module/payments-list-core2.js +9 -3
- package/dist/module/payout-details-core2.js +10 -5
- package/dist/module/payouts-list-core2.js +9 -3
- package/dist/module/saved-payment-method.js +4 -4
- package/dist/module/select-input2.js +1 -1
- package/dist/module/sezzel-payment-method.js +99 -0
- package/dist/module/subaccount-merchant-details2.js +3 -3
- package/dist/module/text-input2.js +1 -1
- package/dist/module/utils2.js +1 -7
- package/dist/module/utils3.js +31 -1
- package/dist/module/utils4.js +7 -1
- package/dist/types/api/Business.d.ts +0 -19
- package/dist/types/api/Checkout.d.ts +63 -2
- package/dist/types/api/ComponentError.d.ts +18 -0
- package/dist/types/api/Identity.d.ts +2 -0
- package/dist/types/api/Payment.d.ts +2 -1
- package/dist/types/api/SubAccount.d.ts +0 -2
- package/dist/types/api/services/checkout.service.d.ts +8 -2
- package/dist/types/api/services/utils.d.ts +2 -0
- package/dist/types/api/shared.d.ts +9 -0
- package/dist/types/components/business-details/business-details-core.d.ts +3 -0
- package/dist/types/components/business-details/business-details.d.ts +3 -0
- package/dist/types/components/business-forms/business-form/business-form.d.ts +9 -2
- package/dist/types/components/business-forms/business-form/business-representative/business-representative.d.ts +3 -3
- package/dist/types/components/business-forms/owner-form/identity-address/identity-address-form.d.ts +10 -0
- package/dist/types/components/business-forms/owner-form/owner-form.d.ts +9 -3
- package/dist/types/components/business-forms/payment-provisioning/additional-questions/business-additional-questions-form-step.d.ts +1 -0
- package/dist/types/components/business-forms/payment-provisioning/business-core-info/business-core-info-form-step.d.ts +1 -0
- package/dist/types/components/business-forms/payment-provisioning/business-owners/business-owners-form-step.d.ts +3 -1
- package/dist/types/components/business-forms/payment-provisioning/business-representative/business-representative-form-step.d.ts +2 -0
- package/dist/types/components/business-forms/payment-provisioning/legal-address-form/legal-address-form-step.d.ts +1 -0
- package/dist/types/components/business-forms/payment-provisioning/payment-provisioning.d.ts +6 -2
- package/dist/types/components/business-forms/schemas/business-additional-questions-schema.d.ts +1 -1
- package/dist/types/components/business-forms/schemas/business-address-schema.d.ts +1 -12
- package/dist/types/components/business-forms/schemas/business-core-info-schema.d.ts +3 -3
- package/dist/types/components/business-forms/schemas/business-form-schema.d.ts +11 -11
- package/dist/types/components/business-forms/schemas/business-identity-schema.d.ts +7 -37
- package/dist/types/components/business-forms/schemas/schema-helpers.d.ts +6 -0
- package/dist/types/components/business-forms/utils/business-form-types.d.ts +15 -0
- package/dist/types/components/business-forms/utils/helpers.d.ts +8 -0
- package/dist/types/components/checkout/checkout-actions.d.ts +3 -3
- package/dist/types/components/checkout/checkout-core.d.ts +5 -4
- package/dist/types/components/checkout/checkout.d.ts +1 -1
- package/dist/types/components/checkout/new-payment-method.d.ts +2 -1
- package/dist/types/components/checkout/payment-method-options.d.ts +5 -1
- package/dist/types/components/checkout/payment-method-payload.d.ts +8 -0
- package/dist/types/components/checkout/saved-payment-method.d.ts +2 -1
- package/dist/types/components/checkout/sezzel-payment-method.d.ts +23 -0
- package/dist/types/components/form/form-control-date.d.ts +18 -0
- package/dist/types/components/form/form-control-text.d.ts +2 -0
- package/dist/types/components/form/utils.d.ts +1 -0
- package/dist/types/components/gross-payment-chart/get-gross-payment-chart-data.d.ts +5 -8
- package/dist/types/components/gross-payment-chart/gross-payment-chart-core.d.ts +3 -0
- package/dist/types/components/gross-payment-chart/gross-payment-chart.d.ts +4 -0
- package/dist/types/components/payment-details/payment-details-core.d.ts +3 -0
- package/dist/types/components/payment-details/payment-details.d.ts +4 -0
- package/dist/types/components/payment-form/payment-form.d.ts +4 -1
- package/dist/types/components/payments-list/payments-list-core.d.ts +2 -0
- package/dist/types/components/payments-list/payments-list.d.ts +4 -0
- package/dist/types/components/payout-details/payout-details-core.d.ts +3 -0
- package/dist/types/components/payout-details/payout-details.d.ts +4 -0
- package/dist/types/components/payouts-list/payouts-list-core.d.ts +2 -0
- package/dist/types/components/payouts-list/payouts-list.d.ts +4 -0
- package/dist/types/components.d.ts +329 -52
- package/dist/types/utils/utils.d.ts +0 -1
- package/dist/webcomponents/p-02fa533c.js +1 -0
- package/dist/webcomponents/p-0315876e.entry.js +1 -0
- package/dist/webcomponents/p-0c269feb.entry.js +1 -0
- package/dist/webcomponents/p-0eb56b44.entry.js +1 -0
- package/dist/webcomponents/p-0eb77101.entry.js +1 -0
- package/dist/webcomponents/p-1334f776.entry.js +1 -0
- package/dist/webcomponents/p-19001cc5.entry.js +1 -0
- package/dist/webcomponents/p-2319abaf.entry.js +1 -0
- package/dist/webcomponents/p-26fe62d6.entry.js +1 -0
- package/dist/webcomponents/p-28b38699.js +1 -0
- package/dist/webcomponents/{p-4df6174c.entry.js → p-29376518.entry.js} +1 -1
- package/dist/webcomponents/p-2bee72bd.entry.js +1 -0
- package/dist/webcomponents/p-3302bc76.js +1 -0
- package/dist/webcomponents/p-3adc0688.entry.js +1 -0
- package/dist/webcomponents/p-3fe05c4a.entry.js +1 -0
- package/dist/webcomponents/p-41b1ad3a.entry.js +1 -0
- package/dist/webcomponents/p-4616768c.entry.js +1 -0
- package/dist/webcomponents/p-56780f10.entry.js +1 -0
- package/dist/webcomponents/p-5c269619.js +1 -0
- package/dist/webcomponents/p-5ff7826e.entry.js +1 -0
- package/dist/webcomponents/{p-8482c23f.js → p-65510838.js} +1 -1
- package/dist/webcomponents/p-6f294d5d.js +1 -0
- package/dist/webcomponents/{p-4d50d08a.entry.js → p-7d8d2984.entry.js} +1 -1
- package/dist/webcomponents/p-7da249b8.entry.js +1 -0
- package/dist/webcomponents/p-84b9ffc9.entry.js +1 -0
- package/dist/webcomponents/{p-07b326d0.entry.js → p-8657128b.entry.js} +1 -1
- package/dist/webcomponents/p-8abba4c2.entry.js +1 -0
- package/dist/webcomponents/p-8c9d9812.entry.js +1 -0
- package/dist/webcomponents/p-910bb656.js +1 -0
- package/dist/webcomponents/p-9245777b.js +1 -0
- package/dist/webcomponents/{p-221b9504.entry.js → p-927150b4.entry.js} +1 -1
- package/dist/webcomponents/p-96cebc8b.entry.js +1 -0
- package/dist/webcomponents/{p-0e189d6a.entry.js → p-99d6b67e.entry.js} +1 -1
- package/dist/webcomponents/p-9e3f9e05.entry.js +1 -0
- package/dist/webcomponents/{p-688bb5da.js → p-9ee8ad4d.js} +1 -1
- package/dist/webcomponents/{p-a46174e0.entry.js → p-9f3facf1.entry.js} +1 -1
- package/dist/webcomponents/p-9f529959.entry.js +1 -0
- package/dist/webcomponents/{p-fb49ef28.entry.js → p-a6f170ba.entry.js} +1 -1
- package/dist/webcomponents/p-a8caec98.entry.js +1 -0
- package/dist/webcomponents/p-a90f7ca0.js +1 -0
- package/dist/webcomponents/p-abc03d5a.entry.js +1 -0
- package/dist/webcomponents/p-b318b899.js +1 -0
- package/dist/webcomponents/{p-1bfadb9f.entry.js → p-c1b92cec.entry.js} +1 -1
- package/dist/webcomponents/{p-a68519e5.entry.js → p-c556deda.entry.js} +1 -1
- package/dist/webcomponents/{p-3d4aaa4a.entry.js → p-c6e207f6.entry.js} +1 -1
- package/dist/webcomponents/{p-b68f1dd9.entry.js → p-cdfde1ca.entry.js} +1 -1
- package/dist/webcomponents/p-d69a485a.entry.js +1 -0
- package/dist/webcomponents/p-e2ba8d84.entry.js +1 -0
- package/dist/webcomponents/{p-ebf7c70f.entry.js → p-e4342f49.entry.js} +1 -1
- package/dist/webcomponents/p-ed72a5cc.js +1 -0
- package/dist/webcomponents/{p-6b51cf97.entry.js → p-f0698778.entry.js} +1 -1
- package/dist/webcomponents/p-f4ae621e.entry.js +1 -0
- package/dist/webcomponents/p-f76283a5.entry.js +19 -0
- package/dist/webcomponents/p-fce2b224.entry.js +1 -0
- package/dist/webcomponents/p-fd60d5af.js +1 -0
- package/dist/webcomponents/p-ff211f76.js +1 -0
- package/dist/webcomponents/webcomponents.css +1 -1
- package/dist/webcomponents/webcomponents.esm.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/Business-663db337.js +0 -92
- package/dist/cjs/Identity-1c4528b8.js +0 -49
- package/dist/cjs/business-additional-questions-schema-cbac27f2.js +0 -26
- package/dist/cjs/business-form-select-options-7ccd8dca.js +0 -85
- package/dist/cjs/justifi-business-address-form-step.cjs.entry.js +0 -35
- package/dist/cjs/payload-parsers-9e72e80f.js +0 -99
- package/dist/cjs/utils-f5d82f21.js +0 -10
- package/dist/collection/api/mockData/MockOnboardingData.js +0 -117
- package/dist/collection/api/mockData/MockPayments.js +0 -243
- package/dist/collection/api/mockData/MockSubAccount.js +0 -102
- package/dist/collection/api/mockData/mockGrossVolumeReport.js +0 -125
- package/dist/collection/components/business-forms/business-form/business-address/test/business-address.e2e.js +0 -9
- package/dist/collection/components/business-forms/payment-provisioning/business-address/business-address-form-step.css +0 -2536
- package/dist/collection/components/business-forms/payment-provisioning/business-address/business-address-form-step.js +0 -97
- package/dist/collection/components/business-forms/payment-provisioning/business-address/test/business-address-form-step.spec.js +0 -97
- package/dist/collection/components/business-forms/schemas/business-owners-schema.js +0 -16
- package/dist/collection/components/business-forms/utils/business-form-select-options.js +0 -80
- package/dist/collection/components/card-form/test/card-form.e2e.js +0 -13
- package/dist/esm/Business-6cc4e473.js +0 -87
- package/dist/esm/Identity-5f8f916f.js +0 -46
- package/dist/esm/business-additional-questions-schema-2cb80f70.js +0 -23
- package/dist/esm/business-form-select-options-6b9293fe.js +0 -82
- package/dist/esm/business-form-types-de9f38cd.js +0 -19
- package/dist/esm/justifi-business-address-form-step.entry.js +0 -31
- package/dist/esm/payload-parsers-caea809d.js +0 -91
- package/dist/esm/utils-546ca6aa.js +0 -8
- package/dist/module/Identity.js +0 -46
- package/dist/module/business-form-select-options.js +0 -82
- package/dist/module/justifi-business-address-form-step.d.ts +0 -11
- package/dist/module/justifi-business-address-form-step.js +0 -75
- package/dist/module/justifi-business-address-form.d.ts +0 -11
- package/dist/module/justifi-business-address-form.js +0 -6
- package/dist/types/api/mockData/MockOnboardingData.d.ts +0 -8
- package/dist/types/api/mockData/MockPayments.d.ts +0 -3
- package/dist/types/api/mockData/MockSubAccount.d.ts +0 -3
- package/dist/types/components/business-forms/business-form/business-address/business-address-form.d.ts +0 -9
- package/dist/types/components/business-forms/payment-provisioning/business-address/business-address-form-step.d.ts +0 -9
- package/dist/types/components/business-forms/schemas/business-owners-schema.d.ts +0 -33
- package/dist/types/components/business-forms/utils/business-form-select-options.d.ts +0 -11
- package/dist/webcomponents/p-03b1d0d5.entry.js +0 -1
- package/dist/webcomponents/p-0923e39c.js +0 -1
- package/dist/webcomponents/p-16dcf053.entry.js +0 -1
- package/dist/webcomponents/p-17d72f4a.js +0 -1
- package/dist/webcomponents/p-2df32b4a.entry.js +0 -1
- package/dist/webcomponents/p-34352d04.js +0 -1
- package/dist/webcomponents/p-38ba2848.entry.js +0 -1
- package/dist/webcomponents/p-41870765.entry.js +0 -1
- package/dist/webcomponents/p-461f42b8.entry.js +0 -1
- package/dist/webcomponents/p-48c2400e.js +0 -1
- package/dist/webcomponents/p-491ca87f.js +0 -1
- package/dist/webcomponents/p-5be4e217.entry.js +0 -1
- package/dist/webcomponents/p-60714f2a.entry.js +0 -1
- package/dist/webcomponents/p-60b2344a.js +0 -1
- package/dist/webcomponents/p-63296409.js +0 -1
- package/dist/webcomponents/p-65500b31.entry.js +0 -19
- package/dist/webcomponents/p-6d39b8bc.entry.js +0 -1
- package/dist/webcomponents/p-6ed680e9.js +0 -1
- package/dist/webcomponents/p-7b2cddc7.js +0 -1
- package/dist/webcomponents/p-7ec301b5.entry.js +0 -1
- package/dist/webcomponents/p-817211f2.entry.js +0 -1
- package/dist/webcomponents/p-9207ccb2.entry.js +0 -1
- package/dist/webcomponents/p-975ab96e.js +0 -1
- package/dist/webcomponents/p-9b99370e.js +0 -1
- package/dist/webcomponents/p-9e4b81ad.entry.js +0 -1
- package/dist/webcomponents/p-a141c531.js +0 -1
- package/dist/webcomponents/p-a2dbe90f.entry.js +0 -1
- package/dist/webcomponents/p-a4122c35.entry.js +0 -1
- package/dist/webcomponents/p-af8363a1.entry.js +0 -1
- package/dist/webcomponents/p-b1bc23af.entry.js +0 -1
- package/dist/webcomponents/p-b37d6888.entry.js +0 -1
- package/dist/webcomponents/p-b5a3bf86.entry.js +0 -1
- package/dist/webcomponents/p-b8f22856.js +0 -1
- package/dist/webcomponents/p-cb8f9cb8.entry.js +0 -1
- package/dist/webcomponents/p-d0761829.entry.js +0 -1
- package/dist/webcomponents/p-da34bba7.entry.js +0 -1
- package/dist/webcomponents/p-dbe32e75.entry.js +0 -1
- package/dist/webcomponents/p-e0c1cba8.js +0 -1
- package/dist/webcomponents/p-e924f2e1.entry.js +0 -1
- package/dist/webcomponents/p-ea03b424.entry.js +0 -1
- package/dist/webcomponents/p-ec230480.entry.js +0 -1
- package/dist/webcomponents/p-eed5f4ad.entry.js +0 -1
- package/dist/webcomponents/p-fe8a94c1.entry.js +0 -1
- /package/dist/collection/components/business-forms/{business-form/business-address/business-address-form.css → owner-form/identity-address/identity-address-form.css} +0 -0
- /package/dist/types/{api → home/runner/work/web-component-library/web-component-library/packages/webcomponents/.stencil}/mockData/mockGrossVolumeReport.d.ts +0 -0
- /package/dist/types/home/runner/work/web-component-library/web-component-library/packages/webcomponents/.stencil/{config.d.ts → packages/webcomponents/config.d.ts} +0 -0
|
@@ -2,6 +2,7 @@ import { h } from "@stencil/core";
|
|
|
2
2
|
import { PaymentService } from "../../api/services/payment.service";
|
|
3
3
|
import { makeGetPayments } from "./get-payments";
|
|
4
4
|
import { ErrorState } from "../details/utils";
|
|
5
|
+
import { ComponentErrorCodes, ComponentErrorSeverity } from "../../api/ComponentError";
|
|
5
6
|
/**
|
|
6
7
|
* @exportedPart table-head: Table head
|
|
7
8
|
* @exportedPart table-head-row: Head row
|
|
@@ -23,6 +24,10 @@ import { ErrorState } from "../details/utils";
|
|
|
23
24
|
*/
|
|
24
25
|
export class PaymentsList {
|
|
25
26
|
constructor() {
|
|
27
|
+
this.handleErrorEvent = (event) => {
|
|
28
|
+
this.errorMessage = event.detail.message;
|
|
29
|
+
this.errorEvent.emit(event.detail);
|
|
30
|
+
};
|
|
26
31
|
this.accountId = undefined;
|
|
27
32
|
this.authToken = undefined;
|
|
28
33
|
this.getPayments = undefined;
|
|
@@ -44,13 +49,18 @@ export class PaymentsList {
|
|
|
44
49
|
}
|
|
45
50
|
else {
|
|
46
51
|
this.errorMessage = 'Account ID and Auth Token are required';
|
|
52
|
+
this.errorEvent.emit({
|
|
53
|
+
errorCode: ComponentErrorCodes.MISSING_PROPS,
|
|
54
|
+
message: this.errorMessage,
|
|
55
|
+
severity: ComponentErrorSeverity.ERROR,
|
|
56
|
+
});
|
|
47
57
|
}
|
|
48
58
|
}
|
|
49
59
|
render() {
|
|
50
60
|
if (this.errorMessage) {
|
|
51
61
|
return ErrorState(this.errorMessage);
|
|
52
62
|
}
|
|
53
|
-
return (h("payments-list-core", { getPayments: this.getPayments }));
|
|
63
|
+
return (h("payments-list-core", { getPayments: this.getPayments, "onError-event": this.handleErrorEvent }));
|
|
54
64
|
}
|
|
55
65
|
static get is() { return "justifi-payments-list"; }
|
|
56
66
|
static get encapsulation() { return "shadow"; }
|
|
@@ -98,6 +108,30 @@ export class PaymentsList {
|
|
|
98
108
|
"errorMessage": {}
|
|
99
109
|
};
|
|
100
110
|
}
|
|
111
|
+
static get events() {
|
|
112
|
+
return [{
|
|
113
|
+
"method": "errorEvent",
|
|
114
|
+
"name": "error-event",
|
|
115
|
+
"bubbles": true,
|
|
116
|
+
"cancelable": true,
|
|
117
|
+
"composed": true,
|
|
118
|
+
"docs": {
|
|
119
|
+
"tags": [],
|
|
120
|
+
"text": ""
|
|
121
|
+
},
|
|
122
|
+
"complexType": {
|
|
123
|
+
"original": "ComponentError",
|
|
124
|
+
"resolved": "ComponentError",
|
|
125
|
+
"references": {
|
|
126
|
+
"ComponentError": {
|
|
127
|
+
"location": "import",
|
|
128
|
+
"path": "../../api/ComponentError",
|
|
129
|
+
"id": "src/api/ComponentError.ts::ComponentError"
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}];
|
|
134
|
+
}
|
|
101
135
|
static get watchers() {
|
|
102
136
|
return [{
|
|
103
137
|
"propName": "accountId",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PaymentService } from "../../../api/services/payment.service";
|
|
2
2
|
import { makeGetPayments } from "../get-payments";
|
|
3
|
-
import mockResponse from "
|
|
3
|
+
import mockResponse from "../../../../../../mockData/mockPaymentsSuccess.json";
|
|
4
4
|
import { Payment } from "../../../api";
|
|
5
5
|
// Mock the PaymentService class
|
|
6
6
|
jest.mock('../../../api/services/payment.service');
|
|
@@ -48,7 +48,11 @@ describe('makeGetPayments', () => {
|
|
|
48
48
|
service: mockServiceInstance,
|
|
49
49
|
});
|
|
50
50
|
await getPayments({ params: mockParams, onSuccess, onError });
|
|
51
|
-
expect(onError).toHaveBeenCalledWith(
|
|
51
|
+
expect(onError).toHaveBeenCalledWith({
|
|
52
|
+
code: 'fetch-error',
|
|
53
|
+
error: 'Error fetching payments',
|
|
54
|
+
severity: 'error',
|
|
55
|
+
});
|
|
52
56
|
expect(onSuccess).not.toHaveBeenCalled();
|
|
53
57
|
});
|
|
54
58
|
it('should call onError with an exception message on fetch exception', async () => {
|
|
@@ -63,7 +67,11 @@ describe('makeGetPayments', () => {
|
|
|
63
67
|
service: mockServiceInstance,
|
|
64
68
|
});
|
|
65
69
|
await getPayments({ params: mockParams, onSuccess, onError });
|
|
66
|
-
expect(onError).toHaveBeenCalledWith(
|
|
70
|
+
expect(onError).toHaveBeenCalledWith({
|
|
71
|
+
code: 'fetch-error',
|
|
72
|
+
error: 'Network error',
|
|
73
|
+
severity: 'error',
|
|
74
|
+
});
|
|
67
75
|
expect(onSuccess).not.toHaveBeenCalled();
|
|
68
76
|
});
|
|
69
77
|
// Add more tests as needed for edge cases and different scenarios
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
1
2
|
import { newSpecPage } from "@stencil/core/testing";
|
|
2
3
|
import { PaymentsListCore } from "../payments-list-core";
|
|
3
4
|
import { Table } from "../../table/table";
|
|
4
5
|
import { PaginationMenu } from "../../pagination-menu/pagination-menu";
|
|
5
|
-
import mockSuccessResponse from "
|
|
6
|
+
import mockSuccessResponse from "../../../../../../mockData/mockPaymentsSuccess.json";
|
|
6
7
|
import { makeGetPayments } from "../get-payments";
|
|
7
8
|
const mockPaymentsResponse = mockSuccessResponse;
|
|
8
9
|
describe('payments-list-core', () => {
|
|
@@ -10,17 +11,15 @@ describe('payments-list-core', () => {
|
|
|
10
11
|
const mockPaymentsService = {
|
|
11
12
|
fetchPayments: jest.fn().mockResolvedValue(mockPaymentsResponse),
|
|
12
13
|
};
|
|
13
|
-
const
|
|
14
|
-
components: [PaymentsListCore, Table, PaginationMenu],
|
|
15
|
-
html: `<payments-list-core></payments-list-core>`,
|
|
16
|
-
});
|
|
17
|
-
page.rootInstance.componentWillLoad = () => { };
|
|
18
|
-
page.rootInstance.getPayments = makeGetPayments({
|
|
14
|
+
const getPayments = makeGetPayments({
|
|
19
15
|
id: '123',
|
|
20
16
|
authToken: '123',
|
|
21
17
|
service: mockPaymentsService
|
|
22
18
|
});
|
|
23
|
-
page
|
|
19
|
+
const page = await newSpecPage({
|
|
20
|
+
components: [PaymentsListCore, Table, PaginationMenu],
|
|
21
|
+
template: () => h("payments-list-core", { getPayments: getPayments }),
|
|
22
|
+
});
|
|
24
23
|
await page.waitForChanges();
|
|
25
24
|
const justifiTable = page.root.querySelector('justifi-table');
|
|
26
25
|
expect(page.rootInstance.payments[0]).toEqual(expect.objectContaining({ account_id: mockPaymentsResponse.data[0].account_id }));
|
|
@@ -40,11 +39,8 @@ describe('payments-list-core', () => {
|
|
|
40
39
|
});
|
|
41
40
|
const page = await newSpecPage({
|
|
42
41
|
components: [PaymentsListCore, Table, PaginationMenu],
|
|
43
|
-
|
|
42
|
+
template: () => h("payments-list-core", { getPayments: getPayments }),
|
|
44
43
|
});
|
|
45
|
-
page.rootInstance.componentWillLoad = () => { };
|
|
46
|
-
page.rootInstance.getPayments = getPayments;
|
|
47
|
-
await page.rootInstance.fetchData();
|
|
48
44
|
await page.waitForChanges();
|
|
49
45
|
expect(page.rootInstance.errorMessage).toBe('Fetch error');
|
|
50
46
|
expect(page.root).toMatchSnapshot();
|
|
@@ -53,17 +49,15 @@ describe('payments-list-core', () => {
|
|
|
53
49
|
const mockPaymentsService = {
|
|
54
50
|
fetchPayments: jest.fn().mockResolvedValue(mockPaymentsResponse),
|
|
55
51
|
};
|
|
56
|
-
const
|
|
57
|
-
components: [PaymentsListCore, Table, PaginationMenu],
|
|
58
|
-
html: `<payments-list-core></payments-list-core>`,
|
|
59
|
-
});
|
|
60
|
-
page.rootInstance.componentWillLoad = () => { };
|
|
61
|
-
page.rootInstance.getPayments = makeGetPayments({
|
|
52
|
+
const getPayments = makeGetPayments({
|
|
62
53
|
id: '123',
|
|
63
54
|
authToken: '123',
|
|
64
55
|
service: mockPaymentsService
|
|
65
56
|
});
|
|
66
|
-
page
|
|
57
|
+
const page = await newSpecPage({
|
|
58
|
+
components: [PaymentsListCore, Table, PaginationMenu],
|
|
59
|
+
template: () => h("payments-list-core", { getPayments: getPayments }),
|
|
60
|
+
});
|
|
67
61
|
await page.waitForChanges();
|
|
68
62
|
const justifiTable = page.root.querySelector('justifi-table');
|
|
69
63
|
const firstRow = justifiTable.shadowRoot.querySelector('[data-test-id="table-row"]');
|
|
@@ -77,24 +71,45 @@ describe('payments-list-core', () => {
|
|
|
77
71
|
const mockPaymentsService = {
|
|
78
72
|
fetchPayments: jest.fn().mockResolvedValue(mockPaymentsResponse),
|
|
79
73
|
};
|
|
80
|
-
const
|
|
81
|
-
components: [PaymentsListCore, Table, PaginationMenu],
|
|
82
|
-
html: `<payments-list-core></payments-list-core>`,
|
|
83
|
-
});
|
|
84
|
-
page.rootInstance.componentWillLoad = () => { };
|
|
85
|
-
page.rootInstance.getPayments = makeGetPayments({
|
|
74
|
+
const getPayments = makeGetPayments({
|
|
86
75
|
id: '123',
|
|
87
76
|
authToken: '123',
|
|
88
77
|
service: mockPaymentsService
|
|
89
78
|
});
|
|
90
|
-
page
|
|
79
|
+
const page = await newSpecPage({
|
|
80
|
+
components: [PaymentsListCore, Table, PaginationMenu],
|
|
81
|
+
template: () => h("payments-list-core", { getPayments: getPayments }),
|
|
82
|
+
});
|
|
91
83
|
await page.waitForChanges();
|
|
92
84
|
// Assuming handleClickNext is accessible and modifies `params` which triggers a re-fetch
|
|
93
85
|
page.rootInstance.handleClickNext('nextCursor');
|
|
94
86
|
await page.waitForChanges();
|
|
95
|
-
// The mock function should be called
|
|
96
|
-
expect(mockPaymentsService.fetchPayments).toHaveBeenCalledTimes(
|
|
87
|
+
// The mock function should be called 2 times: once for the initial load and later after the pagination interaction
|
|
88
|
+
expect(mockPaymentsService.fetchPayments).toHaveBeenCalledTimes(2);
|
|
97
89
|
const updatedParams = page.rootInstance.params;
|
|
98
90
|
expect(updatedParams.after_cursor).toBe('nextCursor');
|
|
99
91
|
});
|
|
92
|
+
it('emits error event on fetch error', async () => {
|
|
93
|
+
const mockService = {
|
|
94
|
+
fetchPayments: jest.fn().mockRejectedValue(new Error('Fetch error'))
|
|
95
|
+
};
|
|
96
|
+
const getPayments = makeGetPayments({
|
|
97
|
+
id: 'some-id',
|
|
98
|
+
authToken: 'some-auth',
|
|
99
|
+
service: mockService
|
|
100
|
+
});
|
|
101
|
+
const errorEvent = jest.fn();
|
|
102
|
+
const page = await newSpecPage({
|
|
103
|
+
components: [PaymentsListCore, Table, PaginationMenu],
|
|
104
|
+
template: () => h("payments-list-core", { getPayments: getPayments, "onError-event": errorEvent }),
|
|
105
|
+
});
|
|
106
|
+
await page.waitForChanges();
|
|
107
|
+
expect(errorEvent).toHaveBeenCalledWith(expect.objectContaining({
|
|
108
|
+
detail: {
|
|
109
|
+
errorCode: 'fetch-error',
|
|
110
|
+
message: 'Fetch error',
|
|
111
|
+
severity: 'error',
|
|
112
|
+
}
|
|
113
|
+
}));
|
|
114
|
+
});
|
|
100
115
|
});
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
1
2
|
import { newSpecPage } from "@stencil/core/testing";
|
|
2
3
|
import { PaymentsList } from "../payments-list";
|
|
3
4
|
import { PaymentsListCore } from "../payments-list-core";
|
|
5
|
+
import { PaymentService } from "../../../api/services/payment.service";
|
|
6
|
+
jest.mock('../../../api/services/payment.service');
|
|
4
7
|
describe('payments-list', () => {
|
|
5
8
|
it('renders an error message when accountId and authToken are not provided', async () => {
|
|
6
9
|
const page = await newSpecPage({
|
|
7
10
|
components: [PaymentsList, PaymentsListCore],
|
|
8
|
-
|
|
11
|
+
template: () => h("justifi-payments-list", null),
|
|
9
12
|
});
|
|
10
13
|
await page.waitForChanges();
|
|
11
14
|
expect(page.root).toMatchSnapshot();
|
|
@@ -13,7 +16,7 @@ describe('payments-list', () => {
|
|
|
13
16
|
it('renders an error message when accountId is not provided', async () => {
|
|
14
17
|
const page = await newSpecPage({
|
|
15
18
|
components: [PaymentsList, PaymentsListCore],
|
|
16
|
-
|
|
19
|
+
template: () => h("justifi-payments-list", { "auth-token": "abc" }),
|
|
17
20
|
});
|
|
18
21
|
await page.waitForChanges();
|
|
19
22
|
expect(page.root).toMatchSnapshot();
|
|
@@ -21,9 +24,34 @@ describe('payments-list', () => {
|
|
|
21
24
|
it('renders an error message when authToken is not provided', async () => {
|
|
22
25
|
const page = await newSpecPage({
|
|
23
26
|
components: [PaymentsList, PaymentsListCore],
|
|
24
|
-
|
|
27
|
+
template: () => h("justifi-payments-list", { "account-id": "abc" }),
|
|
25
28
|
});
|
|
26
29
|
await page.waitForChanges();
|
|
27
30
|
expect(page.root).toMatchSnapshot();
|
|
28
31
|
});
|
|
32
|
+
it('emit an error event when accountId and authToken are not provided', async () => {
|
|
33
|
+
const errorEvent = jest.fn();
|
|
34
|
+
const page = await newSpecPage({
|
|
35
|
+
components: [PaymentsList, PaymentsListCore],
|
|
36
|
+
template: () => h("justifi-payments-list", { "onError-event": errorEvent }),
|
|
37
|
+
});
|
|
38
|
+
await page.waitForChanges();
|
|
39
|
+
expect(errorEvent).toHaveBeenCalled();
|
|
40
|
+
});
|
|
41
|
+
it('emit an error event when fetch fails', async () => {
|
|
42
|
+
PaymentService.prototype.fetchPayments = jest.fn().mockRejectedValue(new Error('Fetch error'));
|
|
43
|
+
const errorEvent = jest.fn();
|
|
44
|
+
const page = await newSpecPage({
|
|
45
|
+
components: [PaymentsList, PaymentsListCore],
|
|
46
|
+
template: () => (h("justifi-payments-list", { "account-id": "abc", "auth-token": "abc", "onError-event": errorEvent })),
|
|
47
|
+
});
|
|
48
|
+
await page.waitForChanges();
|
|
49
|
+
expect(errorEvent).toHaveBeenCalledWith(expect.objectContaining({
|
|
50
|
+
detail: {
|
|
51
|
+
errorCode: 'fetch-error',
|
|
52
|
+
message: 'Fetch error',
|
|
53
|
+
severity: 'error',
|
|
54
|
+
}
|
|
55
|
+
}));
|
|
56
|
+
});
|
|
29
57
|
});
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { Payout } from "../../api";
|
|
2
|
-
import {
|
|
2
|
+
import { ComponentErrorSeverity } from "../../api/ComponentError";
|
|
3
|
+
import { getErrorCode, getErrorMessage } from "../../api/services/utils";
|
|
3
4
|
export const makeGetPayoutDetails = ({ id, authToken, service }) => async ({ onSuccess, onError }) => {
|
|
5
|
+
var _a;
|
|
4
6
|
try {
|
|
5
7
|
const response = await service.fetchPayout(id, authToken);
|
|
6
8
|
if (!response.error) {
|
|
@@ -8,13 +10,22 @@ export const makeGetPayoutDetails = ({ id, authToken, service }) => async ({ onS
|
|
|
8
10
|
onSuccess(payout);
|
|
9
11
|
}
|
|
10
12
|
else {
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
onError(
|
|
13
|
+
const errorMessage = getErrorMessage(response.error);
|
|
14
|
+
const code = getErrorCode((_a = response.error) === null || _a === void 0 ? void 0 : _a.code);
|
|
15
|
+
onError({
|
|
16
|
+
error: errorMessage,
|
|
17
|
+
code,
|
|
18
|
+
severity: ComponentErrorSeverity.ERROR,
|
|
19
|
+
});
|
|
14
20
|
}
|
|
15
21
|
}
|
|
16
22
|
catch (error) {
|
|
17
|
-
const errorMessage =
|
|
18
|
-
|
|
23
|
+
const errorMessage = getErrorMessage(error);
|
|
24
|
+
const code = getErrorCode(error === null || error === void 0 ? void 0 : error.code);
|
|
25
|
+
onError({
|
|
26
|
+
error: errorMessage,
|
|
27
|
+
code,
|
|
28
|
+
severity: ComponentErrorSeverity.ERROR,
|
|
29
|
+
});
|
|
19
30
|
}
|
|
20
31
|
};
|
|
@@ -24,9 +24,13 @@ export class PayoutDetailsCore {
|
|
|
24
24
|
this.payout = payout;
|
|
25
25
|
this.loading = false;
|
|
26
26
|
},
|
|
27
|
-
onError: (
|
|
28
|
-
this.errorMessage =
|
|
29
|
-
|
|
27
|
+
onError: ({ error, code, severity }) => {
|
|
28
|
+
this.errorMessage = error;
|
|
29
|
+
this.errorEvent.emit({
|
|
30
|
+
message: error,
|
|
31
|
+
errorCode: code,
|
|
32
|
+
severity,
|
|
33
|
+
});
|
|
30
34
|
this.loading = false;
|
|
31
35
|
},
|
|
32
36
|
});
|
|
@@ -77,6 +81,30 @@ export class PayoutDetailsCore {
|
|
|
77
81
|
"errorMessage": {}
|
|
78
82
|
};
|
|
79
83
|
}
|
|
84
|
+
static get events() {
|
|
85
|
+
return [{
|
|
86
|
+
"method": "errorEvent",
|
|
87
|
+
"name": "error-event",
|
|
88
|
+
"bubbles": true,
|
|
89
|
+
"cancelable": true,
|
|
90
|
+
"composed": true,
|
|
91
|
+
"docs": {
|
|
92
|
+
"tags": [],
|
|
93
|
+
"text": ""
|
|
94
|
+
},
|
|
95
|
+
"complexType": {
|
|
96
|
+
"original": "ComponentError",
|
|
97
|
+
"resolved": "ComponentError",
|
|
98
|
+
"references": {
|
|
99
|
+
"ComponentError": {
|
|
100
|
+
"location": "import",
|
|
101
|
+
"path": "../../api/ComponentError",
|
|
102
|
+
"id": "src/api/ComponentError.ts::ComponentError"
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}];
|
|
107
|
+
}
|
|
80
108
|
static get watchers() {
|
|
81
109
|
return [{
|
|
82
110
|
"propName": "getPayout",
|
|
@@ -2,8 +2,13 @@ import { h } from "@stencil/core";
|
|
|
2
2
|
import { PayoutService } from "../../api/services/payout.service";
|
|
3
3
|
import { makeGetPayoutDetails } from "./get-payout-details";
|
|
4
4
|
import { ErrorState } from "../details/utils";
|
|
5
|
+
import { ComponentErrorCodes, ComponentErrorSeverity } from "../../api/ComponentError";
|
|
5
6
|
export class PayoutDetails {
|
|
6
7
|
constructor() {
|
|
8
|
+
this.handleErrorEvent = (event) => {
|
|
9
|
+
this.errorMessage = event.detail.message;
|
|
10
|
+
this.errorEvent.emit(event.detail);
|
|
11
|
+
};
|
|
7
12
|
this.payoutId = undefined;
|
|
8
13
|
this.authToken = undefined;
|
|
9
14
|
this.getPayout = undefined;
|
|
@@ -25,13 +30,18 @@ export class PayoutDetails {
|
|
|
25
30
|
}
|
|
26
31
|
else {
|
|
27
32
|
this.errorMessage = 'Failed to load payout details. payoutId or authToken is not provided.';
|
|
33
|
+
this.errorEvent.emit({
|
|
34
|
+
message: this.errorMessage,
|
|
35
|
+
errorCode: ComponentErrorCodes.MISSING_PROPS,
|
|
36
|
+
severity: ComponentErrorSeverity.ERROR
|
|
37
|
+
});
|
|
28
38
|
}
|
|
29
39
|
}
|
|
30
40
|
render() {
|
|
31
41
|
if (this.errorMessage) {
|
|
32
42
|
return ErrorState(this.errorMessage);
|
|
33
43
|
}
|
|
34
|
-
return (h("payout-details-core", { getPayout: this.getPayout }));
|
|
44
|
+
return (h("payout-details-core", { getPayout: this.getPayout, "onError-event": this.handleErrorEvent }));
|
|
35
45
|
}
|
|
36
46
|
static get is() { return "justifi-payout-details"; }
|
|
37
47
|
static get encapsulation() { return "shadow"; }
|
|
@@ -79,6 +89,30 @@ export class PayoutDetails {
|
|
|
79
89
|
"errorMessage": {}
|
|
80
90
|
};
|
|
81
91
|
}
|
|
92
|
+
static get events() {
|
|
93
|
+
return [{
|
|
94
|
+
"method": "errorEvent",
|
|
95
|
+
"name": "error-event",
|
|
96
|
+
"bubbles": true,
|
|
97
|
+
"cancelable": true,
|
|
98
|
+
"composed": true,
|
|
99
|
+
"docs": {
|
|
100
|
+
"tags": [],
|
|
101
|
+
"text": ""
|
|
102
|
+
},
|
|
103
|
+
"complexType": {
|
|
104
|
+
"original": "ComponentError",
|
|
105
|
+
"resolved": "ComponentError",
|
|
106
|
+
"references": {
|
|
107
|
+
"ComponentError": {
|
|
108
|
+
"location": "import",
|
|
109
|
+
"path": "../../api/ComponentError",
|
|
110
|
+
"id": "src/api/ComponentError.ts::ComponentError"
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}];
|
|
115
|
+
}
|
|
82
116
|
static get watchers() {
|
|
83
117
|
return [{
|
|
84
118
|
"propName": "payoutId",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Payout } from "../../../api";
|
|
2
2
|
import { PayoutService } from "../../../api/services/payout.service";
|
|
3
3
|
import { makeGetPayoutDetails } from "../get-payout-details";
|
|
4
|
-
import mockResponse from "
|
|
4
|
+
import mockResponse from "../../../../../../mockData/mockPayoutDetailsSuccess.json";
|
|
5
5
|
describe('getPayout', () => {
|
|
6
6
|
const mockId = '123';
|
|
7
7
|
const mockAuthToken = '123';
|
|
@@ -25,7 +25,8 @@ describe('getPayout', () => {
|
|
|
25
25
|
expect(onError).not.toHaveBeenCalled();
|
|
26
26
|
});
|
|
27
27
|
it('should call onError with an error message on API failure', async () => {
|
|
28
|
-
const
|
|
28
|
+
const errorMessage = 'Error fetching payout';
|
|
29
|
+
const mockError = new Error(errorMessage);
|
|
29
30
|
const onSuccess = jest.fn();
|
|
30
31
|
const onError = jest.fn();
|
|
31
32
|
mockServiceInstance.fetchPayout.mockRejectedValue(mockError);
|
|
@@ -36,10 +37,15 @@ describe('getPayout', () => {
|
|
|
36
37
|
});
|
|
37
38
|
await getPayout({ onSuccess, onError });
|
|
38
39
|
expect(onSuccess).not.toHaveBeenCalled();
|
|
39
|
-
expect(onError).toHaveBeenCalledWith(
|
|
40
|
+
expect(onError).toHaveBeenCalledWith({
|
|
41
|
+
code: 'fetch-error',
|
|
42
|
+
error: 'Error fetching payout',
|
|
43
|
+
severity: 'error',
|
|
44
|
+
});
|
|
40
45
|
});
|
|
41
46
|
it('should call onError with an error message on API failure with error message', async () => {
|
|
42
|
-
const
|
|
47
|
+
const errorMessage = 'Error fetching payout';
|
|
48
|
+
const mockError = new Error(errorMessage);
|
|
43
49
|
const onSuccess = jest.fn();
|
|
44
50
|
const onError = jest.fn();
|
|
45
51
|
mockServiceInstance.fetchPayout.mockRejectedValue(mockError);
|
|
@@ -50,6 +56,10 @@ describe('getPayout', () => {
|
|
|
50
56
|
});
|
|
51
57
|
await getPayout({ onSuccess, onError });
|
|
52
58
|
expect(onSuccess).not.toHaveBeenCalled();
|
|
53
|
-
expect(onError).toHaveBeenCalledWith(
|
|
59
|
+
expect(onError).toHaveBeenCalledWith({
|
|
60
|
+
code: 'fetch-error',
|
|
61
|
+
error: 'Error fetching payout',
|
|
62
|
+
severity: 'error',
|
|
63
|
+
});
|
|
54
64
|
});
|
|
55
65
|
});
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
1
2
|
import { newSpecPage } from "@stencil/core/testing";
|
|
2
3
|
import { PayoutDetailsCore } from "../payout-details-core";
|
|
3
|
-
import mockPayoutDetailSuccess from "
|
|
4
|
+
import mockPayoutDetailSuccess from "../../../../../../mockData/mockPayoutDetailsSuccess.json";
|
|
4
5
|
import { makeGetPayoutDetails } from "../get-payout-details";
|
|
6
|
+
import { API_NOT_AUTHENTICATED_ERROR } from "../../../api/shared";
|
|
5
7
|
describe('payout-details-core', () => {
|
|
6
8
|
it('renders loading state initially', async () => {
|
|
7
9
|
// Define a mock getPayout function as part of the component initialization
|
|
@@ -12,10 +14,8 @@ describe('payout-details-core', () => {
|
|
|
12
14
|
// Initialize the page with the mock getPayout function included in the component tag
|
|
13
15
|
const page = await newSpecPage({
|
|
14
16
|
components: [PayoutDetailsCore],
|
|
15
|
-
|
|
17
|
+
template: () => h("payout-details-core", { getPayout: mockGetPayout })
|
|
16
18
|
});
|
|
17
|
-
page.rootInstance.componentWillLoad = () => { };
|
|
18
|
-
page.rootInstance.getPayout = mockGetPayout;
|
|
19
19
|
// Wait for any state changes to complete
|
|
20
20
|
await page.waitForChanges();
|
|
21
21
|
// Assert the loading state is visible in the snapshot
|
|
@@ -32,11 +32,8 @@ describe('payout-details-core', () => {
|
|
|
32
32
|
});
|
|
33
33
|
const page = await newSpecPage({
|
|
34
34
|
components: [PayoutDetailsCore],
|
|
35
|
-
|
|
35
|
+
template: () => h("payout-details-core", { getPayout: getPayout })
|
|
36
36
|
});
|
|
37
|
-
page.rootInstance.componentWillLoad = () => { };
|
|
38
|
-
page.rootInstance.getPayout = getPayout;
|
|
39
|
-
page.rootInstance.fetchData();
|
|
40
37
|
await page.waitForChanges();
|
|
41
38
|
expect(mockService.fetchPayout).toHaveBeenCalled(); // Verify the mock service method was called
|
|
42
39
|
expect(page.rootInstance.payout).toEqual(expect.objectContaining({
|
|
@@ -50,23 +47,64 @@ describe('payout-details-core', () => {
|
|
|
50
47
|
fetchPayout: jest.fn().mockRejectedValue(new Error('Fetch error'))
|
|
51
48
|
};
|
|
52
49
|
// Real getPayout function but with mocked service
|
|
53
|
-
const
|
|
50
|
+
const getPayout = makeGetPayoutDetails({
|
|
54
51
|
id: 'some-id', // Use appropriate id
|
|
55
52
|
authToken: 'some-auth-token', // Use appropriate auth token
|
|
56
53
|
service: mockService // Injecting the mocked service
|
|
57
54
|
});
|
|
58
55
|
const page = await newSpecPage({
|
|
59
56
|
components: [PayoutDetailsCore],
|
|
60
|
-
|
|
57
|
+
template: () => h("payout-details-core", { getPayout: getPayout })
|
|
61
58
|
});
|
|
62
|
-
page.rootInstance.componentWillLoad = () => { };
|
|
63
|
-
// Inject the getPayout function with mocked service into the component
|
|
64
|
-
page.rootInstance.getPayout = realGetPayoutWithMockedService;
|
|
65
|
-
// Manually call fetchData if necessary, depending on how your component is set up
|
|
66
|
-
await page.rootInstance.fetchData();
|
|
67
59
|
await page.waitForChanges();
|
|
68
60
|
// Assertions to verify the error handling
|
|
69
|
-
expect(page.rootInstance.errorMessage).toBe('
|
|
61
|
+
expect(page.rootInstance.errorMessage).toBe('Fetch error');
|
|
70
62
|
expect(page.root).toMatchSnapshot();
|
|
71
63
|
});
|
|
64
|
+
it('emits error event on fetch error', async () => {
|
|
65
|
+
const mockService = {
|
|
66
|
+
fetchPayout: jest.fn().mockRejectedValue(new Error('Fetch error'))
|
|
67
|
+
};
|
|
68
|
+
const getPayout = makeGetPayoutDetails({
|
|
69
|
+
id: 'some-id',
|
|
70
|
+
authToken: 'some-auth',
|
|
71
|
+
service: mockService
|
|
72
|
+
});
|
|
73
|
+
const onErrorEvent = jest.fn();
|
|
74
|
+
const page = await newSpecPage({
|
|
75
|
+
components: [PayoutDetailsCore],
|
|
76
|
+
template: () => h("payout-details-core", { getPayout: getPayout, "onError-event": onErrorEvent })
|
|
77
|
+
});
|
|
78
|
+
await page.waitForChanges();
|
|
79
|
+
expect(onErrorEvent).toHaveBeenCalledWith(expect.objectContaining({
|
|
80
|
+
detail: {
|
|
81
|
+
message: 'Fetch error',
|
|
82
|
+
errorCode: 'fetch-error',
|
|
83
|
+
severity: 'error'
|
|
84
|
+
}
|
|
85
|
+
}));
|
|
86
|
+
});
|
|
87
|
+
it('emits error event when API returns error', async () => {
|
|
88
|
+
const mockService = {
|
|
89
|
+
fetchPayout: jest.fn().mockResolvedValue(API_NOT_AUTHENTICATED_ERROR)
|
|
90
|
+
};
|
|
91
|
+
const getPayout = makeGetPayoutDetails({
|
|
92
|
+
id: 'some-id',
|
|
93
|
+
authToken: 'some-auth',
|
|
94
|
+
service: mockService
|
|
95
|
+
});
|
|
96
|
+
const onErrorEvent = jest.fn();
|
|
97
|
+
const page = await newSpecPage({
|
|
98
|
+
components: [PayoutDetailsCore],
|
|
99
|
+
template: () => h("payout-details-core", { getPayout: getPayout, "onError-event": onErrorEvent })
|
|
100
|
+
});
|
|
101
|
+
await page.waitForChanges();
|
|
102
|
+
expect(onErrorEvent).toHaveBeenCalledWith(expect.objectContaining({
|
|
103
|
+
detail: {
|
|
104
|
+
message: 'Not Authenticated',
|
|
105
|
+
errorCode: 'not-authenticated',
|
|
106
|
+
severity: 'error'
|
|
107
|
+
}
|
|
108
|
+
}));
|
|
109
|
+
});
|
|
72
110
|
});
|
|
@@ -1,13 +1,62 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
1
2
|
import { newSpecPage } from "@stencil/core/testing";
|
|
2
3
|
import { PayoutDetails } from "../payout-details";
|
|
3
4
|
import { PayoutDetailsCore } from "../payout-details-core";
|
|
5
|
+
import { PayoutService } from "../../../api/services/payout.service";
|
|
6
|
+
jest.mock("../../../api/services/payout.service");
|
|
4
7
|
describe('payout-details', () => {
|
|
5
8
|
it('renders error state when no payoutId or authToken', async () => {
|
|
6
9
|
const page = await newSpecPage({
|
|
7
10
|
components: [PayoutDetails, PayoutDetailsCore],
|
|
8
|
-
|
|
11
|
+
template: () => h("justifi-payout-details", null),
|
|
9
12
|
});
|
|
10
13
|
await page.waitForChanges();
|
|
11
14
|
expect(page.root).toMatchSnapshot();
|
|
12
15
|
});
|
|
16
|
+
it('emits error event when no payoutId', async () => {
|
|
17
|
+
const eventSpy = jest.fn();
|
|
18
|
+
const page = await newSpecPage({
|
|
19
|
+
components: [PayoutDetails, PayoutDetailsCore],
|
|
20
|
+
template: () => h("justifi-payout-details", { authToken: "token", "onError-event": eventSpy }),
|
|
21
|
+
});
|
|
22
|
+
await page.waitForChanges();
|
|
23
|
+
expect(eventSpy).toHaveBeenCalledWith(expect.objectContaining({
|
|
24
|
+
detail: {
|
|
25
|
+
message: 'Failed to load payout details. payoutId or authToken is not provided.',
|
|
26
|
+
errorCode: 'missing-props',
|
|
27
|
+
severity: 'error'
|
|
28
|
+
}
|
|
29
|
+
}));
|
|
30
|
+
});
|
|
31
|
+
it('emits error event when no authToken', async () => {
|
|
32
|
+
const eventSpy = jest.fn();
|
|
33
|
+
const page = await newSpecPage({
|
|
34
|
+
components: [PayoutDetails, PayoutDetailsCore],
|
|
35
|
+
template: () => h("justifi-payout-details", { payoutId: "payoutId", "onError-event": eventSpy }),
|
|
36
|
+
});
|
|
37
|
+
await page.waitForChanges();
|
|
38
|
+
expect(eventSpy).toHaveBeenCalledWith(expect.objectContaining({
|
|
39
|
+
detail: {
|
|
40
|
+
message: 'Failed to load payout details. payoutId or authToken is not provided.',
|
|
41
|
+
errorCode: 'missing-props',
|
|
42
|
+
severity: 'error'
|
|
43
|
+
}
|
|
44
|
+
}));
|
|
45
|
+
});
|
|
46
|
+
it('emits an error event when fetch fails', async () => {
|
|
47
|
+
PayoutService.prototype.fetchPayout = jest.fn().mockRejectedValueOnce(new Error('Failed to fetch'));
|
|
48
|
+
const onErrorSpy = jest.fn();
|
|
49
|
+
const page = await newSpecPage({
|
|
50
|
+
components: [PayoutDetails, PayoutDetailsCore],
|
|
51
|
+
template: () => h("justifi-payout-details", { payoutId: "payoutId", authToken: "authToken", "onError-event": onErrorSpy }),
|
|
52
|
+
});
|
|
53
|
+
await page.waitForChanges();
|
|
54
|
+
expect(onErrorSpy).toHaveBeenCalledWith(expect.objectContaining({
|
|
55
|
+
detail: {
|
|
56
|
+
message: 'Failed to fetch',
|
|
57
|
+
errorCode: 'fetch-error',
|
|
58
|
+
severity: 'error'
|
|
59
|
+
}
|
|
60
|
+
}));
|
|
61
|
+
});
|
|
13
62
|
});
|