@mercurjs/types 2.2.0 → 2.2.1-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/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/modules.d.ts +1 -1
- package/dist/modules.d.ts.map +1 -1
- package/dist/modules.js +1 -1
- package/dist/offer/common.d.ts +7 -1
- package/dist/offer/common.d.ts.map +1 -1
- package/dist/promotion-cost/common.d.ts +15 -0
- package/dist/promotion-cost/common.d.ts.map +1 -0
- package/dist/promotion-cost/common.js +2 -0
- package/dist/promotion-cost/index.d.ts +2 -0
- package/dist/promotion-cost/index.d.ts.map +1 -0
- package/dist/promotion-cost/index.js +17 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export * from "./commission";
|
|
|
5
5
|
export * as HttpTypes from "./http";
|
|
6
6
|
export * from "./payout";
|
|
7
7
|
export * from "./offer";
|
|
8
|
+
export * from "./promotion-cost";
|
|
8
9
|
export { ProductStatus } from "./product/status";
|
|
9
10
|
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
11
|
export * from "./modules";
|
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,UAAU,CAAA;AAGxB,cAAc,SAAS,CAAA;
|
|
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;AAGvB,cAAc,kBAAkB,CAAA;AAahC,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
|
@@ -50,6 +50,8 @@ exports.HttpTypes = __importStar(require("./http"));
|
|
|
50
50
|
__exportStar(require("./payout"), exports);
|
|
51
51
|
// Offer types
|
|
52
52
|
__exportStar(require("./offer"), exports);
|
|
53
|
+
// Promotion cost types
|
|
54
|
+
__exportStar(require("./promotion-cost"), exports);
|
|
53
55
|
// Product types — explicit re-export overrides Medusa's product surface.
|
|
54
56
|
// Mercur's runtime enums and Mercur-extended DTOs (Omit + intersection over
|
|
55
57
|
// upstream) win over the wholesale `export * from "@medusajs/types"` above.
|
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,
|
|
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;CACpC"}
|
package/dist/modules.js
CHANGED
|
@@ -14,5 +14,5 @@ var MercurModules;
|
|
|
14
14
|
MercurModules["VENDOR_UI"] = "vendor_ui";
|
|
15
15
|
MercurModules["ADMIN_UI"] = "admin_ui";
|
|
16
16
|
MercurModules["CODEGEN"] = "codegen";
|
|
17
|
-
MercurModules["
|
|
17
|
+
MercurModules["PROMOTION_COST"] = "promotion_cost";
|
|
18
18
|
})(MercurModules || (exports.MercurModules = MercurModules = {}));
|
package/dist/offer/common.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { InventoryItemDTO, MoneyAmountDTO, ShippingProfileDTO } from "@medusajs/types";
|
|
1
|
+
import { InventoryItemDTO, MoneyAmountDTO, ShippingProfileDTO, StoreCalculatedPrice } from "@medusajs/types";
|
|
2
2
|
import { ProductDTO, ProductVariantDTO } from "../product/common";
|
|
3
3
|
import { SellerDTO } from "../seller/common";
|
|
4
4
|
/**
|
|
@@ -74,5 +74,11 @@ export interface OfferDTO {
|
|
|
74
74
|
product_variant?: ProductVariantDTO;
|
|
75
75
|
/** The offer's shipping profile (joined through `offer ↔ shipping_profile`). */
|
|
76
76
|
shipping_profile?: ShippingProfileDTO;
|
|
77
|
+
/**
|
|
78
|
+
* Per-offer calculated price for the request's pricing context, populated by
|
|
79
|
+
* the store offers route when a pricing context is supplied. Absent on
|
|
80
|
+
* writes and on admin/vendor reads.
|
|
81
|
+
*/
|
|
82
|
+
calculated_price?: StoreCalculatedPrice;
|
|
77
83
|
}
|
|
78
84
|
//# sourceMappingURL=common.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/offer/common.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,kBAAkB,
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/offer/common.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,kBAAkB,EAClB,oBAAoB,EACrB,MAAM,iBAAiB,CAAA;AAExB,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AACjE,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;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B;;;;;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,2EAA2E;IAC3E,OAAO,CAAC,EAAE,UAAU,CAAA;IACpB,kFAAkF;IAClF,eAAe,CAAC,EAAE,iBAAiB,CAAA;IACnC,gFAAgF;IAChF,gBAAgB,CAAC,EAAE,kBAAkB,CAAA;IACrC;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,oBAAoB,CAAA;CACxC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type PromotionCostBearer = "store" | "marketplace" | "shared";
|
|
2
|
+
export interface PromotionCostDTO {
|
|
3
|
+
id: string;
|
|
4
|
+
promotion_id: string;
|
|
5
|
+
cost_bearer: PromotionCostBearer;
|
|
6
|
+
shared_marketplace_percentage: number | null;
|
|
7
|
+
metadata: Record<string, unknown> | null;
|
|
8
|
+
}
|
|
9
|
+
export interface UpsertPromotionCostDTO {
|
|
10
|
+
promotion_id: string;
|
|
11
|
+
cost_bearer: PromotionCostBearer;
|
|
12
|
+
shared_marketplace_percentage?: number | null;
|
|
13
|
+
metadata?: Record<string, unknown> | null;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=common.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/promotion-cost/common.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,mBAAmB,GAAG,OAAO,GAAG,aAAa,GAAG,QAAQ,CAAA;AAEpE,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAA;IACV,YAAY,EAAE,MAAM,CAAA;IACpB,WAAW,EAAE,mBAAmB,CAAA;IAChC,6BAA6B,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5C,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAA;CACzC;AAED,MAAM,WAAW,sBAAsB;IACrC,YAAY,EAAE,MAAM,CAAA;IACpB,WAAW,EAAE,mBAAmB,CAAA;IAChC,6BAA6B,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7C,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAA;CAC1C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/promotion-cost/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
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);
|