@etohq/types 1.3.0 → 1.5.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 (312) hide show
  1. package/LICENSE +21 -0
  2. package/dist/analytics/index.d.ts +5 -0
  3. package/dist/analytics/index.d.ts.map +1 -0
  4. package/dist/analytics/index.js +21 -0
  5. package/dist/analytics/index.js.map +1 -0
  6. package/dist/analytics/mutations.d.ts +71 -0
  7. package/dist/analytics/mutations.d.ts.map +1 -0
  8. package/dist/{index-data/sotrage-provider.js → analytics/mutations.js} +1 -1
  9. package/dist/analytics/mutations.js.map +1 -0
  10. package/dist/analytics/provider.d.ts +41 -0
  11. package/dist/analytics/provider.d.ts.map +1 -0
  12. package/dist/analytics/provider.js +3 -0
  13. package/dist/analytics/provider.js.map +1 -0
  14. package/dist/analytics/providers/index.d.ts +3 -0
  15. package/dist/analytics/providers/index.d.ts.map +1 -0
  16. package/dist/analytics/providers/index.js +19 -0
  17. package/dist/analytics/providers/index.js.map +1 -0
  18. package/dist/analytics/providers/local.d.ts +3 -0
  19. package/dist/analytics/providers/local.d.ts.map +1 -0
  20. package/dist/analytics/providers/local.js +3 -0
  21. package/dist/analytics/providers/local.js.map +1 -0
  22. package/dist/analytics/providers/posthog.d.ts +11 -0
  23. package/dist/analytics/providers/posthog.d.ts.map +1 -0
  24. package/dist/analytics/providers/posthog.js +3 -0
  25. package/dist/analytics/providers/posthog.js.map +1 -0
  26. package/dist/analytics/service.d.ts +51 -0
  27. package/dist/analytics/service.d.ts.map +1 -0
  28. package/dist/{link-modules-sdk → analytics}/service.js.map +1 -1
  29. package/dist/api-key/mutations/api-key.d.ts +2 -0
  30. package/dist/api-key/mutations/api-key.d.ts.map +1 -1
  31. package/dist/auth/common/auth-identity.d.ts +1 -1
  32. package/dist/auth/common/auth-identity.d.ts.map +1 -1
  33. package/dist/auth/provider.d.ts +1 -7
  34. package/dist/auth/provider.d.ts.map +1 -1
  35. package/dist/auth/service.d.ts +50 -0
  36. package/dist/auth/service.d.ts.map +1 -1
  37. package/dist/bundles.d.ts +2 -1
  38. package/dist/bundles.d.ts.map +1 -1
  39. package/dist/bundles.js +3 -2
  40. package/dist/bundles.js.map +1 -1
  41. package/dist/cache/service.d.ts +27 -0
  42. package/dist/cache/service.d.ts.map +1 -1
  43. package/dist/cart/common.d.ts +1125 -0
  44. package/dist/cart/common.d.ts.map +1 -0
  45. package/dist/cart/common.js +3 -0
  46. package/dist/cart/common.js.map +1 -0
  47. package/dist/cart/index.d.ts +5 -0
  48. package/dist/cart/index.d.ts.map +1 -0
  49. package/dist/cart/index.js +21 -0
  50. package/dist/cart/index.js.map +1 -0
  51. package/dist/cart/mutations.d.ts +734 -0
  52. package/dist/cart/mutations.d.ts.map +1 -0
  53. package/dist/cart/mutations.js +4 -0
  54. package/dist/cart/mutations.js.map +1 -0
  55. package/dist/cart/service.d.ts +1888 -0
  56. package/dist/cart/service.d.ts.map +1 -0
  57. package/dist/cart/service.js +3 -0
  58. package/dist/cart/service.js.map +1 -0
  59. package/dist/cart/workflows.d.ts +480 -0
  60. package/dist/cart/workflows.d.ts.map +1 -0
  61. package/dist/cart/workflows.js +3 -0
  62. package/dist/cart/workflows.js.map +1 -0
  63. package/dist/common/batch.d.ts +47 -0
  64. package/dist/common/batch.d.ts.map +1 -1
  65. package/dist/common/common.d.ts +11 -1
  66. package/dist/common/common.d.ts.map +1 -1
  67. package/dist/common/config-module.d.ts +222 -63
  68. package/dist/common/config-module.d.ts.map +1 -1
  69. package/dist/common/modules.d.ts +133 -15
  70. package/dist/common/modules.d.ts.map +1 -1
  71. package/dist/dal/repository-service.d.ts +2 -2
  72. package/dist/dal/repository-service.d.ts.map +1 -1
  73. package/dist/dml/index.d.ts +8 -0
  74. package/dist/dml/index.d.ts.map +1 -1
  75. package/dist/event-bus/common.d.ts +24 -0
  76. package/dist/event-bus/common.d.ts.map +1 -1
  77. package/dist/event-bus/event-bus-module.d.ts +58 -0
  78. package/dist/event-bus/event-bus-module.d.ts.map +1 -1
  79. package/dist/file/common.d.ts +22 -2
  80. package/dist/file/common.d.ts.map +1 -1
  81. package/dist/file/mutations.d.ts +21 -3
  82. package/dist/file/mutations.d.ts.map +1 -1
  83. package/dist/file/provider.d.ts +75 -7
  84. package/dist/file/provider.d.ts.map +1 -1
  85. package/dist/file/service.d.ts +83 -11
  86. package/dist/file/service.d.ts.map +1 -1
  87. package/dist/http/auth/payloads.d.ts +3 -0
  88. package/dist/http/auth/payloads.d.ts.map +1 -1
  89. package/dist/http/common/additional_data.d.ts +9 -2
  90. package/dist/http/common/additional_data.d.ts.map +1 -1
  91. package/dist/http/common/request.d.ts +29 -6
  92. package/dist/http/common/request.d.ts.map +1 -1
  93. package/dist/http/common/response.d.ts +28 -0
  94. package/dist/http/common/response.d.ts.map +1 -1
  95. package/dist/http/currency/admin/entities.d.ts +4 -0
  96. package/dist/http/currency/admin/entities.d.ts.map +1 -0
  97. package/dist/http/currency/admin/entities.js +3 -0
  98. package/dist/http/currency/admin/entities.js.map +1 -0
  99. package/dist/http/currency/admin/index.d.ts +4 -0
  100. package/dist/http/currency/admin/index.d.ts.map +1 -0
  101. package/dist/http/currency/admin/index.js +20 -0
  102. package/dist/http/currency/admin/index.js.map +1 -0
  103. package/dist/http/currency/admin/queries.d.ts +15 -0
  104. package/dist/http/currency/admin/queries.d.ts.map +1 -0
  105. package/dist/http/currency/admin/queries.js +3 -0
  106. package/dist/http/currency/admin/queries.js.map +1 -0
  107. package/dist/http/currency/admin/responses.d.ts +16 -0
  108. package/dist/http/currency/admin/responses.d.ts.map +1 -0
  109. package/dist/http/currency/admin/responses.js +3 -0
  110. package/dist/http/currency/admin/responses.js.map +1 -0
  111. package/dist/http/currency/common.d.ts +48 -0
  112. package/dist/http/currency/common.d.ts.map +1 -0
  113. package/dist/http/currency/common.js +3 -0
  114. package/dist/http/currency/common.js.map +1 -0
  115. package/dist/http/currency/index.d.ts +2 -0
  116. package/dist/http/currency/index.d.ts.map +1 -0
  117. package/dist/http/currency/index.js +18 -0
  118. package/dist/http/currency/index.js.map +1 -0
  119. package/dist/http/encore/encore.d.ts +4 -2
  120. package/dist/http/encore/encore.d.ts.map +1 -1
  121. package/dist/http/encore/encore.js.map +1 -1
  122. package/dist/http/file/admin/payloads.d.ts +18 -0
  123. package/dist/http/file/admin/payloads.d.ts.map +1 -1
  124. package/dist/http/file/admin/responses.d.ts +33 -0
  125. package/dist/http/file/admin/responses.d.ts.map +1 -1
  126. package/dist/http/file/common.d.ts +17 -0
  127. package/dist/http/file/common.d.ts.map +1 -1
  128. package/dist/http/invite/admin/entities.d.ts +35 -0
  129. package/dist/http/invite/admin/entities.d.ts.map +1 -0
  130. package/dist/http/invite/admin/entities.js +3 -0
  131. package/dist/http/invite/admin/entities.js.map +1 -0
  132. package/dist/http/invite/admin/index.d.ts +5 -0
  133. package/dist/http/invite/admin/index.d.ts.map +1 -0
  134. package/dist/http/invite/admin/index.js +21 -0
  135. package/dist/http/invite/admin/index.js.map +1 -0
  136. package/dist/http/invite/admin/payloads.d.ts +25 -0
  137. package/dist/http/invite/admin/payloads.d.ts.map +1 -0
  138. package/dist/http/invite/admin/payloads.js +3 -0
  139. package/dist/http/invite/admin/payloads.js.map +1 -0
  140. package/dist/http/invite/admin/queries.d.ts +11 -0
  141. package/dist/http/invite/admin/queries.d.ts.map +1 -0
  142. package/dist/http/invite/admin/queries.js +3 -0
  143. package/dist/http/invite/admin/queries.js.map +1 -0
  144. package/dist/http/invite/admin/responses.d.ts +28 -0
  145. package/dist/http/invite/admin/responses.d.ts.map +1 -0
  146. package/dist/http/invite/admin/responses.js +3 -0
  147. package/dist/http/invite/admin/responses.js.map +1 -0
  148. package/dist/http/invite/index.d.ts +2 -0
  149. package/dist/http/invite/index.d.ts.map +1 -0
  150. package/dist/http/invite/index.js +18 -0
  151. package/dist/http/invite/index.js.map +1 -0
  152. package/dist/http/notification/admin/entities.d.ts +68 -0
  153. package/dist/http/notification/admin/entities.d.ts.map +1 -0
  154. package/dist/http/notification/admin/entities.js +3 -0
  155. package/dist/http/notification/admin/entities.js.map +1 -0
  156. package/dist/http/notification/admin/index.d.ts +4 -0
  157. package/dist/http/notification/admin/index.d.ts.map +1 -0
  158. package/dist/http/notification/admin/index.js +20 -0
  159. package/dist/http/notification/admin/index.js.map +1 -0
  160. package/dist/http/notification/admin/queries.d.ts +19 -0
  161. package/dist/http/notification/admin/queries.d.ts.map +1 -0
  162. package/dist/http/notification/admin/queries.js +3 -0
  163. package/dist/http/notification/admin/queries.js.map +1 -0
  164. package/dist/http/notification/admin/responses.d.ts +16 -0
  165. package/dist/http/notification/admin/responses.d.ts.map +1 -0
  166. package/dist/http/notification/admin/responses.js +3 -0
  167. package/dist/http/notification/admin/responses.js.map +1 -0
  168. package/dist/http/notification/index.d.ts +2 -0
  169. package/dist/http/notification/index.d.ts.map +1 -0
  170. package/dist/http/notification/index.js +18 -0
  171. package/dist/http/notification/index.js.map +1 -0
  172. package/dist/http/payment/admin/queries.d.ts +6 -0
  173. package/dist/http/payment/admin/queries.d.ts.map +1 -1
  174. package/dist/http/payment/admin/responses.d.ts +3 -0
  175. package/dist/http/payment/admin/responses.d.ts.map +1 -1
  176. package/dist/http/payment/common.d.ts +1 -21
  177. package/dist/http/payment/common.d.ts.map +1 -1
  178. package/dist/http/payment/store/payloads.d.ts +0 -5
  179. package/dist/http/payment/store/payloads.d.ts.map +1 -1
  180. package/dist/http/plugins/admin/responses.d.ts +13 -0
  181. package/dist/http/plugins/admin/responses.d.ts.map +1 -0
  182. package/dist/http/plugins/admin/responses.js +3 -0
  183. package/dist/http/plugins/admin/responses.js.map +1 -0
  184. package/dist/http/plugins/index.d.ts +2 -0
  185. package/dist/http/plugins/index.d.ts.map +1 -0
  186. package/dist/http/plugins/index.js +18 -0
  187. package/dist/http/plugins/index.js.map +1 -0
  188. package/dist/http/user/admin/entities.d.ts +27 -0
  189. package/dist/http/user/admin/entities.d.ts.map +1 -1
  190. package/dist/http/user/admin/payloads.d.ts +12 -0
  191. package/dist/http/user/admin/payloads.d.ts.map +1 -1
  192. package/dist/http/user/admin/queries.d.ts +24 -0
  193. package/dist/http/user/admin/queries.d.ts.map +1 -1
  194. package/dist/http/user/admin/responses.d.ts +6 -0
  195. package/dist/http/user/admin/responses.d.ts.map +1 -1
  196. package/dist/http/workflow-execution/admin/entities.d.ts +142 -2
  197. package/dist/http/workflow-execution/admin/entities.d.ts.map +1 -1
  198. package/dist/http/workflow-execution/admin/queries.d.ts +10 -0
  199. package/dist/http/workflow-execution/admin/queries.d.ts.map +1 -1
  200. package/dist/http/workflow-execution/admin/responses.d.ts +6 -0
  201. package/dist/http/workflow-execution/admin/responses.d.ts.map +1 -1
  202. package/dist/index-data/common.d.ts +11 -0
  203. package/dist/index-data/common.d.ts.map +1 -1
  204. package/dist/index-data/index-operator-map.d.ts +10 -10
  205. package/dist/index-data/index-operator-map.d.ts.map +1 -1
  206. package/dist/index-data/index.d.ts +1 -1
  207. package/dist/index-data/index.js +1 -1
  208. package/dist/index-data/query-config/query-input-config-fields.d.ts +3 -1
  209. package/dist/index-data/query-config/query-input-config-fields.d.ts.map +1 -1
  210. package/dist/index-data/query-config/query-input-config-filters.d.ts +1 -1
  211. package/dist/index-data/query-config/query-input-config-filters.d.ts.map +1 -1
  212. package/dist/index-data/query-config/query-input-config.d.ts +50 -6
  213. package/dist/index-data/query-config/query-input-config.d.ts.map +1 -1
  214. package/dist/index-data/{sotrage-provider.d.ts → storage-provider.d.ts} +1 -1
  215. package/dist/index-data/{sotrage-provider.d.ts.map → storage-provider.d.ts.map} +1 -1
  216. package/dist/index-data/storage-provider.js +3 -0
  217. package/dist/index-data/storage-provider.js.map +1 -0
  218. package/dist/index.d.ts +4 -2
  219. package/dist/index.d.ts.map +1 -1
  220. package/dist/index.js +3 -2
  221. package/dist/index.js.map +1 -1
  222. package/dist/joiner/index.d.ts +3 -0
  223. package/dist/joiner/index.d.ts.map +1 -1
  224. package/dist/link-modules/index.d.ts.map +1 -0
  225. package/dist/link-modules/index.js.map +1 -0
  226. package/dist/link-modules/migrations.d.ts.map +1 -0
  227. package/dist/link-modules/migrations.js.map +1 -0
  228. package/dist/{link-modules-sdk → link-modules}/service.d.ts +1 -1
  229. package/dist/link-modules/service.d.ts.map +1 -0
  230. package/dist/link-modules/service.js +3 -0
  231. package/dist/link-modules/service.js.map +1 -0
  232. package/dist/locking/index.d.ts +466 -0
  233. package/dist/locking/index.d.ts.map +1 -1
  234. package/dist/modules-sdk/eto-internal-service.d.ts +5 -5
  235. package/dist/modules-sdk/eto-internal-service.d.ts.map +1 -1
  236. package/dist/modules-sdk/index.d.ts +25 -5
  237. package/dist/modules-sdk/index.d.ts.map +1 -1
  238. package/dist/modules-sdk/remote-query-object-from-string.d.ts +55 -4
  239. package/dist/modules-sdk/remote-query-object-from-string.d.ts.map +1 -1
  240. package/dist/modules-sdk/remote-query.d.ts +14 -0
  241. package/dist/modules-sdk/remote-query.d.ts.map +1 -1
  242. package/dist/modules-sdk/to-remote-query.d.ts +8 -2
  243. package/dist/modules-sdk/to-remote-query.d.ts.map +1 -1
  244. package/dist/notification/common.d.ts +1 -1
  245. package/dist/notification/common.d.ts.map +1 -1
  246. package/dist/notification/mutations.d.ts +10 -5
  247. package/dist/notification/mutations.d.ts.map +1 -1
  248. package/dist/notification/service.d.ts +23 -5
  249. package/dist/notification/service.d.ts.map +1 -1
  250. package/dist/payment/common.d.ts +78 -48
  251. package/dist/payment/common.d.ts.map +1 -1
  252. package/dist/payment/mutations.d.ts +73 -47
  253. package/dist/payment/mutations.d.ts.map +1 -1
  254. package/dist/payment/provider.d.ts +450 -76
  255. package/dist/payment/provider.d.ts.map +1 -1
  256. package/dist/payment/service.d.ts +351 -14
  257. package/dist/payment/service.d.ts.map +1 -1
  258. package/dist/shared-context.d.ts +8 -0
  259. package/dist/shared-context.d.ts.map +1 -1
  260. package/dist/totals/big-number.d.ts +15 -0
  261. package/dist/totals/big-number.d.ts.map +1 -0
  262. package/dist/totals/big-number.js +3 -0
  263. package/dist/totals/big-number.js.map +1 -0
  264. package/dist/totals/index.d.ts +26 -0
  265. package/dist/totals/index.d.ts.map +1 -0
  266. package/dist/totals/index.js +18 -0
  267. package/dist/totals/index.js.map +1 -0
  268. package/dist/tsconfig.tsbuildinfo +1 -1
  269. package/dist/workflow/index.d.ts +1 -0
  270. package/dist/workflow/index.d.ts.map +1 -1
  271. package/dist/workflow/index.js +2 -1
  272. package/dist/workflow/index.js.map +1 -1
  273. package/dist/workflow/invite/accept-invite.d.ts +39 -0
  274. package/dist/workflow/invite/accept-invite.d.ts.map +1 -0
  275. package/dist/workflow/invite/accept-invite.js +3 -0
  276. package/dist/workflow/invite/accept-invite.js.map +1 -0
  277. package/dist/workflow/invite/create-invite.d.ts +11 -0
  278. package/dist/workflow/invite/create-invite.d.ts.map +1 -0
  279. package/dist/workflow/invite/create-invite.js +3 -0
  280. package/dist/workflow/invite/create-invite.js.map +1 -0
  281. package/dist/workflow/invite/delete-invite.d.ts +10 -0
  282. package/dist/workflow/invite/delete-invite.d.ts.map +1 -0
  283. package/dist/workflow/invite/delete-invite.js +3 -0
  284. package/dist/workflow/invite/delete-invite.js.map +1 -0
  285. package/dist/workflow/invite/index.d.ts +5 -0
  286. package/dist/workflow/invite/index.d.ts.map +1 -0
  287. package/dist/workflow/invite/index.js +21 -0
  288. package/dist/workflow/invite/index.js.map +1 -0
  289. package/dist/workflow/invite/resend-invite.d.ts +10 -0
  290. package/dist/workflow/invite/resend-invite.d.ts.map +1 -0
  291. package/dist/workflow/invite/resend-invite.js +3 -0
  292. package/dist/workflow/invite/resend-invite.js.map +1 -0
  293. package/dist/workflow/user/create-user.d.ts +6 -0
  294. package/dist/workflow/user/create-user.d.ts.map +1 -1
  295. package/dist/workflow/user/update-user.d.ts +6 -0
  296. package/dist/workflow/user/update-user.d.ts.map +1 -1
  297. package/dist/workflows-sdk/common.d.ts +6 -4
  298. package/dist/workflows-sdk/common.d.ts.map +1 -1
  299. package/dist/workflows-sdk/service.d.ts +12 -8
  300. package/dist/workflows-sdk/service.d.ts.map +1 -1
  301. package/package.json +25 -22
  302. package/dist/index-data/sotrage-provider.js.map +0 -1
  303. package/dist/link-modules-sdk/index.d.ts.map +0 -1
  304. package/dist/link-modules-sdk/index.js.map +0 -1
  305. package/dist/link-modules-sdk/migrations.d.ts.map +0 -1
  306. package/dist/link-modules-sdk/migrations.js.map +0 -1
  307. package/dist/link-modules-sdk/service.d.ts.map +0 -1
  308. /package/dist/{link-modules-sdk → analytics}/service.js +0 -0
  309. /package/dist/{link-modules-sdk → link-modules}/index.d.ts +0 -0
  310. /package/dist/{link-modules-sdk → link-modules}/index.js +0 -0
  311. /package/dist/{link-modules-sdk → link-modules}/migrations.d.ts +0 -0
  312. /package/dist/{link-modules-sdk → link-modules}/migrations.js +0 -0
