@mercurjs/types 2.2.0-canary.3 → 2.2.0-canary.31
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 +17 -19
- package/dist/commission/common.d.ts.map +1 -1
- package/dist/commission/common.js +1 -6
- package/dist/commission/mutations.d.ts +10 -8
- package/dist/commission/mutations.d.ts.map +1 -1
- package/dist/http/customer.d.ts +27 -1
- package/dist/http/customer.d.ts.map +1 -1
- package/dist/http/index.d.ts +0 -2
- package/dist/http/index.d.ts.map +1 -1
- package/dist/http/index.js +0 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -3
- package/dist/modules.d.ts +3 -1
- package/dist/modules.d.ts.map +1 -1
- package/dist/modules.js +3 -1
- package/dist/offer/common.d.ts +28 -17
- package/dist/offer/common.d.ts.map +1 -1
- package/dist/offer/mutations.d.ts +6 -4
- package/dist/offer/mutations.d.ts.map +1 -1
- package/dist/product/common.d.ts +62 -38
- package/dist/product/common.d.ts.map +1 -1
- package/dist/product/common.js +16 -14
- package/dist/product/mutations.d.ts +107 -78
- package/dist/product/mutations.d.ts.map +1 -1
- package/dist/product/status.d.ts +19 -0
- package/dist/product/status.d.ts.map +1 -0
- package/dist/product/status.js +19 -0
- package/dist/seller/common.d.ts +4 -4
- package/dist/seller/common.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/http/product-brand.d.ts +0 -16
- package/dist/http/product-brand.d.ts.map +0 -1
- package/dist/http/product-brand.js +0 -2
- package/dist/http/subscription.d.ts +0 -18
- package/dist/http/subscription.d.ts.map +0 -1
- package/dist/http/subscription.js +0 -2
- package/dist/subscription/common.d.ts +0 -27
- package/dist/subscription/common.d.ts.map +0 -1
- package/dist/subscription/common.js +0 -2
- package/dist/subscription/index.d.ts +0 -3
- package/dist/subscription/index.d.ts.map +0 -1
- package/dist/subscription/index.js +0 -18
- package/dist/subscription/mutation.d.ts +0 -33
- package/dist/subscription/mutation.d.ts.map +0 -1
- package/dist/subscription/mutation.js +0 -2
|
@@ -3,10 +3,6 @@ export declare enum CommissionRateType {
|
|
|
3
3
|
FIXED = "fixed",
|
|
4
4
|
PERCENTAGE = "percentage"
|
|
5
5
|
}
|
|
6
|
-
export declare enum CommissionRateTarget {
|
|
7
|
-
ITEM = "item",
|
|
8
|
-
SHIPPING = "shipping"
|
|
9
|
-
}
|
|
10
6
|
export type CommissionRuleDTO = {
|
|
11
7
|
id: string;
|
|
12
8
|
reference: string;
|
|
@@ -16,9 +12,19 @@ export type CommissionRuleDTO = {
|
|
|
16
12
|
updated_at: Date;
|
|
17
13
|
deleted_at: Date | null;
|
|
18
14
|
};
|
|
15
|
+
export type CommissionRateValueDTO = {
|
|
16
|
+
id: string;
|
|
17
|
+
currency_code: string;
|
|
18
|
+
amount: number;
|
|
19
|
+
commission_rate_id: string;
|
|
20
|
+
created_at: Date;
|
|
21
|
+
updated_at: Date;
|
|
22
|
+
deleted_at: Date | null;
|
|
23
|
+
};
|
|
19
24
|
export type CommissionLineDTO = {
|
|
20
25
|
id: string;
|
|
21
|
-
item_id: string;
|
|
26
|
+
item_id: string | null;
|
|
27
|
+
shipping_method_id: string | null;
|
|
22
28
|
commission_rate_id: string | null;
|
|
23
29
|
code: string;
|
|
24
30
|
rate: number;
|
|
@@ -33,14 +39,14 @@ export type CommissionRateDTO = {
|
|
|
33
39
|
name: string;
|
|
34
40
|
code: string;
|
|
35
41
|
type: CommissionRateType;
|
|
36
|
-
target: CommissionRateTarget;
|
|
37
42
|
value: number;
|
|
38
43
|
currency_code: string | null;
|
|
39
|
-
min_amount: number | null;
|
|
40
44
|
include_tax: boolean;
|
|
45
|
+
include_shipping: boolean;
|
|
41
46
|
is_enabled: boolean;
|
|
42
|
-
|
|
47
|
+
is_default: boolean;
|
|
43
48
|
rules?: CommissionRuleDTO[];
|
|
49
|
+
values?: CommissionRateValueDTO[];
|
|
44
50
|
created_at: Date;
|
|
45
51
|
updated_at: Date;
|
|
46
52
|
deleted_at: Date | null;
|
|
@@ -78,7 +84,7 @@ export interface CommissionCalculationItemLine {
|
|
|
78
84
|
}
|
|
79
85
|
export interface CommissionCalculationShippingLine {
|
|
80
86
|
/**
|
|
81
|
-
* The ID of the shipping
|
|
87
|
+
* The ID of the shipping method.
|
|
82
88
|
*/
|
|
83
89
|
id: string;
|
|
84
90
|
/**
|
|
@@ -89,15 +95,6 @@ export interface CommissionCalculationShippingLine {
|
|
|
89
95
|
* The tax total of the shipping method (used when include_tax is true).
|
|
90
96
|
*/
|
|
91
97
|
tax_total?: BigNumberInput;
|
|
92
|
-
/**
|
|
93
|
-
* The shipping option type associated with the shipping method.
|
|
94
|
-
*/
|
|
95
|
-
shipping_option?: {
|
|
96
|
-
/**
|
|
97
|
-
* The ID of the shipping option type associated with the shipping method.
|
|
98
|
-
*/
|
|
99
|
-
shipping_option_type_id?: string;
|
|
100
|
-
};
|
|
101
98
|
}
|
|
102
99
|
export interface CommissionCalculationContext {
|
|
103
100
|
/**
|
|
@@ -114,7 +111,8 @@ export interface CommissionCalculationContext {
|
|
|
114
111
|
shipping_methods?: CommissionCalculationShippingLine[];
|
|
115
112
|
}
|
|
116
113
|
export interface CreateCommissionLineDTO {
|
|
117
|
-
item_id
|
|
114
|
+
item_id?: string | null;
|
|
115
|
+
shipping_method_id?: string | null;
|
|
118
116
|
commission_rate_id: string;
|
|
119
117
|
code: string;
|
|
120
118
|
rate: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/commission/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAEhD,oBAAY,kBAAkB;IAC5B,KAAK,UAAU;IACf,UAAU,eAAe;CAC1B;AAED,
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/commission/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAA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AAE,iCAAiC,EAAE,CAAA;CACvD;AAED,MAAM,WAAW,uBAAuB;IACtC,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAClC,kBAAkB,EAAE,MAAM,CAAA;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAC5B;AAED,MAAM,WAAW,uBAAwB,SAAQ,OAAO,CAAC,uBAAuB,CAAC;IAC/E,EAAE,EAAE,MAAM,CAAA;CACX"}
|
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.CommissionRateType = void 0;
|
|
4
4
|
var CommissionRateType;
|
|
5
5
|
(function (CommissionRateType) {
|
|
6
6
|
CommissionRateType["FIXED"] = "fixed";
|
|
7
7
|
CommissionRateType["PERCENTAGE"] = "percentage";
|
|
8
8
|
})(CommissionRateType || (exports.CommissionRateType = CommissionRateType = {}));
|
|
9
|
-
var CommissionRateTarget;
|
|
10
|
-
(function (CommissionRateTarget) {
|
|
11
|
-
CommissionRateTarget["ITEM"] = "item";
|
|
12
|
-
CommissionRateTarget["SHIPPING"] = "shipping";
|
|
13
|
-
})(CommissionRateTarget || (exports.CommissionRateTarget = CommissionRateTarget = {}));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CommissionRateType
|
|
1
|
+
import { CommissionRateType } from "./common";
|
|
2
2
|
export interface CreateCommissionRuleDTO {
|
|
3
3
|
reference: string;
|
|
4
4
|
reference_id: string;
|
|
@@ -8,29 +8,31 @@ export interface UpdateCommissionRuleDTO {
|
|
|
8
8
|
reference?: string;
|
|
9
9
|
reference_id?: string;
|
|
10
10
|
}
|
|
11
|
+
export interface CreateCommissionRateValueDTO {
|
|
12
|
+
currency_code: string;
|
|
13
|
+
amount: number;
|
|
14
|
+
}
|
|
11
15
|
export interface CreateCommissionRateDTO {
|
|
12
16
|
name: string;
|
|
13
|
-
code
|
|
17
|
+
code?: string;
|
|
14
18
|
type: CommissionRateType;
|
|
15
|
-
target?: CommissionRateTarget;
|
|
16
19
|
value: number;
|
|
17
20
|
currency_code?: string | null;
|
|
18
|
-
min_amount?: number | null;
|
|
19
21
|
include_tax?: boolean;
|
|
22
|
+
include_shipping?: boolean;
|
|
20
23
|
is_enabled?: boolean;
|
|
21
|
-
|
|
24
|
+
is_default?: boolean;
|
|
22
25
|
}
|
|
23
26
|
export interface UpdateCommissionRateDTO {
|
|
24
27
|
id: string;
|
|
25
28
|
name?: string;
|
|
26
29
|
code?: string;
|
|
27
30
|
type?: CommissionRateType;
|
|
28
|
-
target?: CommissionRateTarget;
|
|
29
31
|
value?: number;
|
|
30
32
|
currency_code?: string | null;
|
|
31
|
-
min_amount?: number | null;
|
|
32
33
|
include_tax?: boolean;
|
|
34
|
+
include_shipping?: boolean;
|
|
33
35
|
is_enabled?: boolean;
|
|
34
|
-
|
|
36
|
+
is_default?: boolean;
|
|
35
37
|
}
|
|
36
38
|
//# sourceMappingURL=mutations.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mutations.d.ts","sourceRoot":"","sources":["../../src/commission/mutations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,
|
|
1
|
+
{"version":3,"file":"mutations.d.ts","sourceRoot":"","sources":["../../src/commission/mutations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAE7C,MAAM,WAAW,uBAAuB;IACtC,SAAS,EAAE,MAAM,CAAA;IACjB,YAAY,EAAE,MAAM,CAAA;CACrB;AAED,MAAM,WAAW,uBAAuB;IACtC,EAAE,EAAE,MAAM,CAAA;IACV,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB;AAED,MAAM,WAAW,4BAA4B;IAC3C,aAAa,EAAE,MAAM,CAAA;IACrB,MAAM,EAAE,MAAM,CAAA;CACf;AAOD,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,MAAM,CAAA;IAGZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,kBAAkB,CAAA;IACxB,KAAK,EAAE,MAAM,CAAA;IACb,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB;AAED,MAAM,WAAW,uBAAuB;IACtC,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,kBAAkB,CAAA;IACzB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB"}
|
package/dist/http/customer.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CustomerDTO, PaginatedResponse } from "@medusajs/types";
|
|
1
|
+
import { CustomerDTO, CustomerGroupDTO, PaginatedResponse } from "@medusajs/types";
|
|
2
2
|
export interface VendorCustomerResponse {
|
|
3
3
|
/**
|
|
4
4
|
* The customer's details.
|
|
@@ -11,4 +11,30 @@ export type VendorCustomerListResponse = PaginatedResponse<{
|
|
|
11
11
|
*/
|
|
12
12
|
customers: CustomerDTO[];
|
|
13
13
|
}>;
|
|
14
|
+
export interface VendorCustomerGroupResponse {
|
|
15
|
+
/**
|
|
16
|
+
* The customer group's details.
|
|
17
|
+
*/
|
|
18
|
+
customer_group: CustomerGroupDTO;
|
|
19
|
+
}
|
|
20
|
+
export type VendorCustomerGroupListResponse = PaginatedResponse<{
|
|
21
|
+
/**
|
|
22
|
+
* The list of customer groups.
|
|
23
|
+
*/
|
|
24
|
+
customer_groups: CustomerGroupDTO[];
|
|
25
|
+
}>;
|
|
26
|
+
export interface VendorCustomerGroupDeleteResponse {
|
|
27
|
+
/**
|
|
28
|
+
* The ID of the deleted customer group.
|
|
29
|
+
*/
|
|
30
|
+
id: string;
|
|
31
|
+
/**
|
|
32
|
+
* The type of the deleted object.
|
|
33
|
+
*/
|
|
34
|
+
object: "customer_group";
|
|
35
|
+
/**
|
|
36
|
+
* Whether the customer group was deleted.
|
|
37
|
+
*/
|
|
38
|
+
deleted: boolean;
|
|
39
|
+
}
|
|
14
40
|
//# sourceMappingURL=customer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customer.d.ts","sourceRoot":"","sources":["../../src/http/customer.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"customer.d.ts","sourceRoot":"","sources":["../../src/http/customer.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,gBAAgB,EAChB,iBAAiB,EAClB,MAAM,iBAAiB,CAAA;AAExB,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,QAAQ,EAAE,WAAW,CAAA;CACtB;AAED,MAAM,MAAM,0BAA0B,GAAG,iBAAiB,CAAC;IACzD;;OAEG;IACH,SAAS,EAAE,WAAW,EAAE,CAAA;CACzB,CAAC,CAAA;AAEF,MAAM,WAAW,2BAA2B;IAC1C;;OAEG;IACH,cAAc,EAAE,gBAAgB,CAAA;CACjC;AAED,MAAM,MAAM,+BAA+B,GAAG,iBAAiB,CAAC;IAC9D;;OAEG;IACH,eAAe,EAAE,gBAAgB,EAAE,CAAA;CACpC,CAAC,CAAA;AAEF,MAAM,WAAW,iCAAiC;IAChD;;OAEG;IACH,EAAE,EAAE,MAAM,CAAA;IACV;;OAEG;IACH,MAAM,EAAE,gBAAgB,CAAA;IACxB;;OAEG;IACH,OAAO,EAAE,OAAO,CAAA;CACjB"}
|
package/dist/http/index.d.ts
CHANGED
|
@@ -15,7 +15,6 @@ export * from "./price-preference";
|
|
|
15
15
|
export * from "./product";
|
|
16
16
|
export * from "./promotion";
|
|
17
17
|
export * from "./product-attribute";
|
|
18
|
-
export * from "./product-brand";
|
|
19
18
|
export * from "./product-category";
|
|
20
19
|
export * from "./product-tag";
|
|
21
20
|
export * from "./product-type";
|
|
@@ -30,7 +29,6 @@ export * from "./stock-location";
|
|
|
30
29
|
export * from "./payout";
|
|
31
30
|
export * from "./offer";
|
|
32
31
|
export * from "./commission";
|
|
33
|
-
export * from "./subscription";
|
|
34
32
|
export { AdminProductResponse, AdminProductListResponse, AdminProductDeleteResponse, AdminProductVariantResponse, AdminProductVariantListResponse, } from "./product";
|
|
35
33
|
export { AdminProductCategoryResponse, AdminProductCategoryListResponse, AdminProductCategoryDeleteResponse, } from "./product-category";
|
|
36
34
|
export { StoreCompleteCartResponse } from "./order-group";
|
package/dist/http/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/http/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,IAAI,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAE9D,cAAc,2BAA2B,CAAA;AACzC,cAAc,YAAY,CAAA;AAC1B,cAAc,cAAc,CAAA;AAC5B,cAAc,YAAY,CAAA;AAC1B,cAAc,YAAY,CAAA;AAC1B,cAAc,mBAAmB,CAAA;AACjC,cAAc,kBAAkB,CAAA;AAChC,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,eAAe,CAAA;AA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CAAkC,GACnC,MAAM,oBAAoB,CAAA;AAE3B,OAAO,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAA"}
|
package/dist/http/index.js
CHANGED
|
@@ -33,7 +33,6 @@ __exportStar(require("./price-preference"), exports);
|
|
|
33
33
|
__exportStar(require("./product"), exports);
|
|
34
34
|
__exportStar(require("./promotion"), exports);
|
|
35
35
|
__exportStar(require("./product-attribute"), exports);
|
|
36
|
-
__exportStar(require("./product-brand"), exports);
|
|
37
36
|
__exportStar(require("./product-category"), exports);
|
|
38
37
|
__exportStar(require("./product-tag"), exports);
|
|
39
38
|
__exportStar(require("./product-type"), exports);
|
|
@@ -48,4 +47,3 @@ __exportStar(require("./stock-location"), exports);
|
|
|
48
47
|
__exportStar(require("./payout"), exports);
|
|
49
48
|
__exportStar(require("./offer"), exports);
|
|
50
49
|
__exportStar(require("./commission"), exports);
|
|
51
|
-
__exportStar(require("./subscription"), exports);
|
package/dist/index.d.ts
CHANGED
|
@@ -3,10 +3,10 @@ export * from "./seller";
|
|
|
3
3
|
export * from "./order-group";
|
|
4
4
|
export * from "./commission";
|
|
5
5
|
export * as HttpTypes from "./http";
|
|
6
|
-
export * from "./subscription";
|
|
7
6
|
export * from "./payout";
|
|
8
7
|
export * from "./offer";
|
|
9
|
-
export { ProductStatus
|
|
8
|
+
export { ProductStatus } from "./product/status";
|
|
9
|
+
export { AttributeType, ProductChangeStatus, ProductChangeActionType, type ProductDTO, type ProductVariantDTO, type ProductCategoryDTO, type ProductAttributeDTO, type ProductAttributeValueDTO, type WrappedProductAttributeDTO, type WrappedProductAttributeValueDTO, type ProductChangeDTO, type ProductChangeActionDTO, type CreateProductDTO, type CreateProductAttributeDTO, type UpdateProductAttributeDTO, type CreateProductAttributeValueDTO, type UpdateProductAttributeValueDTO, type UpsertProductAttributeValueDTO, type ProductAttributeBatchAdd, type ProductAttributeBatchUpdate, type ProductAttributeBatchInput, type CreateProductChangeDTO, type CreateProductChangeActionDTO, } from "./product";
|
|
10
10
|
export * from "./modules";
|
|
11
11
|
export * from "./custom-fields";
|
|
12
12
|
export * from "./dashboard";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAG/B,cAAc,UAAU,CAAA;AAGxB,cAAc,eAAe,CAAA;AAG7B,cAAc,cAAc,CAAA;AAG5B,OAAO,KAAK,SAAS,MAAM,QAAQ,CAAA;AAGnC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAG/B,cAAc,UAAU,CAAA;AAGxB,cAAc,eAAe,CAAA;AAG7B,cAAc,cAAc,CAAA;AAG5B,OAAO,KAAK,SAAS,MAAM,QAAQ,CAAA;AAGnC,cAAc,UAAU,CAAA;AAGxB,cAAc,SAAS,CAAA;AAavB,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAChD,OAAO,EACL,aAAa,EACb,mBAAmB,EACnB,uBAAuB,EACvB,KAAK,UAAU,EACf,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,wBAAwB,EAC7B,KAAK,0BAA0B,EAC/B,KAAK,+BAA+B,EACpC,KAAK,gBAAgB,EACrB,KAAK,sBAAsB,EAC3B,KAAK,gBAAgB,EACrB,KAAK,yBAAyB,EAC9B,KAAK,yBAAyB,EAC9B,KAAK,8BAA8B,EACnC,KAAK,8BAA8B,EACnC,KAAK,8BAA8B,EACnC,KAAK,wBAAwB,EAC7B,KAAK,2BAA2B,EAChC,KAAK,0BAA0B,EAC/B,KAAK,sBAAsB,EAC3B,KAAK,4BAA4B,GAClC,MAAM,WAAW,CAAA;AAGlB,cAAc,WAAW,CAAA;AAGzB,cAAc,iBAAiB,CAAA;AAG/B,cAAc,aAAa,CAAA;AAG3B,cAAc,iBAAiB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -46,8 +46,6 @@ __exportStar(require("./order-group"), exports);
|
|
|
46
46
|
__exportStar(require("./commission"), exports);
|
|
47
47
|
// HTTP types
|
|
48
48
|
exports.HttpTypes = __importStar(require("./http"));
|
|
49
|
-
// Subscription types
|
|
50
|
-
__exportStar(require("./subscription"), exports);
|
|
51
49
|
// Payout types
|
|
52
50
|
__exportStar(require("./payout"), exports);
|
|
53
51
|
// Offer types
|
|
@@ -58,8 +56,14 @@ __exportStar(require("./offer"), exports);
|
|
|
58
56
|
// Types upstream declares verbatim (ProductImageDTO, ProductTypeDTO,
|
|
59
57
|
// ProductTagDTO, ProductCollectionDTO, etc.) come through the wholesale
|
|
60
58
|
// re-export unchanged.
|
|
59
|
+
// `ProductStatus` is Medusa's `"draft" | "proposed" | "published" |
|
|
60
|
+
// "rejected"` union. The matching runtime const is co-exported so
|
|
61
|
+
// consumers can keep doing `ProductStatus.PUBLISHED`-style access.
|
|
62
|
+
// `requires_action` is no longer a product status — it's a computed
|
|
63
|
+
// boolean derived from `ProductChange`.
|
|
64
|
+
var status_1 = require("./product/status");
|
|
65
|
+
Object.defineProperty(exports, "ProductStatus", { enumerable: true, get: function () { return status_1.ProductStatus; } });
|
|
61
66
|
var product_1 = require("./product");
|
|
62
|
-
Object.defineProperty(exports, "ProductStatus", { enumerable: true, get: function () { return product_1.ProductStatus; } });
|
|
63
67
|
Object.defineProperty(exports, "AttributeType", { enumerable: true, get: function () { return product_1.AttributeType; } });
|
|
64
68
|
Object.defineProperty(exports, "ProductChangeStatus", { enumerable: true, get: function () { return product_1.ProductChangeStatus; } });
|
|
65
69
|
Object.defineProperty(exports, "ProductChangeActionType", { enumerable: true, get: function () { return product_1.ProductChangeActionType; } });
|
package/dist/modules.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
export declare enum MercurModules {
|
|
2
2
|
SELLER = "seller",
|
|
3
|
-
SUBSCRIPTION = "subscription",
|
|
4
3
|
COMMISSION = "commission",
|
|
5
4
|
PAYOUT = "payout",
|
|
6
5
|
OFFER = "offer",
|
|
6
|
+
MEDIA = "media",
|
|
7
|
+
PRODUCT_ATTRIBUTE = "product_attribute",
|
|
8
|
+
PRODUCT_EDIT = "product_edit",
|
|
7
9
|
CUSTOM_FIELDS = "custom_fields",
|
|
8
10
|
VENDOR_UI = "vendor_ui",
|
|
9
11
|
ADMIN_UI = "admin_ui",
|
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,
|
|
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;CACtB"}
|
package/dist/modules.js
CHANGED
|
@@ -4,10 +4,12 @@ exports.MercurModules = void 0;
|
|
|
4
4
|
var MercurModules;
|
|
5
5
|
(function (MercurModules) {
|
|
6
6
|
MercurModules["SELLER"] = "seller";
|
|
7
|
-
MercurModules["SUBSCRIPTION"] = "subscription";
|
|
8
7
|
MercurModules["COMMISSION"] = "commission";
|
|
9
8
|
MercurModules["PAYOUT"] = "payout";
|
|
10
9
|
MercurModules["OFFER"] = "offer";
|
|
10
|
+
MercurModules["MEDIA"] = "media";
|
|
11
|
+
MercurModules["PRODUCT_ATTRIBUTE"] = "product_attribute";
|
|
12
|
+
MercurModules["PRODUCT_EDIT"] = "product_edit";
|
|
11
13
|
MercurModules["CUSTOM_FIELDS"] = "custom_fields";
|
|
12
14
|
MercurModules["VENDOR_UI"] = "vendor_ui";
|
|
13
15
|
MercurModules["ADMIN_UI"] = "admin_ui";
|
package/dist/offer/common.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { InventoryItemDTO, MoneyAmountDTO,
|
|
1
|
+
import { InventoryItemDTO, MoneyAmountDTO, ShippingProfileDTO } from "@medusajs/types";
|
|
2
|
+
import { ProductVariantDTO } from "../product/common";
|
|
3
|
+
import { SellerDTO } from "../seller/common";
|
|
2
4
|
/**
|
|
3
5
|
* One row on the offer's inventory-item link, resolved through the writable
|
|
4
6
|
* `offer ↔ inventory_item` link defined in
|
|
@@ -13,29 +15,30 @@ export interface OfferInventoryItemLinkDTO {
|
|
|
13
15
|
inventory?: InventoryItemDTO;
|
|
14
16
|
}
|
|
15
17
|
/**
|
|
16
|
-
* One row on the offer's price ladder, surfaced through the
|
|
17
|
-
* `offer ↔
|
|
18
|
-
* `packages/core/src/links/offer-price-
|
|
19
|
-
* `PriceSet`,
|
|
20
|
-
*
|
|
18
|
+
* One row on the offer's price ladder, surfaced through the writable
|
|
19
|
+
* `offer ↔ price` list-link in
|
|
20
|
+
* `packages/core/src/links/offer-price-link.ts`. The offer's prices live on
|
|
21
|
+
* the master variant's shared `PriceSet`, scoped by an `offer_id` `PriceRule`
|
|
22
|
+
* on each row — but the offer-side reads go through the list-link pivot so
|
|
23
|
+
* `offer.prices: Price[]` resolves in a single Query traversal.
|
|
21
24
|
*/
|
|
22
25
|
export type OfferPriceDTO = MoneyAmountDTO;
|
|
23
26
|
/**
|
|
24
27
|
* The marketplace's per-vendor sellable. An offer is the thin marketplace-side
|
|
25
|
-
* record that points at a Medusa `ProductVariant
|
|
26
|
-
* and links to one or more Medusa `InventoryItem` rows. The base
|
|
27
|
-
* (`seller_id`, `variant_id`, `shipping_profile_id`, `
|
|
28
|
-
* `
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
28
|
+
* record that points at a Medusa `ProductVariant` (which owns the shared
|
|
29
|
+
* `PriceSet`) and links to one or more Medusa `InventoryItem` rows. The base
|
|
30
|
+
* columns (`seller_id`, `variant_id`, `shipping_profile_id`, `sku`, `ean`,
|
|
31
|
+
* `upc`, `created_by`, `metadata`) live on the `offer` table; the optional
|
|
32
|
+
* `variant` / `seller` / `shipping_profile` / `prices` / `inventory_items`
|
|
33
|
+
* relations are joined through module links and only present when the
|
|
34
|
+
* consumer requested those fields.
|
|
32
35
|
*/
|
|
33
36
|
export interface OfferDTO {
|
|
34
37
|
id: string;
|
|
35
38
|
seller_id: string;
|
|
36
39
|
variant_id: string;
|
|
40
|
+
product_id: string;
|
|
37
41
|
shipping_profile_id: string;
|
|
38
|
-
price_set_id: string;
|
|
39
42
|
sku: string;
|
|
40
43
|
ean: string | null;
|
|
41
44
|
upc: string | null;
|
|
@@ -45,15 +48,23 @@ export interface OfferDTO {
|
|
|
45
48
|
updated_at: Date;
|
|
46
49
|
deleted_at: Date | null;
|
|
47
50
|
/**
|
|
48
|
-
* Joined through `offer
|
|
49
|
-
*
|
|
51
|
+
* Joined through the writable `offer ↔ price` list-link defined in
|
|
52
|
+
* `packages/core/src/links/offer-price-link.ts`. Carries the offer's
|
|
53
|
+
* Price rows on the variant's shared `PriceSet` (filtered by the
|
|
54
|
+
* `offer_id` `PriceRule` Mercur stamps on every offer-owned row).
|
|
50
55
|
*/
|
|
51
|
-
|
|
56
|
+
prices?: OfferPriceDTO[];
|
|
52
57
|
/**
|
|
53
58
|
* Joined through the writable `offer ↔ inventory_item` link. Each row
|
|
54
59
|
* carries the link's `required_quantity` plus the underlying
|
|
55
60
|
* `InventoryItem` when requested.
|
|
56
61
|
*/
|
|
57
62
|
inventory_items?: OfferInventoryItemLinkDTO[];
|
|
63
|
+
/** The seller that owns this offer (joined through `offer ↔ seller`). */
|
|
64
|
+
seller?: SellerDTO;
|
|
65
|
+
/** The master variant this offer points at (joined through `offer ↔ variant`). */
|
|
66
|
+
product_variant?: ProductVariantDTO;
|
|
67
|
+
/** The offer's shipping profile (joined through `offer ↔ shipping_profile`). */
|
|
68
|
+
shipping_profile?: ShippingProfileDTO;
|
|
58
69
|
}
|
|
59
70
|
//# sourceMappingURL=common.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/offer/common.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/offer/common.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,kBAAkB,EACnB,MAAM,iBAAiB,CAAA;AAExB,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAE5C;;;;;;;GAOG;AACH,MAAM,WAAW,yBAAyB;IACxC,iBAAiB,EAAE,MAAM,CAAA;IACzB,iBAAiB,EAAE,MAAM,CAAA;IACzB,SAAS,CAAC,EAAE,gBAAgB,CAAA;CAC7B;AAED;;;;;;;GAOG;AACH,MAAM,MAAM,aAAa,GAAG,cAAc,CAAA;AAE1C;;;;;;;;;GASG;AACH,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAA;IACV,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,MAAM,CAAA;IAClB,mBAAmB,EAAE,MAAM,CAAA;IAC3B,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;IAClB,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;IAClB,UAAU,EAAE,MAAM,CAAA;IAClB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAA;IACxC,UAAU,EAAE,IAAI,CAAA;IAChB,UAAU,EAAE,IAAI,CAAA;IAChB,UAAU,EAAE,IAAI,GAAG,IAAI,CAAA;IACvB;;;;;OAKG;IACH,MAAM,CAAC,EAAE,aAAa,EAAE,CAAA;IACxB;;;;OAIG;IACH,eAAe,CAAC,EAAE,yBAAyB,EAAE,CAAA;IAC7C,yEAAyE;IACzE,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB,kFAAkF;IAClF,eAAe,CAAC,EAAE,iBAAiB,CAAA;IACnC,gFAAgF;IAChF,gBAAgB,CAAC,EAAE,kBAAkB,CAAA;CACtC"}
|
|
@@ -65,15 +65,17 @@ export interface CreateOfferDTO {
|
|
|
65
65
|
}
|
|
66
66
|
/**
|
|
67
67
|
* Persisted offer-row input — the projection that
|
|
68
|
-
* `createOffersWorkflow` hands to `createOffersStep
|
|
69
|
-
*
|
|
70
|
-
* `
|
|
68
|
+
* `createOffersWorkflow` hands to `createOffersStep`. The offer's price
|
|
69
|
+
* ladder lives on the master variant's shared `PriceSet`, scoped by the
|
|
70
|
+
* `offer_id` `PriceRule` Mercur stamps on every offer-owned row, so the
|
|
71
|
+
* offer row itself no longer carries a `price_set_id`. `ean` / `upc` are
|
|
72
|
+
* snapshotted off the linked `ProductVariant`.
|
|
71
73
|
*/
|
|
72
74
|
export interface CreateOfferRowDTO {
|
|
73
75
|
seller_id: string;
|
|
74
76
|
variant_id: string;
|
|
77
|
+
product_id: string;
|
|
75
78
|
shipping_profile_id: string;
|
|
76
|
-
price_set_id: string;
|
|
77
79
|
sku: string;
|
|
78
80
|
ean: string | null;
|
|
79
81
|
upc: string | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mutations.d.ts","sourceRoot":"","sources":["../../src/offer/mutations.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;;;;GAMG;AACH,MAAM,WAAW,2BAA2B;IAC1C,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,YAAY,CAAC,EAAE,KAA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AAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAA;CAC1C;AAED;;;;;GAKG;AACH,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAA;IACV,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAA;IACzC,MAAM,CAAC,EAAE,mBAAmB,EAAE,CAAA;CAC/B;AAED;;;;GAIG;AACH,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,CAAC,EAAE,KAAK,CAAC;QACb,iBAAiB,EAAE,MAAM,CAAA;QACzB,iBAAiB,CAAC,EAAE,MAAM,CAAA;KAC3B,CAAC,CAAA;IACF,MAAM,CAAC,EAAE,KAAK,CAAC;QACb,iBAAiB,EAAE,MAAM,CAAA;QACzB,iBAAiB,EAAE,MAAM,CAAA;KAC1B,CAAC,CAAA;IACF,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;CAClB"}
|
package/dist/product/common.d.ts
CHANGED
|
@@ -1,16 +1,5 @@
|
|
|
1
1
|
import type { ProductDTO as UpstreamProductDTO, ProductVariantDTO as UpstreamProductVariantDTO, ProductCategoryDTO as UpstreamProductCategoryDTO, ProductImageDTO } from "@medusajs/types";
|
|
2
2
|
import { SellerDTO } from "../seller/common";
|
|
3
|
-
/**
|
|
4
|
-
* Mercur product acceptance workflow. Adds `REQUIRES_ACTION` to the
|
|
5
|
-
* upstream `draft / proposed / published / rejected` set.
|
|
6
|
-
*/
|
|
7
|
-
export declare enum ProductStatus {
|
|
8
|
-
DRAFT = "draft",
|
|
9
|
-
PROPOSED = "proposed",
|
|
10
|
-
PUBLISHED = "published",
|
|
11
|
-
REQUIRES_ACTION = "requires_action",
|
|
12
|
-
REJECTED = "rejected"
|
|
13
|
-
}
|
|
14
3
|
/**
|
|
15
4
|
* Data types for product attributes. Determines validation rules and UI
|
|
16
5
|
* rendering.
|
|
@@ -22,7 +11,12 @@ export declare enum AttributeType {
|
|
|
22
11
|
TOGGLE = "toggle",
|
|
23
12
|
TEXT = "text"
|
|
24
13
|
}
|
|
25
|
-
/**
|
|
14
|
+
/**
|
|
15
|
+
* Product change lifecycle statuses. Vendor edits land as `PENDING`
|
|
16
|
+
* (awaiting admin action) and resolve to `CONFIRMED` / `DECLINED` /
|
|
17
|
+
* `CANCELED`. Audit-trail rows (publish approval, change requests)
|
|
18
|
+
* are created already `CONFIRMED`.
|
|
19
|
+
*/
|
|
26
20
|
export declare enum ProductChangeStatus {
|
|
27
21
|
PENDING = "pending",
|
|
28
22
|
CONFIRMED = "confirmed",
|
|
@@ -42,18 +36,16 @@ export declare enum ProductChangeActionType {
|
|
|
42
36
|
VARIANT_REMOVE = "VARIANT_REMOVE",
|
|
43
37
|
ATTRIBUTE_ADD = "ATTRIBUTE_ADD",
|
|
44
38
|
ATTRIBUTE_REMOVE = "ATTRIBUTE_REMOVE",
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
updated_at: string | Date;
|
|
56
|
-
deleted_at: string | Date | null;
|
|
39
|
+
ATTRIBUTE_UPDATE = "ATTRIBUTE_UPDATE",
|
|
40
|
+
PRODUCT_ADD = "PRODUCT_ADD",
|
|
41
|
+
PRODUCT_DELETE = "PRODUCT_DELETE",
|
|
42
|
+
/**
|
|
43
|
+
* Operator asked the vendor to revise a submission. Auto-applied
|
|
44
|
+
* (no product mutation) — the parent `ProductChange.external_note`
|
|
45
|
+
* carries the operator's message and the action's existence in the
|
|
46
|
+
* audit trail is the durable signal.
|
|
47
|
+
*/
|
|
48
|
+
CHANGE_REQUESTED = "CHANGE_REQUESTED"
|
|
57
49
|
}
|
|
58
50
|
export interface ProductAttributeValueDTO {
|
|
59
51
|
id: string;
|
|
@@ -62,6 +54,7 @@ export interface ProductAttributeValueDTO {
|
|
|
62
54
|
rank: number;
|
|
63
55
|
is_active: boolean;
|
|
64
56
|
metadata: Record<string, unknown> | null;
|
|
57
|
+
product_option_value_id: string | null;
|
|
65
58
|
attribute?: ProductAttributeDTO;
|
|
66
59
|
attribute_id?: string;
|
|
67
60
|
variants?: ProductVariantDTO[];
|
|
@@ -82,15 +75,58 @@ export interface ProductAttributeDTO {
|
|
|
82
75
|
rank: number;
|
|
83
76
|
is_active: boolean;
|
|
84
77
|
created_by: string | null;
|
|
85
|
-
|
|
78
|
+
/**
|
|
79
|
+
* Legacy override-only column on the fused Mercur product module. Optional
|
|
80
|
+
* because the new standalone `product-attribute` module (SPEC-008) drops
|
|
81
|
+
* this field — product-scoped attributes are migrated to stock
|
|
82
|
+
* `ProductOption` / `ProductOptionValue` instead. The legacy fused module
|
|
83
|
+
* still populates the column until step 5 retires it.
|
|
84
|
+
*/
|
|
85
|
+
product_id?: string | null;
|
|
86
|
+
product_option_id: string | null;
|
|
86
87
|
metadata: Record<string, unknown> | null;
|
|
87
88
|
values?: ProductAttributeValueDTO[];
|
|
89
|
+
/**
|
|
90
|
+
* Legacy entity-level M:N relations populated by the fused Mercur product
|
|
91
|
+
* module. The new `product-attribute` module exposes these via Module
|
|
92
|
+
* Links instead (`product_attribute_category_link`,
|
|
93
|
+
* `product_variant_attribute`) and the link aliases resolve through
|
|
94
|
+
* Query Graph rather than the service.
|
|
95
|
+
*/
|
|
88
96
|
categories?: ProductCategoryDTO[];
|
|
89
97
|
variant_products?: ProductDTO[];
|
|
90
98
|
created_at: string | Date;
|
|
91
99
|
updated_at: string | Date;
|
|
92
100
|
deleted_at: string | Date | null;
|
|
93
101
|
}
|
|
102
|
+
/**
|
|
103
|
+
* A product attribute grouped for a single product by
|
|
104
|
+
* `wrapProductWithProductAttributes`: the parent attribute's full value set
|
|
105
|
+
* (`all_values`) plus the values actually selected on that product (`values`).
|
|
106
|
+
*/
|
|
107
|
+
export interface WrappedProductAttributeValueDTO {
|
|
108
|
+
id: string;
|
|
109
|
+
name: string;
|
|
110
|
+
rank?: number;
|
|
111
|
+
}
|
|
112
|
+
export interface WrappedProductAttributeDTO {
|
|
113
|
+
id: string;
|
|
114
|
+
name?: string;
|
|
115
|
+
handle?: string | null;
|
|
116
|
+
type?: AttributeType;
|
|
117
|
+
is_variant_axis?: boolean;
|
|
118
|
+
is_required?: boolean;
|
|
119
|
+
rank?: number;
|
|
120
|
+
/**
|
|
121
|
+
* `true` when this is a product-scoped (inline) attribute — one created on
|
|
122
|
+
* this product rather than a shared catalog attribute. Surfaced from the
|
|
123
|
+
* read-only `scoped_attributes` link so the dashboard edit form can offer the
|
|
124
|
+
* create-style inputs (editable title, free-form values) for it.
|
|
125
|
+
*/
|
|
126
|
+
is_scoped?: boolean;
|
|
127
|
+
all_values: WrappedProductAttributeValueDTO[];
|
|
128
|
+
values: WrappedProductAttributeValueDTO[];
|
|
129
|
+
}
|
|
94
130
|
export interface ProductChangeActionDTO {
|
|
95
131
|
id: string;
|
|
96
132
|
product_id: string;
|
|
@@ -146,14 +182,8 @@ export type ProductVariantDTO = UpstreamProductVariantDTO & {
|
|
|
146
182
|
* Mercur's `ProductDTO`. Replaces `status` (Mercur enum includes
|
|
147
183
|
* `REQUIRES_ACTION`) and drops `options`. Adds marketplace-only fields.
|
|
148
184
|
*/
|
|
149
|
-
export type ProductDTO =
|
|
150
|
-
status: ProductStatus;
|
|
151
|
-
is_restricted: boolean;
|
|
152
|
-
created_by: string | null;
|
|
153
|
-
created_by_actor: string | null;
|
|
185
|
+
export type ProductDTO = UpstreamProductDTO & {
|
|
154
186
|
variants?: ProductVariantDTO[];
|
|
155
|
-
brand?: ProductBrandDTO | null;
|
|
156
|
-
brand_id?: string | null;
|
|
157
187
|
categories?: ProductCategoryDTO[];
|
|
158
188
|
variant_attributes?: ProductAttributeDTO[];
|
|
159
189
|
custom_attributes?: ProductAttributeDTO[];
|
|
@@ -162,10 +192,4 @@ export type ProductDTO = Omit<UpstreamProductDTO, "status" | "options"> & {
|
|
|
162
192
|
sellers?: SellerDTO[];
|
|
163
193
|
changes?: ProductChangeDTO[];
|
|
164
194
|
};
|
|
165
|
-
/**
|
|
166
|
-
* Internal alias of `ProductDTO`. Used by the `.mercur/types.d.ts` shim so
|
|
167
|
-
* consumers writing `import { ProductDTO } from "@medusajs/types"` resolve
|
|
168
|
-
* to the Mercur shape.
|
|
169
|
-
*/
|
|
170
|
-
export type MercurProductDTO = ProductDTO;
|
|
171
195
|
//# sourceMappingURL=common.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/product/common.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,IAAI,kBAAkB,EAChC,iBAAiB,IAAI,yBAAyB,EAC9C,kBAAkB,IAAI,0BAA0B,EAChD,eAAe,EAChB,MAAM,iBAAiB,CAAA;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/product/common.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,IAAI,kBAAkB,EAChC,iBAAiB,IAAI,yBAAyB,EAC9C,kBAAkB,IAAI,0BAA0B,EAChD,eAAe,EAChB,MAAM,iBAAiB,CAAA;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAK5C;;;GAGG;AACH,oBAAY,aAAa;IACvB,aAAa,kBAAkB;IAC/B,YAAY,iBAAiB;IAC7B,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,IAAI,SAAS;CACd;AAED;;;;;GAKG;AACH,oBAAY,mBAAmB;IAC7B,OAAO,YAAY;IACnB,SAAS,cAAc;IACvB,QAAQ,aAAa;IACrB,QAAQ,aAAa;CACtB;AAED;;;;GAIG;AACH,oBAAY,uBAAuB;IACjC,aAAa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