@mercurjs/types 2.0.0-canary.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/dist/commission/common.d.ts +127 -0
- package/dist/commission/common.d.ts.map +1 -0
- package/dist/commission/common.js +13 -0
- package/dist/commission/index.d.ts +3 -0
- package/dist/commission/index.d.ts.map +1 -0
- package/dist/commission/index.js +18 -0
- package/dist/commission/mutations.d.ts +36 -0
- package/dist/commission/mutations.d.ts.map +1 -0
- package/dist/commission/mutations.js +2 -0
- package/dist/http/campaign.d.ts +10 -0
- package/dist/http/campaign.d.ts.map +1 -0
- package/dist/http/campaign.js +2 -0
- package/dist/http/collection.d.ts +14 -0
- package/dist/http/collection.d.ts.map +1 -0
- package/dist/http/collection.js +2 -0
- package/dist/http/commission.d.ts +15 -0
- package/dist/http/commission.d.ts.map +1 -0
- package/dist/http/commission.js +2 -0
- package/dist/http/currency.d.ts +9 -0
- package/dist/http/currency.d.ts.map +1 -0
- package/dist/http/currency.js +2 -0
- package/dist/http/customer.d.ts +14 -0
- package/dist/http/customer.d.ts.map +1 -0
- package/dist/http/customer.js +2 -0
- package/dist/http/fulfillment-set.d.ts +28 -0
- package/dist/http/fulfillment-set.d.ts.map +1 -0
- package/dist/http/fulfillment-set.js +2 -0
- package/dist/http/index.d.ts +31 -0
- package/dist/http/index.d.ts.map +1 -0
- package/dist/http/index.js +47 -0
- package/dist/http/inventory-item.d.ts +25 -0
- package/dist/http/inventory-item.d.ts.map +1 -0
- package/dist/http/inventory-item.js +2 -0
- package/dist/http/order-group.d.ts +53 -0
- package/dist/http/order-group.d.ts.map +1 -0
- package/dist/http/order-group.js +2 -0
- package/dist/http/order.d.ts +32 -0
- package/dist/http/order.d.ts.map +1 -0
- package/dist/http/order.js +2 -0
- package/dist/http/payment.d.ts +20 -0
- package/dist/http/payment.d.ts.map +1 -0
- package/dist/http/payment.js +2 -0
- package/dist/http/payout.d.ts +30 -0
- package/dist/http/payout.d.ts.map +1 -0
- package/dist/http/payout.js +2 -0
- package/dist/http/price-list.d.ts +22 -0
- package/dist/http/price-list.d.ts.map +1 -0
- package/dist/http/price-list.js +2 -0
- package/dist/http/price-preference.d.ts +14 -0
- package/dist/http/price-preference.d.ts.map +1 -0
- package/dist/http/price-preference.js +2 -0
- package/dist/http/product-category.d.ts +20 -0
- package/dist/http/product-category.d.ts.map +1 -0
- package/dist/http/product-category.js +2 -0
- package/dist/http/product-tag.d.ts +14 -0
- package/dist/http/product-tag.d.ts.map +1 -0
- package/dist/http/product-tag.js +2 -0
- package/dist/http/product-type.d.ts +14 -0
- package/dist/http/product-type.d.ts.map +1 -0
- package/dist/http/product-type.js +2 -0
- package/dist/http/product.d.ts +40 -0
- package/dist/http/product.d.ts.map +1 -0
- package/dist/http/product.js +2 -0
- package/dist/http/promotion.d.ts +45 -0
- package/dist/http/promotion.d.ts.map +1 -0
- package/dist/http/promotion.js +2 -0
- package/dist/http/refund-reason.d.ts +14 -0
- package/dist/http/refund-reason.d.ts.map +1 -0
- package/dist/http/refund-reason.js +2 -0
- package/dist/http/return-reason.d.ts +14 -0
- package/dist/http/return-reason.d.ts.map +1 -0
- package/dist/http/return-reason.js +2 -0
- package/dist/http/return.d.ts +35 -0
- package/dist/http/return.d.ts.map +1 -0
- package/dist/http/return.js +2 -0
- package/dist/http/sales-channel.d.ts +14 -0
- package/dist/http/sales-channel.d.ts.map +1 -0
- package/dist/http/sales-channel.js +2 -0
- package/dist/http/seller.d.ts +34 -0
- package/dist/http/seller.d.ts.map +1 -0
- package/dist/http/seller.js +2 -0
- package/dist/http/shipping-option-type.d.ts +14 -0
- package/dist/http/shipping-option-type.d.ts.map +1 -0
- package/dist/http/shipping-option-type.js +2 -0
- package/dist/http/shipping-option.d.ts +39 -0
- package/dist/http/shipping-option.d.ts.map +1 -0
- package/dist/http/shipping-option.js +2 -0
- package/dist/http/shipping-profile.d.ts +15 -0
- package/dist/http/shipping-profile.d.ts.map +1 -0
- package/dist/http/shipping-profile.js +2 -0
- package/dist/http/stock-location.d.ts +14 -0
- package/dist/http/stock-location.d.ts.map +1 -0
- package/dist/http/stock-location.js +2 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +52 -0
- package/dist/modules.d.ts +6 -0
- package/dist/modules.d.ts.map +1 -0
- package/dist/modules.js +9 -0
- package/dist/order-group/common.d.ts +11 -0
- package/dist/order-group/common.d.ts.map +1 -0
- package/dist/order-group/common.js +2 -0
- package/dist/order-group/index.d.ts +3 -0
- package/dist/order-group/index.d.ts.map +1 -0
- package/dist/order-group/index.js +18 -0
- package/dist/order-group/mutation.d.ts +10 -0
- package/dist/order-group/mutation.d.ts.map +1 -0
- package/dist/order-group/mutation.js +2 -0
- package/dist/payout/common.d.ts +80 -0
- package/dist/payout/common.d.ts.map +1 -0
- package/dist/payout/common.js +30 -0
- package/dist/payout/index.d.ts +4 -0
- package/dist/payout/index.d.ts.map +1 -0
- package/dist/payout/index.js +19 -0
- package/dist/payout/mutations.d.ts +34 -0
- package/dist/payout/mutations.d.ts.map +1 -0
- package/dist/payout/mutations.js +2 -0
- package/dist/payout/provider.d.ts +48 -0
- package/dist/payout/provider.d.ts.map +1 -0
- package/dist/payout/provider.js +2 -0
- package/dist/seller/common.d.ts +25 -0
- package/dist/seller/common.d.ts.map +1 -0
- package/dist/seller/common.js +9 -0
- package/dist/seller/index.d.ts +3 -0
- package/dist/seller/index.d.ts.map +1 -0
- package/dist/seller/index.js +18 -0
- package/dist/seller/mutation.d.ts +33 -0
- package/dist/seller/mutation.d.ts.map +1 -0
- package/dist/seller/mutation.js +2 -0
- package/package.json +36 -0
package/dist/modules.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MercurModules = void 0;
|
|
4
|
+
var MercurModules;
|
|
5
|
+
(function (MercurModules) {
|
|
6
|
+
MercurModules["SELLER"] = "seller";
|
|
7
|
+
MercurModules["COMMISSION"] = "commission";
|
|
8
|
+
MercurModules["PAYOUT"] = "payout";
|
|
9
|
+
})(MercurModules || (exports.MercurModules = MercurModules = {}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/order-group/common.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GAAG;IAC1B,EAAE,EAAE,MAAM,CAAA;IACV,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,OAAO,EAAE,MAAM,CAAA;IACf,YAAY,EAAE,MAAM,CAAA;IACpB,KAAK,EAAE,MAAM,CAAA;IACb,UAAU,EAAE,IAAI,CAAA;IAChB,UAAU,EAAE,IAAI,CAAA;IAChB,UAAU,EAAE,IAAI,GAAG,IAAI,CAAA;CACxB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/order-group/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,cAAc,YAAY,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./common"), exports);
|
|
18
|
+
__exportStar(require("./mutation"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mutation.d.ts","sourceRoot":"","sources":["../../src/order-group/mutation.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,mBAAmB,GAAG;IAChC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,OAAO,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG;IAChC,EAAE,EAAE,MAAM,CAAA;IACV,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,CAAA"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { BigNumberInput, BigNumberRawValue, BigNumberValue } from "@medusajs/types";
|
|
2
|
+
export declare enum PayoutAccountStatus {
|
|
3
|
+
/**
|
|
4
|
+
* User hasn't completed setup
|
|
5
|
+
*/
|
|
6
|
+
PENDING = "pending",
|
|
7
|
+
/**
|
|
8
|
+
* Account is active
|
|
9
|
+
*/
|
|
10
|
+
ACTIVE = "active",
|
|
11
|
+
/**
|
|
12
|
+
* Missing info or compliance issue
|
|
13
|
+
*/
|
|
14
|
+
RESTRICTED = "restricted",
|
|
15
|
+
/**
|
|
16
|
+
* Permanently disabled
|
|
17
|
+
*/
|
|
18
|
+
REJECTED = "rejected"
|
|
19
|
+
}
|
|
20
|
+
export declare enum PayoutStatus {
|
|
21
|
+
PENDING = "pending",
|
|
22
|
+
PROCESSING = "processing",
|
|
23
|
+
PAID = "paid",
|
|
24
|
+
FAILED = "failed",
|
|
25
|
+
CANCELED = "canceled"
|
|
26
|
+
}
|
|
27
|
+
export type PayoutWebhookAction = "not_supported" | "account.activated" | "account.restricted" | "account.rejected" | "payout.processing" | "payout.paid" | "payout.failed" | "payout.canceled";
|
|
28
|
+
export interface PayoutAccountDTO {
|
|
29
|
+
id: string;
|
|
30
|
+
status: PayoutAccountStatus;
|
|
31
|
+
data: Record<string, unknown>;
|
|
32
|
+
context: Record<string, unknown> | null;
|
|
33
|
+
created_at: Date;
|
|
34
|
+
updated_at: Date;
|
|
35
|
+
}
|
|
36
|
+
export interface OnboardingDTO {
|
|
37
|
+
id: string;
|
|
38
|
+
account_id: string;
|
|
39
|
+
data: Record<string, unknown> | null;
|
|
40
|
+
context: Record<string, unknown> | null;
|
|
41
|
+
created_at: Date;
|
|
42
|
+
updated_at: Date;
|
|
43
|
+
}
|
|
44
|
+
export interface PayoutDTO {
|
|
45
|
+
id: string;
|
|
46
|
+
display_id: number;
|
|
47
|
+
account_id: string;
|
|
48
|
+
amount: BigNumberInput;
|
|
49
|
+
currency_code: string;
|
|
50
|
+
status: PayoutStatus;
|
|
51
|
+
data: Record<string, unknown> | null;
|
|
52
|
+
created_at: Date;
|
|
53
|
+
updated_at: Date;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* The payout balance totals stored in JSON
|
|
57
|
+
*/
|
|
58
|
+
export type PayoutBalanceTotals = {
|
|
59
|
+
balance: BigNumberValue;
|
|
60
|
+
raw_balance: BigNumberRawValue;
|
|
61
|
+
};
|
|
62
|
+
export interface PayoutBalanceDTO {
|
|
63
|
+
id: string;
|
|
64
|
+
account_id: string;
|
|
65
|
+
currency_code: string;
|
|
66
|
+
totals: PayoutBalanceTotals;
|
|
67
|
+
created_at: Date;
|
|
68
|
+
updated_at: Date;
|
|
69
|
+
}
|
|
70
|
+
export interface PayoutTransactionDTO {
|
|
71
|
+
id: string;
|
|
72
|
+
account_id: string;
|
|
73
|
+
amount: BigNumberInput;
|
|
74
|
+
currency_code: string;
|
|
75
|
+
reference: string | null;
|
|
76
|
+
reference_id: string | null;
|
|
77
|
+
created_at: Date;
|
|
78
|
+
updated_at: Date;
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=common.d.ts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UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,MAAM,CAAA;IAClB,MAAM,EAAE,cAAc,CAAA;IACtB,aAAa,EAAE,MAAM,CAAA;IACrB,MAAM,EAAE,YAAY,CAAA;IACpB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAA;IACpC,UAAU,EAAE,IAAI,CAAA;IAChB,UAAU,EAAE,IAAI,CAAA;CACjB;AAED;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,OAAO,EAAE,cAAc,CAAA;IACvB,WAAW,EAAE,iBAAiB,CAAA;CAC/B,CAAA;AAED,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAA;IACV,UAAU,EAAE,MAAM,CAAA;IAClB,aAAa,EAAE,MAAM,CAAA;IACrB,MAAM,EAAE,mBAAmB,CAAA;IAC3B,UAAU,EAAE,IAAI,CAAA;IAChB,UAAU,EAAE,IAAI,CAAA;CACjB;AAED,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,MAAM,CAAA;IACV,UAAU,EAAE,MAAM,CAAA;IAClB,MAAM,EAAE,cAAc,CAAA;IACtB,aAAa,EAAE,MAAM,CAAA;IACrB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,UAAU,EAAE,IAAI,CAAA;IAChB,UAAU,EAAE,IAAI,CAAA;CACjB"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PayoutStatus = exports.PayoutAccountStatus = void 0;
|
|
4
|
+
var PayoutAccountStatus;
|
|
5
|
+
(function (PayoutAccountStatus) {
|
|
6
|
+
/**
|
|
7
|
+
* User hasn't completed setup
|
|
8
|
+
*/
|
|
9
|
+
PayoutAccountStatus["PENDING"] = "pending";
|
|
10
|
+
/**
|
|
11
|
+
* Account is active
|
|
12
|
+
*/
|
|
13
|
+
PayoutAccountStatus["ACTIVE"] = "active";
|
|
14
|
+
/**
|
|
15
|
+
* Missing info or compliance issue
|
|
16
|
+
*/
|
|
17
|
+
PayoutAccountStatus["RESTRICTED"] = "restricted";
|
|
18
|
+
/**
|
|
19
|
+
* Permanently disabled
|
|
20
|
+
*/
|
|
21
|
+
PayoutAccountStatus["REJECTED"] = "rejected";
|
|
22
|
+
})(PayoutAccountStatus || (exports.PayoutAccountStatus = PayoutAccountStatus = {}));
|
|
23
|
+
var PayoutStatus;
|
|
24
|
+
(function (PayoutStatus) {
|
|
25
|
+
PayoutStatus["PENDING"] = "pending";
|
|
26
|
+
PayoutStatus["PROCESSING"] = "processing";
|
|
27
|
+
PayoutStatus["PAID"] = "paid";
|
|
28
|
+
PayoutStatus["FAILED"] = "failed";
|
|
29
|
+
PayoutStatus["CANCELED"] = "canceled";
|
|
30
|
+
})(PayoutStatus || (exports.PayoutStatus = PayoutStatus = {}));
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./common"), exports);
|
|
18
|
+
__exportStar(require("./provider"), exports);
|
|
19
|
+
__exportStar(require("./mutations"), exports);
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { PayoutAccountStatus, PayoutStatus } from "./common";
|
|
2
|
+
import { PayoutProviderInput } from "./provider";
|
|
3
|
+
import { BigNumberInput } from "@medusajs/types";
|
|
4
|
+
export interface CreatePayoutAccountDTO extends PayoutProviderInput {
|
|
5
|
+
}
|
|
6
|
+
export interface CreateOnboardingDTO extends PayoutProviderInput {
|
|
7
|
+
account_id: string;
|
|
8
|
+
}
|
|
9
|
+
export interface CreatePayoutDTO extends PayoutProviderInput {
|
|
10
|
+
account_id: string;
|
|
11
|
+
amount: number;
|
|
12
|
+
currency_code: string;
|
|
13
|
+
}
|
|
14
|
+
export interface UpdatePayoutAccountDTO {
|
|
15
|
+
id: string;
|
|
16
|
+
status: PayoutAccountStatus;
|
|
17
|
+
}
|
|
18
|
+
export interface UpdatePayoutDTO {
|
|
19
|
+
id: string;
|
|
20
|
+
status: PayoutStatus;
|
|
21
|
+
}
|
|
22
|
+
export interface CreatePayoutTransactionDTO {
|
|
23
|
+
account_id: string;
|
|
24
|
+
amount: BigNumberInput;
|
|
25
|
+
currency_code: string;
|
|
26
|
+
reference?: string;
|
|
27
|
+
reference_id?: string;
|
|
28
|
+
}
|
|
29
|
+
export interface CreatePayoutBalanceDTO {
|
|
30
|
+
account_id: string;
|
|
31
|
+
currency_code: string;
|
|
32
|
+
totals?: Record<string, unknown>;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=mutations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mutations.d.ts","sourceRoot":"","sources":["../../src/payout/mutations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAA;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAEhD,MAAM,WAAW,sBAAuB,SAAQ,mBAAmB;CAClE;AAED,MAAM,WAAW,mBAAoB,SAAQ,mBAAmB;IAC9D,UAAU,EAAE,MAAM,CAAA;CACnB;AAED,MAAM,WAAW,eAAgB,SAAQ,mBAAmB;IAC1D,UAAU,EAAE,MAAM,CAAA;IAClB,MAAM,EAAE,MAAM,CAAA;IACd,aAAa,EAAE,MAAM,CAAA;CACtB;AAED,MAAM,WAAW,sBAAsB;IACrC,EAAE,EAAE,MAAM,CAAA;IACV,MAAM,EAAE,mBAAmB,CAAA;CAC5B;AAED,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAA;IACV,MAAM,EAAE,YAAY,CAAA;CACrB;AAED,MAAM,WAAW,0BAA0B;IACzC,UAAU,EAAE,MAAM,CAAA;IAClB,MAAM,EAAE,cAAc,CAAA;IACtB,aAAa,EAAE,MAAM,CAAA;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB;AAED,MAAM,WAAW,sBAAsB;IACrC,UAAU,EAAE,MAAM,CAAA;IAClB,aAAa,EAAE,MAAM,CAAA;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACjC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { PayoutAccountStatus, PayoutStatus, PayoutWebhookAction } from "./common";
|
|
2
|
+
import { BigNumberInput } from "@medusajs/types";
|
|
3
|
+
export interface PayoutProviderContext {
|
|
4
|
+
idempotency_key?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface PayoutProviderInput {
|
|
7
|
+
context?: PayoutProviderContext;
|
|
8
|
+
data?: Record<string, unknown>;
|
|
9
|
+
}
|
|
10
|
+
export interface PayoutProviderOutput {
|
|
11
|
+
data: Record<string, unknown>;
|
|
12
|
+
}
|
|
13
|
+
export interface CreatePayoutAccountInput extends PayoutProviderInput {
|
|
14
|
+
}
|
|
15
|
+
export interface CreatePayoutAccountResponse extends PayoutProviderOutput {
|
|
16
|
+
id: string;
|
|
17
|
+
status?: PayoutAccountStatus;
|
|
18
|
+
}
|
|
19
|
+
export interface CreatePayoutInput extends PayoutProviderInput {
|
|
20
|
+
amount: BigNumberInput;
|
|
21
|
+
currency_code: string;
|
|
22
|
+
account_id: string;
|
|
23
|
+
}
|
|
24
|
+
export interface CreatePayoutResponse extends PayoutProviderOutput {
|
|
25
|
+
status?: PayoutStatus;
|
|
26
|
+
}
|
|
27
|
+
export interface CreateOnboardingInput extends PayoutProviderInput {
|
|
28
|
+
}
|
|
29
|
+
export interface CreateOnboardingResponse extends PayoutProviderOutput {
|
|
30
|
+
}
|
|
31
|
+
export interface PayoutWebhookActionInput {
|
|
32
|
+
data: Record<string, unknown>;
|
|
33
|
+
rawData: string | Buffer;
|
|
34
|
+
headers: Record<string, unknown>;
|
|
35
|
+
}
|
|
36
|
+
export type PayoutWebhookResult = {
|
|
37
|
+
action: PayoutWebhookAction;
|
|
38
|
+
data?: {
|
|
39
|
+
id: string;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
export interface IPayoutProvider {
|
|
43
|
+
createPayoutAccount(data: CreatePayoutAccountInput): Promise<CreatePayoutAccountResponse>;
|
|
44
|
+
createPayout(data: CreatePayoutInput): Promise<CreatePayoutResponse>;
|
|
45
|
+
createOnboarding(input: CreateOnboardingInput): Promise<CreateOnboardingResponse>;
|
|
46
|
+
getWebhookActionAndData(payload: PayoutWebhookActionInput): Promise<PayoutWebhookResult>;
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=provider.d.ts.map
|
|
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IAChC,MAAM,EAAE,mBAAmB,CAAC;IAC5B,IAAI,CAAC,EAAE;QAEL,EAAE,EAAE,MAAM,CAAA;KACX,CAAA;CACF,CAAA;AAED,MAAM,WAAW,eAAe;IAC9B,mBAAmB,CACjB,IAAI,EAAE,wBAAwB,GAC7B,OAAO,CAAC,2BAA2B,CAAC,CAAA;IAEvC,YAAY,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAA;IAEpE,gBAAgB,CACd,KAAK,EAAE,qBAAqB,GAC3B,OAAO,CAAC,wBAAwB,CAAC,CAAA;IAEpC,uBAAuB,CACrB,OAAO,EAAE,wBAAwB,GAChC,OAAO,CAAC,mBAAmB,CAAC,CAAA;CAChC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export declare enum SellerStatus {
|
|
2
|
+
PENDING = "pending",
|
|
3
|
+
ACTIVE = "active",
|
|
4
|
+
SUSPENDED = "suspended"
|
|
5
|
+
}
|
|
6
|
+
export type SellerDTO = {
|
|
7
|
+
id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
handle: string;
|
|
10
|
+
email: string;
|
|
11
|
+
phone: string | null;
|
|
12
|
+
logo: string | null;
|
|
13
|
+
cover_image: string | null;
|
|
14
|
+
address_1: string | null;
|
|
15
|
+
address_2: string | null;
|
|
16
|
+
city: string | null;
|
|
17
|
+
country_code: string | null;
|
|
18
|
+
province: string | null;
|
|
19
|
+
postal_code: string | null;
|
|
20
|
+
status: SellerStatus;
|
|
21
|
+
created_at: Date;
|
|
22
|
+
updated_at: Date;
|
|
23
|
+
deleted_at: Date | null;
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=common.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/seller/common.ts"],"names":[],"mappings":"AAAA,oBAAY,YAAY;IACtB,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,SAAS,cAAc;CACxB;AAED,MAAM,MAAM,SAAS,GAAG;IACtB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,MAAM,EAAE,YAAY,CAAA;IACpB,UAAU,EAAE,IAAI,CAAA;IAChB,UAAU,EAAE,IAAI,CAAA;IAChB,UAAU,EAAE,IAAI,GAAG,IAAI,CAAA;CACxB,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SellerStatus = void 0;
|
|
4
|
+
var SellerStatus;
|
|
5
|
+
(function (SellerStatus) {
|
|
6
|
+
SellerStatus["PENDING"] = "pending";
|
|
7
|
+
SellerStatus["ACTIVE"] = "active";
|
|
8
|
+
SellerStatus["SUSPENDED"] = "suspended";
|
|
9
|
+
})(SellerStatus || (exports.SellerStatus = SellerStatus = {}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/seller/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,cAAc,YAAY,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./common"), exports);
|
|
18
|
+
__exportStar(require("./mutation"), exports);
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { SellerStatus } from "./common";
|
|
2
|
+
export type CreateSellerDTO = {
|
|
3
|
+
name: string;
|
|
4
|
+
handle?: string;
|
|
5
|
+
email: string;
|
|
6
|
+
phone?: string | null;
|
|
7
|
+
logo?: string | null;
|
|
8
|
+
cover_image?: string | null;
|
|
9
|
+
address_1?: string | null;
|
|
10
|
+
address_2?: string | null;
|
|
11
|
+
city?: string | null;
|
|
12
|
+
country_code?: string | null;
|
|
13
|
+
province?: string | null;
|
|
14
|
+
postal_code?: string | null;
|
|
15
|
+
status?: SellerStatus;
|
|
16
|
+
};
|
|
17
|
+
export type UpdateSellerDTO = {
|
|
18
|
+
id: string;
|
|
19
|
+
name?: string;
|
|
20
|
+
handle?: string;
|
|
21
|
+
email?: string;
|
|
22
|
+
phone?: string | null;
|
|
23
|
+
logo?: string | null;
|
|
24
|
+
cover_image?: string | null;
|
|
25
|
+
address_1?: string | null;
|
|
26
|
+
address_2?: string | null;
|
|
27
|
+
city?: string | null;
|
|
28
|
+
country_code?: string | null;
|
|
29
|
+
province?: string | null;
|
|
30
|
+
postal_code?: string | null;
|
|
31
|
+
status?: SellerStatus;
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=mutation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mutation.d.ts","sourceRoot":"","sources":["../../src/seller/mutation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAEvC,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,MAAM,CAAC,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,MAAM,CAAC,EAAE,YAAY,CAAA;CACtB,CAAA"}
|
package/package.json
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@mercurjs/types",
|
|
3
|
+
"version": "2.0.0-canary.0",
|
|
4
|
+
"repository": {
|
|
5
|
+
"type": "git",
|
|
6
|
+
"url": "https://github.com/mercurjs/mercur",
|
|
7
|
+
"directory": "packages/types"
|
|
8
|
+
},
|
|
9
|
+
"description": "Type definitions for Mercur",
|
|
10
|
+
"author": "Mercur",
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"main": "./dist/index.js",
|
|
13
|
+
"types": "./dist/index.d.ts",
|
|
14
|
+
"files": [
|
|
15
|
+
"dist"
|
|
16
|
+
],
|
|
17
|
+
"exports": {
|
|
18
|
+
".": {
|
|
19
|
+
"types": "./dist/index.d.ts",
|
|
20
|
+
"default": "./dist/index.js"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"scripts": {
|
|
24
|
+
"build": "tsc",
|
|
25
|
+
"dev": "tsc --watch"
|
|
26
|
+
},
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"@medusajs/types": "2.13.1"
|
|
29
|
+
},
|
|
30
|
+
"devDependencies": {
|
|
31
|
+
"typescript": "5.9.3"
|
|
32
|
+
},
|
|
33
|
+
"engines": {
|
|
34
|
+
"node": ">=20"
|
|
35
|
+
}
|
|
36
|
+
}
|