@@ -1,6 +1,5 @@
1
- import { BaseAddressDTO, BaseCustomerDTO } from "../common";
2
- import { BigNumberInput, BigNumberValue } from "../common";
3
- import { PaymentSessionStatus } from "./common";
1
+ import { BaseAddressDTO, BigNumberInput, BigNumberValue } from '../common';
2
+ import { AccountHolderDTO, PaymentSessionStatus } from "./common";
4
3
  import { ProviderWebhookPayload } from "./mutations";
5
4
  /**
6
5
  * The address of the payment.
@@ -9,49 +8,80 @@ export type PaymentAddressDTO = Partial<BaseAddressDTO>;
9
8
  /**
10
9
  * The customer associated with the payment.
11
10
  */
12
- export type PaymentCustomerDTO = Partial<BaseCustomerDTO>;
11
+ export type PaymentCustomerDTO = {
12
+ /**
13
+ * The ID of the customer in Eto.
14
+ */
15
+ id: string;
16
+ /**
17
+ * The email of the customer.
18
+ */
19
+ email: string;
20
+ /**
21
+ * The customer's company name.
22
+ */
23
+ company_name?: string | null;
24
+ /**
25
+ * The customer's first name.
26
+ */
27
+ first_name?: string | null;
28
+ /**
29
+ * The customer's last name.
30
+ */
31
+ last_name?: string | null;
32
+ /**
33
+ * The customer's phone number.
34
+ */
35
+ phone?: string | null;
36
+ /**
37
+ * The customer's billing address.
38
+ */
39
+ billing_address?: PaymentAddressDTO | null;
40
+ };
41
+ export type PaymentAccountHolderDTO = {
42
+ /**
43
+ * Account holder's details as stored in the third-party payment provider.
44
+ */
45
+ data: Record<string, unknown>;
46
+ };
13
47
  /**
14
48
  * Normalized events from payment provider to internal payment module events.
15
49
  */
