@justifi/webcomponents 4.12.2 → 4.13.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (244) hide show
  1. package/dist/cjs/{Api-a06b996e.js → Api-ab34a402.js} +4 -1
  2. package/dist/cjs/{Business-21cef37d.js → Business-32a53780.js} +8 -3
  3. package/dist/cjs/{utils-f8079741.js → ComponentError-8ba0c0e7.js} +0 -25
  4. package/dist/cjs/additional-questions-details_5.cjs.entry.js +2 -2
  5. package/dist/cjs/{business-additional-questions-schema-f5f303fb.js → business-additional-questions-schema-0a35f597.js} +17 -9
  6. package/dist/cjs/{business-form-types-a3cc374d.js → business-form-options-43366c9a.js} +50 -33
  7. package/dist/cjs/business-form-types-29b2bad9.js +26 -0
  8. package/dist/cjs/form-control-date_3.cjs.entry.js +1 -1
  9. package/dist/cjs/form-control-datepart_2.cjs.entry.js +1 -1
  10. package/dist/cjs/form-control-file.cjs.entry.js +44 -0
  11. package/dist/cjs/form-control-monetary.cjs.entry.js +7 -12
  12. package/dist/cjs/form-input-masks-0879c139.js +27 -0
  13. package/dist/cjs/{index-fc5339a5.js → index-d8e99b54.js} +352 -198
  14. package/dist/cjs/justifi-additional-questions-form-step_5.cjs.entry.js +10 -9
  15. package/dist/cjs/justifi-additional-questions_4.cjs.entry.js +6 -6
  16. package/dist/cjs/justifi-billing-form_4.cjs.entry.js +2 -2
  17. package/dist/cjs/justifi-business-details.cjs.entry.js +8 -7
  18. package/dist/cjs/justifi-business-form.cjs.entry.js +6 -5
  19. package/dist/cjs/justifi-business-list.cjs.entry.js +2 -2
  20. package/dist/cjs/justifi-business-owners.cjs.entry.js +1 -1
  21. package/dist/cjs/justifi-checkout-core.cjs.entry.js +30 -11
  22. package/dist/cjs/justifi-checkout.cjs.entry.js +36 -9
  23. package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +7 -6
  24. package/dist/cjs/justifi-new-payment-method_4.cjs.entry.js +12 -12
  25. package/dist/cjs/justifi-owner-form.cjs.entry.js +6 -5
  26. package/dist/cjs/justifi-payment-balance-transactions.cjs.entry.js +1 -1
  27. package/dist/cjs/justifi-payment-details.cjs.entry.js +8 -7
  28. package/dist/cjs/justifi-payment-form.cjs.entry.js +6 -5
  29. package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +1 -3
  30. package/dist/cjs/justifi-payments-list.cjs.entry.js +8 -7
  31. package/dist/cjs/justifi-payout-details.cjs.entry.js +8 -7
  32. package/dist/cjs/justifi-payouts-list.cjs.entry.js +7 -6
  33. package/dist/cjs/justifi-proceeds-list.cjs.entry.js +1 -1
  34. package/dist/cjs/justifi-refund-form.cjs.entry.js +3 -2
  35. package/dist/cjs/justifi-subaccount-details.cjs.entry.js +1 -1
  36. package/dist/cjs/justifi-subaccounts-list.cjs.entry.js +1 -1
  37. package/dist/cjs/loader.cjs.js +1 -1
  38. package/dist/cjs/{payload-parsers-74693a97.js → payload-parsers-6c4b5323.js} +61 -6
  39. package/dist/cjs/{payment.service-9db24ab9.js → payment.service-336189d3.js} +1 -1
  40. package/dist/cjs/{payout.service-a0efb71a.js → payout.service-6012d576.js} +1 -1
  41. package/dist/cjs/utils-491248ca.js +28 -0
  42. package/dist/cjs/webcomponents.cjs.js +1 -1
  43. package/dist/collection/api/Api.js +4 -1
  44. package/dist/collection/api/Business.js +8 -3
  45. package/dist/collection/collection-manifest.json +1 -0
  46. package/dist/collection/components/business-details/additional-questions-details/additional-questions-details.js +2 -2
  47. package/dist/collection/components/business-forms/business-form/additional-questions/additional-questions.js +4 -2
  48. package/dist/collection/components/business-forms/business-form/business-core-info/business-core-info.js +2 -2
  49. package/dist/collection/components/business-forms/payment-provisioning/additional-questions/business-additional-questions-form-step.js +4 -2
  50. package/dist/collection/components/business-forms/payment-provisioning/business-core-info/business-core-info-form-step.js +3 -2
  51. package/dist/collection/components/business-forms/schemas/business-additional-questions-schema.js +16 -9
  52. package/dist/collection/components/business-forms/schemas/business-core-info-schema.js +3 -1
  53. package/dist/collection/components/business-forms/schemas/schema-helpers.js +3 -0
  54. package/dist/collection/components/business-forms/schemas/schema-validations.js +51 -7
  55. package/dist/collection/components/business-forms/utils/business-form-options.js +119 -0
  56. package/dist/collection/components/business-forms/utils/business-form-types.js +0 -81
  57. package/dist/collection/components/checkout/checkout-actions.js +29 -7
  58. package/dist/collection/components/checkout/checkout-core.js +51 -14
  59. package/dist/collection/components/checkout/checkout.js +30 -2
  60. package/dist/collection/components/checkout/new-payment-method.js +11 -11
  61. package/dist/collection/components/checkout/payment-method-options.js +2 -18
  62. package/dist/collection/components/checkout/test/checkout-actions.spec.js +124 -0
  63. package/dist/collection/components/checkout/test/checkout-core.spec.js +127 -0
  64. package/dist/collection/components/checkout/test/checkout.spec.js +0 -153
  65. package/dist/collection/components/form/form-control-file.css +1806 -0
  66. package/dist/collection/components/form/form-control-file.js +169 -0
  67. package/dist/collection/components/form/form-control-monetary.css +1812 -0
  68. package/dist/collection/components/form/form-control-monetary.js +24 -11
  69. package/dist/collection/components/form/test/form-control-file.spec.js +84 -0
  70. package/dist/collection/components/form/test/form-control-monetary.spec.js +5 -3
  71. package/dist/collection/components/refund-form/refund-form.js +2 -1
  72. package/dist/collection/utils/form-input-masks.js +15 -0
  73. package/dist/docs.json +275 -33
  74. package/dist/esm/{Api-0e88671c.js → Api-e9d568c7.js} +4 -1
  75. package/dist/esm/{Business-0e8a9a3a.js → Business-d83fbdb4.js} +8 -3
  76. package/dist/esm/{utils-4609f32c.js → ComponentError-2a58dbbc.js} +1 -23
  77. package/dist/esm/additional-questions-details_5.entry.js +2 -2
  78. package/dist/esm/{business-additional-questions-schema-a84dd641.js → business-additional-questions-schema-e96b0509.js} +18 -10
  79. package/dist/esm/{business-form-types-7420dc96.js → business-form-options-de11bc46.js} +46 -32
  80. package/dist/esm/business-form-types-0d76133c.js +26 -0
  81. package/dist/esm/form-control-date_3.entry.js +1 -1
  82. package/dist/esm/form-control-datepart_2.entry.js +1 -1
  83. package/dist/esm/form-control-file.entry.js +40 -0
  84. package/dist/esm/form-control-monetary.entry.js +7 -12
  85. package/dist/esm/form-input-masks-0e18300f.js +22 -0
  86. package/dist/esm/{index-5eb05747.js → index-dc1350b1.js} +352 -198
  87. package/dist/esm/justifi-additional-questions-form-step_5.entry.js +10 -9
  88. package/dist/esm/justifi-additional-questions_4.entry.js +6 -6
  89. package/dist/esm/justifi-billing-form_4.entry.js +2 -2
  90. package/dist/esm/justifi-business-details.entry.js +4 -3
  91. package/dist/esm/justifi-business-form.entry.js +6 -5
  92. package/dist/esm/justifi-business-list.entry.js +2 -2
  93. package/dist/esm/justifi-business-owners.entry.js +1 -1
  94. package/dist/esm/justifi-checkout-core.entry.js +30 -11
  95. package/dist/esm/justifi-checkout.entry.js +37 -10
  96. package/dist/esm/justifi-gross-payment-chart.entry.js +3 -2
  97. package/dist/esm/justifi-new-payment-method_4.entry.js +12 -12
  98. package/dist/esm/justifi-owner-form.entry.js +6 -5
  99. package/dist/esm/justifi-payment-balance-transactions.entry.js +1 -1
  100. package/dist/esm/justifi-payment-details.entry.js +4 -3
  101. package/dist/esm/justifi-payment-form.entry.js +2 -1
  102. package/dist/esm/justifi-payment-provisioning.entry.js +1 -3
  103. package/dist/esm/justifi-payments-list.entry.js +4 -3
  104. package/dist/esm/justifi-payout-details.entry.js +4 -3
  105. package/dist/esm/justifi-payouts-list.entry.js +4 -3
  106. package/dist/esm/justifi-proceeds-list.entry.js +1 -1
  107. package/dist/esm/justifi-refund-form.entry.js +3 -2
  108. package/dist/esm/justifi-subaccount-details.entry.js +1 -1
  109. package/dist/esm/justifi-subaccounts-list.entry.js +1 -1
  110. package/dist/esm/loader.js +1 -1
  111. package/dist/esm/{payload-parsers-0c4fc2b1.js → payload-parsers-32028700.js} +54 -7
  112. package/dist/esm/{payment.service-ec28a959.js → payment.service-2fdc5018.js} +1 -1
  113. package/dist/esm/{payout.service-5fd5986c.js → payout.service-15064bcc.js} +1 -1
  114. package/dist/esm/utils-f580d6b7.js +25 -0
  115. package/dist/esm/webcomponents.js +1 -1
  116. package/dist/module/Api.js +4 -1
  117. package/dist/module/Business.js +8 -3
  118. package/dist/module/ComponentError.js +16 -0
  119. package/dist/module/additional-questions-details2.js +2 -2
  120. package/dist/module/additional-questions.js +18 -4
  121. package/dist/module/business-additional-questions-form-step.js +18 -4
  122. package/dist/module/business-additional-questions-schema.js +16 -9
  123. package/dist/module/business-address-schema.js +1 -1
  124. package/dist/module/business-core-info-form-step.js +10 -3
  125. package/dist/module/business-core-info-schema.js +3 -1
  126. package/dist/module/business-core-info.js +9 -3
  127. package/dist/module/business-form-options.js +122 -0
  128. package/dist/module/business-form-types.js +153 -82
  129. package/dist/module/business-identity-schema.js +1 -1
  130. package/dist/module/business-representative-form-step.js +1 -1
  131. package/dist/module/checkout-core.js +30 -13
  132. package/dist/module/form-control-file.d.ts +11 -0
  133. package/dist/module/form-control-file.js +67 -0
  134. package/dist/module/form-control-monetary2.js +8 -12
  135. package/dist/module/form-input-masks.js +16 -1
  136. package/dist/module/index2.js +352 -198
  137. package/dist/module/justifi-business-details.js +2 -1
  138. package/dist/module/justifi-business-form.js +2 -2
  139. package/dist/module/justifi-checkout.js +37 -11
  140. package/dist/module/justifi-gross-payment-chart.js +2 -1
  141. package/dist/module/justifi-payment-details.js +2 -1
  142. package/dist/module/justifi-payment-form.js +2 -1
  143. package/dist/module/justifi-payment-provisioning.js +1 -1
  144. package/dist/module/justifi-payments-list.js +2 -1
  145. package/dist/module/justifi-payout-details.js +2 -1
  146. package/dist/module/justifi-payouts-list.js +2 -1
  147. package/dist/module/justifi-refund-form.js +2 -1
  148. package/dist/module/legal-address-form-step.js +1 -1
  149. package/dist/module/new-payment-method.js +11 -11
  150. package/dist/module/owner-form.js +2 -2
  151. package/dist/module/payload-parsers.js +1 -107
  152. package/dist/module/payment-method-form.js +2 -2
  153. package/dist/module/payment-method-options.js +2 -2
  154. package/dist/module/utils3.js +2 -15
  155. package/dist/types/api/Api.d.ts +1 -0
  156. package/dist/types/api/Business.d.ts +15 -5
  157. package/dist/types/api/services/checkout.service.d.ts +3 -3
  158. package/dist/types/components/business-forms/schemas/business-additional-questions-schema.d.ts +10 -4
  159. package/dist/types/components/business-forms/schemas/business-core-info-schema.d.ts +2 -0
  160. package/dist/types/components/business-forms/schemas/business-form-schema.d.ts +12 -4
  161. package/dist/types/components/business-forms/schemas/schema-helpers.d.ts +3 -0
  162. package/dist/types/components/business-forms/schemas/schema-validations.d.ts +8 -0
  163. package/dist/types/components/business-forms/utils/business-form-options.d.ts +21 -0
  164. package/dist/types/components/business-forms/utils/business-form-types.d.ts +0 -9
  165. package/dist/types/components/checkout/checkout-core.d.ts +8 -3
  166. package/dist/types/components/checkout/checkout.d.ts +3 -0
  167. package/dist/types/components/checkout/payment-method-options.d.ts +1 -1
  168. package/dist/types/components/checkout/payment-method-payload.d.ts +5 -0
  169. package/dist/types/components/form/form-control-file.d.ts +17 -0
  170. package/dist/types/components/form/form-control-monetary.d.ts +1 -0
  171. package/dist/types/components/payment-method-form/payment-method-responses.d.ts +1 -0
  172. package/dist/types/components.d.ts +61 -2
  173. package/dist/types/utils/form-input-masks.d.ts +15 -0
  174. package/dist/webcomponents/p-00ca94d1.js +1 -0
  175. package/dist/webcomponents/p-02b18979.entry.js +1 -0
  176. package/dist/webcomponents/p-0d80748f.js +1 -0
  177. package/dist/webcomponents/p-101b2648.entry.js +1 -0
  178. package/dist/webcomponents/p-132ba228.js +1 -0
  179. package/dist/webcomponents/p-13e2f667.js +1 -0
  180. package/dist/webcomponents/{p-18cf5a16.entry.js → p-1885c478.entry.js} +1 -1
  181. package/dist/webcomponents/{p-8abba4c2.entry.js → p-23099f1f.entry.js} +1 -1
  182. package/dist/webcomponents/p-230b96df.entry.js +1 -0
  183. package/dist/webcomponents/{p-2fbe8823.entry.js → p-3367225e.entry.js} +1 -1
  184. package/dist/webcomponents/p-3917edbf.entry.js +1 -0
  185. package/dist/webcomponents/p-3da23f21.js +1 -0
  186. package/dist/webcomponents/p-41bdee27.entry.js +1 -0
  187. package/dist/webcomponents/{p-5ff7826e.entry.js → p-4c84952f.entry.js} +1 -1
  188. package/dist/webcomponents/p-4ff52695.entry.js +1 -0
  189. package/dist/webcomponents/p-525db3e8.js +1 -0
  190. package/dist/webcomponents/p-61fd33c7.js +1 -0
  191. package/dist/webcomponents/p-64710363.entry.js +1 -0
  192. package/dist/webcomponents/{p-9245777b.js → p-731085e3.js} +1 -1
  193. package/dist/webcomponents/p-78b32fb9.entry.js +1 -0
  194. package/dist/webcomponents/p-7e334dce.entry.js +1 -0
  195. package/dist/webcomponents/p-7faacb1e.entry.js +1 -0
  196. package/dist/webcomponents/{p-5f5e730c.entry.js → p-834cba99.entry.js} +1 -1
  197. package/dist/webcomponents/p-87d646c0.js +1 -0
  198. package/dist/webcomponents/p-935d6f55.js +1 -0
  199. package/dist/webcomponents/{p-e3946c2b.js → p-9ada56da.js} +1 -1
  200. package/dist/webcomponents/p-9ba31a6a.entry.js +1 -0
  201. package/dist/webcomponents/p-a9af8f40.entry.js +1 -0
  202. package/dist/webcomponents/p-b81afd51.entry.js +1 -0
  203. package/dist/webcomponents/{p-c556deda.entry.js → p-bb58e656.entry.js} +1 -1
  204. package/dist/webcomponents/p-bc12b8b9.js +1 -0
  205. package/dist/webcomponents/p-bfe7c55c.entry.js +1 -0
  206. package/dist/webcomponents/p-c1be3378.entry.js +1 -0
  207. package/dist/webcomponents/p-cb31488b.entry.js +1 -0
  208. package/dist/webcomponents/p-cf3151a3.entry.js +1 -0
  209. package/dist/webcomponents/p-d0a8c631.entry.js +1 -0
  210. package/dist/webcomponents/p-e6ab1f0d.entry.js +1 -0
  211. package/dist/webcomponents/p-ee68566f.entry.js +1 -0
  212. package/dist/webcomponents/{p-3adc0688.entry.js → p-efbc8ffc.entry.js} +1 -1
  213. package/dist/webcomponents/{p-b9f04fb0.entry.js → p-f152d6b8.entry.js} +1 -1
  214. package/dist/webcomponents/webcomponents.esm.js +1 -1
  215. package/package.json +2 -2
  216. package/dist/cjs/form-input-masks-efd44b8e.js +0 -11
  217. package/dist/esm/form-input-masks-84875967.js +0 -7
  218. package/dist/webcomponents/p-01913426.js +0 -1
  219. package/dist/webcomponents/p-04c7f8f8.js +0 -1
  220. package/dist/webcomponents/p-0c269feb.entry.js +0 -1
  221. package/dist/webcomponents/p-0eb77101.entry.js +0 -1
  222. package/dist/webcomponents/p-19001cc5.entry.js +0 -1
  223. package/dist/webcomponents/p-2319abaf.entry.js +0 -1
  224. package/dist/webcomponents/p-2bee72bd.entry.js +0 -1
  225. package/dist/webcomponents/p-51ee396f.entry.js +0 -1
  226. package/dist/webcomponents/p-52e4cc27.js +0 -1
  227. package/dist/webcomponents/p-602a1588.entry.js +0 -1
  228. package/dist/webcomponents/p-6ec77980.entry.js +0 -1
  229. package/dist/webcomponents/p-6f294d5d.js +0 -1
  230. package/dist/webcomponents/p-81c43ba5.entry.js +0 -1
  231. package/dist/webcomponents/p-927150b4.entry.js +0 -1
  232. package/dist/webcomponents/p-93579716.js +0 -1
  233. package/dist/webcomponents/p-9e35b0f6.entry.js +0 -1
  234. package/dist/webcomponents/p-9e3f9e05.entry.js +0 -1
  235. package/dist/webcomponents/p-9ec89299.entry.js +0 -1
  236. package/dist/webcomponents/p-a8caec98.entry.js +0 -1
  237. package/dist/webcomponents/p-a90f7ca0.js +0 -1
  238. package/dist/webcomponents/p-abc03d5a.entry.js +0 -1
  239. package/dist/webcomponents/p-b38baa84.entry.js +0 -1
  240. package/dist/webcomponents/p-bfc634c6.entry.js +0 -1
  241. package/dist/webcomponents/p-c1b92cec.entry.js +0 -1
  242. package/dist/webcomponents/p-cb86b2fd.js +0 -1
  243. package/dist/webcomponents/p-d2b7beac.js +0 -1
  244. package/dist/webcomponents/p-d69a485a.entry.js +0 -1
