@deuna/react-native-sdk 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (190) hide show
  1. package/LICENSE +20 -0
  2. package/README.md +15 -0
  3. package/lib/module/DeunaLogs.js +18 -0
  4. package/lib/module/DeunaLogs.js.map +1 -0
  5. package/lib/module/DeunaSDK.js +207 -0
  6. package/lib/module/DeunaSDK.js.map +1 -0
  7. package/lib/module/components/DeunaWebView.js +37 -0
  8. package/lib/module/components/DeunaWebView.js.map +1 -0
  9. package/lib/module/components/DeunaWidget.js +82 -0
  10. package/lib/module/components/DeunaWidget.js.map +1 -0
  11. package/lib/module/components/NewTabWebView.js +55 -0
  12. package/lib/module/components/NewTabWebView.js.map +1 -0
  13. package/lib/module/components/WebViewLoader.js +25 -0
  14. package/lib/module/components/WebViewLoader.js.map +1 -0
  15. package/lib/module/controllers/BaseWebViewController.js +252 -0
  16. package/lib/module/controllers/BaseWebViewController.js.map +1 -0
  17. package/lib/module/controllers/ElementsWidgetController.js +64 -0
  18. package/lib/module/controllers/ElementsWidgetController.js.map +1 -0
  19. package/lib/module/controllers/OpenInNewTabController.js +34 -0
  20. package/lib/module/controllers/OpenInNewTabController.js.map +1 -0
  21. package/lib/module/controllers/PaymentWidgetController.js +98 -0
  22. package/lib/module/controllers/PaymentWidgetController.js.map +1 -0
  23. package/lib/module/helpers/Completer.js +30 -0
  24. package/lib/module/helpers/Completer.js.map +1 -0
  25. package/lib/module/helpers/getController.js +48 -0
  26. package/lib/module/helpers/getController.js.map +1 -0
  27. package/lib/module/index.js +7 -0
  28. package/lib/module/index.js.map +1 -0
  29. package/lib/module/interfaces/constants.js +8 -0
  30. package/lib/module/interfaces/constants.js.map +1 -0
  31. package/lib/module/interfaces/errors.js +36 -0
  32. package/lib/module/interfaces/errors.js.map +1 -0
  33. package/lib/module/interfaces/events/checkout.js +45 -0
  34. package/lib/module/interfaces/events/checkout.js.map +1 -0
  35. package/lib/module/interfaces/events/elements.js +28 -0
  36. package/lib/module/interfaces/events/elements.js.map +1 -0
  37. package/lib/module/interfaces/index.js +6 -0
  38. package/lib/module/interfaces/index.js.map +1 -0
  39. package/lib/module/interfaces/types.js +13 -0
  40. package/lib/module/interfaces/types.js.map +1 -0
  41. package/lib/module/package.json +1 -0
  42. package/lib/module/types/base.js +24 -0
  43. package/lib/module/types/base.js.map +1 -0
  44. package/lib/module/types/env.js +48 -0
  45. package/lib/module/types/env.js.map +1 -0
  46. package/lib/module/types/helpers/buildElementsLink.js +75 -0
  47. package/lib/module/types/helpers/buildElementsLink.js.map +1 -0
  48. package/lib/module/types/helpers/buildNextActionLink.js +33 -0
  49. package/lib/module/types/helpers/buildNextActionLink.js.map +1 -0
  50. package/lib/module/types/helpers/buildPaymentLink.js +54 -0
  51. package/lib/module/types/helpers/buildPaymentLink.js.map +1 -0
  52. package/lib/module/types/helpers/buildVoucherLink.js +48 -0
  53. package/lib/module/types/helpers/buildVoucherLink.js.map +1 -0
  54. package/lib/module/types/helpers/index.js +13 -0
  55. package/lib/module/types/helpers/index.js.map +1 -0
  56. package/lib/module/types/helpers/urlConfig.js +19 -0
  57. package/lib/module/types/helpers/urlConfig.js.map +1 -0
  58. package/lib/module/types/index.js +7 -0
  59. package/lib/module/types/index.js.map +1 -0
  60. package/lib/module/types/interfaces/callbacks.js +2 -0
  61. package/lib/module/types/interfaces/callbacks.js.map +1 -0
  62. package/lib/module/types/interfaces/customStyle.js +2 -0
  63. package/lib/module/types/interfaces/customStyle.js.map +1 -0
  64. package/lib/module/types/interfaces/index.js +9 -0
  65. package/lib/module/types/interfaces/index.js.map +1 -0
  66. package/lib/module/types/interfaces/initWidgetBase.js +4 -0
  67. package/lib/module/types/interfaces/initWidgetBase.js.map +1 -0
  68. package/lib/module/types/interfaces/merchant.js +2 -0
  69. package/lib/module/types/interfaces/merchant.js.map +1 -0
  70. package/lib/module/types/interfaces/order.js +2 -0
  71. package/lib/module/types/interfaces/order.js.map +1 -0
  72. package/lib/module/types/interfaces/user.js +2 -0
  73. package/lib/module/types/interfaces/user.js.map +1 -0
  74. package/lib/module/types/utils/hasKey.js +8 -0
  75. package/lib/module/types/utils/hasKey.js.map +1 -0
  76. package/lib/module/types/utils/index.js +4 -0
  77. package/lib/module/types/utils/index.js.map +1 -0
  78. package/lib/typescript/deuna-sdk-react-native/src/DeunaLogs.d.ts +6 -0
  79. package/lib/typescript/deuna-sdk-react-native/src/DeunaLogs.d.ts.map +1 -0
  80. package/lib/typescript/deuna-sdk-react-native/src/DeunaSDK.d.ts +88 -0
  81. package/lib/typescript/deuna-sdk-react-native/src/DeunaSDK.d.ts.map +1 -0
  82. package/lib/typescript/deuna-sdk-react-native/src/components/DeunaWebView.d.ts +11 -0
  83. package/lib/typescript/deuna-sdk-react-native/src/components/DeunaWebView.d.ts.map +1 -0
  84. package/lib/typescript/deuna-sdk-react-native/src/components/DeunaWidget.d.ts +7 -0
  85. package/lib/typescript/deuna-sdk-react-native/src/components/DeunaWidget.d.ts.map +1 -0
  86. package/lib/typescript/deuna-sdk-react-native/src/components/NewTabWebView.d.ts +7 -0
  87. package/lib/typescript/deuna-sdk-react-native/src/components/NewTabWebView.d.ts.map +1 -0
  88. package/lib/typescript/deuna-sdk-react-native/src/components/WebViewLoader.d.ts +2 -0
  89. package/lib/typescript/deuna-sdk-react-native/src/components/WebViewLoader.d.ts.map +1 -0
  90. package/lib/typescript/deuna-sdk-react-native/src/controllers/BaseWebViewController.d.ts +83 -0
  91. package/lib/typescript/deuna-sdk-react-native/src/controllers/BaseWebViewController.d.ts.map +1 -0
  92. package/lib/typescript/deuna-sdk-react-native/src/controllers/ElementsWidgetController.d.ts +9 -0
  93. package/lib/typescript/deuna-sdk-react-native/src/controllers/ElementsWidgetController.d.ts.map +1 -0
  94. package/lib/typescript/deuna-sdk-react-native/src/controllers/OpenInNewTabController.d.ts +12 -0
  95. package/lib/typescript/deuna-sdk-react-native/src/controllers/OpenInNewTabController.d.ts.map +1 -0
  96. package/lib/typescript/deuna-sdk-react-native/src/controllers/PaymentWidgetController.d.ts +12 -0
  97. package/lib/typescript/deuna-sdk-react-native/src/controllers/PaymentWidgetController.d.ts.map +1 -0
  98. package/lib/typescript/deuna-sdk-react-native/src/helpers/Completer.d.ts +12 -0
  99. package/lib/typescript/deuna-sdk-react-native/src/helpers/Completer.d.ts.map +1 -0
  100. package/lib/typescript/deuna-sdk-react-native/src/helpers/getController.d.ts +22 -0
  101. package/lib/typescript/deuna-sdk-react-native/src/helpers/getController.d.ts.map +1 -0
  102. package/lib/typescript/deuna-sdk-react-native/src/index.d.ts +5 -0
  103. package/lib/typescript/deuna-sdk-react-native/src/index.d.ts.map +1 -0
  104. package/lib/typescript/deuna-sdk-react-native/src/interfaces/constants.d.ts +6 -0
  105. package/lib/typescript/deuna-sdk-react-native/src/interfaces/constants.d.ts.map +1 -0
  106. package/lib/typescript/deuna-sdk-react-native/src/interfaces/errors.d.ts +32 -0
  107. package/lib/typescript/deuna-sdk-react-native/src/interfaces/errors.d.ts.map +1 -0
  108. package/lib/typescript/deuna-sdk-react-native/src/interfaces/events/checkout.d.ts +46 -0
  109. package/lib/typescript/deuna-sdk-react-native/src/interfaces/events/checkout.d.ts.map +1 -0
  110. package/lib/typescript/deuna-sdk-react-native/src/interfaces/events/elements.d.ts +29 -0
  111. package/lib/typescript/deuna-sdk-react-native/src/interfaces/events/elements.d.ts.map +1 -0
  112. package/lib/typescript/deuna-sdk-react-native/src/interfaces/index.d.ts +4 -0
  113. package/lib/typescript/deuna-sdk-react-native/src/interfaces/index.d.ts.map +1 -0
  114. package/lib/typescript/deuna-sdk-react-native/src/interfaces/types.d.ts +15 -0
  115. package/lib/typescript/deuna-sdk-react-native/src/interfaces/types.d.ts.map +1 -0
  116. package/lib/typescript/deuna-sdk-react-native/src/types/base.d.ts +91 -0
  117. package/lib/typescript/deuna-sdk-react-native/src/types/base.d.ts.map +1 -0
  118. package/lib/typescript/deuna-sdk-react-native/src/types/env.d.ts +45 -0
  119. package/lib/typescript/deuna-sdk-react-native/src/types/env.d.ts.map +1 -0
  120. package/lib/typescript/deuna-sdk-react-native/src/types/helpers/buildElementsLink.d.ts +3 -0
  121. package/lib/typescript/deuna-sdk-react-native/src/types/helpers/buildElementsLink.d.ts.map +1 -0
  122. package/lib/typescript/deuna-sdk-react-native/src/types/helpers/buildNextActionLink.d.ts +3 -0
  123. package/lib/typescript/deuna-sdk-react-native/src/types/helpers/buildNextActionLink.d.ts.map +1 -0
  124. package/lib/typescript/deuna-sdk-react-native/src/types/helpers/buildPaymentLink.d.ts +8 -0
  125. package/lib/typescript/deuna-sdk-react-native/src/types/helpers/buildPaymentLink.d.ts.map +1 -0
  126. package/lib/typescript/deuna-sdk-react-native/src/types/helpers/buildVoucherLink.d.ts +8 -0
  127. package/lib/typescript/deuna-sdk-react-native/src/types/helpers/buildVoucherLink.d.ts.map +1 -0
  128. package/lib/typescript/deuna-sdk-react-native/src/types/helpers/index.d.ts +7 -0
  129. package/lib/typescript/deuna-sdk-react-native/src/types/helpers/index.d.ts.map +1 -0
  130. package/lib/typescript/deuna-sdk-react-native/src/types/helpers/urlConfig.d.ts +34 -0
  131. package/lib/typescript/deuna-sdk-react-native/src/types/helpers/urlConfig.d.ts.map +1 -0
  132. package/lib/typescript/deuna-sdk-react-native/src/types/index.d.ts +5 -0
  133. package/lib/typescript/deuna-sdk-react-native/src/types/index.d.ts.map +1 -0
  134. package/lib/typescript/deuna-sdk-react-native/src/types/interfaces/callbacks.d.ts +38 -0
  135. package/lib/typescript/deuna-sdk-react-native/src/types/interfaces/callbacks.d.ts.map +1 -0
  136. package/lib/typescript/deuna-sdk-react-native/src/types/interfaces/customStyle.d.ts +156 -0
  137. package/lib/typescript/deuna-sdk-react-native/src/types/interfaces/customStyle.d.ts.map +1 -0
  138. package/lib/typescript/deuna-sdk-react-native/src/types/interfaces/index.d.ts +7 -0
  139. package/lib/typescript/deuna-sdk-react-native/src/types/interfaces/index.d.ts.map +1 -0
  140. package/lib/typescript/deuna-sdk-react-native/src/types/interfaces/initWidgetBase.d.ts +78 -0
  141. package/lib/typescript/deuna-sdk-react-native/src/types/interfaces/initWidgetBase.d.ts.map +1 -0
  142. package/lib/typescript/deuna-sdk-react-native/src/types/interfaces/merchant.d.ts +76 -0
  143. package/lib/typescript/deuna-sdk-react-native/src/types/interfaces/merchant.d.ts.map +1 -0
  144. package/lib/typescript/deuna-sdk-react-native/src/types/interfaces/order.d.ts +3 -0
  145. package/lib/typescript/deuna-sdk-react-native/src/types/interfaces/order.d.ts.map +1 -0
  146. package/lib/typescript/deuna-sdk-react-native/src/types/interfaces/user.d.ts +23 -0
  147. package/lib/typescript/deuna-sdk-react-native/src/types/interfaces/user.d.ts.map +1 -0
  148. package/lib/typescript/deuna-sdk-react-native/src/types/utils/hasKey.d.ts +2 -0
  149. package/lib/typescript/deuna-sdk-react-native/src/types/utils/hasKey.d.ts.map +1 -0
  150. package/lib/typescript/deuna-sdk-react-native/src/types/utils/index.d.ts +2 -0
  151. package/lib/typescript/deuna-sdk-react-native/src/types/utils/index.d.ts.map +1 -0
  152. package/lib/typescript/package.json +1 -0
  153. package/package.json +159 -0
  154. package/src/DeunaLogs.ts +17 -0
  155. package/src/DeunaSDK.ts +269 -0
  156. package/src/components/DeunaWebView.tsx +38 -0
  157. package/src/components/DeunaWidget.tsx +92 -0
  158. package/src/components/NewTabWebView.tsx +61 -0
  159. package/src/components/WebViewLoader.tsx +22 -0
  160. package/src/controllers/BaseWebViewController.ts +289 -0
  161. package/src/controllers/ElementsWidgetController.ts +78 -0
  162. package/src/controllers/OpenInNewTabController.ts +39 -0
  163. package/src/controllers/PaymentWidgetController.ts +118 -0
  164. package/src/helpers/Completer.ts +33 -0
  165. package/src/helpers/getController.ts +83 -0
  166. package/src/index.tsx +4 -0
  167. package/src/interfaces/constants.ts +5 -0
  168. package/src/interfaces/errors.ts +34 -0
  169. package/src/interfaces/events/checkout.ts +46 -0
  170. package/src/interfaces/events/elements.ts +29 -0
  171. package/src/interfaces/index.ts +3 -0
  172. package/src/interfaces/types.ts +13 -0
  173. package/src/types/base.ts +126 -0
  174. package/src/types/env.ts +51 -0
  175. package/src/types/helpers/buildElementsLink.ts +87 -0
  176. package/src/types/helpers/buildNextActionLink.ts +42 -0
  177. package/src/types/helpers/buildPaymentLink.ts +63 -0
  178. package/src/types/helpers/buildVoucherLink.ts +53 -0
  179. package/src/types/helpers/index.ts +11 -0
  180. package/src/types/helpers/urlConfig.ts +80 -0
  181. package/src/types/index.ts +4 -0
  182. package/src/types/interfaces/callbacks.ts +43 -0
  183. package/src/types/interfaces/customStyle.ts +189 -0
  184. package/src/types/interfaces/index.ts +6 -0
  185. package/src/types/interfaces/initWidgetBase.ts +97 -0
  186. package/src/types/interfaces/merchant.ts +79 -0
  187. package/src/types/interfaces/order.ts +1 -0
  188. package/src/types/interfaces/user.ts +22 -0
  189. package/src/types/utils/hasKey.ts +5 -0
  190. package/src/types/utils/index.ts +1 -0