16
- export type PaymentActions = "authorized" | "captured" | "failed" | "not_supported";
50
+ export type PaymentActions = "authorized" | "captured" | "failed" | "pending" | "requires_more" | "canceled" | "not_supported";
17
51
  /**
18
52
  * @interface
19
53
  *
20
- * Context data provided to the payment provider when authorizing a payment session.
54
+ * Context data provided to the payment provider
21
55
  */
22
56
  export type PaymentProviderContext = {
23
57
  /**
24
- * The payment's billing address.
58
+ * The account holder information, if available for the payment provider.
25
59
  */
26
- billing_address?: PaymentAddressDTO;
60
+ account_holder?: PaymentAccountHolderDTO;
27
61
  /**
28
- * The associated customer's email.
62
+ * The customer information from Eto.
29
63
  */
30
- email?: string;
64
+ customer?: PaymentCustomerDTO;
31
65
  /**
32
- * The ID of payment session the provider payment is associated with.
66
+ * Idempotency key for the request, if the payment provider supports it. It will be ignored otherwise.
33
67
  */
34
- session_id?: string;
68
+ idempotency_key?: string;
69
+ };
70
+ export type PaymentProviderInput = {
35
71
  /**
36
- * The customer associated with this payment.
72
+ * Data is a combination of the input from the user and what is stored in the database for the associated model.
37
73
  */
38
- customer?: PaymentCustomerDTO;
74
+ data?: Record<string, unknown>;
39
75
  /**
40
- * The extra fields specific to the provider session.
76
+ * The context for this payment operation. The data is guaranteed to be validated and not directly provided by the user.
41
77
  */
42
- extra?: Record<string, unknown>;
78
+ context?: PaymentProviderContext;
43
79
  };
