@paydock/client-sdk 1.104.3-beta → 1.105.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 (490) hide show
  1. package/.nvmrc +1 -0
  2. package/README.md +572 -290
  3. package/api.d.ts +1 -0
  4. package/api.js +1 -0
  5. package/bundles/widget.umd.js +9130 -8655
  6. package/bundles/widget.umd.min.js +1 -2
  7. package/canvas3ds.d.ts +1 -0
  8. package/canvas3ds.js +1 -0
  9. package/checkout-button.d.ts +1 -0
  10. package/checkout-button.js +1 -0
  11. package/inicialization-guide.md +7 -0
  12. package/{bundles/types → lib}/api/api-base.d.ts +1 -2
  13. package/lib/api/api-base.js +101 -0
  14. package/lib/api/api-base.js.map +1 -0
  15. package/{bundles/types → lib}/api/api-charge-internal.d.ts +0 -1
  16. package/lib/api/api-charge-internal.js +30 -0
  17. package/lib/api/api-charge-internal.js.map +1 -0
  18. package/{bundles/types → lib}/api/api-charge.d.ts +0 -1
  19. package/lib/api/api-charge.js +49 -0
  20. package/lib/api/api-charge.js.map +1 -0
  21. package/{bundles/types → lib}/api/api-internal.d.ts +0 -1
  22. package/lib/api/api-internal.js +13 -0
  23. package/lib/api/api-internal.js.map +1 -0
  24. package/{bundles/types → lib}/api/api-service-internal.d.ts +0 -1
  25. package/lib/api/api-service-internal.js +18 -0
  26. package/lib/api/api-service-internal.js.map +1 -0
  27. package/{bundles/types → lib}/api/api.d.ts +1 -2
  28. package/lib/api/api.js +62 -0
  29. package/lib/api/api.js.map +1 -0
  30. package/lib/api/index.d.ts +1 -0
  31. package/lib/api/index.js +2 -0
  32. package/lib/api/index.js.map +1 -0
  33. package/{bundles/types → lib}/canvas-3ds/canvas-3ds.d.ts +1 -2
  34. package/lib/canvas-3ds/canvas-3ds.js +157 -0
  35. package/lib/canvas-3ds/canvas-3ds.js.map +1 -0
  36. package/{bundles/types → lib}/canvas-3ds/index.d.ts +0 -1
  37. package/lib/canvas-3ds/index.js +2 -0
  38. package/lib/canvas-3ds/index.js.map +1 -0
  39. package/{bundles/types → lib}/canvas-3ds/services/gpayments-service.d.ts +0 -1
  40. package/lib/canvas-3ds/services/gpayments-service.js +181 -0
  41. package/lib/canvas-3ds/services/gpayments-service.js.map +1 -0
  42. package/{bundles/types → lib}/canvas-3ds/services/index.d.ts +0 -1
  43. package/lib/canvas-3ds/services/index.js +2 -0
  44. package/lib/canvas-3ds/services/index.js.map +1 -0
  45. package/{bundles/types → lib}/canvas-3ds/services/standalone3ds-service.d.ts +0 -1
  46. package/lib/canvas-3ds/services/standalone3ds-service.js +32 -0
  47. package/lib/canvas-3ds/services/standalone3ds-service.js.map +1 -0
  48. package/{bundles/types → lib}/checkout-button/afterpay/afterpay-checkout-button.d.ts +1 -2
  49. package/lib/checkout-button/afterpay/afterpay-checkout-button.js +50 -0
  50. package/lib/checkout-button/afterpay/afterpay-checkout-button.js.map +1 -0
  51. package/{bundles/types → lib}/checkout-button/afterpay/afterpay.runner.d.ts +0 -1
  52. package/lib/checkout-button/afterpay/afterpay.runner.js +41 -0
  53. package/lib/checkout-button/afterpay/afterpay.runner.js.map +1 -0
  54. package/{bundles/types → lib}/checkout-button/checkout-button.d.ts +1 -2
  55. package/{bundles/types → lib}/checkout-button/checkout-button.interface.d.ts +0 -1
  56. package/lib/checkout-button/checkout-button.interface.js +45 -0
  57. package/lib/checkout-button/checkout-button.interface.js.map +1 -0
  58. package/lib/checkout-button/checkout-button.js +266 -0
  59. package/lib/checkout-button/checkout-button.js.map +1 -0
  60. package/{bundles/types → lib}/checkout-button/checkout-contextual-handler.d.ts +0 -1
  61. package/lib/checkout-button/checkout-contextual-handler.js +75 -0
  62. package/lib/checkout-button/checkout-contextual-handler.js.map +1 -0
  63. package/{bundles/types → lib}/checkout-button/index.d.ts +1 -2
  64. package/lib/checkout-button/index.js +85 -0
  65. package/lib/checkout-button/index.js.map +1 -0
  66. package/{bundles/types → lib}/checkout-button/paypal/paypal-checkout-button.d.ts +1 -2
  67. package/lib/checkout-button/paypal/paypal-checkout-button.js +25 -0
  68. package/lib/checkout-button/paypal/paypal-checkout-button.js.map +1 -0
  69. package/{bundles/types → lib}/checkout-button/paypal/paypal.runner.d.ts +0 -1
  70. package/lib/checkout-button/paypal/paypal.runner.js +14 -0
  71. package/lib/checkout-button/paypal/paypal.runner.js.map +1 -0
  72. package/{bundles/types → lib}/checkout-button/runner/base.runner.d.ts +3 -4
  73. package/lib/checkout-button/runner/base.runner.js +13 -0
  74. package/lib/checkout-button/runner/base.runner.js.map +1 -0
  75. package/{bundles/types → lib}/checkout-button/runner/contextual.runner.d.ts +1 -2
  76. package/lib/checkout-button/runner/contextual.runner.js +40 -0
  77. package/lib/checkout-button/runner/contextual.runner.js.map +1 -0
  78. package/{bundles/types → lib}/checkout-button/runner/index.d.ts +0 -1
  79. package/lib/checkout-button/runner/index.js +11 -0
  80. package/lib/checkout-button/runner/index.js.map +1 -0
  81. package/{bundles/types → lib}/checkout-button/runner/popup.runner.d.ts +1 -2
  82. package/lib/checkout-button/runner/popup.runner.js +68 -0
  83. package/lib/checkout-button/runner/popup.runner.js.map +1 -0
  84. package/{bundles/types → lib}/checkout-button/runner/redirect.runner.d.ts +1 -2
  85. package/lib/checkout-button/runner/redirect.runner.js +15 -0
  86. package/lib/checkout-button/runner/redirect.runner.js.map +1 -0
  87. package/{bundles/types → lib}/checkout-button/zipmoney/zipmoney-checkout-button.d.ts +1 -2
  88. package/lib/checkout-button/zipmoney/zipmoney-checkout-button.js +64 -0
  89. package/lib/checkout-button/zipmoney/zipmoney-checkout-button.js.map +1 -0
  90. package/{bundles/types → lib}/checkout-button/zipmoney/zipmoney-contextual.runner.d.ts +1 -2
  91. package/lib/checkout-button/zipmoney/zipmoney-contextual.runner.js +78 -0
  92. package/lib/checkout-button/zipmoney/zipmoney-contextual.runner.js.map +1 -0
  93. package/{bundles/types → lib}/checkout-button/zipmoney/zipmoney-redirect.runner.d.ts +1 -2
  94. package/lib/checkout-button/zipmoney/zipmoney-redirect.runner.js +49 -0
  95. package/lib/checkout-button/zipmoney/zipmoney-redirect.runner.js.map +1 -0
  96. package/{bundles/types → lib}/checkout-button/zipmoney/zipmoney.config.d.ts +0 -1
  97. package/lib/checkout-button/zipmoney/zipmoney.config.js +4 -0
  98. package/lib/checkout-button/zipmoney/zipmoney.config.js.map +1 -0
  99. package/{bundles/types → lib}/checkout-button/zipmoney/zipmoney.runner.d.ts +1 -2
  100. package/lib/checkout-button/zipmoney/zipmoney.runner.js +23 -0
  101. package/lib/checkout-button/zipmoney/zipmoney.runner.js.map +1 -0
  102. package/{bundles/types → lib}/checkout-button/zipmoney/zipmoney.types.d.ts +0 -1
  103. package/lib/checkout-button/zipmoney/zipmoney.types.js +1 -0
  104. package/lib/checkout-button/zipmoney/zipmoney.types.js.map +1 -0
  105. package/{bundles/types → lib}/components/ability-guard.d.ts +0 -1
  106. package/lib/components/ability-guard.js +44 -0
  107. package/lib/components/ability-guard.js.map +1 -0
  108. package/{bundles/types → lib}/components/background.d.ts +0 -1
  109. package/lib/components/background.js +193 -0
  110. package/lib/components/background.js.map +1 -0
  111. package/{bundles/types → lib}/components/container.d.ts +1 -1
  112. package/lib/components/container.js +63 -0
  113. package/lib/components/container.js.map +1 -0
  114. package/{bundles/types → lib}/components/dispatcher.d.ts +1 -2
  115. package/lib/components/dispatcher.js +39 -0
  116. package/lib/components/dispatcher.js.map +1 -0
  117. package/{bundles/types → lib}/components/element-style.d.ts +1 -2
  118. package/lib/components/element-style.js +52 -0
  119. package/lib/components/element-style.js.map +1 -0
  120. package/{bundles/types → lib}/components/flypay-iframe-event.d.ts +0 -1
  121. package/lib/components/flypay-iframe-event.js +28 -0
  122. package/lib/components/flypay-iframe-event.js.map +1 -0
  123. package/{bundles/types/components/form-interceptor.d.ts → lib/components/form-Interceptor.d.ts} +0 -1
  124. package/lib/components/form-Interceptor.js +38 -0
  125. package/lib/components/form-Interceptor.js.map +1 -0
  126. package/{bundles/types → lib}/components/http-core.d.ts +0 -1
  127. package/lib/components/http-core.js +57 -0
  128. package/lib/components/http-core.js.map +1 -0
  129. package/{bundles/types → lib}/components/iframe-event.d.ts +15 -13
  130. package/lib/components/iframe-event.js +75 -0
  131. package/lib/components/iframe-event.js.map +1 -0
  132. package/{bundles/types → lib}/components/iframe.d.ts +0 -1
  133. package/lib/components/iframe.js +62 -0
  134. package/lib/components/iframe.js.map +1 -0
  135. package/{bundles/types → lib}/components/link.d.ts +1 -2
  136. package/lib/components/link.js +59 -0
  137. package/lib/components/link.js.map +1 -0
  138. package/{bundles/types → lib}/components/loader.d.ts +0 -1
  139. package/lib/components/loader.js +234 -0
  140. package/lib/components/loader.js.map +1 -0
  141. package/{bundles/types → lib}/components/param.d.ts +9 -12
  142. package/lib/components/param.js +147 -0
  143. package/lib/components/param.js.map +1 -0
  144. package/{bundles/types → lib}/components/popup.d.ts +0 -1
  145. package/lib/components/popup.js +104 -0
  146. package/lib/components/popup.js.map +1 -0
  147. package/{bundles/types → lib}/components/storage-dispatcher.d.ts +0 -1
  148. package/lib/components/storage-dispatcher.js +75 -0
  149. package/lib/components/storage-dispatcher.js.map +1 -0
  150. package/{bundles/types → lib}/components/trigger.d.ts +0 -1
  151. package/lib/components/trigger.js +49 -0
  152. package/lib/components/trigger.js.map +1 -0
  153. package/{bundles/types → lib}/components/vault-display-iframe-event.d.ts +0 -1
  154. package/lib/components/vault-display-iframe-event.js +27 -0
  155. package/lib/components/vault-display-iframe-event.js.map +1 -0
  156. package/{bundles/types → lib}/components/wallet-background.d.ts +2 -2
  157. package/lib/components/wallet-background.js +63 -0
  158. package/lib/components/wallet-background.js.map +1 -0
  159. package/{bundles/types → lib}/components/wallet-trigger.d.ts +0 -1
  160. package/lib/components/wallet-trigger.js +27 -0
  161. package/lib/components/wallet-trigger.js.map +1 -0
  162. package/{bundles/types/configs/env/environment.paydock.d.ts → lib/configs/env/env.d.ts} +8 -5
  163. package/lib/configs/env/env.js +117 -0
  164. package/lib/configs/env/env.js.map +1 -0
  165. package/{bundles/types → lib}/configs/sdk.d.ts +2 -3
  166. package/lib/configs/sdk.js +16 -0
  167. package/lib/configs/sdk.js.map +1 -0
  168. package/lib/constants/validators.d.ts +44 -0
  169. package/lib/constants/validators.js +42 -0
  170. package/lib/constants/validators.js.map +1 -0
  171. package/{bundles/types → lib}/external-checkout/builder.d.ts +0 -1
  172. package/lib/external-checkout/builder.js +45 -0
  173. package/lib/external-checkout/builder.js.map +1 -0
  174. package/{bundles/types → lib}/external-checkout/checker.d.ts +0 -1
  175. package/lib/external-checkout/checker.js +22 -0
  176. package/lib/external-checkout/checker.js.map +1 -0
  177. package/lib/external-checkout/index.d.ts +2 -0
  178. package/lib/external-checkout/index.js +3 -0
  179. package/lib/external-checkout/index.js.map +1 -0
  180. package/{bundles/types → lib}/helper/access-token.d.ts +0 -1
  181. package/lib/helper/access-token.js +44 -0
  182. package/lib/helper/access-token.js.map +1 -0
  183. package/{bundles/types → lib}/helper/browser.d.ts +0 -1
  184. package/lib/helper/browser.js +79 -0
  185. package/lib/helper/browser.js.map +1 -0
  186. package/{bundles/types → lib}/helper/event-emitter.d.ts +0 -1
  187. package/lib/helper/event-emitter.js +23 -0
  188. package/lib/helper/event-emitter.js.map +1 -0
  189. package/{bundles/types → lib}/helper/event.d.ts +0 -1
  190. package/lib/helper/event.js +23 -0
  191. package/lib/helper/event.js.map +1 -0
  192. package/{bundles/types → lib}/helper/ms.d.ts +0 -1
  193. package/lib/helper/ms.js +32 -0
  194. package/lib/helper/ms.js.map +1 -0
  195. package/{bundles/types → lib}/helper/object.d.ts +0 -1
  196. package/lib/helper/object.js +6 -0
  197. package/lib/helper/object.js.map +1 -0
  198. package/{bundles/types → lib}/helper/url.d.ts +0 -1
  199. package/lib/helper/url.js +11 -0
  200. package/lib/helper/url.js.map +1 -0
  201. package/{bundles/types → lib}/helper/uuid.d.ts +0 -1
  202. package/lib/helper/uuid.js +26 -0
  203. package/lib/helper/uuid.js.map +1 -0
  204. package/lib/index.d.ts +15 -0
  205. package/lib/index.js +15 -0
  206. package/lib/index.js.map +1 -0
  207. package/{bundles/types → lib}/payment-source/builder.d.ts +0 -1
  208. package/lib/payment-source/builder.js +49 -0
  209. package/lib/payment-source/builder.js.map +1 -0
  210. package/{bundles/types → lib}/payment-source/index.d.ts +0 -1
  211. package/lib/payment-source/index.js +2 -0
  212. package/lib/payment-source/index.js.map +1 -0
  213. package/{bundles/types → lib}/payment-source-widget/html-payment-source-widget.d.ts +17 -14
  214. package/lib/payment-source-widget/html-payment-source-widget.js +172 -0
  215. package/lib/payment-source-widget/html-payment-source-widget.js.map +1 -0
  216. package/{bundles/types → lib}/payment-source-widget/index.d.ts +0 -1
  217. package/lib/payment-source-widget/index.js +35 -0
  218. package/lib/payment-source-widget/index.js.map +1 -0
  219. package/{bundles/types → lib}/payment-source-widget/interfaces.d.ts +0 -1
  220. package/lib/payment-source-widget/interfaces.js +2 -0
  221. package/lib/payment-source-widget/interfaces.js.map +1 -0
  222. package/{bundles/types → lib}/payment-source-widget/payment-source-widget.d.ts +1 -2
  223. package/lib/payment-source-widget/payment-source-widget.js +142 -0
  224. package/lib/payment-source-widget/payment-source-widget.js.map +1 -0
  225. package/{bundles/types → lib}/secure-remote-commerce/index.d.ts +0 -1
  226. package/lib/secure-remote-commerce/index.js +2 -0
  227. package/lib/secure-remote-commerce/index.js.map +1 -0
  228. package/{bundles/types → lib}/secure-remote-commerce/interfaces.d.ts +5 -6
  229. package/lib/secure-remote-commerce/interfaces.js +28 -0
  230. package/lib/secure-remote-commerce/interfaces.js.map +1 -0
  231. package/{bundles/types → lib}/secure-remote-commerce/providers/src-provider.d.ts +0 -1
  232. package/lib/secure-remote-commerce/providers/src-provider.js +1 -0
  233. package/lib/secure-remote-commerce/providers/src-provider.js.map +1 -0
  234. package/{bundles/types → lib}/secure-remote-commerce/providers/visa-src/helper.d.ts +0 -1
  235. package/lib/secure-remote-commerce/providers/visa-src/helper.js +36 -0
  236. package/lib/secure-remote-commerce/providers/visa-src/helper.js.map +1 -0
  237. package/{bundles/types → lib}/secure-remote-commerce/providers/visa-src/index.d.ts +0 -1
  238. package/lib/secure-remote-commerce/providers/visa-src/index.js +2 -0
  239. package/lib/secure-remote-commerce/providers/visa-src/index.js.map +1 -0
  240. package/{bundles/types → lib}/secure-remote-commerce/providers/visa-src/visa-src.d.ts +0 -1
  241. package/lib/secure-remote-commerce/providers/visa-src/visa-src.js +113 -0
  242. package/lib/secure-remote-commerce/providers/visa-src/visa-src.js.map +1 -0
  243. package/{bundles/types → lib}/secure-remote-commerce/providers/visa-src/visa-src.styles.d.ts +0 -1
  244. package/lib/secure-remote-commerce/providers/visa-src/visa-src.styles.js +10 -0
  245. package/lib/secure-remote-commerce/providers/visa-src/visa-src.styles.js.map +1 -0
  246. package/{bundles/types → lib}/secure-remote-commerce/secure-remote-commerce.d.ts +1 -2
  247. package/lib/secure-remote-commerce/secure-remote-commerce.js +239 -0
  248. package/lib/secure-remote-commerce/secure-remote-commerce.js.map +1 -0
  249. package/{bundles/types → lib}/vault-display-widget/index.d.ts +0 -1
  250. package/lib/vault-display-widget/index.js +14 -0
  251. package/lib/vault-display-widget/index.js.map +1 -0
  252. package/{bundles/types → lib}/vault-display-widget/vault-display-widget.d.ts +1 -2
  253. package/lib/vault-display-widget/vault-display-widget.js +99 -0
  254. package/lib/vault-display-widget/vault-display-widget.js.map +1 -0
  255. package/{bundles/types → lib}/wallet-buttons/afterpay.wallet-service.d.ts +0 -1
  256. package/lib/wallet-buttons/afterpay.wallet-service.js +152 -0
  257. package/lib/wallet-buttons/afterpay.wallet-service.js.map +1 -0
  258. package/{bundles/types → lib}/wallet-buttons/apple.wallet-service.d.ts +2 -1
  259. package/lib/wallet-buttons/apple.wallet-service.js +324 -0
  260. package/lib/wallet-buttons/apple.wallet-service.js.map +1 -0
  261. package/{bundles/types → lib}/wallet-buttons/flypay-v2.wallet-service.d.ts +9 -2
  262. package/lib/wallet-buttons/flypay-v2.wallet-service.js +165 -0
  263. package/lib/wallet-buttons/flypay-v2.wallet-service.js.map +1 -0
  264. package/{bundles/types → lib}/wallet-buttons/flypay.wallet-service.d.ts +0 -1
  265. package/lib/wallet-buttons/flypay.wallet-service.js +117 -0
  266. package/lib/wallet-buttons/flypay.wallet-service.js.map +1 -0
  267. package/{bundles/types → lib}/wallet-buttons/google.wallet-service.d.ts +3 -1
  268. package/lib/wallet-buttons/google.wallet-service.js +301 -0
  269. package/lib/wallet-buttons/google.wallet-service.js.map +1 -0
  270. package/lib/wallet-buttons/helpers/flypay-v2.helper.d.ts +3 -0
  271. package/lib/wallet-buttons/helpers/flypay-v2.helper.js +151 -0
  272. package/lib/wallet-buttons/helpers/flypay-v2.helper.js.map +1 -0
  273. package/lib/wallet-buttons/index.d.ts +127 -0
  274. package/lib/wallet-buttons/index.js +128 -0
  275. package/lib/wallet-buttons/index.js.map +1 -0
  276. package/{bundles/types → lib}/wallet-buttons/interfaces.d.ts +3 -1
  277. package/lib/wallet-buttons/interfaces.js +1 -0
  278. package/lib/wallet-buttons/interfaces.js.map +1 -0
  279. package/{bundles/types → lib}/wallet-buttons/mastercard.wallet-service.d.ts +0 -1
  280. package/lib/wallet-buttons/mastercard.wallet-service.js +27 -0
  281. package/lib/wallet-buttons/mastercard.wallet-service.js.map +1 -0
  282. package/{bundles/types → lib}/wallet-buttons/paypal.wallet-service.d.ts +0 -1
  283. package/lib/wallet-buttons/paypal.wallet-service.js +144 -0
  284. package/lib/wallet-buttons/paypal.wallet-service.js.map +1 -0
  285. package/{bundles/types → lib}/wallet-buttons/stripe.wallet-service.d.ts +0 -1
  286. package/lib/wallet-buttons/stripe.wallet-service.js +100 -0
  287. package/lib/wallet-buttons/stripe.wallet-service.js.map +1 -0
  288. package/{bundles/types/wallet-buttons/wallet-cba-buttons.d.ts → lib/wallet-buttons/wallet-buttons.d.ts} +92 -115
  289. package/lib/wallet-buttons/wallet-buttons.js +479 -0
  290. package/lib/wallet-buttons/wallet-buttons.js.map +1 -0
  291. package/{bundles/types → lib}/wallet-buttons/wallet-service.d.ts +7 -1
  292. package/lib/wallet-buttons/wallet-service.js +60 -0
  293. package/lib/wallet-buttons/wallet-service.js.map +1 -0
  294. package/{bundles/types → lib}/widget/configuration.d.ts +2 -3
  295. package/lib/widget/configuration.js +260 -0
  296. package/lib/widget/configuration.js.map +1 -0
  297. package/lib/widget/html-multi-widget.d.ts +336 -0
  298. package/lib/widget/html-multi-widget.js +422 -0
  299. package/lib/widget/html-multi-widget.js.map +1 -0
  300. package/{bundles/types → lib}/widget/html-widget.d.ts +1 -2
  301. package/lib/widget/html-widget.js +127 -0
  302. package/lib/widget/html-widget.js.map +1 -0
  303. package/{bundles/types → lib}/widget/index.d.ts +1 -2
  304. package/lib/widget/index.js +132 -0
  305. package/lib/widget/index.js.map +1 -0
  306. package/{bundles/types → lib}/widget/meta.d.ts +0 -1
  307. package/lib/widget/meta.js +8 -0
  308. package/lib/widget/meta.js.map +1 -0
  309. package/{bundles/types → lib}/widget/multi-widget.d.ts +1 -2
  310. package/lib/widget/multi-widget.js +437 -0
  311. package/lib/widget/multi-widget.js.map +1 -0
  312. package/{bundles/types → lib}/widget/style.d.ts +0 -1
  313. package/lib/widget/style.js +204 -0
  314. package/lib/widget/style.js.map +1 -0
  315. package/package.json +42 -164
  316. package/payment-source-widget.d.ts +1 -0
  317. package/payment-source-widget.js +1 -0
  318. package/slate.md +136 -107
  319. package/tslint.json +129 -0
  320. package/typings/globals/@auspayplus/open-payments-checkout/index.d.ts +43 -0
  321. package/typings/globals/jasmine/index.d.ts +576 -0
  322. package/typings/globals/jasmine-ajax/index.d.ts +83 -0
  323. package/typings/globals/jquery/index.d.ts +3759 -0
  324. package/typings/index.d.ts +4 -0
  325. package/vault-display-widget.d.ts +1 -0
  326. package/vault-display-widget.js +1 -0
  327. package/vendors/zipmoney.d.ts +18 -0
  328. package/vendors/zipmoney.js +2 -0
  329. package/widget.d.ts +1 -0
  330. package/widget.js +1 -0
  331. package/bundles/index.cjs +0 -10674
  332. package/bundles/index.cjs.d.ts +0 -3163
  333. package/bundles/index.cjs.map +0 -1
  334. package/bundles/index.mjs +0 -10642
  335. package/bundles/index.mjs.d.ts +0 -3163
  336. package/bundles/index.mjs.map +0 -1
  337. package/bundles/types/api/api-base.d.ts.map +0 -1
  338. package/bundles/types/api/api-charge-internal.d.ts.map +0 -1
  339. package/bundles/types/api/api-charge.d.ts.map +0 -1
  340. package/bundles/types/api/api-internal.d.ts.map +0 -1
  341. package/bundles/types/api/api-service-internal.d.ts.map +0 -1
  342. package/bundles/types/api/api.d.ts.map +0 -1
  343. package/bundles/types/api/index.d.ts +0 -2
  344. package/bundles/types/api/index.d.ts.map +0 -1
  345. package/bundles/types/canvas-3ds/canvas-3ds.d.ts.map +0 -1
  346. package/bundles/types/canvas-3ds/index.d.ts.map +0 -1
  347. package/bundles/types/canvas-3ds/services/gpayments-service.d.ts.map +0 -1
  348. package/bundles/types/canvas-3ds/services/index.d.ts.map +0 -1
  349. package/bundles/types/canvas-3ds/services/standalone3ds-service.d.ts.map +0 -1
  350. package/bundles/types/checkout-button/afterpay/afterpay-checkout-button.d.ts.map +0 -1
  351. package/bundles/types/checkout-button/afterpay/afterpay.runner.d.ts.map +0 -1
  352. package/bundles/types/checkout-button/checkout-button.d.ts.map +0 -1
  353. package/bundles/types/checkout-button/checkout-button.interface.d.ts.map +0 -1
  354. package/bundles/types/checkout-button/checkout-contextual-handler.d.ts.map +0 -1
  355. package/bundles/types/checkout-button/index.d.ts.map +0 -1
  356. package/bundles/types/checkout-button/paypal/paypal-checkout-button.d.ts.map +0 -1
  357. package/bundles/types/checkout-button/paypal/paypal.runner.d.ts.map +0 -1
  358. package/bundles/types/checkout-button/runner/base.runner.d.ts.map +0 -1
  359. package/bundles/types/checkout-button/runner/contextual.runner.d.ts.map +0 -1
  360. package/bundles/types/checkout-button/runner/index.d.ts.map +0 -1
  361. package/bundles/types/checkout-button/runner/popup.runner.d.ts.map +0 -1
  362. package/bundles/types/checkout-button/runner/redirect.runner.d.ts.map +0 -1
  363. package/bundles/types/checkout-button/zipmoney/index.d.ts +0 -4
  364. package/bundles/types/checkout-button/zipmoney/index.d.ts.map +0 -1
  365. package/bundles/types/checkout-button/zipmoney/zipmoney-checkout-button.d.ts.map +0 -1
  366. package/bundles/types/checkout-button/zipmoney/zipmoney-contextual.runner.d.ts.map +0 -1
  367. package/bundles/types/checkout-button/zipmoney/zipmoney-redirect.runner.d.ts.map +0 -1
  368. package/bundles/types/checkout-button/zipmoney/zipmoney.config.d.ts.map +0 -1
  369. package/bundles/types/checkout-button/zipmoney/zipmoney.runner.d.ts.map +0 -1
  370. package/bundles/types/checkout-button/zipmoney/zipmoney.types.d.ts.map +0 -1
  371. package/bundles/types/components/ability-guard.d.ts.map +0 -1
  372. package/bundles/types/components/background.d.ts.map +0 -1
  373. package/bundles/types/components/container.d.ts.map +0 -1
  374. package/bundles/types/components/dispatcher.d.ts.map +0 -1
  375. package/bundles/types/components/element-style.d.ts.map +0 -1
  376. package/bundles/types/components/flypay-iframe-event.d.ts.map +0 -1
  377. package/bundles/types/components/form-interceptor.d.ts.map +0 -1
  378. package/bundles/types/components/http-core.d.ts.map +0 -1
  379. package/bundles/types/components/iframe-event.d.ts.map +0 -1
  380. package/bundles/types/components/iframe.d.ts.map +0 -1
  381. package/bundles/types/components/link.d.ts.map +0 -1
  382. package/bundles/types/components/loader.d.ts.map +0 -1
  383. package/bundles/types/components/param.d.ts.map +0 -1
  384. package/bundles/types/components/popup.d.ts.map +0 -1
  385. package/bundles/types/components/storage-dispatcher.d.ts.map +0 -1
  386. package/bundles/types/components/trigger.d.ts.map +0 -1
  387. package/bundles/types/components/vault-display-iframe-event.d.ts.map +0 -1
  388. package/bundles/types/components/wallet-background.d.ts.map +0 -1
  389. package/bundles/types/components/wallet-trigger.d.ts.map +0 -1
  390. package/bundles/types/configs/env/environment.cba.d.ts +0 -29
  391. package/bundles/types/configs/env/environment.cba.d.ts.map +0 -1
  392. package/bundles/types/configs/env/environment.interface.d.ts +0 -12
  393. package/bundles/types/configs/env/environment.interface.d.ts.map +0 -1
  394. package/bundles/types/configs/env/environment.paydock.d.ts.map +0 -1
  395. package/bundles/types/configs/env/index.d.ts +0 -3
  396. package/bundles/types/configs/env/index.d.ts.map +0 -1
  397. package/bundles/types/configs/sdk.d.ts.map +0 -1
  398. package/bundles/types/external-checkout/builder.d.ts.map +0 -1
  399. package/bundles/types/external-checkout/checker.d.ts.map +0 -1
  400. package/bundles/types/external-checkout/index.d.ts +0 -3
  401. package/bundles/types/external-checkout/index.d.ts.map +0 -1
  402. package/bundles/types/helper/access-token.d.ts.map +0 -1
  403. package/bundles/types/helper/browser.d.ts.map +0 -1
  404. package/bundles/types/helper/event-emitter.d.ts.map +0 -1
  405. package/bundles/types/helper/event.d.ts.map +0 -1
  406. package/bundles/types/helper/ms.d.ts.map +0 -1
  407. package/bundles/types/helper/object.d.ts.map +0 -1
  408. package/bundles/types/helper/url.d.ts.map +0 -1
  409. package/bundles/types/helper/uuid.d.ts.map +0 -1
  410. package/bundles/types/index-cba.d.ts +0 -13
  411. package/bundles/types/index-cba.d.ts.map +0 -1
  412. package/bundles/types/index.d.ts +0 -14
  413. package/bundles/types/index.d.ts.map +0 -1
  414. package/bundles/types/payment-source/builder.d.ts.map +0 -1
  415. package/bundles/types/payment-source/index.d.ts.map +0 -1
  416. package/bundles/types/payment-source-widget/html-payment-source-widget.d.ts.map +0 -1
  417. package/bundles/types/payment-source-widget/index.d.ts.map +0 -1
  418. package/bundles/types/payment-source-widget/interfaces.d.ts.map +0 -1
  419. package/bundles/types/payment-source-widget/payment-source-widget.d.ts.map +0 -1
  420. package/bundles/types/secure-remote-commerce/index.d.ts.map +0 -1
  421. package/bundles/types/secure-remote-commerce/interfaces.d.ts.map +0 -1
  422. package/bundles/types/secure-remote-commerce/providers/src-provider.d.ts.map +0 -1
  423. package/bundles/types/secure-remote-commerce/providers/visa-src/helper.d.ts.map +0 -1
  424. package/bundles/types/secure-remote-commerce/providers/visa-src/index.d.ts.map +0 -1
  425. package/bundles/types/secure-remote-commerce/providers/visa-src/visa-src.d.ts.map +0 -1
  426. package/bundles/types/secure-remote-commerce/providers/visa-src/visa-src.styles.d.ts.map +0 -1
  427. package/bundles/types/secure-remote-commerce/secure-remote-commerce.d.ts.map +0 -1
  428. package/bundles/types/vault-display-widget/index.d.ts.map +0 -1
  429. package/bundles/types/vault-display-widget/vault-display-widget.d.ts.map +0 -1
  430. package/bundles/types/wallet-buttons/afterpay.wallet-service.d.ts.map +0 -1
  431. package/bundles/types/wallet-buttons/apple.wallet-service.d.ts.map +0 -1
  432. package/bundles/types/wallet-buttons/flypay-v2.wallet-service.d.ts.map +0 -1
  433. package/bundles/types/wallet-buttons/flypay.wallet-service.d.ts.map +0 -1
  434. package/bundles/types/wallet-buttons/google.wallet-service.d.ts.map +0 -1
  435. package/bundles/types/wallet-buttons/index-cba.d.ts +0 -2
  436. package/bundles/types/wallet-buttons/index-cba.d.ts.map +0 -1
  437. package/bundles/types/wallet-buttons/index.d.ts +0 -2
  438. package/bundles/types/wallet-buttons/index.d.ts.map +0 -1
  439. package/bundles/types/wallet-buttons/interfaces.d.ts.map +0 -1
  440. package/bundles/types/wallet-buttons/mastercard.wallet-service.d.ts.map +0 -1
  441. package/bundles/types/wallet-buttons/paypal.wallet-service.d.ts.map +0 -1
  442. package/bundles/types/wallet-buttons/stripe.wallet-service.d.ts.map +0 -1
  443. package/bundles/types/wallet-buttons/wallet-buttons.d.ts +0 -366
  444. package/bundles/types/wallet-buttons/wallet-buttons.d.ts.map +0 -1
  445. package/bundles/types/wallet-buttons/wallet-cba-buttons.d.ts.map +0 -1
  446. package/bundles/types/wallet-buttons/wallet-service.d.ts.map +0 -1
  447. package/bundles/types/widget/configuration.d.ts.map +0 -1
  448. package/bundles/types/widget/html-multi-widget.d.ts +0 -266
  449. package/bundles/types/widget/html-multi-widget.d.ts.map +0 -1
  450. package/bundles/types/widget/html-widget.d.ts.map +0 -1
  451. package/bundles/types/widget/index.d.ts.map +0 -1
  452. package/bundles/types/widget/meta.d.ts.map +0 -1
  453. package/bundles/types/widget/multi-widget.d.ts.map +0 -1
  454. package/bundles/types/widget/style.d.ts.map +0 -1
  455. package/bundles/widget.umd.js.d.ts +0 -3163
  456. package/bundles/widget.umd.js.map +0 -1
  457. package/bundles/widget.umd.js.min.d.ts +0 -3163
  458. package/bundles/widget.umd.min.js.map +0 -1
  459. package/docs/api-canvas3ds.md +0 -158
  460. package/docs/api-checkout-button.md +0 -912
  461. package/docs/api-examples.md +0 -65
  462. package/docs/api-ps-widget.md +0 -585
  463. package/docs/api-vault-display.md +0 -94
  464. package/docs/api-widget.md +0 -2444
  465. package/docs/api-wrapper.md +0 -78
  466. package/docs/canvas3ds-examples.md +0 -242
  467. package/docs/cba-header.md +0 -13
  468. package/docs/cba-license.md +0 -2
  469. package/docs/checkout-examples.md +0 -248
  470. package/docs/header.md +0 -15
  471. package/docs/html/layout.html +0 -78
  472. package/docs/html/marked.js +0 -23
  473. package/docs/html/style.css +0 -365
  474. package/docs/install/npm.content.md +0 -16
  475. package/docs/install/npm.example.md +0 -24
  476. package/docs/install/umd.content.md +0 -20
  477. package/docs/install/umd.example.md +0 -6
  478. package/docs/install.md +0 -43
  479. package/docs/install.readme.t.md +0 -17
  480. package/docs/install.slate.t.md +0 -17
  481. package/docs/license.md +0 -2
  482. package/docs/partials/header.hbs +0 -3
  483. package/docs/ps-examples.md +0 -129
  484. package/docs/secure-remote-commerce-examples.md +0 -258
  485. package/docs/secure-remote-commerce.md +0 -265
  486. package/docs/vault-display-example.md +0 -132
  487. package/docs/wallet-buttons-examples.md +0 -580
  488. package/docs/wallet-buttons.md +0 -424
  489. package/docs/wallet-cba-buttons-examples.md +0 -388
  490. package/docs/widget-examples.md +0 -134