@@ -0,0 +1,45 @@
1
+ export declare enum Env {
2
+ Production = "production",
3
+ Staging = "staging",
4
+ Develop = "develop",
5
+ Sandbox = "sandbox",
6
+ local = "local"
7
+ }
8
+ export declare const env: {
9
+ production: string;
10
+ staging: string;
11
+ develop: string;
12
+ sandbox: string;
13
+ };
14
+ export declare const checkout: {
15
+ production: string;
16
+ staging: string;
17
+ develop: string;
18
+ sandbox: string;
19
+ };
20
+ export declare const fingerprintjsEnv: {
21
+ production: string;
22
+ staging: string;
23
+ develop: string;
24
+ sandbox: string;
25
+ };
26
+ export declare const storageSite: {
27
+ production: string;
28
+ staging: string;
29
+ develop: string;
30
+ sandbox: string;
31
+ local: string;
32
+ };
33
+ export declare const siftCred: {
34
+ production: string;
35
+ staging: string;
36
+ develop: string;
37
+ sandbox: string;
38
+ };
39
+ export declare const proxyUrls: {
40
+ URL: string;
41
+ FPJS_BEHAVIOR_PATH: string;
42
+ FPJS_AGENT_DOWNLOAD_PATH: string;
43
+ FPJS_GET_RESULT_PATH: string;
44
+ };
45
+ //# sourceMappingURL=env.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../../../../src/types/env.ts"],"names":[],"mappings":"AAAA,oBAAY,GAAG;IACX,UAAU,eAAe;IACzB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,KAAK,UAAU;CAChB;AAED,eAAO,MAAM,GAAG;;;;;CAKf,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;;CAKpB,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;;;CAK5B,CAAC;AAEF,eAAO,MAAM,WAAW;;;;;;CAMvB,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;;CAKpB,CAAC;AAEF,eAAO,MAAM,SAAS;;;;;CAKrB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { UrlConfig } from "./urlConfig";
2
+ export declare const buildElementsLink: (config: UrlConfig) => string;
3
+ //# sourceMappingURL=buildElementsLink.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"buildElementsLink.d.ts","sourceRoot":"","sources":["../../../../../../src/types/helpers/buildElementsLink.ts"],"names":[],"mappings":"AAEA,OAAO,EAAsB,SAAS,EAAE,MAAM,aAAa,CAAC;AAc5D,eAAO,MAAM,iBAAiB,GAAI,QAAQ,SAAS,KAAG,MAsErD,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { UrlConfig } from "./urlConfig";
2
+ export declare const buildNextActionLink: (config: UrlConfig) => string;
3
+ //# sourceMappingURL=buildNextActionLink.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"buildNextActionLink.d.ts","sourceRoot":"","sources":["../../../../../../src/types/helpers/buildNextActionLink.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,SAAS,EACV,MAAM,aAAa,CAAC;AASrB,eAAO,MAAM,mBAAmB,GAAI,QAAQ,SAAS,KAAG,MA2BvD,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Helper function to get base URL based on environment
3
+ * @param config
4
+ * @returns
5
+ */
6
+ import { UrlConfig } from "./urlConfig";
7
+ export declare const buildPaymentLink: (config: UrlConfig) => string;
8
+ //# sourceMappingURL=buildPaymentLink.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"buildPaymentLink.d.ts","sourceRoot":"","sources":["../../../../../../src/types/helpers/buildPaymentLink.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAGL,SAAS,EACV,MAAM,aAAa,CAAC;AASrB,eAAO,MAAM,gBAAgB,GAAI,QAAQ,SAAS,KAAG,MA0CpD,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Helper function to get base URL based on environment
3
+ * @param config
4
+ * @returns
5
+ */
6
+ import { UrlConfig } from "./urlConfig";
7
+ export declare const buildVoucherLink: (config: UrlConfig) => string;
8
+ //# sourceMappingURL=buildVoucherLink.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"buildVoucherLink.d.ts","sourceRoot":"","sources":["../../../../../../src/types/helpers/buildVoucherLink.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAsB,SAAS,EAAE,MAAM,aAAa,CAAC;AAS5D,eAAO,MAAM,gBAAgB,GAAI,QAAQ,SAAS,KAAG,MAoCpD,CAAC"}
@@ -0,0 +1,7 @@
1
+ export declare const linkBuilders: {
2
+ elements: (config: import("./urlConfig").UrlConfig) => string;
3
+ payment: (config: import("./urlConfig").UrlConfig) => string;
4
+ nextAction: (config: import("./urlConfig").UrlConfig) => string;
5
+ voucher: (config: import("./urlConfig").UrlConfig) => string;
6
+ };
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/types/helpers/index.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,YAAY;;;;;CAKxB,CAAC"}
@@ -0,0 +1,34 @@
1
+ import { Environment } from "../base";
2
+ import { BehaviorWidget, InitWidgetBase } from "../interfaces/initWidgetBase";
3
+ export declare const configToQueryParams: (config: UrlConfig, searchParams: URLSearchParams) => void;
4
+ export declare const getIntegrationType: (mode?: string) => string;
5
+ interface PaymentMethods {
6
+ paymentMethod: string;
7
+ processors: string[];
8
+ }
9
+ export interface UrlConfig {
10
+ id?: string;
11
+ env?: Environment;
12
+ orderToken: string;
13
+ showPromotionsBanner?: boolean;
14
+ paymentMethods?: PaymentMethods[];
15
+ publicApiKey: string;
16
+ styleFile?: string;
17
+ userToken: string;
18
+ language: string;
19
+ devUrl?: string;
20
+ domain?: string;
21
+ mode?: string;
22
+ target?: string;
23
+ userInfo?: InitWidgetBase["userInfo"];
24
+ widgetExperience?: InitWidgetBase["widgetExperience"];
25
+ behavior?: BehaviorWidget;
26
+ sessionId: string;
27
+ types?: ElementWidgetType[];
28
+ }
29
+ export interface ElementWidgetType {
30
+ name: ElementWidgetTypeName;
31
+ }
32
+ type ElementWidgetTypeName = "vault" | "click_to_pay";
33
+ export {};
34
+ //# sourceMappingURL=urlConfig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"urlConfig.d.ts","sourceRoot":"","sources":["../../../../../../src/types/helpers/urlConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAI9E,eAAO,MAAM,mBAAmB,GAC9B,QAAQ,SAAS,EACjB,cAAc,eAAe,SAS9B,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,OAAO,MAAM,WAQ/C,CAAC;AAEF,UAAU,cAAc;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB;AAED,MAAM,WAAW,SAAS;IAExB,EAAE,CAAC,EAAE,MAAM,CAAC;IAGZ,GAAG,CAAC,EAAE,WAAW,CAAC;IAGlB,UAAU,EAAE,MAAM,CAAC;IAGnB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAE/B,cAAc,CAAC,EAAE,cAAc,EAAE,CAAC;IAElC,YAAY,EAAE,MAAM,CAAC;IAErB,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,SAAS,EAAE,MAAM,CAAC;IAElB,QAAQ,EAAE,MAAM,CAAC;IAEjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,QAAQ,CAAC,EAAE,cAAc,CAAC,UAAU,CAAC,CAAC;IAEtC,gBAAgB,CAAC,EAAE,cAAc,CAAC,kBAAkB,CAAC,CAAC;IAEtD,QAAQ,CAAC,EAAE,cAAc,CAAC;IAE1B,SAAS,EAAE,MAAM,CAAC;IAElB,KAAK,CAAC,EAAE,iBAAiB,EAAE,CAAC;CAC7B;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,qBAAqB,CAAC;CAC7B;AAED,KAAK,qBAAqB,GAAG,OAAO,GAAG,cAAc,CAAC"}
@@ -0,0 +1,5 @@
1
+ export * from "./interfaces";
2
+ export * from "./env";
3
+ export * from "./base";
4
+ export * from "./utils";
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC"}
@@ -0,0 +1,38 @@
1
+ export type ClosedAction = "userAction" | "systemAction";
2
+ export type Json = Record<string, any>;
3
+ export interface OnError {
4
+ type: string;
5
+ metadata: {
6
+ code: string;
7
+ message: string;
8
+ };
9
+ }
10
+ interface OnCardBinDetected {
11
+ cardBin: string;
12
+ cardBrand: string;
13
+ }
14
+ interface OnInstallmentSelectedPayload {
15
+ cardBin: string;
16
+ installmentPlanOptionId: string;
17
+ }
18
+ interface BaseCallbacks {
19
+ onSuccess?: (data: Json) => void;
20
+ onError?: (data: OnError) => void;
21
+ onClosed?: (action: ClosedAction) => void;
22
+ onEventDispatch?: (event: string, payload: Json) => void;
23
+ }
24
+ export interface PaymentWidgetCallbacks extends BaseCallbacks {
25
+ onCardBinDetected?: (data: OnCardBinDetected) => void;
26
+ onInstallmentSelected?: (data: OnInstallmentSelectedPayload) => void;
27
+ onPaymentProcessing?: () => void;
28
+ }
29
+ export interface ElementsWidgetCallbacks extends BaseCallbacks {
30
+ onCardBinDetected?: (data: OnCardBinDetected) => void;
31
+ onInstallmentSelected?: (data: OnInstallmentSelectedPayload) => void;
32
+ }
33
+ export interface NextActionWidgetCallbacks extends BaseCallbacks {
34
+ }
35
+ export interface VoucherWidgetCallbacks extends BaseCallbacks {
36
+ }
37
+ export {};
38
+ //# sourceMappingURL=callbacks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"callbacks.d.ts","sourceRoot":"","sources":["../../../../../../src/types/interfaces/callbacks.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG,YAAY,GAAG,cAAc,CAAC;AAEzD,MAAM,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAEvC,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE;QACR,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;CACH;AAED,UAAU,iBAAiB;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,UAAU,4BAA4B;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB,uBAAuB,EAAE,MAAM,CAAC;CACjC;AAED,UAAU,aAAa;IACrB,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IACjC,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAClC,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,IAAI,CAAC;IAC1C,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,KAAK,IAAI,CAAC;CAC1D;AAED,MAAM,WAAW,sBAAuB,SAAQ,aAAa;IAC3D,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,iBAAiB,KAAK,IAAI,CAAC;IACtD,qBAAqB,CAAC,EAAE,CAAC,IAAI,EAAE,4BAA4B,KAAK,IAAI,CAAC;IACrE,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAC;CAClC;AAED,MAAM,WAAW,uBAAwB,SAAQ,aAAa;IAC5D,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,iBAAiB,KAAK,IAAI,CAAC;IACtD,qBAAqB,CAAC,EAAE,CAAC,IAAI,EAAE,4BAA4B,KAAK,IAAI,CAAC;CACtE;AAED,MAAM,WAAW,yBAA0B,SAAQ,aAAa;CAAG;AAEnE,MAAM,WAAW,sBAAuB,SAAQ,aAAa;CAAG"}
@@ -0,0 +1,156 @@
1
+ export interface CustomStyles {
2
+ theme: Theme;
3
+ OtpPage: OtpPage;
4
+ CardInfoPattern: CardInfoPattern;
5
+ CardPattern: CardPattern;
6
+ TermsConditionsPattern: TermsConditionsPattern;
7
+ PaymentButtonPattern: PaymentButtonPattern;
8
+ UserCardPattern: UserCardPattern;
9
+ }
10
+ interface UserCardPattern {
11
+ translations: Translations2;
12
+ }
13
+ interface Translations2 {
14
+ es: Es2;
15
+ }
16
+ interface Es2 {
17
+ addNewCard: AddNewCard;
18
+ moreOptions: MoreOptions;
19
+ paymentMethods: PaymentMethods;
20
+ }
21
+ interface PaymentMethods {
22
+ seeAllMyCards: string;
23
+ expiredCard: string;
24
+ warningExpiredCard: string;
25
+ confirmDeleteMethodTitle: string;
26
+ deleteMainText: string;
27
+ confirmDeleteMethodAccept: string;
28
+ confirmDeleteMethodCancel: string;
29
+ confirmDeleteMethod: string;
30
+ }
31
+ interface MoreOptions {
32
+ payWith: string;
33
+ }
34
+ interface AddNewCard {
35
+ info: string;
36
+ }
37
+ interface PaymentButtonPattern {
38
+ label: string;
39
+ hidePoweredBy: boolean;
40
+ showOrderTotal: boolean;
41
+ styles: Styles;
42
+ }
43
+ interface Styles {
44
+ padding: string;
45
+ borderRadius: string;
46
+ }
47
+ interface TermsConditionsPattern {
48
+ showForGuest: boolean;
49
+ showForAuth: boolean;
50
+ legalMessage: string;
51
+ connectorText: string;
52
+ hideCompanyDisclaimer: boolean;
53
+ }
54
+ interface CardPattern {
55
+ translations: Translations;
56
+ }
57
+ interface Translations {
58
+ es: Es;
59
+ }
60
+ interface Es {
61
+ inputs: Inputs;
62
+ }
63
+ interface Inputs {
64
+ identityNumber: IdentityNumber;
65
+ identityDocument: IdentityDocument;
66
+ cardNumber: IdentityNumber;
67
+ cardHolder: IdentityNumber;
68
+ installment: Installment;
69
+ }
70
+ interface Installment {
71
+ label: string;
72
+ withoutInstallments: string;
73
+ }
74
+ interface IdentityDocument {
75
+ label: Label;
76
+ }
77
+ interface Label {
78
+ CO: string;
79
+ CL: string;
80
+ EC: string;
81
+ MX: string;
82
+ BR: string;
83
+ AR: string;
84
+ UY: string;
85
+ }
86
+ interface IdentityNumber {
87
+ label: string;
88
+ }
89
+ interface CardInfoPattern {
90
+ title: string;
91
+ subtitle: Subtitle;
92
+ }
93
+ interface Subtitle {
94
+ content: string;
95
+ }
96
+ interface OtpPage {
97
+ overrides: Overrides2;
98
+ }
99
+ interface Overrides2 {
100
+ Header: Header;
101
+ Headings: Headings;
102
+ OtpChangeChannelButton: OtpChangeChannelButton;
103
+ ContinueAsGuestButton: ContinueAsGuestButton;
104
+ }
105
+ interface ContinueAsGuestButton {
106
+ props: Props5;
107
+ }
108
+ interface Props5 {
109
+ description: string;
110
+ }
111
+ interface OtpChangeChannelButton {
112
+ props: Props4;
113
+ }
114
+ interface Props4 {
115
+ description: Description;
116
+ }
117
+ interface Description {
118
+ sms: string;
119
+ email: string;
120
+ }
121
+ interface Headings {
122
+ props: Props3;
123
+ }
124
+ interface Props3 {
125
+ title: string;
126
+ description: string;
127
+ }
128
+ interface Header {
129
+ props: Props2;
130
+ }
131
+ interface Props2 {
132
+ overrides: Overrides;
133
+ }
134
+ interface Overrides {
135
+ Logo: Logo;
136
+ }
137
+ interface Logo {
138
+ props: Props;
139
+ }
140
+ interface Props {
141
+ url: string;
142
+ }
143
+ interface Theme {
144
+ colors: Colors;
145
+ }
146
+ interface Colors {
147
+ primaryTextColor: string;
148
+ backgroundSecondary: string;
149
+ backgroundPrimary: string;
150
+ buttonPrimaryFill: string;
151
+ buttonPrimaryHover: string;
152
+ buttonPrimaryText: string;
153
+ buttonPrimaryActive: string;
154
+ }
155
+ export {};
156
+ //# sourceMappingURL=customStyle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"customStyle.d.ts","sourceRoot":"","sources":["../../../../../../src/types/interfaces/customStyle.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,KAAK,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;IACjB,eAAe,EAAE,eAAe,CAAC;IACjC,WAAW,EAAE,WAAW,CAAC;IACzB,sBAAsB,EAAE,sBAAsB,CAAC;IAC/C,oBAAoB,EAAE,oBAAoB,CAAC;IAC3C,eAAe,EAAE,eAAe,CAAC;CAClC;AAED,UAAU,eAAe;IACvB,YAAY,EAAE,aAAa,CAAC;CAC7B;AAED,UAAU,aAAa;IACrB,EAAE,EAAE,GAAG,CAAC;CACT;AAED,UAAU,GAAG;IACX,UAAU,EAAE,UAAU,CAAC;IACvB,WAAW,EAAE,WAAW,CAAC;IACzB,cAAc,EAAE,cAAc,CAAC;CAChC;AAED,UAAU,cAAc;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM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UAAU,KAAK;IACb,GAAG,EAAE,MAAM,CAAC;CACb;AAED,UAAU,KAAK;IACb,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,UAAU,MAAM;IACd,gBAAgB,EAAE,MAAM,CAAC;IACzB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,mBAAmB,EAAE,MAAM,CAAC;CAC7B"}
@@ -0,0 +1,7 @@
1
+ export * from "./initWidgetBase";
2
+ export * from "./callbacks";
3
+ export * from "./customStyle";
4
+ export * from "./merchant";
5
+ export * from "./user";
6
+ export * from "./order";
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/types/interfaces/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC"}
@@ -0,0 +1,78 @@
1
+ import { ElementsWidgetCallbacks, NextActionWidgetCallbacks, PaymentWidgetCallbacks, VoucherWidgetCallbacks } from "./callbacks";
2
+ type DeepPartial<T> = {
3
+ [K in keyof T]?: T[K] extends object ? DeepPartial<T[K]> : T[K];
4
+ };
5
+ export type Language = "es" | "pt" | "en";
6
+ interface UserInfo {
7
+ firstName: string;
8
+ lastName: string;
9
+ email: string;
10
+ }
11
+ interface WidgetExperience {
12
+ theme: {
13
+ mainColor: string;
14
+ secondaryColor: string;
15
+ backgroundColor: string;
16
+ font: string;
17
+ imageUrl: string;
18
+ banner: string;
19
+ mainActionButtonText: string;
20
+ };
21
+ userExperience: {
22
+ showSavedCardsFlow: boolean;
23
+ defaultCardFlow: boolean;
24
+ };
25
+ flags: {
26
+ allowSaveUserInfo: boolean;
27
+ };
28
+ checkoutModules: CheckoutModule[];
29
+ }
30
+ interface CheckoutModule {
31
+ name: string;
32
+ props: {
33
+ hideProductImage: boolean;
34
+ showInMainView: boolean;
35
+ fields: any[];
36
+ };
37
+ }
38
+ export type BehaviorFlow = "tokenize" | "purchase";
39
+ export interface BankTransferBehavior {
40
+ splitPayments?: boolean;
41
+ }
42
+ export interface BehaviorWidget {
43
+ hidePayButton?: boolean;
44
+ paymentMethods?: {
45
+ creditCard?: CreditCardBehavior;
46
+ paypal?: PaypalBehavior;
47
+ bankTransfer?: BankTransferBehavior;
48
+ flowType?: PaymentMethodConfigurationFlow;
49
+ };
50
+ }
51
+ export interface CreditCardBehavior {
52
+ splitPayments?: {
53
+ maxCards: number;
54
+ };
55
+ flow?: BehaviorFlow;
56
+ }
57
+ export interface PaypalBehavior {
58
+ flow?: BehaviorFlow;
59
+ }
60
+ export interface InitWidgetBase {
61
+ orderToken?: string;
62
+ userToken?: string;
63
+ language?: Language;
64
+ styleFile?: string;
65
+ int?: string;
66
+ widgetExperience?: DeepPartial<WidgetExperience>;
67
+ userInfo?: Partial<UserInfo>;
68
+ behavior?: BehaviorWidget;
69
+ domain?: string;
70
+ hidePayButton?: boolean;
71
+ callbacks?: PaymentWidgetCallbacks & ElementsWidgetCallbacks & NextActionWidgetCallbacks & VoucherWidgetCallbacks;
72
+ }
73
+ type PaymentMethodConfigurationFlowType = "twoStep" | "singleStep";
74
+ export interface PaymentMethodConfigurationFlow {
75
+ type: PaymentMethodConfigurationFlowType;
76
+ }
77
+ export {};
78
+ //# sourceMappingURL=initWidgetBase.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"initWidgetBase.d.ts","sourceRoot":"","sources":["../../../../../../src/types/interfaces/initWidgetBase.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,yBAAyB,EACzB,sBAAsB,EACtB,sBAAsB,EACvB,MAAM,aAAa,CAAC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AAE;QACf,UAAU,CAAC,EAAE,kBAAkB,CAAC;QAChC,MAAM,CAAC,EAAE,cAAc,CAAC;QACxB,YAAY,CAAC,EAAE,oBAAoB,CAAC;QACpC,QAAQ,CAAC,EAAE,8BAA8B,CAAC;KAC3C,CAAC;CACH;AAED,MAAM,WAAW,kBAAkB;IACjC,aAAa,CAAC,EAAE;QACd,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC;IACF,IAAI,CAAC,EAAE,YAAY,CAAC;CACrB;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,CAAC,EAAE,YAAY,CAAC;CACrB;AAED,MAAM,WAAW,cAAc;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,gBAAgB,CAAC,EAAE,WAAW,CAAC,gBAAgB,CAAC,CAAC;IACjD,QAAQ,CAAC,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC7B,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,SAAS,CAAC,EAAE,sBAAsB,GAChC,uBAAuB,GACvB,yBAAyB,GACzB,sBAAsB,CAAC;CAC1B;AAGD,KAAK,kCAAkC,GAAG,SAAS,GAAG,YAAY,CAAC;AACnE,MAAM,WAAW,8BAA8B;IAC7C,IAAI,EAAE,kCAAkC,CAAC;CAC1C"}
@@ -0,0 +1,76 @@
1
+ export interface Merchant {
2
+ id: string;
3
+ name: string;
4
+ short_name: string;
5
+ country: string;
6
+ currency: string;
7
+ logo_url: string;
8
+ term_and_conditions_url: string;
9
+ privacy_policies_url: string;
10
+ use_duna_send: boolean;
11
+ latitude: number;
12
+ longitude: number;
13
+ ok: boolean;
14
+ use_shipping_methods: boolean;
15
+ use_fixed_shipping_methods: boolean;
16
+ merchant_config?: MerchantConfig;
17
+ }
18
+ export interface MerchantConfig {
19
+ id: string;
20
+ merchant_id: string;
21
+ configuration: Configuration;
22
+ image_url: string;
23
+ theme?: Theme;
24
+ created_at: string;
25
+ updated_at: string;
26
+ }
27
+ export interface Theme {
28
+ main_color?: string;
29
+ secondary_color?: string;
30
+ background_color?: string;
31
+ }
32
+ export interface Configuration {
33
+ is_identity_document_hide?: boolean;
34
+ show_rfc?: boolean;
35
+ hide_powered_by_deuna?: boolean;
36
+ hide_address_map?: boolean;
37
+ exclude_billing_address?: boolean;
38
+ hide_pickup_time?: boolean;
39
+ }
40
+ export declare enum PaymentMethodTypes {
41
+ CreditCard = "credit_card",
42
+ Cash = "cash",
43
+ POS = "pos",
44
+ DebitCard = "debit_card",
45
+ BNPL = "bnpl",
46
+ Voucher = "voucher",
47
+ PSE = "pse"
48
+ }
49
+ export declare enum PaymentProcessorName {
50
+ DLocalDebit = "dlocal_debito",
51
+ DLocal = "dlocal",
52
+ Paymentez = "paymentez_credit",
53
+ Paypal = "paypal",
54
+ PaypalCommercePlatform = "paypal_commerce_platform",
55
+ PaypalPlus = "paypal_plus",
56
+ Conekta = "conekta_credit",
57
+ Oxxo = "oxxo",
58
+ Baloto = "baloto",
59
+ Efecty = "efecty",
60
+ Kueski = "kueski",
61
+ Addi = "addi",
62
+ Zip = "zip",
63
+ Aplazo = "aplazo",
64
+ Nequi = "nequi",
65
+ Stripe = "stripe",
66
+ Sistecredito = "sistecredito",
67
+ PhysicalTransfer = "physical_transfer",
68
+ Cash = "cash",
69
+ SpeiOpenpay = "openpay_spei",
70
+ MercadoPago = "mercadopago",
71
+ Payu = "payu",
72
+ Wompi = "wompi",
73
+ Daviplata = "daviplata",
74
+ ApplePayStripe = "stripe_apple_pay"
75
+ }
76
+ //# sourceMappingURL=merchant.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"merchant.d.ts","sourceRoot":"","sources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ACpC,UAAU,gBAAgB;IAC1B,IAAI,SAAS;IACb,GAAG,QAAQ;IACX,SAAS,eAAe;IACxB,IAAI,SAAS;IACb,OAAO,YAAY;IACnB,GAAG,QAAQ;CACZ;AAED,MAAM,CAAC,OAAO,MAAM,oBAAoB;IACtC,WAAW,kBAAkB;IAC7B,MAAM,WAAW;IACjB,SAAS,qBAAqB;IAC9B,MAAM,WAAW;IACjB,sBAAsB,6BAA6B;IACnD,UAAU,gBAAgB;IAC1B,OAAO,mBAAmB;IAC1B,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,IAAI,SAAS;IACb,GAAG,QAAQ;IACX,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,YAAY,iBAAiB;IAC7B,gBAAgB,sBAAsB;IACtC,IAAI,SAAS;IACb,WAAW,iBAAiB;IAC5B,WAAW,gBAAgB;IAC3B,IAAI,SAAS;IACb,KAAK,UAAU;IACf,SAAS,cAAc;IACvB,cAAc,qBAAqB;CACpC"}
@@ -0,0 +1,3 @@
1
+ export interface Order {
2
+ }
3
+ //# sourceMappingURL=order.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"order.d.ts","sourceRoot":"","sources":["../../../../../../src/types/interfaces/order.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,KAAK;CAAG"}
@@ -0,0 +1,23 @@
1
+ export interface User {
2
+ id: string;
3
+ created_at: string;
4
+ updated_at: string;
5
+ deleted_at?: string;
6
+ email: string;
7
+ first_name: string;
8
+ last_name: string;
9
+ phone: string;
10
+ identity_document: string;
11
+ identity_providers: Identityprovider[];
12
+ is_phone_verified: boolean;
13
+ is_guest: boolean;
14
+ }
15
+ interface Identityprovider {
16
+ id: number;
17
+ provider_name: string;
18
+ created_at: string;
19
+ updated_at: string;
20
+ deleted_at?: string;
21
+ }
22
+ export {};
23
+ //# sourceMappingURL=user.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../../../../../src/types/interfaces/user.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,IAAI;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,iBAAiB,EAAE,MAAM,CAAC;IAC1B,kBAAkB,EAAE,gBAAgB,EAAE,CAAC;IACvC,iBAAiB,EAAE,OAAO,CAAC;IAC3B,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,UAAU,gBAAgB;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB"}
@@ -0,0 +1,2 @@
1
+ export declare function hasKey<O>(obj: O, key: keyof any): key is keyof O;
2
+ //# sourceMappingURL=hasKey.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hasKey.d.ts","sourceRoot":"","sources":["../../../../../../src/types/utils/hasKey.ts"],"names":[],"mappings":"AAEA,wBAAgB,MAAM,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,GAAG,GAAG,IAAI,MAAM,CAAC,CAEhE"}
@@ -0,0 +1,2 @@
1
+ export * from "./hasKey";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/types/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
@@ -0,0 +1 @@
1
+ {"type":"module"}