@@ -3,7 +3,8 @@ import { E as ErrorState } from './utils.js';
3
3
  import { c as config } from './config.js';
4
4
  import { A as Api } from './Api.js';
5
5
  import { b as Business } from './Business.js';
6
- import { C as ComponentErrorSeverity, g as getErrorMessage, a as getErrorCode, b as ComponentErrorCodes } from './utils3.js';
6
+ import { C as ComponentErrorSeverity, a as ComponentErrorCodes } from './ComponentError.js';
7
+ import { g as getErrorMessage, a as getErrorCode } from './utils3.js';
7
8
  import { d as defineCustomElement$7 } from './additional-questions-details2.js';
8
9
  import { d as defineCustomElement$6 } from './business-details-core2.js';
9
10
  import { d as defineCustomElement$5 } from './generic-info-details2.js';
@@ -9,10 +9,10 @@ import { A as Api } from './Api.js';
9
9
  import './Pagination.js';
10
10
  import './Payment.js';
11
11
  import './Payout.js';
12
- import { g as parseBusiness } from './payload-parsers.js';
12
+ import { a as parseBusiness } from './payload-parsers.js';
13
13
  import { c as config } from './config.js';
14
14
  import { F as FormAlert } from './utils4.js';
15
- import { B as BusinessFormServerErrors, c as BusinessFormClickActions } from './business-form-types.js';
15
+ import { B as BusinessFormServerErrors, l as BusinessFormClickActions } from './business-form-types.js';
16
16
  import { b as Business } from './Business.js';
