@mercurjs/types 2.3.9-canary.3 → 2.3.9-canary.5
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/dist/http/payout.d.ts +5 -0
- package/dist/http/payout.d.ts.map +1 -1
- package/dist/modules.d.ts +2 -1
- package/dist/modules.d.ts.map +1 -1
- package/dist/modules.js +1 -0
- package/dist/payout/common.d.ts +89 -53
- package/dist/payout/common.d.ts.map +1 -1
- package/dist/payout/common.js +46 -15
- package/dist/payout/index.d.ts +1 -0
- package/dist/payout/index.d.ts.map +1 -1
- package/dist/payout/index.js +1 -0
- package/dist/payout/mutations.d.ts +56 -7
- package/dist/payout/mutations.d.ts.map +1 -1
- package/dist/payout/provider.d.ts +112 -13
- package/dist/payout/provider.d.ts.map +1 -1
- package/dist/payout/provider.js +30 -0
- package/dist/payout/service.d.ts +93 -0
- package/dist/payout/service.d.ts.map +1 -0
- package/dist/payout/service.js +2 -0
- package/package.json +1 -1
package/dist/http/payout.d.ts
CHANGED
|
@@ -15,6 +15,11 @@ export interface VendorPayoutResponse {
|
|
|
15
15
|
export type VendorPayoutListResponse = PaginatedResponse<{
|
|
16
16
|
payouts: PayoutDTO[];
|
|
17
17
|
}>;
|
|
18
|
+
export interface VendorPayoutAccountMeResponse {
|
|
19
|
+
payout_account: (PayoutAccountDTO & {
|
|
20
|
+
onboarding: OnboardingDTO | null;
|
|
21
|
+
}) | null;
|
|
22
|
+
}
|
|
18
23
|
export interface AdminPayoutResponse {
|
|
19
24
|
payout: PayoutDTO;
|
|
20
25
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payout.d.ts","sourceRoot":"","sources":["../../src/http/payout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AACnD,OAAO,
|
|
1
|
+
{"version":3,"file":"payout.d.ts","sourceRoot":"","sources":["../../src/http/payout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AACnD,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,SAAS,EACV,MAAM,WAAW,CAAA;AAElB,MAAM,WAAW,2BAA2B;IAC1C,cAAc,EAAE,gBAAgB,CAAA;CACjC;AAED,MAAM,MAAM,+BAA+B,GAAG,iBAAiB,CAAC;IAC9D,eAAe,EAAE,gBAAgB,EAAE,CAAA;CACpC,CAAC,CAAA;AAEF,MAAM,WAAW,wBAAwB;IACvC,UAAU,EAAE,aAAa,CAAA;CAC1B;AAED,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,SAAS,CAAA;CAClB;AAED,MAAM,MAAM,wBAAwB,GAAG,iBAAiB,CAAC;IACvD,OAAO,EAAE,SAAS,EAAE,CAAA;CACrB,CAAC,CAAA;AAEF,MAAM,WAAW,6BAA6B;IAC5C,cAAc,EAAE,CAAC,gBAAgB,GAAG;QAAE,UAAU,EAAE,aAAa,GAAG,IAAI,CAAA;KAAE,CAAC,GAAG,IAAI,CAAA;CACjF;AAED,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,SAAS,CAAA;CAClB;AAED,MAAM,MAAM,uBAAuB,GAAG,iBAAiB,CAAC;IACtD,OAAO,EAAE,SAAS,EAAE,CAAA;CACrB,CAAC,CAAA;AAEF,MAAM,WAAW,0BAA0B;IACzC,cAAc,EAAE,gBAAgB,CAAA;CACjC;AAED,MAAM,MAAM,8BAA8B,GAAG,iBAAiB,CAAC;IAC7D,eAAe,EAAE,gBAAgB,EAAE,CAAA;CACpC,CAAC,CAAA"}
|
package/dist/modules.d.ts
CHANGED
package/dist/modules.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modules.d.ts","sourceRoot":"","sources":["../src/modules.ts"],"names":[],"mappings":"AAAA,oBAAY,aAAa;IACrB,MAAM,WAAW;IACjB,UAAU,eAAe;IACzB,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,KAAK,UAAU;IACf,iBAAiB,sBAAsB;IACvC,YAAY,iBAAiB;IAC7B,aAAa,kBAAkB;IAC/B,SAAS,cAAc;IACvB,QAAQ,aAAa;IACrB,OAAO,YAAY;IACnB,cAAc,mBAAmB;IACjC,MAAM,WAAW;
|
|
1
|
+
{"version":3,"file":"modules.d.ts","sourceRoot":"","sources":["../src/modules.ts"],"names":[],"mappings":"AAAA,oBAAY,aAAa;IACrB,MAAM,WAAW;IACjB,UAAU,eAAe;IACzB,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,KAAK,UAAU;IACf,iBAAiB,sBAAsB;IACvC,YAAY,iBAAiB;IAC7B,aAAa,kBAAkB;IAC/B,SAAS,cAAc;IACvB,QAAQ,aAAa;IACrB,OAAO,YAAY;IACnB,cAAc,mBAAmB;IACjC,MAAM,WAAW;IACjB,SAAS,cAAc;CAC1B"}
|
package/dist/modules.js
CHANGED
|
@@ -16,4 +16,5 @@ var MercurModules;
|
|
|
16
16
|
MercurModules["CODEGEN"] = "codegen";
|
|
17
17
|
MercurModules["PROMOTION_COST"] = "promotion_cost";
|
|
18
18
|
MercurModules["REVIEW"] = "review";
|
|
19
|
+
MercurModules["TELEMETRY"] = "telemetry";
|
|
19
20
|
})(MercurModules || (exports.MercurModules = MercurModules = {}));
|
package/dist/payout/common.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BigNumberInput,
|
|
1
|
+
import { BigNumberInput, ModuleProviderExports } from "@medusajs/types";
|
|
2
2
|
export declare enum PayoutAccountStatus {
|
|
3
3
|
/**
|
|
4
4
|
* User hasn't completed setup
|
|
@@ -17,76 +17,75 @@ export declare enum PayoutAccountStatus {
|
|
|
17
17
|
*/
|
|
18
18
|
REJECTED = "rejected"
|
|
19
19
|
}
|
|
20
|
+
export declare enum PayoutKycStatus {
|
|
21
|
+
PENDING_SUBMISSION = "pending_submission",
|
|
22
|
+
PENDING_APPROVAL = "pending_approval",
|
|
23
|
+
APPROVED = "approved",
|
|
24
|
+
REFUSED = "refused"
|
|
25
|
+
}
|
|
20
26
|
export declare enum PayoutStatus {
|
|
21
27
|
PENDING = "pending",
|
|
28
|
+
ON_HOLD = "on_hold",
|
|
22
29
|
PROCESSING = "processing",
|
|
23
30
|
PAID = "paid",
|
|
24
31
|
FAILED = "failed",
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
export declare enum PayoutEvents {
|
|
28
|
-
OrderCaptureRequested = "order.capture_requested",
|
|
29
|
-
OrderAuthorizationExpired = "order.authorization_expired",
|
|
30
|
-
PayoutRequested = "payout.requested"
|
|
32
|
+
ABORTED = "aborted"
|
|
31
33
|
}
|
|
34
|
+
export declare const PayoutModuleEvents: {
|
|
35
|
+
readonly ACCOUNT_UPDATED: "payout_account.updated";
|
|
36
|
+
readonly PAYOUT_FAILED: "payout.failed";
|
|
37
|
+
readonly PAYOUT_REVERSAL_FAILED: "payout.reversal_failed";
|
|
38
|
+
readonly WEBHOOK_RECEIVED: "payout.webhook_received";
|
|
39
|
+
};
|
|
32
40
|
export interface PayoutModuleOptions {
|
|
33
|
-
/**
|
|
34
|
-
* Providers to be registered
|
|
35
|
-
*/
|
|
36
41
|
providers?: {
|
|
37
|
-
/**
|
|
38
|
-
* The module provider to be registered
|
|
39
|
-
*/
|
|
40
42
|
resolve: string | ModuleProviderExports;
|
|
41
|
-
/**
|
|
42
|
-
* The id of the provider
|
|
43
|
-
*/
|
|
44
43
|
id: string;
|
|
45
|
-
/**
|
|
46
|
-
* Key value pair of the configuration to be passed to the provider constructor
|
|
47
|
-
*/
|
|
48
44
|
options?: Record<string, unknown>;
|
|
49
45
|
}[];
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
* not_fulfilled < partially_fulfilled < fulfilled < partially_shipped < shipped < partially_delivered < delivered
|
|
78
|
-
* An order qualifies when its status is >= the configured requirement.
|
|
79
|
-
* Default: "fulfilled".
|
|
80
|
-
*/
|
|
81
|
-
requiredFulfillmentStatus?: FulfillmentStatus;
|
|
46
|
+
onboarding?: {
|
|
47
|
+
returnUrl?: string;
|
|
48
|
+
refreshBaseUrl?: string;
|
|
49
|
+
prefill?: boolean;
|
|
50
|
+
defaultCountry?: string;
|
|
51
|
+
/**
|
|
52
|
+
* How long the token in an onboarding refresh URL stays valid, in seconds.
|
|
53
|
+
* Defaults to 24 hours.
|
|
54
|
+
*/
|
|
55
|
+
tokenTtlSeconds?: number;
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
export type ResolvedPayoutModuleOptions = {
|
|
59
|
+
onboarding: {
|
|
60
|
+
returnUrl: string;
|
|
61
|
+
refreshBaseUrl: string;
|
|
62
|
+
prefill: boolean;
|
|
63
|
+
defaultCountry?: string;
|
|
64
|
+
tokenTtlSeconds: number;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
export declare function resolvePayoutModuleOptions(options?: PayoutModuleOptions | null): ResolvedPayoutModuleOptions;
|
|
68
|
+
export type PayoutWebhookAction = "not_supported" | "account.updated" | "account.activated" | "account.restricted" | "account.rejected" | "payout.paid" | "payout.failed" | "payout.reversed";
|
|
69
|
+
export interface PayoutAccountRequirements {
|
|
70
|
+
currently_due: string[];
|
|
71
|
+
past_due: string[];
|
|
72
|
+
pending_verification: string[];
|
|
82
73
|
}
|
|
83
|
-
export declare const PAYOUT_MODULE_OPTION_DEFAULTS: Required<Omit<PayoutModuleOptions, 'providers'>>;
|
|
84
|
-
export type PayoutWebhookAction = "not_supported" | "account.activated" | "account.restricted" | "account.rejected" | "payout.processing" | "payout.paid" | "payout.failed" | "payout.canceled";
|
|
85
74
|
export interface PayoutAccountDTO {
|
|
86
75
|
id: string;
|
|
76
|
+
external_id: string | null;
|
|
87
77
|
status: PayoutAccountStatus;
|
|
78
|
+
kyc_status: PayoutKycStatus | null;
|
|
79
|
+
payouts_enabled: boolean;
|
|
80
|
+
charges_enabled: boolean;
|
|
81
|
+
details_submitted: boolean;
|
|
82
|
+
disabled_reason: string | null;
|
|
83
|
+
onboarding_token: string | null;
|
|
84
|
+
onboarding_token_issued_at: Date | null;
|
|
85
|
+
last_synced_at: Date | null;
|
|
88
86
|
data: Record<string, unknown>;
|
|
89
87
|
context: Record<string, unknown> | null;
|
|
88
|
+
onboarding?: OnboardingDTO | null;
|
|
90
89
|
created_at: Date;
|
|
91
90
|
updated_at: Date;
|
|
92
91
|
}
|
|
@@ -102,11 +101,48 @@ export interface PayoutDTO {
|
|
|
102
101
|
id: string;
|
|
103
102
|
display_id: number;
|
|
104
103
|
account_id: string;
|
|
104
|
+
order_id: string | null;
|
|
105
105
|
amount: BigNumberInput;
|
|
106
106
|
currency_code: string;
|
|
107
107
|
status: PayoutStatus;
|
|
108
|
+
status_reason: string | null;
|
|
109
|
+
data: Record<string, unknown> | null;
|
|
110
|
+
metadata: Record<string, unknown> | null;
|
|
111
|
+
account?: PayoutAccountDTO;
|
|
112
|
+
reversals?: PayoutReversalDTO[];
|
|
113
|
+
created_at: Date;
|
|
114
|
+
updated_at: Date;
|
|
115
|
+
}
|
|
116
|
+
export interface PayoutReversalDTO {
|
|
117
|
+
id: string;
|
|
118
|
+
payout_id: string;
|
|
119
|
+
refund_id: string | null;
|
|
120
|
+
amount: BigNumberInput;
|
|
121
|
+
status: PayoutStatus;
|
|
122
|
+
status_reason: string | null;
|
|
108
123
|
data: Record<string, unknown> | null;
|
|
124
|
+
payout?: PayoutDTO;
|
|
109
125
|
created_at: Date;
|
|
110
126
|
updated_at: Date;
|
|
111
127
|
}
|
|
128
|
+
/**
|
|
129
|
+
* Stable codes stored in `status_reason` on payouts and payout reversals.
|
|
130
|
+
* Ids, statuses and provider messages behind a code go in `data.status_detail`.
|
|
131
|
+
*/
|
|
132
|
+
export declare const PayoutStatusReason: {
|
|
133
|
+
readonly ACCOUNT_NOT_READY: "account_not_ready";
|
|
134
|
+
readonly ACCOUNT_PAYOUTS_DISABLED: "account_payouts_disabled";
|
|
135
|
+
readonly ORDER_NOT_READY: "order_not_ready";
|
|
136
|
+
readonly ORDER_ABORTED: "order_aborted";
|
|
137
|
+
readonly PAYMENT_NOT_READY: "payment_not_ready";
|
|
138
|
+
readonly PAYMENT_FAILED: "payment_failed";
|
|
139
|
+
readonly PAYMENT_CANCELED: "payment_canceled";
|
|
140
|
+
readonly PAYMENT_REFUNDED: "payment_refunded";
|
|
141
|
+
readonly PAYOUT_NOT_READY: "payout_not_ready";
|
|
142
|
+
readonly REFUND_ABORTED: "refund_aborted";
|
|
143
|
+
readonly REFUND_ABSORBED: "refund_absorbed";
|
|
144
|
+
readonly INVALID_AMOUNT: "invalid_amount";
|
|
145
|
+
readonly PROVIDER_ERROR: "provider_error";
|
|
146
|
+
};
|
|
147
|
+
export type PayoutStatusReasonCode = (typeof PayoutStatusReason)[keyof typeof PayoutStatusReason];
|
|
112
148
|
//# sourceMappingURL=common.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/payout/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/payout/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAA;AAEvE,oBAAY,mBAAmB;IAC7B;;OAEG;IACH,OAAO,YAAY;IAEnB;;OAEG;IACH,MAAM,WAAW;IAEjB;;OAEG;IACH,UAAU,eAAe;IAEzB;;OAEG;IACH,QAAQ,aAAa;CACtB;AAED,oBA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,EAAE,cAAc,CAAA;IACtB,aAAa,EAAE,MAAM,CAAA;IACrB,MAAM,EAAE,YAAY,CAAA;IACpB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAA;IACpC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAA;IACxC,OAAO,CAAC,EAAE,gBAAgB,CAAA;IAC1B,SAAS,CAAC,EAAE,iBAAiB,EAAE,CAAA;IAC/B,UAAU,EAAE,IAAI,CAAA;IAChB,UAAU,EAAE,IAAI,CAAA;CACjB;AAED,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAA;IACV,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,MAAM,EAAE,cAAc,CAAA;IACtB,MAAM,EAAE,YAAY,CAAA;IACpB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAA;IACpC,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB,UAAU,EAAE,IAAI,CAAA;IAChB,UAAU,EAAE,IAAI,CAAA;CACjB;AAED;;;GAGG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;CAcrB,CAAA;AAEV,MAAM,MAAM,sBAAsB,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,OAAO,kBAAkB,CAAC,CAAA"}
|
package/dist/payout/common.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.PayoutStatusReason = exports.PayoutModuleEvents = exports.PayoutStatus = exports.PayoutKycStatus = exports.PayoutAccountStatus = void 0;
|
|
4
|
+
exports.resolvePayoutModuleOptions = resolvePayoutModuleOptions;
|
|
4
5
|
var PayoutAccountStatus;
|
|
5
6
|
(function (PayoutAccountStatus) {
|
|
6
7
|
/**
|
|
@@ -20,25 +21,55 @@ var PayoutAccountStatus;
|
|
|
20
21
|
*/
|
|
21
22
|
PayoutAccountStatus["REJECTED"] = "rejected";
|
|
22
23
|
})(PayoutAccountStatus || (exports.PayoutAccountStatus = PayoutAccountStatus = {}));
|
|
24
|
+
var PayoutKycStatus;
|
|
25
|
+
(function (PayoutKycStatus) {
|
|
26
|
+
PayoutKycStatus["PENDING_SUBMISSION"] = "pending_submission";
|
|
27
|
+
PayoutKycStatus["PENDING_APPROVAL"] = "pending_approval";
|
|
28
|
+
PayoutKycStatus["APPROVED"] = "approved";
|
|
29
|
+
PayoutKycStatus["REFUSED"] = "refused";
|
|
30
|
+
})(PayoutKycStatus || (exports.PayoutKycStatus = PayoutKycStatus = {}));
|
|
23
31
|
var PayoutStatus;
|
|
24
32
|
(function (PayoutStatus) {
|
|
25
33
|
PayoutStatus["PENDING"] = "pending";
|
|
34
|
+
PayoutStatus["ON_HOLD"] = "on_hold";
|
|
26
35
|
PayoutStatus["PROCESSING"] = "processing";
|
|
27
36
|
PayoutStatus["PAID"] = "paid";
|
|
28
37
|
PayoutStatus["FAILED"] = "failed";
|
|
29
|
-
PayoutStatus["
|
|
38
|
+
PayoutStatus["ABORTED"] = "aborted";
|
|
30
39
|
})(PayoutStatus || (exports.PayoutStatus = PayoutStatus = {}));
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
exports.PayoutModuleEvents = {
|
|
41
|
+
ACCOUNT_UPDATED: "payout_account.updated",
|
|
42
|
+
PAYOUT_FAILED: "payout.failed",
|
|
43
|
+
PAYOUT_REVERSAL_FAILED: "payout.reversal_failed",
|
|
44
|
+
WEBHOOK_RECEIVED: "payout.webhook_received",
|
|
45
|
+
};
|
|
46
|
+
function resolvePayoutModuleOptions(options) {
|
|
47
|
+
return {
|
|
48
|
+
onboarding: {
|
|
49
|
+
returnUrl: "",
|
|
50
|
+
refreshBaseUrl: "",
|
|
51
|
+
prefill: false,
|
|
52
|
+
tokenTtlSeconds: 24 * 60 * 60,
|
|
53
|
+
...(options?.onboarding ?? {}),
|
|
54
|
+
},
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Stable codes stored in `status_reason` on payouts and payout reversals.
|
|
59
|
+
* Ids, statuses and provider messages behind a code go in `data.status_detail`.
|
|
60
|
+
*/
|
|
61
|
+
exports.PayoutStatusReason = {
|
|
62
|
+
ACCOUNT_NOT_READY: "account_not_ready",
|
|
63
|
+
ACCOUNT_PAYOUTS_DISABLED: "account_payouts_disabled",
|
|
64
|
+
ORDER_NOT_READY: "order_not_ready",
|
|
65
|
+
ORDER_ABORTED: "order_aborted",
|
|
66
|
+
PAYMENT_NOT_READY: "payment_not_ready",
|
|
67
|
+
PAYMENT_FAILED: "payment_failed",
|
|
68
|
+
PAYMENT_CANCELED: "payment_canceled",
|
|
69
|
+
PAYMENT_REFUNDED: "payment_refunded",
|
|
70
|
+
PAYOUT_NOT_READY: "payout_not_ready",
|
|
71
|
+
REFUND_ABORTED: "refund_aborted",
|
|
72
|
+
REFUND_ABSORBED: "refund_absorbed",
|
|
73
|
+
INVALID_AMOUNT: "invalid_amount",
|
|
74
|
+
PROVIDER_ERROR: "provider_error",
|
|
44
75
|
};
|
package/dist/payout/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/payout/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,cAAc,YAAY,CAAA;AAC1B,cAAc,aAAa,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/payout/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,cAAc,YAAY,CAAA;AAC1B,cAAc,aAAa,CAAA;AAC3B,cAAc,WAAW,CAAA"}
|
package/dist/payout/index.js
CHANGED
|
@@ -1,21 +1,70 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BigNumberInput } from "@medusajs/types";
|
|
2
|
+
import { PayoutAccountStatus, PayoutKycStatus, PayoutStatus } from "./common";
|
|
2
3
|
import { PayoutProviderInput } from "./provider";
|
|
3
4
|
export interface CreatePayoutAccountDTO extends PayoutProviderInput {
|
|
5
|
+
seller?: {
|
|
6
|
+
id: string;
|
|
7
|
+
name?: string | null;
|
|
8
|
+
email?: string | null;
|
|
9
|
+
phone?: string | null;
|
|
10
|
+
website_url?: string | null;
|
|
11
|
+
country_code?: string | null;
|
|
12
|
+
is_company?: boolean;
|
|
13
|
+
};
|
|
4
14
|
}
|
|
5
15
|
export interface CreateOnboardingDTO extends PayoutProviderInput {
|
|
6
16
|
account_id: string;
|
|
17
|
+
/**
|
|
18
|
+
* Issue a new onboarding token even when the current one is still valid,
|
|
19
|
+
* so the refresh URL that was just used stops working.
|
|
20
|
+
*/
|
|
21
|
+
rotate_token?: boolean;
|
|
7
22
|
}
|
|
8
|
-
export interface
|
|
23
|
+
export interface UpdatePayoutAccountDTO {
|
|
24
|
+
id: string;
|
|
25
|
+
status?: PayoutAccountStatus;
|
|
26
|
+
kyc_status?: PayoutKycStatus | null;
|
|
27
|
+
payouts_enabled?: boolean;
|
|
28
|
+
charges_enabled?: boolean;
|
|
29
|
+
details_submitted?: boolean;
|
|
30
|
+
disabled_reason?: string | null;
|
|
31
|
+
onboarding_token?: string | null;
|
|
32
|
+
onboarding_token_issued_at?: Date | null;
|
|
33
|
+
last_synced_at?: Date | null;
|
|
34
|
+
data?: Record<string, unknown>;
|
|
35
|
+
}
|
|
36
|
+
export interface CreatePayoutDTO {
|
|
9
37
|
account_id: string;
|
|
10
|
-
amount:
|
|
38
|
+
amount: BigNumberInput;
|
|
11
39
|
currency_code: string;
|
|
40
|
+
order_id?: string | null;
|
|
41
|
+
status?: PayoutStatus;
|
|
42
|
+
status_reason?: string | null;
|
|
43
|
+
data?: Record<string, unknown> | null;
|
|
44
|
+
metadata?: Record<string, unknown> | null;
|
|
12
45
|
}
|
|
13
|
-
export interface
|
|
46
|
+
export interface UpdatePayoutDTO {
|
|
14
47
|
id: string;
|
|
15
|
-
|
|
48
|
+
account_id?: string;
|
|
49
|
+
amount?: BigNumberInput;
|
|
50
|
+
status?: PayoutStatus;
|
|
51
|
+
status_reason?: string | null;
|
|
52
|
+
data?: Record<string, unknown> | null;
|
|
53
|
+
metadata?: Record<string, unknown> | null;
|
|
16
54
|
}
|
|
17
|
-
export interface
|
|
55
|
+
export interface CreatePayoutReversalDTO {
|
|
56
|
+
payout_id: string;
|
|
57
|
+
amount: BigNumberInput;
|
|
58
|
+
refund_id?: string | null;
|
|
59
|
+
status?: PayoutStatus;
|
|
60
|
+
status_reason?: string | null;
|
|
61
|
+
data?: Record<string, unknown> | null;
|
|
62
|
+
}
|
|
63
|
+
export interface UpdatePayoutReversalDTO {
|
|
18
64
|
id: string;
|
|
19
|
-
|
|
65
|
+
amount?: BigNumberInput;
|
|
66
|
+
status?: PayoutStatus;
|
|
67
|
+
status_reason?: string | null;
|
|
68
|
+
data?: Record<string, unknown> | null;
|
|
20
69
|
}
|
|
21
70
|
//# sourceMappingURL=mutations.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mutations.d.ts","sourceRoot":"","sources":["../../src/payout/mutations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"mutations.d.ts","sourceRoot":"","sources":["../../src/payout/mutations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAChD,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,YAAY,EACb,MAA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
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { PayoutAccountStatus, PayoutStatus, PayoutWebhookAction } from "./common";
|
|
2
1
|
import { BigNumberInput } from "@medusajs/types";
|
|
2
|
+
import { PayoutAccountRequirements, PayoutAccountStatus, PayoutStatus, PayoutWebhookAction } from "./common";
|
|
3
3
|
export interface PayoutProviderContext {
|
|
4
4
|
idempotency_key?: string;
|
|
5
|
+
[key: string]: unknown;
|
|
5
6
|
}
|
|
6
7
|
export interface PayoutProviderInput {
|
|
7
8
|
context?: PayoutProviderContext;
|
|
@@ -10,23 +11,81 @@ export interface PayoutProviderInput {
|
|
|
10
11
|
export interface PayoutProviderOutput {
|
|
11
12
|
data: Record<string, unknown>;
|
|
12
13
|
}
|
|
13
|
-
export interface
|
|
14
|
+
export interface PayoutProviderAccountRef {
|
|
15
|
+
id: string;
|
|
16
|
+
data: Record<string, unknown>;
|
|
17
|
+
}
|
|
18
|
+
export interface CreateAccountInput extends PayoutProviderInput {
|
|
19
|
+
country?: string;
|
|
20
|
+
business_type?: "individual" | "company";
|
|
21
|
+
business_profile?: {
|
|
22
|
+
name?: string | null;
|
|
23
|
+
url?: string | null;
|
|
24
|
+
support_email?: string | null;
|
|
25
|
+
support_phone?: string | null;
|
|
26
|
+
};
|
|
27
|
+
metadata?: Record<string, string>;
|
|
28
|
+
}
|
|
29
|
+
export interface AccountOutput extends PayoutProviderOutput {
|
|
30
|
+
id: string;
|
|
31
|
+
status: PayoutAccountStatus;
|
|
32
|
+
payouts_enabled: boolean;
|
|
33
|
+
charges_enabled: boolean;
|
|
34
|
+
details_submitted: boolean;
|
|
35
|
+
disabled_reason: string | null;
|
|
36
|
+
requirements: PayoutAccountRequirements;
|
|
37
|
+
}
|
|
38
|
+
export interface RetrieveAccountInput extends PayoutProviderInput {
|
|
39
|
+
account: PayoutProviderAccountRef;
|
|
40
|
+
}
|
|
41
|
+
export interface ListAccountsInput extends PayoutProviderInput {
|
|
42
|
+
limit?: number;
|
|
43
|
+
starting_after?: string;
|
|
44
|
+
}
|
|
45
|
+
export interface ListAccountsOutput {
|
|
46
|
+
accounts: AccountOutput[];
|
|
47
|
+
has_more: boolean;
|
|
48
|
+
}
|
|
49
|
+
export interface CreateOnboardingInput extends PayoutProviderInput {
|
|
50
|
+
account: PayoutProviderAccountRef;
|
|
51
|
+
refresh_url: string;
|
|
52
|
+
return_url: string;
|
|
53
|
+
}
|
|
54
|
+
export interface CreateLoginLinkInput extends PayoutProviderInput {
|
|
55
|
+
account: PayoutProviderAccountRef;
|
|
14
56
|
}
|
|
15
|
-
export interface
|
|
57
|
+
export interface LinkOutput extends PayoutProviderOutput {
|
|
58
|
+
url: string;
|
|
59
|
+
expires_at?: Date | null;
|
|
60
|
+
}
|
|
61
|
+
export interface SourcePaymentRef {
|
|
16
62
|
id: string;
|
|
17
|
-
|
|
63
|
+
data: Record<string, unknown>;
|
|
18
64
|
}
|
|
19
65
|
export interface CreatePayoutInput extends PayoutProviderInput {
|
|
66
|
+
account: PayoutProviderAccountRef;
|
|
20
67
|
amount: BigNumberInput;
|
|
21
68
|
currency_code: string;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
69
|
+
/**
|
|
70
|
+
* The customer payment the funds come from, for providers that tie a
|
|
71
|
+
* payout to the charge that funded it.
|
|
72
|
+
*/
|
|
73
|
+
source_payment?: SourcePaymentRef | null;
|
|
74
|
+
group?: string | null;
|
|
75
|
+
metadata?: Record<string, string>;
|
|
26
76
|
}
|
|
27
|
-
export interface
|
|
77
|
+
export interface ReversePayoutInput extends PayoutProviderInput {
|
|
78
|
+
payout: {
|
|
79
|
+
id: string;
|
|
80
|
+
data: Record<string, unknown>;
|
|
81
|
+
};
|
|
82
|
+
amount: BigNumberInput;
|
|
83
|
+
currency_code: string;
|
|
84
|
+
metadata?: Record<string, string>;
|
|
28
85
|
}
|
|
29
|
-
export interface
|
|
86
|
+
export interface PayoutOutput extends PayoutProviderOutput {
|
|
87
|
+
id: string;
|
|
88
|
+
status: PayoutStatus;
|
|
30
89
|
}
|
|
31
90
|
export interface PayoutWebhookActionInput {
|
|
32
91
|
data: Record<string, unknown>;
|
|
@@ -36,13 +95,53 @@ export interface PayoutWebhookActionInput {
|
|
|
36
95
|
export type PayoutWebhookResult = {
|
|
37
96
|
action: PayoutWebhookAction;
|
|
38
97
|
data?: {
|
|
98
|
+
/** The provider's id of the object the event is about. */
|
|
39
99
|
id: string;
|
|
100
|
+
/** Mercur's payout id, for payout events: providers echo it from the metadata sent with the payout. */
|
|
101
|
+
payout_id?: string;
|
|
102
|
+
status_reason?: string;
|
|
40
103
|
};
|
|
41
104
|
};
|
|
105
|
+
export declare enum PayoutProviderErrorCode {
|
|
106
|
+
/**
|
|
107
|
+
* The outcome is unknown (timeout, network error, provider 5xx): the request
|
|
108
|
+
* may have gone through, so a retry reuses the same idempotency key.
|
|
109
|
+
*/
|
|
110
|
+
UNKNOWN = "unknown",
|
|
111
|
+
/**
|
|
112
|
+
* The provider rejected the request and created nothing, so a retry is sent
|
|
113
|
+
* with a new idempotency key.
|
|
114
|
+
*/
|
|
115
|
+
REFUSED = "refused",
|
|
116
|
+
/**
|
|
117
|
+
* The payout can never succeed and is aborted instead of retried.
|
|
118
|
+
*/
|
|
119
|
+
FINAL = "final"
|
|
120
|
+
}
|
|
121
|
+
export declare class PayoutProviderError extends Error {
|
|
122
|
+
readonly code: PayoutProviderErrorCode;
|
|
123
|
+
constructor(message: string, options?: {
|
|
124
|
+
code?: PayoutProviderErrorCode;
|
|
125
|
+
final?: boolean;
|
|
126
|
+
});
|
|
127
|
+
get final(): boolean;
|
|
128
|
+
}
|
|
129
|
+
export interface DeleteAccountInput extends PayoutProviderInput {
|
|
130
|
+
account: PayoutProviderAccountRef;
|
|
131
|
+
}
|
|
42
132
|
export interface IPayoutProvider {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
133
|
+
createAccount(input: CreateAccountInput): Promise<AccountOutput>;
|
|
134
|
+
retrieveAccount(input: RetrieveAccountInput): Promise<AccountOutput>;
|
|
135
|
+
/**
|
|
136
|
+
* Removes an account created by `createAccount`, used to roll back an
|
|
137
|
+
* account creation. Optional: without it the account stays at the provider.
|
|
138
|
+
*/
|
|
139
|
+
deleteAccount?(input: DeleteAccountInput): Promise<void>;
|
|
140
|
+
listAccounts?(input: ListAccountsInput): Promise<ListAccountsOutput>;
|
|
141
|
+
createOnboarding(input: CreateOnboardingInput): Promise<LinkOutput>;
|
|
142
|
+
createLoginLink?(input: CreateLoginLinkInput): Promise<LinkOutput>;
|
|
143
|
+
createPayout(input: CreatePayoutInput): Promise<PayoutOutput>;
|
|
144
|
+
reversePayout(input: ReversePayoutInput): Promise<PayoutOutput>;
|
|
46
145
|
getWebhookActionAndData(payload: PayoutWebhookActionInput): Promise<PayoutWebhookResult>;
|
|
47
146
|
}
|
|
48
147
|
//# sourceMappingURL=provider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../src/payout/provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../src/payout/provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAChD,OAAO,EACL,yBAAyB,EACzB,mBAAmB,EACnB,YAAY,EACZ,mBAAmB,EACpB,MAAM,UAAU,CAAA;AAEjB,MAAM,WAAW,qBAAqB;IACpC,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CACvB;AAED,MAAM,WAAW,mBAAmB;IAClC,OAAO,CAAC,EAAE,qBAAqB,CAAA;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAC/B;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC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,OAAO,CAAC,UAAU,CAAC,CAAA;IAClE,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAAC,YAAY,CAAC,CAAA;IAC7D,aAAa,CAAC,KAAK,EAAE,kBAAkB,GAAG,OAAO,CAAC,YAAY,CAAC,CAAA;IAC/D,uBAAuB,CAAC,OAAO,EAAE,wBAAwB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAA;CACzF"}
|
package/dist/payout/provider.js
CHANGED
|
@@ -1,2 +1,32 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PayoutProviderError = exports.PayoutProviderErrorCode = void 0;
|
|
4
|
+
var PayoutProviderErrorCode;
|
|
5
|
+
(function (PayoutProviderErrorCode) {
|
|
6
|
+
/**
|
|
7
|
+
* The outcome is unknown (timeout, network error, provider 5xx): the request
|
|
8
|
+
* may have gone through, so a retry reuses the same idempotency key.
|
|
9
|
+
*/
|
|
10
|
+
PayoutProviderErrorCode["UNKNOWN"] = "unknown";
|
|
11
|
+
/**
|
|
12
|
+
* The provider rejected the request and created nothing, so a retry is sent
|
|
13
|
+
* with a new idempotency key.
|
|
14
|
+
*/
|
|
15
|
+
PayoutProviderErrorCode["REFUSED"] = "refused";
|
|
16
|
+
/**
|
|
17
|
+
* The payout can never succeed and is aborted instead of retried.
|
|
18
|
+
*/
|
|
19
|
+
PayoutProviderErrorCode["FINAL"] = "final";
|
|
20
|
+
})(PayoutProviderErrorCode || (exports.PayoutProviderErrorCode = PayoutProviderErrorCode = {}));
|
|
21
|
+
class PayoutProviderError extends Error {
|
|
22
|
+
code;
|
|
23
|
+
constructor(message, options) {
|
|
24
|
+
super(message);
|
|
25
|
+
this.name = "PayoutProviderError";
|
|
26
|
+
this.code = options?.code ?? (options?.final ? PayoutProviderErrorCode.FINAL : PayoutProviderErrorCode.UNKNOWN);
|
|
27
|
+
}
|
|
28
|
+
get final() {
|
|
29
|
+
return this.code === PayoutProviderErrorCode.FINAL;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
exports.PayoutProviderError = PayoutProviderError;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { BaseFilterable, Context, FindConfig, IModuleService, OperatorMap } from "@medusajs/types";
|
|
2
|
+
import { OnboardingDTO, PayoutAccountDTO, PayoutAccountStatus, PayoutDTO, PayoutKycStatus, PayoutReversalDTO, PayoutStatus, ResolvedPayoutModuleOptions } from "./common";
|
|
3
|
+
import { CreateOnboardingDTO, CreatePayoutAccountDTO, CreatePayoutDTO, CreatePayoutReversalDTO, UpdatePayoutAccountDTO, UpdatePayoutDTO, UpdatePayoutReversalDTO } from "./mutations";
|
|
4
|
+
import { PayoutWebhookActionInput, PayoutWebhookResult } from "./provider";
|
|
5
|
+
export interface FilterablePayoutAccountProps extends BaseFilterable<FilterablePayoutAccountProps> {
|
|
6
|
+
id?: string | string[];
|
|
7
|
+
external_id?: string | string[];
|
|
8
|
+
status?: PayoutAccountStatus | PayoutAccountStatus[];
|
|
9
|
+
kyc_status?: PayoutKycStatus | PayoutKycStatus[];
|
|
10
|
+
payouts_enabled?: boolean;
|
|
11
|
+
onboarding_token?: string;
|
|
12
|
+
created_at?: OperatorMap<string>;
|
|
13
|
+
updated_at?: OperatorMap<string>;
|
|
14
|
+
}
|
|
15
|
+
export interface FilterableOnboardingProps extends BaseFilterable<FilterableOnboardingProps> {
|
|
16
|
+
id?: string | string[];
|
|
17
|
+
account_id?: string | string[];
|
|
18
|
+
}
|
|
19
|
+
export interface FilterablePayoutProps extends BaseFilterable<FilterablePayoutProps> {
|
|
20
|
+
id?: string | string[];
|
|
21
|
+
account_id?: string | string[];
|
|
22
|
+
order_id?: string | string[];
|
|
23
|
+
status?: PayoutStatus | PayoutStatus[];
|
|
24
|
+
created_at?: OperatorMap<string>;
|
|
25
|
+
updated_at?: OperatorMap<string>;
|
|
26
|
+
}
|
|
27
|
+
export interface FilterablePayoutReversalProps extends BaseFilterable<FilterablePayoutReversalProps> {
|
|
28
|
+
id?: string | string[];
|
|
29
|
+
payout_id?: string | string[];
|
|
30
|
+
refund_id?: string | string[];
|
|
31
|
+
status?: PayoutStatus | PayoutStatus[];
|
|
32
|
+
created_at?: OperatorMap<string>;
|
|
33
|
+
updated_at?: OperatorMap<string>;
|
|
34
|
+
}
|
|
35
|
+
export interface IPayoutModuleService extends IModuleService {
|
|
36
|
+
getOptions(): ResolvedPayoutModuleOptions;
|
|
37
|
+
retrievePayoutAccount(id: string, config?: FindConfig<PayoutAccountDTO>, sharedContext?: Context): Promise<PayoutAccountDTO>;
|
|
38
|
+
listPayoutAccounts(filters?: FilterablePayoutAccountProps, config?: FindConfig<PayoutAccountDTO>, sharedContext?: Context): Promise<PayoutAccountDTO[]>;
|
|
39
|
+
listAndCountPayoutAccounts(filters?: FilterablePayoutAccountProps, config?: FindConfig<PayoutAccountDTO>, sharedContext?: Context): Promise<[PayoutAccountDTO[], number]>;
|
|
40
|
+
/**
|
|
41
|
+
* Stores account rows without calling the provider, e.g. for an account
|
|
42
|
+
* that already exists there. Use `createPayoutAccount` to open one.
|
|
43
|
+
*/
|
|
44
|
+
createPayoutAccounts(data: Partial<PayoutAccountDTO>[], sharedContext?: Context): Promise<PayoutAccountDTO[]>;
|
|
45
|
+
createPayoutAccounts(data: Partial<PayoutAccountDTO>, sharedContext?: Context): Promise<PayoutAccountDTO>;
|
|
46
|
+
updatePayoutAccounts(data: UpdatePayoutAccountDTO[], sharedContext?: Context): Promise<PayoutAccountDTO[]>;
|
|
47
|
+
updatePayoutAccounts(data: UpdatePayoutAccountDTO, sharedContext?: Context): Promise<PayoutAccountDTO>;
|
|
48
|
+
deletePayoutAccounts(ids: string | string[], sharedContext?: Context): Promise<void>;
|
|
49
|
+
retrieveOnboarding(id: string, config?: FindConfig<OnboardingDTO>, sharedContext?: Context): Promise<OnboardingDTO>;
|
|
50
|
+
listOnboardings(filters?: FilterableOnboardingProps, config?: FindConfig<OnboardingDTO>, sharedContext?: Context): Promise<OnboardingDTO[]>;
|
|
51
|
+
retrievePayout(id: string, config?: FindConfig<PayoutDTO>, sharedContext?: Context): Promise<PayoutDTO>;
|
|
52
|
+
listPayouts(filters?: FilterablePayoutProps, config?: FindConfig<PayoutDTO>, sharedContext?: Context): Promise<PayoutDTO[]>;
|
|
53
|
+
listAndCountPayouts(filters?: FilterablePayoutProps, config?: FindConfig<PayoutDTO>, sharedContext?: Context): Promise<[PayoutDTO[], number]>;
|
|
54
|
+
createPayouts(data: CreatePayoutDTO[], sharedContext?: Context): Promise<PayoutDTO[]>;
|
|
55
|
+
createPayouts(data: CreatePayoutDTO, sharedContext?: Context): Promise<PayoutDTO>;
|
|
56
|
+
updatePayouts(data: UpdatePayoutDTO[], sharedContext?: Context): Promise<PayoutDTO[]>;
|
|
57
|
+
updatePayouts(data: UpdatePayoutDTO, sharedContext?: Context): Promise<PayoutDTO>;
|
|
58
|
+
deletePayouts(ids: string | string[], sharedContext?: Context): Promise<void>;
|
|
59
|
+
retrievePayoutReversal(id: string, config?: FindConfig<PayoutReversalDTO>, sharedContext?: Context): Promise<PayoutReversalDTO>;
|
|
60
|
+
listPayoutReversals(filters?: FilterablePayoutReversalProps, config?: FindConfig<PayoutReversalDTO>, sharedContext?: Context): Promise<PayoutReversalDTO[]>;
|
|
61
|
+
listAndCountPayoutReversals(filters?: FilterablePayoutReversalProps, config?: FindConfig<PayoutReversalDTO>, sharedContext?: Context): Promise<[PayoutReversalDTO[], number]>;
|
|
62
|
+
createPayoutReversals(data: CreatePayoutReversalDTO[], sharedContext?: Context): Promise<PayoutReversalDTO[]>;
|
|
63
|
+
createPayoutReversals(data: CreatePayoutReversalDTO, sharedContext?: Context): Promise<PayoutReversalDTO>;
|
|
64
|
+
updatePayoutReversals(data: UpdatePayoutReversalDTO[], sharedContext?: Context): Promise<PayoutReversalDTO[]>;
|
|
65
|
+
updatePayoutReversals(data: UpdatePayoutReversalDTO, sharedContext?: Context): Promise<PayoutReversalDTO>;
|
|
66
|
+
deletePayoutReversals(ids: string | string[], sharedContext?: Context): Promise<void>;
|
|
67
|
+
/**
|
|
68
|
+
* Opens the account at the provider and stores it.
|
|
69
|
+
*/
|
|
70
|
+
createPayoutAccount(data: CreatePayoutAccountDTO, sharedContext?: Context): Promise<PayoutAccountDTO>;
|
|
71
|
+
/**
|
|
72
|
+
* Pulls the account from the provider and stores its flags and KYC status.
|
|
73
|
+
*/
|
|
74
|
+
syncPayoutAccount(id: string, sharedContext?: Context): Promise<PayoutAccountDTO>;
|
|
75
|
+
/**
|
|
76
|
+
* Deletes the account at the provider, when the provider supports it, and
|
|
77
|
+
* then the stored row.
|
|
78
|
+
*/
|
|
79
|
+
deletePayoutAccount(id: string, sharedContext?: Context): Promise<void>;
|
|
80
|
+
/**
|
|
81
|
+
* Publishes the link the seller follows next: an onboarding link until the
|
|
82
|
+
* provider has their details, a dashboard login link afterwards.
|
|
83
|
+
*/
|
|
84
|
+
createOnboarding(data: CreateOnboardingDTO, sharedContext?: Context): Promise<OnboardingDTO>;
|
|
85
|
+
/**
|
|
86
|
+
* Sends a pending or failed payout to the provider. A provider error is
|
|
87
|
+
* recorded on the payout instead of thrown.
|
|
88
|
+
*/
|
|
89
|
+
processPayout(id: string, sharedContext?: Context): Promise<PayoutDTO>;
|
|
90
|
+
processPayoutReversal(id: string, sharedContext?: Context): Promise<PayoutReversalDTO>;
|
|
91
|
+
getWebhookActionAndData(data: PayoutWebhookActionInput): Promise<PayoutWebhookResult>;
|
|
92
|
+
}
|
|
93
|
+
//# sourceMappingURL=service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../src/payout/service.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,OAAO,EACP,UAAU,EACV,cAAc,EACd,WAAW,EACZ,MAAM,iBAAiB,CAAA;AAExB,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,mBAAmB,EACnB,SAAS,EACT,eAAe,E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