@@ -0,0 +1,260 @@
1
+ import { AccessToken } from './../helper/access-token';
2
+ import { API_URL, Env } from '../configs/env/env';
3
+ import { SDK } from '../configs/sdk';
4
+ import { ObjectHelper } from '../helper/object';
5
+ import { FORM_FIELD, SUPPORTED_CHECKOUT_META_COLLECTION, } from "../components/param";
6
+ /**
7
+ * List of available payment source types
8
+ *
9
+ * @type {object}
10
+ * @param {string} CARD=card
11
+ * @param {string} BANK_ACCOUNT=bank_account
12
+ * @param {string} CHECKOUT=checkout
13
+ */
14
+ export const PAYMENT_TYPE = {
15
+ CARD: 'card',
16
+ GIFT_CARD: 'gift_card',
17
+ BANK_ACCOUNT: 'bank_account',
18
+ CHECKOUT: 'checkout',
19
+ };
20
+ /**
21
+ * Purposes
22
+ * @type {object}
23
+ * @param {string} PAYMENT_SOURCE=payment_source
24
+ * @param {string} CARD_PAYMENT_SOURCE_WITH_CVV=card_payment_source_with_cvv
25
+ * @param {string} CARD_PAYMENT_SOURCE_WITHOUT_CVV=card_payment_source_without_cvv
26
+ * */
27
+ export const PURPOSE = {
28
+ PAYMENT_SOURCE: 'payment_source',
29
+ CARD_PAYMENT_SOURCE_WITH_CVV: 'card_payment_source_with_cvv',
30
+ CARD_PAYMENT_SOURCE_WITHOUT_CVV: 'card_payment_source_without_cvv',
31
+ };
32
+ const CONFIGURATION_LINK = '/v1/remote-action/configs';
33
+ /**
34
+ * Class Configuration include methods for creating configuration token
35
+ * @constructor
36
+ *
37
+ * @example
38
+ * var config = new Configuration('gatewayId'); // short
39
+ *
40
+ * var config = new Configuration('gatewayId', 'bank_account', 'paymentSource'); // extend
41
+ *
42
+ * var config = new Configuration('not_configured'); // without gateway
43
+ *
44
+ * @param {string} [gatewayID=default] - gateway ID. By default or if put 'default', it will use the selected default gateway. If put 'not_configured', it won’t use gateway to create downstream token.
45
+ * @param {string} paymentType - Type of payment source which shows in widget form. Available parameters [PAYMENT_TYPE]{@link PAYMENT_TYPE}
46
+ * @param {string} purpose - Param which describes payment purpose. By default uses Available parameters [PURPOSE]{@link PURPOSE}
47
+ */
48
+ class Configuration {
49
+ /** @constructs */ // constructs added for correct parse classes jsdoc2md
50
+ constructor(gatewayID = 'default', paymentType = PAYMENT_TYPE.CARD, purpose = PURPOSE.PAYMENT_SOURCE) {
51
+ if (ObjectHelper.values(PAYMENT_TYPE).indexOf(paymentType) === -1)
52
+ throw new Error('unsupported payment type');
53
+ else if (paymentType === PAYMENT_TYPE.CHECKOUT)
54
+ throw new Error('Payment type "checkout" is deprecated. Use CheckoutButton for this type of payments https://www.npmjs.com/package/@paydock/client-sdk#checkout-button');
55
+ if (ObjectHelper.values(PURPOSE).indexOf(purpose) === -1)
56
+ throw new Error('unsupported purpose');
57
+ this.env = new Env(API_URL);
58
+ this.configs = {
59
+ purpose: purpose,
60
+ meta: {},
61
+ dynamic_fields_position: true,
62
+ predefined_fields: {
63
+ gateway_id: gatewayID,
64
+ type: paymentType,
65
+ card_scheme: null,
66
+ card_processing_network: null,
67
+ },
68
+ };
69
+ }
70
+ static createEachToken(accessToken, configs, cb, errorCb = (errors) => { }) {
71
+ let tokens = new Array(configs.length);
72
+ let errors = [];
73
+ let counter = 0;
74
+ for (let index in configs) {
75
+ if (configs.hasOwnProperty(index))
76
+ configs[index].createToken(accessToken, (token) => {
77
+ tokens[index] = token;
78
+ counter++;
79
+ if (configs.length === counter)
80
+ Configuration.finishCreatingEachToken(tokens, errors, cb, errorCb);
81
+ }, (err) => {
82
+ errors.push(`gateway: ${configs[index].getConfigs().predefined_fields.gateway_id} | ${err}`);
83
+ counter++;
84
+ if (configs.length === counter)
85
+ Configuration.finishCreatingEachToken(tokens, errors, cb, errorCb);
86
+ });
87
+ }
88
+ }
89
+ static finishCreatingEachToken(tokens, errors, cb, errorCb) {
90
+ if (errors.length >= 1)
91
+ errorCb(errors);
92
+ else
93
+ cb(tokens);
94
+ }
95
+ /**
96
+ * Destination, where customer will receive all successful responses.
97
+ * Response will contain “data” object with “payment_source” or other parameters, in depending on 'purpose'
98
+ *
99
+ * @example
100
+ * config.setWebHookDestination('http://google.com');
101
+ *
102
+ * @param {string} url - Your endpoint for post request.
103
+ */
104
+ setWebHookDestination(url) {
105
+ this.configs.webhook_destination = url;
106
+ }
107
+ /**
108
+ * URL to which the Customer will be redirected to after the success finish
109
+ *
110
+ * @example
111
+ * config.setSuccessRedirectUrl('google.com/search?q=success');
112
+ *
113
+ * @param {string} url
114
+ */
115
+ setSuccessRedirectUrl(url) {
116
+ this.configs.success_redirect_url = url;
117
+ }
118
+ /**
119
+ * URL to which the Customer will be redirected to if an error is triggered in the process of operation
120
+ *
121
+ * @example
122
+ * config.setErrorRedirectUrl('google.com/search?q=error');
123
+ *
124
+ * @param {string} url
125
+ */
126
+ setErrorRedirectUrl(url) {
127
+ this.configs.error_redirect_url = url;
128
+ }
129
+ /**
130
+ * Set list with widget form field, which will be shown in form. Also you can set the required validation for these fields
131
+ *
132
+ * @example
133
+ * config.setFormFields(['phone', 'email', 'first_name*']);
134
+ *
135
+ * @param {string[]} fields - name of fields which can be shown in a widget.
136
+ * If after a name of a field, you put “*”, this field will be required on client-side.
137
+ * (For validation, you can specify any fields, even those that are shown by default: card_number, expiration, etc... ) [FORM_FIELD]{@link FORM_FIELD}
138
+ */
139
+ setFormFields(fields) {
140
+ if (!Array.isArray(this.configs.defined_form_fields))
141
+ this.configs.defined_form_fields = [];
142
+ for (let index in fields) {
143
+ if (!fields.hasOwnProperty(index))
144
+ continue;
145
+ if (ObjectHelper.values(FORM_FIELD).indexOf(fields[index].replace('*', '')) !== -1)
146
+ this.configs.defined_form_fields.push(fields[index]);
147
+ else
148
+ console.warn(`Configuration::setFormFields: unsupported form field ${fields[index]}`);
149
+ }
150
+ }
151
+ /**
152
+ * Method for setting meta information for checkout page
153
+ *
154
+ * @example
155
+ * config.setMeta({
156
+ brand_name: 'paydock',
157
+ reference: '15',
158
+ email: 'wault@paydock.com'
159
+ });
160
+ *
161
+ * @param {IPayPalMeta | IZipmoneyMeta | IAfterpayMeta | IBamboraMeta} object -
162
+ * data which can be shown on checkout page [IPayPalMeta]{@link IPayPalMeta} [IZipmoneyMeta]{@link IZipmoneyMeta} [IAfterpayMeta]{@link IAfterpayMeta} [IBamboraMeta]{@link IBamboraMeta}
163
+ */
164
+ setMeta(meta) {
165
+ for (let key in meta) {
166
+ if (!meta.hasOwnProperty(key))
167
+ continue;
168
+ if (SUPPORTED_CHECKOUT_META_COLLECTION.indexOf(key) !== -1)
169
+ this.configs.meta[key] = meta[key];
170
+ else
171
+ console.warn(`Configuration::setMeta: unsupported meta key ${key}`);
172
+ }
173
+ }
174
+ /**
175
+ * Current method can change environment. By default environment = sandbox.
176
+ * Also we can change domain alias for this environment. By default domain_alias = paydock.com
177
+ *
178
+ * @example
179
+ * config.setEnv('production');
180
+ * @param {string} env - sandbox, production
181
+ * @param {string} [alias] - Own domain alias
182
+ */
183
+ setEnv(env, alias) {
184
+ this.env.setEnv(env, alias);
185
+ }
186
+ /**
187
+ * Title for tab which can be set instead of default
188
+ *
189
+ * @example
190
+ * config.setLabel('custom label');
191
+ *
192
+ * @param {string} label - Text label for tab
193
+ */
194
+ setLabel(label) {
195
+ this.configs.label = label;
196
+ }
197
+ getEnv() {
198
+ return this.env.getEnv();
199
+ }
200
+ /**
201
+ * createToken - method which exactly create payment one time token
202
+ *
203
+ * @example
204
+ * config.createToken('582035346f65cdd57ee81192d6e5w65w4e5',
205
+ * function (data) {
206
+ * console.log(data);
207
+ * }, function (error) {
208
+ * console.log(error);
209
+ * });
210
+ *
211
+ * @param {string} accessToken - Customer access token or public key which provided for each client
212
+ * @param {createToken~requestCallback} cb - The callback that handles the success response.
213
+ * @param {createToken~requestCallback} errorCb - The callback that handles the failed response.
214
+ */
215
+ createToken(accessToken, cb, errorCb = (err) => { }) {
216
+ this.send(accessToken, (data, status) => {
217
+ if (status >= 200 && status < 300)
218
+ return cb(data.resource.data.configuration_token);
219
+ if (typeof data.error === "undefined" || typeof data.error.message === "undefined")
220
+ errorCb('unknown error');
221
+ else
222
+ errorCb(data.error.message);
223
+ });
224
+ }
225
+ send(accessToken, cb) {
226
+ let request = new XMLHttpRequest();
227
+ request.open('POST', this.getUrl(), true);
228
+ request.setRequestHeader('Content-Type', 'application/json; charset=UTF-8');
229
+ request.setRequestHeader(AccessToken.getAccessHeaderNameByToken(accessToken), accessToken);
230
+ if (SDK.version) {
231
+ request.setRequestHeader(SDK.headerKeys.version, SDK.version);
232
+ request.setRequestHeader(SDK.headerKeys.type, SDK.type);
233
+ }
234
+ request.send(JSON.stringify(this.getConfigs()));
235
+ request.onload = () => {
236
+ let res = {};
237
+ try {
238
+ res = JSON.parse(request.responseText);
239
+ }
240
+ catch (e) { }
241
+ cb(res, request.status);
242
+ };
243
+ }
244
+ getConfigs() {
245
+ return this.configs;
246
+ }
247
+ getUrl() {
248
+ return this.env.getConf().url + CONFIGURATION_LINK;
249
+ }
250
+ setGiftCardSchemeData(giftCardScheme, processingNetwork) {
251
+ if (this.configs.predefined_fields.type !== PAYMENT_TYPE.GIFT_CARD)
252
+ throw new Error('unsupported payment type');
253
+ if (!giftCardScheme || !processingNetwork)
254
+ throw new Error('');
255
+ this.configs.predefined_fields.card_scheme = giftCardScheme;
256
+ this.configs.predefined_fields.card_processing_network = processingNetwork;
257
+ }
258
+ }
259
+ export { Configuration };
260
+ //# sourceMappingURL=../../src/lib/widget/configuration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"configuration.js","sourceRoot":"","sources":["../../widget/configuration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,GAAG,EAAO,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EACH,UAAU,EAA6C,kCAAkC,GAE5F,MAAM,qBAAqB,CAAC;AAG7B;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG;IACxB,IAAI,EAAE,MAAM;IACZ,SAAS,EAAE,WAAW;IACtB,YAAY,EAAE,cAAc;IAC5B,QAAQ,EAAE,UAAU;CACvB,CAAA;AAED;;;;;;KAMK;AACL,MAAM,CAAC,MAAM,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0 +1,336 @@
1
+ import { MultiWidget } from "./multi-widget";
2
+ import { Container } from "../components/container";
3
+ import { IFrame } from "../components/iframe";
4
+ import { IFrameEvent, IEventData } from "../components/iframe-event";
5
+ import { Trigger, ITriggerData } from "../components/trigger";
6
+ import { IFormValidation, IFormValues, ValidatorFieldsMapKey } from '../components/param';
7
+ export interface IEventMetaData extends IEventData {
8
+ configuration_token: string;
9
+ type: string;
10
+ account_name?: string;
11
+ account_number?: string;
12
+ card_number_last4?: string;
13
+ card_number_length?: number;
14
+ card_scheme?: string;
15
+ gateway_type?: string;
16
+ }
17
+ export interface IEventAfterLoadData extends IEventData {
18
+ }
19
+ export interface IEventFinishData extends IEventData {
20
+ payment_source: string;
21
+ }
22
+ /**
23
+ * Interface of data from validation event.
24
+ *
25
+ * @interface IFormValidation
26
+ *
27
+ * @param {string} event The name of the event.
28
+ * @param {string} message_source A system variable that identifies the event source.
29
+ * @param {string} purpose A system variable that states the purpose of the event.
30
+ * @param {string} [ref_id] Custom unique value that identifies result of processed operation.
31
+ * @param {boolean} [form_valid] Indicates wether or not the form is valid.
32
+ * @param {Array<string>} [invalid_fields] Names of form fields with invalid data.
33
+ * @param {Array<string>} [invalid_showed_fields] Names of invalid form fields which are already displaying the error.
34
+ * @param {Partial<Record<CardValidatorValue | GenericValidatorValue, Array<string>>>} [validators] Object containing validator identifiers as keys and the fields subject to that validator as an array of form field names.
35
+ * See list of available [Generic Vallidators]{@link GENERIC_VALIDATORS} and [Card Validators]{@link CARD_VALIDATORS},
36
+ */
37
+ /**
38
+ * Contains basic information associated with the event and additional meta data
39
+ * specific to the event. E.g., card info, gateway info, etc.
40
+ *
41
+ * @interface IEventMetaData
42
+ *
43
+ * @param {string} event The name of the event.
44
+ * @param {string} purpose A system variable that states the purpose of the event.
45
+ * @param {string} message_source A system variable that identifies the event source.
46
+ * @param {string} [ref_id] Custom unique value that identifies result of processed operation.
47
+ * @param {string} configuration_token Token received from our API with widget data
48
+ * @param {string} type Payment type 'card', 'bank_account'
49
+ * @param {string} gateway_type Gateway type
50
+ * @param {string} [card_number_last4] Last 4 digit of your card
51
+ * @param {string} [card_scheme] Card scheme, e.g., (Visa, Mastercard and American Express (AmEx))
52
+ * @param {number} [card_number_length] Card number length
53
+ * @param {string} [account_name] Bank account account name
54
+ * @param {string} [account_number] Bank account account number
55
+ * */
56
+ /**
57
+ * Interface of data from event.
58
+ * @interface IEventAfterLoadData
59
+ *
60
+ * @param {string} event The name of the event.
61
+ * @param {string} purpose A system variable that states the purpose of the event.
62
+ * @param {string} message_source A system variable that identifies the event source.
63
+ * @param {string} [ref_id] Custom unique value that identifies result of processed operation.
64
+ * */
65
+ /**
66
+ * Interface of data from event.
67
+ * @interface IEventFinishData
68
+ *
69
+ * @param {string} event The name of the event.
70
+ * @param {string} purpose A system variable that states the purpose of the event.
71
+ * @param {string} message_source A system variable that identifies the event source.
72
+ * @param {string} [ref_id] Custom unique value that identifies result of processed operation.
73
+ * @param {string} payment_source One time token. Result from this endpoint [API docs](https://docs.paydock.com/#tokens)
74
+ * */
75
+ /**
76
+ * List of available event's name
77
+ * @const EVENT
78
+ *
79
+ * @type {object}
80
+ * @param {string} AFTER_LOAD=afterLoad
81
+ * @param {string} SUBMIT=submit
82
+ * @param {string} FINISH=finish
83
+ * @param {string} VALIDATION=validation
84
+ * @param {string} VALIDATION_ERROR=validationError
85
+ * @param {string} SYSTEM_ERROR=systemError
86
+ * @param {string} META_CHANGE=metaChange
87
+ * @param {string} RESIZE=resize
88
+ */
89
+ /**
90
+ * List of available event's name
91
+ * @const VAULT_DISPLAY_EVENT
92
+ *
93
+ * @type {object}
94
+ * @param {string} AFTER_LOAD=afterLoad
95
+ * @param {string} SYSTEM_ERROR=system_error
96
+ * @param {string} CVV_SECURE_CODE_REQUESTED=cvv_secure_code_requested
97
+ * @param {string} CARD_NUMBER_SECURE_CODE_REQUESTED=card_number_secure_code_requested
98
+ * @param {string} ACCESS_FORBIDDEN=access_forbidden
99
+ * @param {string} SESSION_EXPIRED=systemError
100
+ * @param {string} SYSTEM_ERROR=session_expired
101
+ * @param {string} OPERATION_FORBIDDEN=operation_forbidden
102
+ */
103
+ /**
104
+ * Class HtmlMultiWidget include method for working with html
105
+ * @constructor
106
+ * @extends MultiWidget
107
+ *
108
+ * @param {string} selector - Selector of html element. Container for widget
109
+ * @param {string} publicKey - PayDock users public key
110
+ * @param {(Configuration | string | Configuration[] | string[])} conf - exemplar[s] Configuration class OR configuration token
111
+ * @example
112
+ * var widget = new MultiWidget('#widget', 'publicKey','configurationToken'); // With a pre-created configuration token
113
+ *
114
+ * var widget = new MultiWidget('#widget', 'publicKey',['configurationToken', 'configurationToken2']); // With pre-created configuration tokens
115
+ *
116
+ * var widget = new MultiWidget('#widget', 'publicKey', new Configuration('gatewayId')); With Configuration
117
+ *
118
+ * var widget = new MultiWidget('#widget', 'publicKey',[ With Configurations
119
+ * Configuration(), // default gateway_id,
120
+ * Configuration('not_configured'), // without gateway,
121
+ * Configuration('gatewayId'),
122
+ * Configuration('gatewayId', 'bank_account')
123
+ * ]);
124
+ */
125
+ declare class HtmlMultiWidget extends MultiWidget {
126
+ protected container: Container;
127
+ protected iFrame: IFrame;
128
+ protected triggerElement: Trigger;
129
+ protected event: IFrameEvent;
130
+ protected validationData: IFormValidation;
131
+ /** @constructs */ constructor(selector: string, publicKey: string, conf: any);
132
+ /**
133
+ * Loads the widget.
134
+ *
135
+ * Calling this method results in an iframe element being inserted and rendered in the DOM.
136
+ */
137
+ load(): void;
138
+ /**
139
+ * Registers a form validation callback for validation events.
140
+ */
141
+ protected afterLoad(): void;
142
+ /**
143
+ * Listen to events of widget
144
+ *
145
+ * @example
146
+ *
147
+ * ```javascript
148
+ * widget.on('form_submit', function (data) {
149
+ * console.log(data);
150
+ * });
151
+ * ```
152
+ *
153
+ * @example
154
+ *
155
+ * ```javascript
156
+ * widget.on('form_submit').then(function (data) {
157
+ * console.log(data);
158
+ * });
159
+ * ```
160
+ *
161
+ * @typedef {(data: IEventData | IEventMetaData | IEventFinishData | IFormValidation) => void} EventListenerCallback
162
+ *
163
+ * @param {string} eventName - The name of the event that should be listened. Available event names [EVENT]{@link EVENT}.
164
+ * @param {EventListenerCallback} [cb] - A function to be invoked whenever the event occurs.
165
+ *
166
+ * @return {Promise<IEventData | IEventMetaData | IEventFinishData | IFormValidation> | void}
167
+ */
168
+ on(eventName: string): Promise<IEventData | IEventMetaData | IEventFinishData | IFormValidation>;
169
+ on(eventName: string, cb: (data: IEventData | IEventMetaData | IEventFinishData | IFormValidation) => void): any;
170
+ /**
171
+ * Registers callback that will be invoked for every trigger.
172
+ *
173
+ * @param {'submit_form' | 'tab'} triggers - The Widget element identifier that caused the trigger.
174
+ * @param {ITriggerData} data - Data that will be sent to the widget when the trigger occurs.
175
+ */
176
+ trigger(triggerName: string, data?: ITriggerData): void;
177
+ /**
178
+ * Gets a reference to the form current validation state.
179
+ *
180
+ * !Warning: do not directly modify the values of the returned object.
181
+ *
182
+ * @return {IFormValidation} Form validation object
183
+ */
184
+ getValidationState(): IFormValidation;
185
+ /**
186
+ * Checks if a given form is valid.
187
+ *
188
+ * A form is valid if all form fields are valid.
189
+ *
190
+ * @return {boolean} Indicates wether or not form is valid.
191
+ */
192
+ isValidForm(): boolean;
193
+ /**
194
+ * Using this method you can check if a specific form field is invalid
195
+ *
196
+ * @param {string} field - Field name
197
+ * @return {boolean} Field is invalid
198
+ */
199
+ isInvalidField(field?: string): boolean;
200
+ /**
201
+ * Checks if a given form field is displaying an error.
202
+ *
203
+ * @param {string} field - The form field name
204
+ *
205
+ * @return {boolean} Indicates wether or not the Error message is being displayed on the associated field.
206
+ */
207
+ isFieldErrorShowed(field?: string): boolean;
208
+ /**
209
+ * Checks if a given form field is valid or invalid by name.
210
+ *
211
+ * @param {string} field - The form field name
212
+ * @param validator - The name of the validator.
213
+ *
214
+ * @return {boolean} Indicates wether or not the field is invalid based on validator intepretation.
215
+ */
216
+ isInvalidFieldByValidator(field: string, validator: ValidatorFieldsMapKey): boolean;
217
+ /**
218
+ * Hides the widget.
219
+ *
220
+ * E.g., use this method to hide the widget after it loads.
221
+ *
222
+ * @param {boolean} [saveSize=false] Wether the original iframe element size should be saved before being hidden.
223
+ */
224
+ hide(saveSize: boolean): void;
225
+ /**
226
+ * Shows the widget.
227
+ *
228
+ * E.g., use this method to show the widget after it was explicitly hidden.
229
+ */
230
+ show(): void;
231
+ /**
232
+ * Reloads the widget.
233
+ */
234
+ reload(): void;
235
+ /**
236
+ * Hides the specified Widget elements by their identifier.
237
+ *
238
+ * @example
239
+ *
240
+ * ```javascript
241
+ * widget.hideElements(['submit_button', 'email']);
242
+ * ```
243
+ *
244
+ * @param {string[]} elements - List of element which can be hidden [ELEMENT]{@link ELEMENT} || [FORM_FIELD]{@link FORM_FIELD}
245
+ */
246
+ hideElements(elements: string[]): void;
247
+ /**
248
+ * Shows the specified Widget elements by their identifier.
249
+ *
250
+ * @example
251
+ *
252
+ * ```javascript
253
+ * widget.showElements(['submit_button', 'email']);
254
+ * ```
255
+ *
256
+ * @param {string[]} elements - List of elements which can be showed [ELEMENT]{@link ELEMENT} || [FORM_FIELD]{@link FORM_FIELD}
257
+ */
258
+ showElements(elements: string[]): void;
259
+ /**
260
+ * Updates the form field values inside the widget.
261
+ *
262
+ * @example
263
+ *
264
+ * ```javascript
265
+ * widget.updateFormValues({
266
+ * email: 'predefined@email.com',
267
+ * card_name: 'Houston'
268
+ * });
269
+ *```
270
+ *
271
+ * @param {IFormValues} fieldValues - Fields with values
272
+ */
273
+ updateFormValues(fieldValues: IFormValues): void;
274
+ /**
275
+ * Updates a single form field values inside the widget by the form field name.
276
+ *
277
+ * @example
278
+ *
279
+ * ```javascript
280
+ * widget.updateFormValue("card_name", "John Doe");
281
+ *```
282
+ *
283
+ * @param {string} key - The form field name
284
+ * @param {string} value - The form field value
285
+ */
286
+ updateFormValue(key: string, value: string): void;
287
+ /**
288
+ * Inserts the event data (after finish event) onto the input field associated with the provided CSS selector.
289
+ *
290
+ * @param {string} selector - A CSS selector. E.g., ".my-class", "#my-id", or others
291
+ * @param {string} dataType - The data type of IEventData object.
292
+ */
293
+ onFinishInsert(selector: string, dataType: string): void;
294
+ /**
295
+ * Intercepts a form submission and delegates processing to the widget.
296
+ *
297
+ * An simplified example of the process:
298
+ * - User clicks submit button in your form
299
+ * - This implicitly triggers a submission to the widget
300
+ * - The widget submits your form
301
+ *
302
+ * @note The widget's submit button will be hidden.
303
+ *
304
+ * @param {string} selector - css selector of your form
305
+ *
306
+ * @example
307
+ *
308
+ * ```html
309
+ * <body>
310
+ * <form id="myForm">
311
+ * <input name="amount">
312
+ * <button type="submit">Submit</button>
313
+ * </form>
314
+ * <script>
315
+ * widget.interceptSubmitForm('#myForm');
316
+ * </script>
317
+ * </body>
318
+ * ```
319
+ */
320
+ interceptSubmitForm(selector: string): void;
321
+ /**
322
+ * This method hides a submit button and automatically execute form submit
323
+ */
324
+ useCheckoutAutoSubmit(): void;
325
+ /**
326
+ * Use this method for resize iFrame according content height
327
+ *
328
+ * @example
329
+ *
330
+ * ```javascript
331
+ * widget.useAutoResize();
332
+ *```
333
+ */
334
+ useAutoResize(): void;
335
+ }
336
+ export { HtmlMultiWidget };