44
80
  /**
45
- * @interface
46
- *
47
81
  * The data used initiate a payment in a provider when a payment
48
82
  * session is created.
49
83
  */
50
- export type CreatePaymentProviderSession = {
51
- /**
52
- * A context necessary for the payment provider.
53
- */
54
- context: PaymentProviderContext;
84
+ export interface InitiatePaymentInput extends PaymentProviderInput {
55
85
  /**
56
86
  * The amount to be authorized.
57
87
  */
@@ -60,89 +90,224 @@ export type CreatePaymentProviderSession = {
60
90
  * The ISO 3 character currency code.
61
91
  */
62
92
  currency_code: string;
63
- };
93
+ }
64
94
  /**
65
- * @interface
66
- *
67
95
  * The attributes to update a payment related to a payment session in a provider.
68
96
  */
69
- export type UpdatePaymentProviderSession = {
97
+ export interface UpdatePaymentInput extends PaymentProviderInput {
70
98
  /**
71
- * A payment's context.
99
+ * The payment session's amount.
72
100
  */
73
- context: PaymentProviderContext;
101
+ amount: BigNumberInput;
74
102
  /**
75
- * The `data` field of the payment session.
103
+ * The ISO 3 character code of the payment session.
76
104
  */
77
- data: Record<string, unknown>;
105
+ currency_code: string;
106
+ }
107
+ /**
108
+ * The data to delete a payment.
109
+ */
110
+ export interface DeletePaymentInput extends PaymentProviderInput {
111
+ }
112
+ /**
113
+ * The data to authorize a payment.
114
+ */
115
+ export interface AuthorizePaymentInput extends PaymentProviderInput {
116
+ }
117
+ /**
118
+ * The data to capture a payment.
119
+ */
120
+ export interface CapturePaymentInput extends PaymentProviderInput {
121
+ }
122
+ /**
123
+ * The data to refund a payment.
124
+ */
125
+ export interface RefundPaymentInput extends PaymentProviderInput {
78
126
  /**
79
- * The payment session's amount.
127
+ * The amount to refund.
80
128
  */
81
129
  amount: BigNumberInput;
130
+ }
131
+ /**
132
+ * The data to retrieve a payment.
133
+ */
134
+ export interface RetrievePaymentInput extends PaymentProviderInput {
135
+ }
136
+ /**
137
+ * The data to cancel a payment.
138
+ */
139
+ export interface CancelPaymentInput extends PaymentProviderInput {
140
+ }
141
+ /**
142
+ * The data to create an account holder.
143
+ */
144
+ export interface CreateAccountHolderInput extends PaymentProviderInput {
82
145
  /**
83
- * The ISO 3 character code of the payment session.
146
+ * The context of creating the account holder.
84
147
  */
85
- currency_code: string;
86
- };
148
+ context: Omit<PaymentProviderContext, "customer"> & {
149
+ /**
150
+ * The account holder's associated customer details.
151
+ */
152
+ customer: PaymentCustomerDTO;
153
+ };
154
+ }
155
+ export interface UpdateAccountHolderInput extends PaymentProviderInput {
156
+ /**
157
+ * The context of updating the account holder.
158
+ */
159
+ context: PaymentProviderContext & {
160
+ /**
161
+ * The account holder's details.
162
+ */
163
+ account_holder: PaymentAccountHolderDTO;
164
+ };
165
+ }
166
+ /**
167
+ * The data to delete an account holder.
168
+ */
169
+ export interface DeleteAccountHolderInput extends Omit<PaymentProviderInput, "context"> {
170
+ /**
171
+ * The context of deleting the account holder.
172
+ */
173
+ context: Omit<PaymentProviderContext, "account_holder"> & {
174
+ /**
175
+ * The account holder's details.
176
+ */
177
+ account_holder: Partial<AccountHolderDTO>;
178
+ };
179
+ }
180
+ /**
181
+ * The data to list payment methods.
182
+ */
183
+ export interface ListPaymentMethodsInput extends PaymentProviderInput {
184
+ }
185
+ /**
186
+ * The data to save a payment method.
187
+ */
188
+ export interface SavePaymentMethodInput extends PaymentProviderInput {
189
+ }
190
+ /**
191
+ * The data to get the payment status.
192
+ */
193
+ export interface GetPaymentStatusInput extends PaymentProviderInput {
194
+ }
87
195
  /**
88
196
  * @interface
89
197
  *
90
198
  * The response of operations on a payment.
91
199
  */
92
- export type PaymentProviderSessionResponse = {
200
+ export type PaymentProviderOutput = {
93
201
  /**
94
- * The data to be stored in the `data` field of the Payment Session to be created.
95
- * The `data` field is useful to hold any data required by the third-party provider to process the payment or retrieve its details at a later point.
202
+ * The unstructured data returned from the payment provider. The content will vary between providers.
96
203
  */
97
- data: Record<string, unknown>;
204
+ data?: Record<string, unknown>;
98
205
  };
99
206
  /**
100
- * @interface
101
- *
207
+ * The successful result of initiating a payment session using a third-party payment provider.
208
+ */
209
+ export interface InitiatePaymentOutput extends PaymentProviderOutput {
210
+ /**
211
+ * The ID of the payment session in the payment provider.
212
+ */
213
+ id: string;
214
+ /**
215
+ * The status of the payment session, which will be stored in the payment session's `status` field.
216
+ */
217
+ status?: PaymentSessionStatus;
218
+ }
219
+ /**
102
220
  * The successful result of authorizing a payment session using a payment provider.
103
221
  */
104
- export type PaymentProviderAuthorizeResponse = {
222
+ export interface AuthorizePaymentOutput extends PaymentProviderOutput {
105
223
  /**
106
224
  * The status of the payment, which will be stored in the payment session's `status` field.
107
225
  */
108
226
  status: PaymentSessionStatus;
109
- /**
110
- * The `data` to be stored in the payment session's `data` field.
111
- */
112
- data: PaymentProviderSessionResponse["data"];
113
- };
227
+ }
114
228
  /**
115
- * @interface
116
- *
117
- * The details of which payment provider to use to perform an action, and what
118
- * data to be passed to that provider.
229
+ * The result of updating a payment.
119
230
  */
120
- export type PaymentProviderDataInput = {
231
+ export interface UpdatePaymentOutput extends PaymentProviderOutput {
121
232
  /**
122
- * The ID of the provider to be used to perform an action.
233
+ * The status of the payment, which will be stored in the payment session's `status` field.
123
234
  */
124
- provider_id: string;
235
+ status?: PaymentSessionStatus;
236
+ }
237
+ /**
238
+ * The result of deleting a payment.
239
+ */
240
+ export interface DeletePaymentOutput extends PaymentProviderOutput {
241
+ }
242
+ /**
243
+ * The result of capturing the payment.
244
+ */
245
+ export interface CapturePaymentOutput extends PaymentProviderOutput {
246
+ }
247
+ /**
248
+ * The result of refunding the payment.
249
+ */
250
+ export interface RefundPaymentOutput extends PaymentProviderOutput {
251
+ }
252
+ /**
253
+ * The result of retrieving the payment.
254
+ */
255
+ export interface RetrievePaymentOutput extends PaymentProviderOutput {
256
+ }
257
+ /**
258
+ * The result of canceling the payment.
259
+ */
260
+ export interface CancelPaymentOutput extends PaymentProviderOutput {
261
+ }
262
+ /**
263
+ * The result of creating an account holder in the third-party payment provider. The `data`
264
+ * property is stored as-is in Eto's account holder's `data` property.
265
+ */
266
+ export interface CreateAccountHolderOutput extends PaymentProviderOutput {
125
267
  /**
126
- * The data to be passed to the provider.
268
+ * The ID of the account holder in the payment provider.
269
+ * This is stored in Eto's account holder in the `external_id` property.
127
270
  */
128
- data: Record<string, unknown>;
129
- };
271
+ id: string;
272
+ }
130
273
  /**
131
- * An object that is returned in case of an error.
274
+ * The result of updating an account holder in the third-party payment provider. The `data`
275
+ * property is stored as-is in Eto's account holder's `data` property.
132
276
  */
133
- export interface PaymentProviderError {
277
+ export interface UpdateAccountHolderOutput extends PaymentProviderOutput {
278
+ }
279
+ /**
280
+ * The result of deleting an account holder in the third-party payment provider.
281
+ */
282
+ export interface DeleteAccountHolderOutput extends PaymentProviderOutput {
283
+ }
284
+ /**
285
+ * The result of listing payment methods for an account holder in the third-party payment provider.
286
+ */
287
+ export interface ListPaymentMethodsOutput extends Array<PaymentProviderOutput & {
134
288
  /**
135
- * The error message
289
+ * The ID of the payment method in the payment provider.
136
290
  */
137
- error: string;
291
+ id: string;
292
+ }> {
293
+ }
294
+ /**
295
+ * The result of saving a payment method.
296
+ */
297
+ export interface SavePaymentMethodOutput extends PaymentProviderOutput {
138
298
  /**
139
- * The error code.
299
+ * The ID of the payment method in the payment provider.
140
300
  */
141
- code?: string;
301
+ id: string;
302
+ }
303
+ /**
304
+ * The result of getting the payment status.
305
+ */
306
+ export interface GetPaymentStatusOutput extends PaymentProviderOutput {
142
307
  /**
143
- * Any additional helpful details.
308
+ * The status of the payment, which will be stored in the payment session's `status` field.
144
309
  */
145
- detail?: any;
310
+ status: PaymentSessionStatus;
146
311
  }
147
312
  /**
148
313
  * @interface
@@ -151,7 +316,9 @@ export interface PaymentProviderError {
151
316
  */
152
317
  export type WebhookActionData = {
153
318
  /**
154
- * The associated payment session's ID.
319
+ * The ID of the payment session in Eto.
320
+ * Make sure to store this ID in the third-party payment provider
321
+ * to be able to retrieve the payment session later.
155
322
  */
156
323
  session_id: string;
157
324
  /**
@@ -166,7 +333,7 @@ export type WebhookActionData = {
166
333
  */
167
334
  export type WebhookActionResult = {
168
335
  /**
169
- * Normalized events from payment provider to internal payment module events.
336
+ * The action that was performed so that Eto can handle it internally.
170
337
  */
171
338
  action: PaymentActions;
172
339
  /**
@@ -181,15 +348,222 @@ export interface IPaymentProvider {
181
348
  * Return a unique identifier to retrieve the payment module provider
182
349
  */
183
350
  getIdentifier(): string;
184
- initiatePayment(data: CreatePaymentProviderSession): Promise<PaymentProviderError | PaymentProviderSessionResponse>;
185
- updatePayment(context: UpdatePaymentProviderSession): Promise<PaymentProviderError | PaymentProviderSessionResponse>;
186
- deletePayment(paymentSessionData: Record<string, unknown>): Promise<PaymentProviderError | PaymentProviderSessionResponse["data"]>;
187
- authorizePayment(paymentSessionData: Record<string, unknown>, context: Record<string, unknown>): Promise<PaymentProviderError | PaymentProviderAuthorizeResponse>;
188
- capturePayment(paymentSessionData: Record<string, unknown>): Promise<PaymentProviderError | PaymentProviderSessionResponse["data"]>;
189
- refundPayment(paymentSessionData: Record<string, unknown>, refundAmount: BigNumberInput): Promise<PaymentProviderError | PaymentProviderSessionResponse["data"]>;
190
- retrievePayment(paymentSessionData: Record<string, unknown>): Promise<PaymentProviderError | PaymentProviderSessionResponse["data"]>;
191
- cancelPayment(paymentSessionData: Record<string, unknown>): Promise<PaymentProviderError | PaymentProviderSessionResponse["data"]>;
192
- getPaymentStatus(paymentSessionData: Record<string, unknown>): Promise<PaymentSessionStatus>;
351
+ initiatePayment(data: InitiatePaymentInput): Promise<InitiatePaymentOutput>;
352
+ updatePayment(data: UpdatePaymentInput): Promise<UpdatePaymentOutput>;
353
+ deletePayment(data: DeletePaymentInput): Promise<DeletePaymentOutput>;
354
+ authorizePayment(data: AuthorizePaymentInput): Promise<AuthorizePaymentOutput>;
355
+ capturePayment(data: CapturePaymentInput): Promise<CapturePaymentOutput>;
356
+ refundPayment(data: RefundPaymentInput): Promise<RefundPaymentOutput>;
357
+ retrievePayment(data: RetrievePaymentInput): Promise<RetrievePaymentOutput>;
358
+ cancelPayment(data: CancelPaymentInput): Promise<CancelPaymentOutput>;
359
+ /**
360
+ * This method is used when creating an account holder in Eto, allowing you to create
361
+ * the equivalent account in the third-party payment provider. An account holder is useful to
362
+ * later save payment methods, such as credit cards, for a customer in the
363
+ * third-party payment provider using the {@link savePaymentMethod} method.
364
+ *
365
+ * The returned data will be stored in the account holder created in Eto. For example,
366
+ * the returned `id` property will be stored in the account holder's `external_id` property.
367
+ *
368
+ * Eto creates an account holder when a payment session initialized for a registered customer.
369
+ *
370
+ * @param data - Input data including the details of the account holder to create.
371
+ * @returns The result of creating the account holder. If an error occurs, throw it.
372
+ *
373
+ * @version 2.5.0
374
+ *
375
+ * @example
376
+ * import { EtoError } from "@etohq/framework/utils"
377
+ *
378
+ * class MyPaymentProviderService extends AbstractPaymentProvider<
379
+ * Options
380
+ * > {
381
+ * async createAccountHolder({ context, data }: CreateAccountHolderInput) {
382
+ * const { account_holder, customer } = context
383
+ *
384
+ * if (account_holder?.data?.id) {
385
+ * return { id: account_holder.data.id as string }
386
+ * }
387
+ *
388
+ * if (!customer) {
389
+ * throw new EtoError(
390
+ * EtoError.Types.INVALID_DATA,
391
+ * "Missing customer data."
392
+ * )
393
+ * }
394
+ *
395
+ * // assuming you have a client that creates the account holder
396
+ * const providerAccountHolder = await this.client.createAccountHolder({
397
+ * email: customer.email,
398
+ * ...data
399
+ * })
400
+ *
401
+ * return {
402
+ * id: providerAccountHolder.id,
403
+ * data: providerAccountHolder as unknown as Record<string, unknown>
404
+ * }
405
+ * }
406
+ */
407
+ createAccountHolder?(data: CreateAccountHolderInput): Promise<CreateAccountHolderOutput>;
408
+ /**
409
+ * This method is used when updating an account holder in Eto, allowing you to update
410
+ * the equivalent account in the third-party payment provider.
411
+ *
412
+ * The returned data will be stored in the account holder created in Eto. For example,
413
+ * the returned `id` property will be stored in the account holder's `external_id` property.
414
+ *
415
+ * @param data - Input data including the details of the account holder to update.
416
+ * @returns The result of updating the account holder. If an error occurs, throw it.
417
+ *
418
+ * @version 2.5.1
419
+ *
420
+ * @example
421
+ * import { EtoError } from "@etohq/framework/utils"
422
+ *
423
+ * class MyPaymentProviderService extends AbstractPaymentProvider<
424
+ * Options
425
+ * > {
426
+ * async updateAccountHolder({ context, data }: UpdateAccountHolderInput) {
427
+ * const { account_holder, customer } = context
428
+ *
429
+ * if (!account_holder?.data?.id) {
430
+ * throw new EtoError(
431
+ * EtoError.Types.INVALID_DATA,
432
+ * "Missing account holder ID."
433
+ * )
434
+ * }
435
+ *
436
+ * // assuming you have a client that updates the account holder
437
+ * const providerAccountHolder = await this.client.updateAccountHolder({
438
+ * id: account_holder.data.id,
439
+ * ...data
440
+ * })
441
+ *
442
+ * return {
443
+ * id: providerAccountHolder.id,
444
+ * data: providerAccountHolder as unknown as Record<string, unknown>
445
+ * }
446
+ * }
447
+ */
448
+ updateAccountHolder?(data: UpdateAccountHolderInput): Promise<UpdateAccountHolderOutput>;
449
+ /**
450
+ * This method is used when an account holder is deleted in Eto, allowing you
451
+ * to also delete the equivalent account holder in the third-party payment provider.
452
+ *
453
+ * @param data - Input data including the details of the account holder to delete.
454
+ * @returns The result of deleting the account holder. If an error occurs, throw it.
455
+ *
456
+ * @version 2.5.0
457
+ *
458
+ * @example
459
+ * import { EtoError } from "@etohq/framework/utils"
460
+ *
461
+ * class MyPaymentProviderService extends AbstractPaymentProvider<
462
+ * Options
463
+ * > {
464
+ * async deleteAccountHolder({ context }: DeleteAccountHolderInput) {
465
+ * const { account_holder } = context
466
+ * const accountHolderId = account_holder?.data?.id as string | undefined
467
+ * if (!accountHolderId) {
468
+ * throw new EtoError(
469
+ * EtoError.Types.INVALID_DATA,
470
+ * "Missing account holder ID."
471
+ * )
472
+ * }
473
+ *
474
+ * // assuming you have a client that deletes the account holder
475
+ * await this.client.deleteAccountHolder({
476
+ * id: accountHolderId
477
+ * })
478
+ *
479
+ * return {}
480
+ * }
481
+ * }
482
+ */
483
+ deleteAccountHolder?(data: DeleteAccountHolderInput): Promise<DeleteAccountHolderOutput>;
484
+ /**
485
+ * This method is used to retrieve the list of saved payment methods for an account holder
486
+ * in the third-party payment provider. A payment provider that supports saving payment methods
487
+ * must implement this method.
488
+ *
489
+ * @version 2.5.0
490
+ *
491
+ * @param data - Input data including the details of the account holder to list payment methods for.
492
+ * @returns The list of payment methods saved for the account holder. If an error occurs, throw it.
493
+ *
494
+ * @example
495
+ * import { EtoError } from "@etohq/framework/utils"
496
+ *
497
+ * class MyPaymentProviderService extends AbstractPaymentProvider<
498
+ * Options
499
+ * > {
500
+ * async listPaymentMethods({ context }: ListPaymentMethodsInput) {
501
+ * const { account_holder } = context
502
+ * const accountHolderId = account_holder?.data?.id as string | undefined
503
+ *
504
+ * if (!accountHolderId) {
505
+ * throw new EtoError(
506
+ * EtoError.Types.INVALID_DATA,
507
+ * "Missing account holder ID."
508
+ * )
509
+ * }
510
+ *
511
+ * // assuming you have a client that lists the payment methods
512
+ * const paymentMethods = await this.client.listPaymentMethods({
513
+ * customer_id: accountHolderId
514
+ * })
515
+ *
516
+ * return paymentMethods.map((pm) => ({
517
+ * id: pm.id,
518
+ * data: pm as unknown as Record<string, unknown>
519
+ * }))
520
+ * }
521
+ * }
522
+ */
523
+ listPaymentMethods?(data: ListPaymentMethodsInput): Promise<ListPaymentMethodsOutput>;
524
+ /**
525
+ * This method is used to save a customer's payment method, such as a credit card, in the
526
+ * third-party payment provider. A payment provider that supports saving payment methods
527
+ * must implement this method.
528
+ *
529
+ * @version 2.5.0
530
+ *
531
+ * @param data - The details of the payment method to save.
532
+ * @returns The result of saving the payment method. If an error occurs, throw it.
533
+ *
534
+ * @example
535
+ * import { EtoError } from "@etohq/framework/utils"
536
+ *
537
+ * class MyPaymentProviderService extends AbstractPaymentProvider<
538
+ * Options
539
+ * > {
540
+ * async savePaymentMethod({ context, data }: SavePaymentMethodInput) { *
541
+ * const accountHolderId = context?.account_holder?.data?.id as
542
+ * | string
543
+ * | undefined
544
+ *
545
+ * if (!accountHolderId) {
546
+ * throw new EtoError(
547
+ * EtoError.Types.INVALID_DATA,
548
+ * "Missing account holder ID."
549
+ * )
550
+ * }
551
+ *
552
+ * // assuming you have a client that saves the payment method
553
+ * const paymentMethod = await this.client.savePaymentMethod({
554
+ * customer_id: accountHolderId,
555
+ * ...data
556
+ * })
557
+ *
558
+ * return {
559
+ * id: paymentMethod.id,
560
+ * data: paymentMethod as unknown as Record<string, unknown>
561
+ * }
562
+ * }
563
+ * }
564
+ */
565
+ savePaymentMethod?(data: SavePaymentMethodInput): Promise<SavePaymentMethodOutput>;
566
+ getPaymentStatus(data: GetPaymentStatusInput): Promise<GetPaymentStatusOutput>;
193
567
  getWebhookActionAndData(data: ProviderWebhookPayload["payload"]): Promise<WebhookActionResult>;
194
568
  }
195
569
  //# sourceMappingURL=provider.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../src/payment/provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAC3D,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAC1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AAC/C,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAA;AAMpD;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,OAAO,CAAC,cAAc,CAAC,CAAA;AAEvD;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,OAAO,CAAC,eAAe,CAAC,CAAA;AAEzD;;GAEG;AACH,MAAM,MAAM,cAAc,GACtB,YAAY,GACZ,UAAU,GACV,QAAQ,GACR,eAAe,CAAA;AAEnB;;;;GAIG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACnC;;OAEG;IACH,eAAe,CAAC,EAAE,iBAAiB,CAAA;IAEnC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;IAEnB;;OAEG;IACH,QAAQ,CAAC,EAAE,kBAAkB,CAAA;IAE7B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAChC,CAAA;AAED;;;;;GAKG;AACH,MAAM,MAAM,4BAA4B,GAAG;IACzC;;OAEG;IACH,OAAO,EAAE,sBAAsB,CAAA;IAE/B;;OAEG;IACH,MAAM,EAAE,cAAc,CAAA;I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