@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.
- package/LICENSE +21 -0
- package/dist/analytics/index.d.ts +5 -0
- package/dist/analytics/index.d.ts.map +1 -0
- package/dist/analytics/index.js +21 -0
- package/dist/analytics/index.js.map +1 -0
- package/dist/analytics/mutations.d.ts +71 -0
- package/dist/analytics/mutations.d.ts.map +1 -0
- package/dist/{index-data/sotrage-provider.js → analytics/mutations.js} +1 -1
- package/dist/analytics/mutations.js.map +1 -0
- package/dist/analytics/provider.d.ts +41 -0
- package/dist/analytics/provider.d.ts.map +1 -0
- package/dist/analytics/provider.js +3 -0
- package/dist/analytics/provider.js.map +1 -0
- package/dist/analytics/providers/index.d.ts +3 -0
- package/dist/analytics/providers/index.d.ts.map +1 -0
- package/dist/analytics/providers/index.js +19 -0
- package/dist/analytics/providers/index.js.map +1 -0
- package/dist/analytics/providers/local.d.ts +3 -0
- package/dist/analytics/providers/local.d.ts.map +1 -0
- package/dist/analytics/providers/local.js +3 -0
- package/dist/analytics/providers/local.js.map +1 -0
- package/dist/analytics/providers/posthog.d.ts +11 -0
- package/dist/analytics/providers/posthog.d.ts.map +1 -0
- package/dist/analytics/providers/posthog.js +3 -0
- package/dist/analytics/providers/posthog.js.map +1 -0
- package/dist/analytics/service.d.ts +51 -0
- package/dist/analytics/service.d.ts.map +1 -0
- package/dist/{link-modules-sdk → analytics}/service.js.map +1 -1
- package/dist/api-key/mutations/api-key.d.ts +2 -0
- package/dist/api-key/mutations/api-key.d.ts.map +1 -1
- package/dist/auth/common/auth-identity.d.ts +1 -1
- package/dist/auth/common/auth-identity.d.ts.map +1 -1
- package/dist/auth/provider.d.ts +1 -7
- package/dist/auth/provider.d.ts.map +1 -1
- package/dist/auth/service.d.ts +50 -0
- package/dist/auth/service.d.ts.map +1 -1
- package/dist/bundles.d.ts +2 -1
- package/dist/bundles.d.ts.map +1 -1
- package/dist/bundles.js +3 -2
- package/dist/bundles.js.map +1 -1
- package/dist/cache/service.d.ts +27 -0
- package/dist/cache/service.d.ts.map +1 -1
- package/dist/cart/common.d.ts +1125 -0
- package/dist/cart/common.d.ts.map +1 -0
- package/dist/cart/common.js +3 -0
- package/dist/cart/common.js.map +1 -0
- package/dist/cart/index.d.ts +5 -0
- package/dist/cart/index.d.ts.map +1 -0
- package/dist/cart/index.js +21 -0
- package/dist/cart/index.js.map +1 -0
- package/dist/cart/mutations.d.ts +734 -0
- package/dist/cart/mutations.d.ts.map +1 -0
- package/dist/cart/mutations.js +4 -0
- package/dist/cart/mutations.js.map +1 -0
- package/dist/cart/service.d.ts +1888 -0
- package/dist/cart/service.d.ts.map +1 -0
- package/dist/cart/service.js +3 -0
- package/dist/cart/service.js.map +1 -0
- package/dist/cart/workflows.d.ts +480 -0
- package/dist/cart/workflows.d.ts.map +1 -0
- package/dist/cart/workflows.js +3 -0
- package/dist/cart/workflows.js.map +1 -0
- package/dist/common/batch.d.ts +47 -0
- package/dist/common/batch.d.ts.map +1 -1
- package/dist/common/common.d.ts +11 -1
- package/dist/common/common.d.ts.map +1 -1
- package/dist/common/config-module.d.ts +222 -63
- package/dist/common/config-module.d.ts.map +1 -1
- package/dist/common/modules.d.ts +133 -15
- package/dist/common/modules.d.ts.map +1 -1
- package/dist/dal/repository-service.d.ts +2 -2
- package/dist/dal/repository-service.d.ts.map +1 -1
- package/dist/dml/index.d.ts +8 -0
- package/dist/dml/index.d.ts.map +1 -1
- package/dist/event-bus/common.d.ts +24 -0
- package/dist/event-bus/common.d.ts.map +1 -1
- package/dist/event-bus/event-bus-module.d.ts +58 -0
- package/dist/event-bus/event-bus-module.d.ts.map +1 -1
- package/dist/file/common.d.ts +22 -2
- package/dist/file/common.d.ts.map +1 -1
- package/dist/file/mutations.d.ts +21 -3
- package/dist/file/mutations.d.ts.map +1 -1
- package/dist/file/provider.d.ts +75 -7
- package/dist/file/provider.d.ts.map +1 -1
- package/dist/file/service.d.ts +83 -11
- package/dist/file/service.d.ts.map +1 -1
- package/dist/http/auth/payloads.d.ts +3 -0
- package/dist/http/auth/payloads.d.ts.map +1 -1
- package/dist/http/common/additional_data.d.ts +9 -2
- package/dist/http/common/additional_data.d.ts.map +1 -1
- package/dist/http/common/request.d.ts +29 -6
- package/dist/http/common/request.d.ts.map +1 -1
- package/dist/http/common/response.d.ts +28 -0
- package/dist/http/common/response.d.ts.map +1 -1
- package/dist/http/currency/admin/entities.d.ts +4 -0
- package/dist/http/currency/admin/entities.d.ts.map +1 -0
- package/dist/http/currency/admin/entities.js +3 -0
- package/dist/http/currency/admin/entities.js.map +1 -0
- package/dist/http/currency/admin/index.d.ts +4 -0
- package/dist/http/currency/admin/index.d.ts.map +1 -0
- package/dist/http/currency/admin/index.js +20 -0
- package/dist/http/currency/admin/index.js.map +1 -0
- package/dist/http/currency/admin/queries.d.ts +15 -0
- package/dist/http/currency/admin/queries.d.ts.map +1 -0
- package/dist/http/currency/admin/queries.js +3 -0
- package/dist/http/currency/admin/queries.js.map +1 -0
- package/dist/http/currency/admin/responses.d.ts +16 -0
- package/dist/http/currency/admin/responses.d.ts.map +1 -0
- package/dist/http/currency/admin/responses.js +3 -0
- package/dist/http/currency/admin/responses.js.map +1 -0
- package/dist/http/currency/common.d.ts +48 -0
- package/dist/http/currency/common.d.ts.map +1 -0
- package/dist/http/currency/common.js +3 -0
- package/dist/http/currency/common.js.map +1 -0
- package/dist/http/currency/index.d.ts +2 -0
- package/dist/http/currency/index.d.ts.map +1 -0
- package/dist/http/currency/index.js +18 -0
- package/dist/http/currency/index.js.map +1 -0
- package/dist/http/encore/encore.d.ts +4 -2
- package/dist/http/encore/encore.d.ts.map +1 -1
- package/dist/http/encore/encore.js.map +1 -1
- package/dist/http/file/admin/payloads.d.ts +18 -0
- package/dist/http/file/admin/payloads.d.ts.map +1 -1
- package/dist/http/file/admin/responses.d.ts +33 -0
- package/dist/http/file/admin/responses.d.ts.map +1 -1
- package/dist/http/file/common.d.ts +17 -0
- package/dist/http/file/common.d.ts.map +1 -1
- package/dist/http/invite/admin/entities.d.ts +35 -0
- package/dist/http/invite/admin/entities.d.ts.map +1 -0
- package/dist/http/invite/admin/entities.js +3 -0
- package/dist/http/invite/admin/entities.js.map +1 -0
- package/dist/http/invite/admin/index.d.ts +5 -0
- package/dist/http/invite/admin/index.d.ts.map +1 -0
- package/dist/http/invite/admin/index.js +21 -0
- package/dist/http/invite/admin/index.js.map +1 -0
- package/dist/http/invite/admin/payloads.d.ts +25 -0
- package/dist/http/invite/admin/payloads.d.ts.map +1 -0
- package/dist/http/invite/admin/payloads.js +3 -0
- package/dist/http/invite/admin/payloads.js.map +1 -0
- package/dist/http/invite/admin/queries.d.ts +11 -0
- package/dist/http/invite/admin/queries.d.ts.map +1 -0
- package/dist/http/invite/admin/queries.js +3 -0
- package/dist/http/invite/admin/queries.js.map +1 -0
- package/dist/http/invite/admin/responses.d.ts +28 -0
- package/dist/http/invite/admin/responses.d.ts.map +1 -0
- package/dist/http/invite/admin/responses.js +3 -0
- package/dist/http/invite/admin/responses.js.map +1 -0
- package/dist/http/invite/index.d.ts +2 -0
- package/dist/http/invite/index.d.ts.map +1 -0
- package/dist/http/invite/index.js +18 -0
- package/dist/http/invite/index.js.map +1 -0
- package/dist/http/notification/admin/entities.d.ts +68 -0
- package/dist/http/notification/admin/entities.d.ts.map +1 -0
- package/dist/http/notification/admin/entities.js +3 -0
- package/dist/http/notification/admin/entities.js.map +1 -0
- package/dist/http/notification/admin/index.d.ts +4 -0
- package/dist/http/notification/admin/index.d.ts.map +1 -0
- package/dist/http/notification/admin/index.js +20 -0
- package/dist/http/notification/admin/index.js.map +1 -0
- package/dist/http/notification/admin/queries.d.ts +19 -0
- package/dist/http/notification/admin/queries.d.ts.map +1 -0
- package/dist/http/notification/admin/queries.js +3 -0
- package/dist/http/notification/admin/queries.js.map +1 -0
- package/dist/http/notification/admin/responses.d.ts +16 -0
- package/dist/http/notification/admin/responses.d.ts.map +1 -0
- package/dist/http/notification/admin/responses.js +3 -0
- package/dist/http/notification/admin/responses.js.map +1 -0
- package/dist/http/notification/index.d.ts +2 -0
- package/dist/http/notification/index.d.ts.map +1 -0
- package/dist/http/notification/index.js +18 -0
- package/dist/http/notification/index.js.map +1 -0
- package/dist/http/payment/admin/queries.d.ts +6 -0
- package/dist/http/payment/admin/queries.d.ts.map +1 -1
- package/dist/http/payment/admin/responses.d.ts +3 -0
- package/dist/http/payment/admin/responses.d.ts.map +1 -1
- package/dist/http/payment/common.d.ts +1 -21
- package/dist/http/payment/common.d.ts.map +1 -1
- package/dist/http/payment/store/payloads.d.ts +0 -5
- package/dist/http/payment/store/payloads.d.ts.map +1 -1
- package/dist/http/plugins/admin/responses.d.ts +13 -0
- package/dist/http/plugins/admin/responses.d.ts.map +1 -0
- package/dist/http/plugins/admin/responses.js +3 -0
- package/dist/http/plugins/admin/responses.js.map +1 -0
- package/dist/http/plugins/index.d.ts +2 -0
- package/dist/http/plugins/index.d.ts.map +1 -0
- package/dist/http/plugins/index.js +18 -0
- package/dist/http/plugins/index.js.map +1 -0
- package/dist/http/user/admin/entities.d.ts +27 -0
- package/dist/http/user/admin/entities.d.ts.map +1 -1
- package/dist/http/user/admin/payloads.d.ts +12 -0
- package/dist/http/user/admin/payloads.d.ts.map +1 -1
- package/dist/http/user/admin/queries.d.ts +24 -0
- package/dist/http/user/admin/queries.d.ts.map +1 -1
- package/dist/http/user/admin/responses.d.ts +6 -0
- package/dist/http/user/admin/responses.d.ts.map +1 -1
- package/dist/http/workflow-execution/admin/entities.d.ts +142 -2
- package/dist/http/workflow-execution/admin/entities.d.ts.map +1 -1
- package/dist/http/workflow-execution/admin/queries.d.ts +10 -0
- package/dist/http/workflow-execution/admin/queries.d.ts.map +1 -1
- package/dist/http/workflow-execution/admin/responses.d.ts +6 -0
- package/dist/http/workflow-execution/admin/responses.d.ts.map +1 -1
- package/dist/index-data/common.d.ts +11 -0
- package/dist/index-data/common.d.ts.map +1 -1
- package/dist/index-data/index-operator-map.d.ts +10 -10
- package/dist/index-data/index-operator-map.d.ts.map +1 -1
- package/dist/index-data/index.d.ts +1 -1
- package/dist/index-data/index.js +1 -1
- package/dist/index-data/query-config/query-input-config-fields.d.ts +3 -1
- package/dist/index-data/query-config/query-input-config-fields.d.ts.map +1 -1
- package/dist/index-data/query-config/query-input-config-filters.d.ts +1 -1
- package/dist/index-data/query-config/query-input-config-filters.d.ts.map +1 -1
- package/dist/index-data/query-config/query-input-config.d.ts +50 -6
- package/dist/index-data/query-config/query-input-config.d.ts.map +1 -1
- package/dist/index-data/{sotrage-provider.d.ts → storage-provider.d.ts} +1 -1
- package/dist/index-data/{sotrage-provider.d.ts.map → storage-provider.d.ts.map} +1 -1
- package/dist/index-data/storage-provider.js +3 -0
- package/dist/index-data/storage-provider.js.map +1 -0
- package/dist/index.d.ts +4 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/joiner/index.d.ts +3 -0
- package/dist/joiner/index.d.ts.map +1 -1
- package/dist/link-modules/index.d.ts.map +1 -0
- package/dist/link-modules/index.js.map +1 -0
- package/dist/link-modules/migrations.d.ts.map +1 -0
- package/dist/link-modules/migrations.js.map +1 -0
- package/dist/{link-modules-sdk → link-modules}/service.d.ts +1 -1
- package/dist/link-modules/service.d.ts.map +1 -0
- package/dist/link-modules/service.js +3 -0
- package/dist/link-modules/service.js.map +1 -0
- package/dist/locking/index.d.ts +466 -0
- package/dist/locking/index.d.ts.map +1 -1
- package/dist/modules-sdk/eto-internal-service.d.ts +5 -5
- package/dist/modules-sdk/eto-internal-service.d.ts.map +1 -1
- package/dist/modules-sdk/index.d.ts +25 -5
- package/dist/modules-sdk/index.d.ts.map +1 -1
- package/dist/modules-sdk/remote-query-object-from-string.d.ts +55 -4
- package/dist/modules-sdk/remote-query-object-from-string.d.ts.map +1 -1
- package/dist/modules-sdk/remote-query.d.ts +14 -0
- package/dist/modules-sdk/remote-query.d.ts.map +1 -1
- package/dist/modules-sdk/to-remote-query.d.ts +8 -2
- package/dist/modules-sdk/to-remote-query.d.ts.map +1 -1
- package/dist/notification/common.d.ts +1 -1
- package/dist/notification/common.d.ts.map +1 -1
- package/dist/notification/mutations.d.ts +10 -5
- package/dist/notification/mutations.d.ts.map +1 -1
- package/dist/notification/service.d.ts +23 -5
- package/dist/notification/service.d.ts.map +1 -1
- package/dist/payment/common.d.ts +78 -48
- package/dist/payment/common.d.ts.map +1 -1
- package/dist/payment/mutations.d.ts +73 -47
- package/dist/payment/mutations.d.ts.map +1 -1
- package/dist/payment/provider.d.ts +450 -76
- package/dist/payment/provider.d.ts.map +1 -1
- package/dist/payment/service.d.ts +351 -14
- package/dist/payment/service.d.ts.map +1 -1
- package/dist/shared-context.d.ts +8 -0
- package/dist/shared-context.d.ts.map +1 -1
- package/dist/totals/big-number.d.ts +15 -0
- package/dist/totals/big-number.d.ts.map +1 -0
- package/dist/totals/big-number.js +3 -0
- package/dist/totals/big-number.js.map +1 -0
- package/dist/totals/index.d.ts +26 -0
- package/dist/totals/index.d.ts.map +1 -0
- package/dist/totals/index.js +18 -0
- package/dist/totals/index.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/workflow/index.d.ts +1 -0
- package/dist/workflow/index.d.ts.map +1 -1
- package/dist/workflow/index.js +2 -1
- package/dist/workflow/index.js.map +1 -1
- package/dist/workflow/invite/accept-invite.d.ts +39 -0
- package/dist/workflow/invite/accept-invite.d.ts.map +1 -0
- package/dist/workflow/invite/accept-invite.js +3 -0
- package/dist/workflow/invite/accept-invite.js.map +1 -0
- package/dist/workflow/invite/create-invite.d.ts +11 -0
- package/dist/workflow/invite/create-invite.d.ts.map +1 -0
- package/dist/workflow/invite/create-invite.js +3 -0
- package/dist/workflow/invite/create-invite.js.map +1 -0
- package/dist/workflow/invite/delete-invite.d.ts +10 -0
- package/dist/workflow/invite/delete-invite.d.ts.map +1 -0
- package/dist/workflow/invite/delete-invite.js +3 -0
- package/dist/workflow/invite/delete-invite.js.map +1 -0
- package/dist/workflow/invite/index.d.ts +5 -0
- package/dist/workflow/invite/index.d.ts.map +1 -0
- package/dist/workflow/invite/index.js +21 -0
- package/dist/workflow/invite/index.js.map +1 -0
- package/dist/workflow/invite/resend-invite.d.ts +10 -0
- package/dist/workflow/invite/resend-invite.d.ts.map +1 -0
- package/dist/workflow/invite/resend-invite.js +3 -0
- package/dist/workflow/invite/resend-invite.js.map +1 -0
- package/dist/workflow/user/create-user.d.ts +6 -0
- package/dist/workflow/user/create-user.d.ts.map +1 -1
- package/dist/workflow/user/update-user.d.ts +6 -0
- package/dist/workflow/user/update-user.d.ts.map +1 -1
- package/dist/workflows-sdk/common.d.ts +6 -4
- package/dist/workflows-sdk/common.d.ts.map +1 -1
- package/dist/workflows-sdk/service.d.ts +12 -8
- package/dist/workflows-sdk/service.d.ts.map +1 -1
- package/package.json +25 -22
- package/dist/index-data/sotrage-provider.js.map +0 -1
- package/dist/link-modules-sdk/index.d.ts.map +0 -1
- package/dist/link-modules-sdk/index.js.map +0 -1
- package/dist/link-modules-sdk/migrations.d.ts.map +0 -1
- package/dist/link-modules-sdk/migrations.js.map +0 -1
- package/dist/link-modules-sdk/service.d.ts.map +0 -1
- /package/dist/{link-modules-sdk → analytics}/service.js +0 -0
- /package/dist/{link-modules-sdk → link-modules}/index.d.ts +0 -0
- /package/dist/{link-modules-sdk → link-modules}/index.js +0 -0
- /package/dist/{link-modules-sdk → link-modules}/migrations.d.ts +0 -0
- /package/dist/{link-modules-sdk → link-modules}/migrations.js +0 -0
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { BaseAddressDTO,
|
|
2
|
-
import {
|
|
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 =
|
|
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
|
|
54
|
+
* Context data provided to the payment provider
|
|
21
55
|
*/
|
|
22
56
|
export type PaymentProviderContext = {
|
|
23
57
|
/**
|
|
24
|
-
* The payment
|
|
58
|
+
* The account holder information, if available for the payment provider.
|
|
25
59
|
*/
|
|
26
|
-
|
|
60
|
+
account_holder?: PaymentAccountHolderDTO;
|
|
27
61
|
/**
|
|
28
|
-
* The
|
|
62
|
+
* The customer information from Eto.
|
|
29
63
|
*/
|
|
30
|
-
|
|
64
|
+
customer?: PaymentCustomerDTO;
|
|
31
65
|
/**
|
|
32
|
-
*
|
|
66
|
+
* Idempotency key for the request, if the payment provider supports it. It will be ignored otherwise.
|
|
33
67
|
*/
|
|
34
|
-
|
|
68
|
+
idempotency_key?: string;
|
|
69
|
+
};
|
|
70
|
+
export type PaymentProviderInput = {
|
|
35
71
|
/**
|
|
36
|
-
*
|
|
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
|
-
|
|
74
|
+
data?: Record<string, unknown>;
|
|
39
75
|
/**
|
|
40
|
-
* The
|
|
76
|
+
* The context for this payment operation. The data is guaranteed to be validated and not directly provided by the user.
|
|
41
77
|
*/
|
|
42
|
-
|
|
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
|
|
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
|
|
97
|
+
export interface UpdatePaymentInput extends PaymentProviderInput {
|
|
70
98
|
/**
|
|
71
|
-
*
|
|
99
|
+
* The payment session's amount.
|
|
72
100
|
*/
|
|
73
|
-
|
|
101
|
+
amount: BigNumberInput;
|
|
74
102
|
/**
|
|
75
|
-
* The
|
|
103
|
+
* The ISO 3 character code of the payment session.
|
|
76
104
|
*/
|
|
77
|
-
|
|
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
|
|
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
|
|
146
|
+
* The context of creating the account holder.
|
|
84
147
|
*/
|
|
85
|
-
|
|
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
|
|
200
|
+
export type PaymentProviderOutput = {
|
|
93
201
|
/**
|
|
94
|
-
* The data
|
|
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
|
|
204
|
+
data?: Record<string, unknown>;
|
|
98
205
|
};
|
|
99
206
|
/**
|
|
100
|
-
*
|
|
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
|
|
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
|
-
*
|
|
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
|
|
231
|
+
export interface UpdatePaymentOutput extends PaymentProviderOutput {
|
|
121
232
|
/**
|
|
122
|
-
* The
|
|
233
|
+
* The status of the payment, which will be stored in the payment session's `status` field.
|
|
123
234
|
*/
|
|
124
|
-
|
|
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
|
|
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
|
-
|
|
129
|
-
}
|
|
271
|
+
id: string;
|
|
272
|
+
}
|
|
130
273
|
/**
|
|
131
|
-
*
|
|
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
|
|
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
|
|
289
|
+
* The ID of the payment method in the payment provider.
|
|
136
290
|
*/
|
|
137
|
-
|
|
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
|
|
299
|
+
* The ID of the payment method in the payment provider.
|
|
140
300
|
*/
|
|
141
|
-
|
|
301
|
+
id: string;
|
|
302
|
+
}
|
|
303
|
+
/**
|
|
304
|
+
* The result of getting the payment status.
|
|
305
|
+
*/
|
|
306
|
+
export interface GetPaymentStatusOutput extends PaymentProviderOutput {
|
|
142
307
|
/**
|
|
143
|
-
*
|
|
308
|
+
* The status of the payment, which will be stored in the payment session's `status` field.
|
|
144
309
|
*/
|
|
145
|
-
|
|
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
|
|
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
|
-
*
|
|
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:
|
|
185
|
-
updatePayment(
|
|
186
|
-
deletePayment(
|
|
187
|
-
authorizePayment(
|
|
188
|
-
capturePayment(
|
|
189
|
-
refundPayment(
|
|
190
|
-
retrievePayment(
|
|
191
|
-
cancelPayment(
|
|
192
|
-
|
|
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":"
|
|
1
|
+
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../src/payment/provider.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAC1E,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AACjE,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAA;AAEpD;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,OAAO,CAAC,cAAc,CAAC,CAAA;AAEvD;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAA;IACV;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;IACb;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,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