17
17
  import { d as defineCustomElement$b } from './form-control-date2.js';
18
18
  import { d as defineCustomElement$a } from './form-control-monetary2.js';
@@ -1,5 +1,6 @@
1
- import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
2
- import { g as getErrorMessage } from './utils3.js';
1
+ import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
+ import { C as ComponentErrorSeverity, a as ComponentErrorCodes } from './ComponentError.js';
3
+ import { g as getErrorMessage, a as getErrorCode } from './utils3.js';
3
4
  import { A as Api } from './Api.js';
4
5
  import './Pagination.js';
5
6
  import './Payment.js';
@@ -16,6 +17,7 @@ import { d as defineCustomElement$3 } from './select-input2.js';
16
17
  import { d as defineCustomElement$2 } from './text-input2.js';
17
18
 
18
19
  const makeGetCheckout = ({ authToken, checkoutId, service }) => async ({ onSuccess, onError }) => {
20
+ var _a;
19
21
  try {
20
22
  const response = await service.fetchCheckout(authToken, checkoutId);
21
23
  if (!response.error) {
@@ -24,27 +26,47 @@ const makeGetCheckout = ({ authToken, checkoutId, service }) => async ({ onSucce
24
26
  }
25
27
  else {
26
28
  const responseError = getErrorMessage(response.error);
27
- return onError(responseError);
29
+ const code = getErrorCode((_a = response.error) === null || _a === void 0 ? void 0 : _a.code);
30
+ return onError({
31
+ error: responseError,
32
+ code,
33
+ severity: ComponentErrorSeverity.ERROR,
34
+ });
28
35
  }
29
36
  }
30
37
  catch (error) {
31
- return onError(error.message || error);
38
+ const code = getErrorCode(error === null || error === void 0 ? void 0 : error.code);
39
+ return onError({
40
+ error: error.message || error,
41
+ code,
42
+ severity: ComponentErrorSeverity.ERROR,
43
+ });
32
44
  }
33
45
  };
34
46
  const makeCheckoutComplete = ({ authToken, checkoutId, service }) => async ({ payment, onSuccess, onError }) => {
47
+ var _a;
35
48
  try {
36
49
  const response = await service.complete(authToken, checkoutId, payment);
37
50
  if (!response.error) {
38
- const checkout = response.data;
39
- onSuccess({ checkout });
51
+ onSuccess(response);
40
52
  }
41
53
  else {
42
54
  const responseError = getErrorMessage(response.error);
43
- return onError(responseError);
55
+ const code = getErrorCode((_a = response.error) === null || _a === void 0 ? void 0 : _a.code);
56
+ return onError({
57
+ error: responseError,
58
+ code,
59
+ severity: ComponentErrorSeverity.ERROR,
60
+ });
44
61
  }
45
62
  }
46
63
  catch (error) {
47
- return onError(error.message || error);
64
+ const code = getErrorCode(error === null || error === void 0 ? void 0 : error.code);
65
+ return onError({
66
+ error: error.message || error,
67
+ code,
68
+ severity: ComponentErrorSeverity.ERROR,
69
+ });
48
70
  }
49
71
  };
50
72
 
@@ -67,7 +89,7 @@ const Checkout = /*@__PURE__*/ proxyCustomElement(class Checkout extends HTMLEle
67
89
  constructor() {
68
90
  super();
69
91
  this.__registerHost();
70
- this.__attachShadow();
92
+ this.errorEvent = createEvent(this, "error-event", 7);
71
93
  this.iframeOrigin = undefined;
72
94
  this.authToken = undefined;
73
95
  this.checkoutId = undefined;
@@ -92,7 +114,11 @@ const Checkout = /*@__PURE__*/ proxyCustomElement(class Checkout extends HTMLEle
92
114
  });
93
115
  }
94
116
  else {
95
- this.errorMessage = 'auth-token and checkout-id are required';
117
+ this.errorEvent.emit({
118
+ message: 'auth-token and checkout-id are required',
119
+ errorCode: ComponentErrorCodes.MISSING_PROPS,
120
+ severity: ComponentErrorSeverity.ERROR,
121
+ });
96
122
  }
97
123
  }
98
124
  propChanged() {
@@ -105,7 +131,7 @@ const Checkout = /*@__PURE__*/ proxyCustomElement(class Checkout extends HTMLEle
105
131
  "authToken": ["propChanged"],
106
132
  "checkoutId": ["propChanged"]
107
133
  }; }
108
- }, [1, "justifi-checkout", {
134
+ }, [0, "justifi-checkout", {
109
135
  "iframeOrigin": [1, "iframe-origin"],
110
136
  "authToken": [1, "auth-token"],
111
137
  "checkoutId": [1, "checkout-id"],
@@ -1,7 +1,8 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
2
  import { c as config } from './config.js';
3
3
  import { A as Api } from './Api.js';
4
- import { C as ComponentErrorSeverity, g as getErrorMessage, a as getErrorCode, b as ComponentErrorCodes } from './utils3.js';
4
+ import { C as ComponentErrorSeverity, a as ComponentErrorCodes } from './ComponentError.js';
5
+ import { g as getErrorMessage, a as getErrorCode } from './utils3.js';
5
6
  import { E as ErrorState } from './utils.js';
6
7
  import { d as defineCustomElement$2 } from './gross-payment-chart-core2.js';
7
8
 
@@ -3,7 +3,8 @@ import { P as PaymentService } from './payment.service.js';
3
3
  import './Pagination.js';
4
4
  import { b as Payment } from './Payment.js';
5
5
  import './Payout.js';
6
- import { C as ComponentErrorSeverity, g as getErrorMessage, a as getErrorCode, b as ComponentErrorCodes } from './utils3.js';
6
+ import { C as ComponentErrorSeverity, a as ComponentErrorCodes } from './ComponentError.js';
7
+ import { g as getErrorMessage, a as getErrorCode } from './utils3.js';
7
8
  import { E as ErrorState } from './utils.js';
8
9
  import { d as defineCustomElement$3 } from './details.js';
9
10
  import { d as defineCustomElement$2 } from './payment-details-core2.js';
@@ -4,7 +4,8 @@ import { P as PaymentMethodTypes } from './Payment.js';
4
4
  import './Payout.js';
5
5
  import { l as loadFontsOnParent } from './utils2.js';
6
6
  import { c as config } from './config.js';
7
- import { b as ComponentErrorCodes, C as ComponentErrorSeverity, g as getErrorMessage } from './utils3.js';
7
+ import { a as ComponentErrorCodes, C as ComponentErrorSeverity } from './ComponentError.js';
8
+ import { g as getErrorMessage } from './utils3.js';
8
9
  import { d as defineCustomElement$6 } from './billing-form.js';
9
10
  import { d as defineCustomElement$5 } from './payment-method-form.js';
10
11
  import { d as defineCustomElement$4 } from './payment-method-selector.js';
@@ -1,6 +1,6 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
2
  import { F as FormAlert, L as LoadingSpinner } from './utils4.js';
3
- import { c as BusinessFormClickActions } from './business-form-types.js';
3
+ import { l as BusinessFormClickActions } from './business-form-types.js';
4
4
  import { d as defineCustomElement$d } from './form-control-date2.js';
5
5
  import { d as defineCustomElement$c } from './form-control-monetary2.js';
6
6
  import { d as defineCustomElement$b } from './form-control-number-masked2.js';
@@ -3,7 +3,8 @@ import { P as PaymentService } from './payment.service.js';
3
3
  import './Pagination.js';
4
4
  import { b as Payment } from './Payment.js';
5
5
  import './Payout.js';
6
- import { C as ComponentErrorSeverity, g as getErrorMessage, a as getErrorCode, b as ComponentErrorCodes } from './utils3.js';
6
+ import { C as ComponentErrorSeverity, a as ComponentErrorCodes } from './ComponentError.js';
7
+ import { g as getErrorMessage, a as getErrorCode } from './utils3.js';
7
8
  import { E as ErrorState } from './utils.js';
8
9
  import { d as defineCustomElement$4 } from './table.js';
9
10
  import { d as defineCustomElement$3 } from './pagination-menu2.js';
@@ -3,7 +3,8 @@ import { P as PayoutService } from './payout.service.js';
3
3
  import './Pagination.js';
4
4
  import './Payment.js';
5
5
  import { P as Payout } from './Payout.js';
6
- import { C as ComponentErrorSeverity, g as getErrorMessage, a as getErrorCode, b as ComponentErrorCodes } from './utils3.js';
6
+ import { C as ComponentErrorSeverity, a as ComponentErrorCodes } from './ComponentError.js';
7
+ import { g as getErrorMessage, a as getErrorCode } from './utils3.js';
7
8
  import { E as ErrorState } from './utils.js';
8
9
  import { d as defineCustomElement$3 } from './details.js';
9
10
  import { d as defineCustomElement$2 } from './payout-details-core2.js';
@@ -4,7 +4,8 @@ import { P as PayoutService } from './payout.service.js';
4
4
  import './Pagination.js';
5
5
  import './Payment.js';
6
6
  import { P as Payout } from './Payout.js';
7
- import { C as ComponentErrorSeverity, g as getErrorMessage, a as getErrorCode, b as ComponentErrorCodes } from './utils3.js';
7
+ import { C as ComponentErrorSeverity, a as ComponentErrorCodes } from './ComponentError.js';
8
+ import { g as getErrorMessage, a as getErrorCode } from './utils3.js';
8
9
  import { E as ErrorState } from './utils.js';
9
10
  import { d as defineCustomElement$3 } from './pagination-menu2.js';
10
11
  import { d as defineCustomElement$2 } from './payouts-list-core2.js';
@@ -6,6 +6,7 @@ import './Payment.js';
6
6
  import './Payout.js';
7
7
  import { F as FormController } from './form.js';
8
8
  import { c as config } from './config.js';
9
+ import { C as CURRENCY_MASK } from './form-input-masks.js';
9
10
  import { d as defineCustomElement$3 } from './form-control-monetary2.js';
10
11
  import { d as defineCustomElement$2 } from './form-control-text2.js';
11
12
 
@@ -96,7 +97,7 @@ const RefundForm = /*@__PURE__*/ proxyCustomElement(class RefundForm extends HTM
96
97
  }
97
98
  render() {
98
99
  var _a;
99
- return (h(Host, null, h("h1", null, "Refund"), this.refundInfoText && (h("div", { class: "d-flex align-items-center flex-row gap-4 border-top border-bottom my-4 p-3", role: "alert" }, h("img", { src: "/info-icon.svg", alt: "Information", height: "30", width: "30" }), h("p", { class: "m-0", innerHTML: this.refundInfoText }))), h("form", { onSubmit: e => this.handleSubmit(e), class: "d-grid gap-4" }, h("div", { class: "form-group" }, h("form-control-monetary", { name: "amount", label: "Refund Amount", defaultValue: ((_a = this.amount) === null || _a === void 0 ? void 0 : _a.toString()) || '', inputHandler: (name, value) => this.handleInput(name, value), error: this.errors.amount })), h("div", { class: "form-group" }, h("form-control-text", { name: "notes", label: "Additional Notes", inputHandler: (name, value) => this.handleInput(name, value), error: this.errors.notes })), this.withButton && (h("div", { class: "form-group d-flex flex-row-reverse" }, h("button", { type: "submit", disabled: !!this.isSubmitting, class: "btn btn-primary ml-auto" }, this.submitButtonText))))));
100
+ return (h(Host, null, h("h1", null, "Refund"), this.refundInfoText && (h("div", { class: "d-flex align-items-center flex-row gap-4 border-top border-bottom my-4 p-3", role: "alert" }, h("img", { src: "/info-icon.svg", alt: "Information", height: "30", width: "30" }), h("p", { class: "m-0", innerHTML: this.refundInfoText }))), h("form", { onSubmit: e => this.handleSubmit(e), class: "d-grid gap-4" }, h("div", { class: "form-group" }, h("form-control-monetary", { name: "amount", label: "Refund Amount", defaultValue: ((_a = this.amount) === null || _a === void 0 ? void 0 : _a.toString()) || '', maskOptions: CURRENCY_MASK.DECIMAL, inputHandler: (name, value) => this.handleInput(name, value), error: this.errors.amount })), h("div", { class: "form-group" }, h("form-control-text", { name: "notes", label: "Additional Notes", inputHandler: (name, value) => this.handleInput(name, value), error: this.errors.notes })), this.withButton && (h("div", { class: "form-group d-flex flex-row-reverse" }, h("button", { type: "submit", disabled: !!this.isSubmitting, class: "btn btn-primary ml-auto" }, this.submitButtonText))))));
100
101
  }
101
102
  static get style() { return refundFormCss; }
102
103
  }, [1, "justifi-refund-form", {
@@ -2,7 +2,7 @@ import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/
2
2
  import { F as FormController } from './form.js';
3
3
  import { A as Api } from './Api.js';
4
4
  import { c as Address } from './Business.js';
5
- import { u as parseAddressInfo } from './payload-parsers.js';
5
+ import { c as parseAddressInfo } from './payload-parsers.js';
6
6
  import { a as addressSchema } from './business-address-schema.js';
7
7
  import { c as config } from './config.js';
8
8
  import { B as BusinessFormServerErrors } from './business-form-types.js';
@@ -24,14 +24,21 @@ const NewPaymentMethod = /*@__PURE__*/ proxyCustomElement(class NewPaymentMethod
24
24
  this.isSelected = undefined;
25
25
  }
26
26
  async resolvePaymentMethod() {
27
+ var _a, _b;
27
28
  if (!this.paymentMethodFormRef || !this.billingFormRef)
28
29
  return;
29
30
  const billingFormValidation = await this.billingFormRef.validate();
30
31
  const paymentMethodFormValidation = await this.paymentMethodFormRef.validate();
31
32
  if (!billingFormValidation.isValid || !paymentMethodFormValidation.isValid)
32
33
  return;
33
- const token = await this.tokenize();
34
- return { token: token };
34
+ const tokenizeResponse = await this.tokenize();
35
+ if (tokenizeResponse.error) {
36
+ return { error: tokenizeResponse.error };
37
+ }
38
+ else {
39
+ const tokenizeRessponseData = tokenizeResponse.data;
40
+ return { token: ((_a = tokenizeRessponseData.card) === null || _a === void 0 ? void 0 : _a.token) || ((_b = tokenizeRessponseData.bank_account) === null || _b === void 0 ? void 0 : _b.token) };
41
+ }
35
42
  }
36
43
  async tokenize() {
37
44
  try {
@@ -39,17 +46,10 @@ const NewPaymentMethod = /*@__PURE__*/ proxyCustomElement(class NewPaymentMethod
39
46
  const paymentMethodData = Object.assign({}, billingFormFieldValues);
40
47
  const clientId = this.clientId;
41
48
  const tokenizeResponse = await this.paymentMethodFormRef.tokenize(clientId, paymentMethodData, this.accountId);
42
- if (tokenizeResponse.error) {
43
- console.error(`An error occured submitting the form: ${tokenizeResponse.error.message}`);
44
- return null;
45
- }
46
- const data = tokenizeResponse.data;
47
- const tokenizedPaymentMethod = data.card || data.ach; // fix the response types to avoid this
48
- return tokenizedPaymentMethod.token;
49
+ return tokenizeResponse;
49
50
  }
50
51
  catch (error) {
51
- console.error(`An error occured submitting the form: ${error}`);
52
- return null;
52
+ return error;
53
53
  }
54
54
  }
55
55
  showNewPaymentMethodForm() {
@@ -6,12 +6,12 @@ import './Pagination.js';
6
6
  import './Payment.js';
7
7
  import './Payout.js';
8
8
  import { O as Owner } from './Business.js';
9
- import { r as parseIdentityInfo } from './payload-parsers.js';
9
+ import { b as parseIdentityInfo } from './payload-parsers.js';
10
10
  import { i as identitySchema } from './business-identity-schema.js';
11
11
  import { c as config } from './config.js';
12
12
  import { L as LoadingSpinner } from './utils4.js';
13
13
  import { d as deconstructDate } from './helpers.js';
14
- import { d as OwnerFormServerErrors, O as OwnerFormClickActions } from './business-form-types.js';
14
+ import { C as OwnerFormServerErrors, O as OwnerFormClickActions } from './business-form-types.js';
15
15
  import { d as defineCustomElement$5 } from './form-control-date2.js';
16
16
  import { d as defineCustomElement$4 } from './form-control-number-masked2.js';
17
17
  import { d as defineCustomElement$3 } from './form-control-select2.js';
@@ -1,109 +1,3 @@
1
- import { a as create$6 } from './index.esm.js';
2
- import { a as BusinessTypeOptions, b as BusinessStructureOptions } from './business-form-types.js';
3
- import { S as StateOptions } from './state-options.js';
4
-
5
- const transformEmptyString = (value) => {
6
- return value === '' ? null : value;
7
- };
8
- const businessNameRegex = /^(?!^\s+$)[a-zA-Z0-9\s,&.-]*$/;
9
- const phoneRegex = /^\d{10}$/;
10
- const urlRegex = /^(?:http(s)?:\/\/)?(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)$/;
11
- const taxIdRegex = /^\d{9}$/;
12
- const stringLettersOnlyRegex = /^(?!^\s+$)[a-zA-Z\s]*$/;
13
- const ssnRegex = /^(?!000|666|9\d{2})\d{3}(?!00)\d{2}(?!0000)\d{4}$/;
14
-
15
- // Common Validations
16
- const emailValidation = create$6()
17
- .email('Enter valid email')
18
- .transform(transformEmptyString);
19
- const phoneValidation = create$6()
20
- .matches(phoneRegex, 'Enter valid phone number')
21
- .transform(transformEmptyString);
22
- // Core Info Validations
23
- const businessNameValidation = create$6()
24
- .min(2, 'Name must be at least 2 characters')
25
- .max(100, 'Name must be less than 100 characters')
26
- .matches(businessNameRegex, 'Enter valid business name')
27
- .transform(transformEmptyString);
28
- const doingBusinessAsValidation = create$6()
29
- .min(2, 'Name must be at least 2 characters')
30
- .max(100, 'Name must be less than 100 characters')
31
- .matches(businessNameRegex, 'Enter valid doing business as')
32
- .transform(transformEmptyString);
33
- const websiteUrlValidation = create$6()
34
- .matches(urlRegex, 'Enter valid website url')
35
- .transform(transformEmptyString);
36
- const businessTypeValidation = create$6()
37
- .oneOf(BusinessTypeOptions.map((option) => option.value), 'Select business type')
38
- .transform(transformEmptyString);
39
- const businessStructureValidation = create$6()
40
- .oneOf(BusinessStructureOptions.map((option) => option.value), 'Select business structure')
41
- .transform(transformEmptyString);
42
- const industryValidation = create$6()
43
- .min(2, 'Industry must be at least 2 characters')
44
- .max(50, 'Industry must be less than 50 characters')
45
- .matches(stringLettersOnlyRegex, 'Enter valid industry')
46
- .transform(transformEmptyString);
47
- const taxIdValidation = create$6()
48
- .matches(taxIdRegex, 'Enter valid tax id')
49
- .transform(transformEmptyString);
50
- // Identity Validations
51
- const identityNameValidation = create$6()
52
- .min(2, 'Name must be at least 2 characters')
53
- .max(100, 'Name must be less than 100 characters')
54
- .matches(stringLettersOnlyRegex, 'Enter valid name')
55
- .transform(transformEmptyString);
56
- const identityTitleValidation = create$6()
57
- .min(2, 'Title must be at least 2 characters')
58
- .max(50, 'Title must be less than 50 characters')
59
- .matches(stringLettersOnlyRegex, 'Enter valid title')
60
- .transform(transformEmptyString);
61
- const dobValidation = (role) => {
62
- return (create$6()
63
- .test('min', 'Enter a valid date', (value) => {
64
- const date = new Date(value);
65
- const minDate = new Date('1902-01-01');
66
- return date >= minDate;
67
- })
68
- .test('age', `${role} must be at least 18 years old`, (value) => {
69
- const date = new Date(value);
70
- const minAgeDate = new Date();
71
- minAgeDate.setFullYear(minAgeDate.getFullYear() - 18);
72
- return date <= minAgeDate;
73
- })
74
- .transform(transformEmptyString));
75
- };
76
- const ssnValidation = create$6()
77
- .matches(ssnRegex, 'Enter valid SSN')
78
- .test('not-repeat', 'Enter valid SSN', (value) => {
79
- return !/^(\d)\1+$/.test(value);
80
- })
81
- .test('not-seq', 'Enter valid SSN', (value) => {
82
- return value !== '123456789';
83
- })
84
- .transform(transformEmptyString);
85
- // Address Validations
86
- const lineOneValidation = create$6()
87
- .min(5, 'Address must be at least 5 characters')
88
- .max(100, 'Address must be less than 100 characters')
89
- .matches(/^(?!^\s+$)[a-zA-Z0-9\s,.'-]*$/, 'Enter valid address line 1')
90
- .transform(transformEmptyString);
91
- const lineTwoValidation = create$6()
92
- .max(100, 'Address must be less than 100 characters')
93
- .matches(/^(?!^\s+$)[a-zA-Z0-9\s,.'-]*$/, 'Enter valid address line 2')
94
- .transform(transformEmptyString);
95
- const cityValidation = create$6()
96
- .min(2, 'City must be at least 2 characters')
97
- .max(50, 'City must be less than 50 characters')
98
- .matches(/^(?!^\s+$)[a-zA-Z\s]*$/, 'Enter valid city')
99
- .transform(transformEmptyString);
100
- const stateValidation = create$6()
101
- .oneOf(StateOptions.map((option) => option.value), 'Select state')
102
- .transform(transformEmptyString);
103
- const postalValidation = create$6()
104
- .matches(/^[0-9]{5}$/, 'Enter valid postal code')
105
- .transform(transformEmptyString);
106
-
107
1
  // These props should not be sent to the server
108
2
  // This function is for the larger business form.
109
3
  const parseBusiness = (values, initialValues) => {
@@ -144,4 +38,4 @@ const parseIdentityInfo = (values) => {
144
38
  return values;
145
39
  };
146
40
 
147
- export { phoneValidation as a, businessNameValidation as b, businessTypeValidation as c, doingBusinessAsValidation as d, emailValidation as e, businessStructureValidation as f, parseBusiness as g, identityNameValidation as h, industryValidation as i, identityTitleValidation as j, dobValidation as k, lineOneValidation as l, lineTwoValidation as m, cityValidation as n, stateValidation as o, parseCoreInfo as p, postalValidation as q, parseIdentityInfo as r, ssnValidation as s, taxIdValidation as t, parseAddressInfo as u, websiteUrlValidation as w };
41
+ export { parseBusiness as a, parseIdentityInfo as b, parseAddressInfo as c, parseCoreInfo as p };
@@ -1490,7 +1490,7 @@ const MessageEventType = {
1490
1490
  };
1491
1491
 
1492
1492
  const name = "@justifi/webcomponents";
1493
- const version = "4.12.2";
1493
+ const version = "4.13.0-rc.1";
1494
1494
  const description = "JustiFi Web Components";
1495
1495
  const main = "dist/module/index.js";
1496
1496
  const module = "dist/module/index.js";
@@ -1524,7 +1524,7 @@ const dependencies = {
1524
1524
  "date-fns": "^2.29.3",
1525
1525
  "dinero.js": "^1.9.1",
1526
1526
  "iframe-resizer": "^4.3.7",
1527
- imask: "^7.1.3",
1527
+ imask: "^7.6.0",
1528
1528
  rxjs: "^7.8.1",
1529
1529
  "ts-dedent": "^2.2.0",
1530
1530
  uuid: "^9.0.0",
@@ -23,8 +23,8 @@ const PaymentMethodOptions = /*@__PURE__*/ proxyCustomElement(class PaymentMetho
23
23
  this.accountId = undefined;
24
24
  this.iframeOrigin = config.iframeOrigin;
25
25
  this.savedPaymentMethods = [];
26
- this.selectedPaymentMethodId = undefined;
27
26
  this.paymentAmount = undefined;
27
+ this.selectedPaymentMethodId = undefined;
28
28
  this.paymentMethodOptions = [];
29
29
  }
30
30
  paymentMethodsChanged() {
@@ -90,8 +90,8 @@ const PaymentMethodOptions = /*@__PURE__*/ proxyCustomElement(class PaymentMetho
90
90
  "accountId": [1, "account-id"],
91
91
  "iframeOrigin": [1025, "iframe-origin"],
92
92
  "savedPaymentMethods": [16],
93
- "selectedPaymentMethodId": [1, "selected-payment-method-id"],
94
93
  "paymentAmount": [1, "payment-amount"],
94
+ "selectedPaymentMethodId": [32],
95
95
  "paymentMethodOptions": [32],
96
96
  "resolvePaymentMethod": [64]
97
97
  }, [[0, "paymentMethodOptionSelected", "paymentMethodOptionSelected"]], {
@@ -1,17 +1,4 @@
1
- var ComponentErrorCodes;
2
- (function (ComponentErrorCodes) {
3
- ComponentErrorCodes["MISSING_PROPS"] = "missing-props";
4
- ComponentErrorCodes["FETCH_ERROR"] = "fetch-error";
5
- ComponentErrorCodes["UNKNOWN_ERROR"] = "unknown-error";
6
- ComponentErrorCodes["TOKENIZE_ERROR"] = "tokenize-error";
7
- ComponentErrorCodes["NOT_AUTHENTICATED"] = "not-authenticated";
8
- })(ComponentErrorCodes || (ComponentErrorCodes = {}));
9
- var ComponentErrorSeverity;
10
- (function (ComponentErrorSeverity) {
11
- ComponentErrorSeverity["INFO"] = "info";
12
- ComponentErrorSeverity["WARNING"] = "warning";
13
- ComponentErrorSeverity["ERROR"] = "error";
14
- })(ComponentErrorSeverity || (ComponentErrorSeverity = {}));
1
+ import { a as ComponentErrorCodes } from './ComponentError.js';
15
2
 
16
3
  // Errors on [capital]/config/locales/en.yml
17
4
  // Add more errors as needed
@@ -35,4 +22,4 @@ const getErrorCode = (code) => {
35
22
  }
36
23
  };
37
24
 
38
- export { ComponentErrorSeverity as C, getErrorCode as a, ComponentErrorCodes as b, getErrorMessage as g };
25
+ export { getErrorCode as a, getErrorMessage as g };
@@ -19,6 +19,7 @@ export interface IApiResponseCollection<T> extends IApiResponse<T> {
19
19
  declare const Api: (authToken: string, apiOrigin: string) => {
20
20
  get: (endpoint: string, params?: any, signal?: AbortSignal) => Promise<any>;
21
21
  post: (endpoint: string, body?: any, params?: any, signal?: AbortSignal) => Promise<any>;
22
+ put: (endpoint: string, body?: any, params?: any, signal?: AbortSignal) => Promise<any>;
22
23
  patch: (endpoint: string, body?: any, params?: any, signal?: AbortSignal) => Promise<any>;
23
24
  destroy: (endpoint: string, params?: any, signal?: AbortSignal) => Promise<any>;
24
25
  };
@@ -70,14 +70,20 @@ export interface ProductCategories {
70
70
  export interface IAdditionalQuestions {
71
71
  business_revenue?: string;
72
72
  business_payment_volume?: string;
73
- business_dispute_volume?: string;
74
- business_receivable_volume?: string;
73
+ business_when_service_received?: string;
74
+ business_recurring_payments?: string;
75
+ business_recurring_payments_percentage?: string;
76
+ business_seasonal?: string;
77
+ business_other_payment_details?: string;
75
78
  }
76
79
  export declare class AdditionalQuestions implements IAdditionalQuestions {
77
80
  business_revenue?: string;
78
81
  business_payment_volume?: string;
79
- business_dispute_volume?: string;
80
- business_receivable_volume?: string;
82
+ business_when_service_received?: string;
83
+ business_recurring_payments?: string;
84
+ business_recurring_payments_percentage?: string;
85
+ business_seasonal?: string;
86
+ business_other_payment_details?: string;
81
87
  constructor(additionalQuestions: IAdditionalQuestions);
82
88
  }
83
89
  export interface ICoreBusinessInfo {
@@ -90,6 +96,7 @@ export interface ICoreBusinessInfo {
90
96
  website_url?: string;
91
97
  email?: string;
92
98
  phone?: string;
99
+ date_of_incorporation?: string;
93
100
  }
94
101
  export declare class CoreBusinessInfo implements ICoreBusinessInfo {
95
102
  business_type: BusinessType;
@@ -101,6 +108,7 @@ export declare class CoreBusinessInfo implements ICoreBusinessInfo {
101
108
  website_url: string;
102
109
  email: string;
103
110
  phone: string;
111
+ date_of_incorporation: string;
104
112
  constructor(coreBusinessInfo: ICoreBusinessInfo);
105
113
  }
106
114
  export interface IBusiness {
@@ -125,9 +133,10 @@ export interface IBusiness {
125
133
  tax_id: string;
126
134
  updated_at: string;
127
135
  website_url: string;
136
+ date_of_incorporation?: string;
128
137
  }
129
138
  export declare class Business implements IBusiness {
130
- additional_questions: IAdditionalQuestions | {};
139
+ additional_questions: AdditionalQuestions | {};
131
140
  business_type: BusinessType;
132
141
  business_structure: BusinessStructure;
133
142
  bank_accounts: BankAccount[];
@@ -147,6 +156,7 @@ export declare class Business implements IBusiness {
147
156
  tax_id: string;
148
157
  updated_at: string;
149
158
  website_url: string;
159
+ date_of_incorporation?: string;
150
160
  product_categories: ProductCategories;
151
161
  constructor(business: IBusiness);
152
162
  }
@@ -1,15 +1,15 @@
1
- import { IApiResponse, ICheckout } from '..';
1
+ import { IApiResponse, ICheckout, ICheckoutCompleteResponse } from '..';
2
2
  export interface ICheckoutService {
3
3
  fetchCheckout(authToken: string, checkoutId: string): Promise<IApiResponse<ICheckout>>;
4
4
  complete(authToken: string, checkoutId: string, payment: {
5
5
  payment_mode: string;
6
6
  payment_token?: string;
7
- }): Promise<IApiResponse<ICheckout>>;
7
+ }): Promise<IApiResponse<ICheckoutCompleteResponse>>;
8
8
  }
9
9
  export declare class CheckoutService implements ICheckoutService {
10
10
  fetchCheckout(authToken: string, checkoutId: string): Promise<IApiResponse<ICheckout>>;
11
11
  complete(authToken: string, checkoutId: string, payment: {
12
12
  payment_mode: string;
13
13
  payment_token?: string;
14
- }): Promise<IApiResponse<ICheckout>>;
14
+ }): Promise<IApiResponse<ICheckoutCompleteResponse>>;
15
15
  }
@@ -1,11 +1,17 @@
1
1
  export declare const additionalQuestionsSchema: (allowOptionalFields?: boolean) => import("yup").ObjectSchema<{
2
2
  business_revenue: string;
3
3
  business_payment_volume: string;
4
- business_dispute_volume: string;
5
- business_receivable_volume: string;
4
+ business_when_service_received: string;
5
+ business_recurring_payments: string;
6
+ business_recurring_payments_percentage: string;
7
+ business_seasonal: string;
8
+ business_other_payment_details: string;
6
9
  }, import("yup").AnyObject, {
7
10
  business_revenue: undefined;
8
11
  business_payment_volume: undefined;
9
- business_dispute_volume: undefined;
10
- business_receivable_volume: undefined;
12
+ business_when_service_received: undefined;
13
+ business_recurring_payments: undefined;
14
+ business_recurring_payments_percentage: undefined;
15
+ business_seasonal: undefined;
16
+ business_other_payment_details: undefined;
11
17
  }, "">;
@@ -8,6 +8,7 @@ export declare const businessCoreInfoSchema: (allowOptionalFields?: boolean) =>
8
8
  business_structure: string;
9
9
  industry: string;
10
10
  tax_id: string;
11
+ date_of_incorporation: string;
11
12
  }, import("yup").AnyObject, {
12
13
  legal_name: undefined;
13
14
  website_url: undefined;
@@ -18,4 +19,5 @@ export declare const businessCoreInfoSchema: (allowOptionalFields?: boolean) =>
18
19
  business_structure: undefined;
19
20
  industry: undefined;
20
21
  tax_id: undefined;
22
+ date_of_incorporation: undefined;
21
23
  }, "">;
@@ -8,10 +8,13 @@ export declare const businessFormSchema: import("yup").ObjectSchema<{
8
8
  country?: string;
9
9
  };
10
10
  additional_questions: {
11
+ business_recurring_payments?: string;
11
12
  business_revenue?: string;
12
13
  business_payment_volume?: string;
13
- business_dispute_volume?: string;
14
- business_receivable_volume?: string;
14
+ business_when_service_received?: string;
15
+ business_recurring_payments_percentage?: string;
16
+ business_seasonal?: string;
17
+ business_other_payment_details?: string;
15
18
  };
16
19
  representative: {
17
20
  address?: {
@@ -38,6 +41,7 @@ export declare const businessFormSchema: import("yup").ObjectSchema<{
38
41
  business_structure: unknown;
39
42
  industry: unknown;
40
43
  tax_id: unknown;
44
+ date_of_incorporation: unknown;
41
45
  }, import("yup").AnyObject, {
42
46
  legal_address: {
43
47
  line1: undefined;
@@ -50,8 +54,11 @@ export declare const businessFormSchema: import("yup").ObjectSchema<{
50
54
  additional_questions: {
51
55
  business_revenue: undefined;
52
56
  business_payment_volume: undefined;
53
- business_dispute_volume: undefined;
54
- business_receivable_volume: undefined;
57
+ business_when_service_received: undefined;
58
+ business_recurring_payments: undefined;
59
+ business_recurring_payments_percentage: undefined;
60
+ business_seasonal: undefined;
61
+ business_other_payment_details: undefined;
55
62
  };
56
63
  representative: {
57
64
  name: undefined;
@@ -78,4 +85,5 @@ export declare const businessFormSchema: import("yup").ObjectSchema<{
78
85
  business_structure: undefined;
79
86
  industry: undefined;
80
87
  tax_id: undefined;
88
+ date_of_incorporation: undefined;
81
89
  }, "">;