@medusajs/types 1.10.1 → 1.10.2-next-20230816100952
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/address/common.d.ts +15 -0
- package/dist/address/common.js +3 -0
- package/dist/address/common.js.map +1 -0
- package/dist/address/index.d.ts +1 -0
- package/dist/address/index.js +18 -0
- package/dist/address/index.js.map +1 -0
- package/dist/cart/common.d.ts +27 -0
- package/dist/cart/common.js +3 -0
- package/dist/cart/common.js.map +1 -0
- package/dist/cart/index.d.ts +1 -0
- package/dist/cart/index.js +18 -0
- package/dist/cart/index.js.map +1 -0
- package/dist/index.d.ts +6 -4
- package/dist/index.js +6 -4
- package/dist/index.js.map +1 -1
- package/dist/modules-sdk/index.d.ts +5 -1
- package/dist/workflow/cart/create-cart.d.ts +18 -0
- package/dist/workflow/cart/create-cart.js +3 -0
- package/dist/workflow/cart/create-cart.js.map +1 -0
- package/dist/workflow/cart/index.d.ts +1 -0
- package/dist/workflow/cart/index.js +18 -0
- package/dist/workflow/cart/index.js.map +1 -0
- package/dist/workflow/index.d.ts +2 -1
- package/dist/workflow/index.js +3 -2
- package/dist/workflow/index.js.map +1 -1
- package/dist/workflow/product/create-products.d.ts +0 -6
- package/package.json +2 -2
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare type AddressDTO = {
|
|
2
|
+
id?: string;
|
|
3
|
+
address_1: string;
|
|
4
|
+
address_2?: string | null;
|
|
5
|
+
company?: string | null;
|
|
6
|
+
country_code: string;
|
|
7
|
+
city?: string | null;
|
|
8
|
+
phone?: string | null;
|
|
9
|
+
postal_code?: string | null;
|
|
10
|
+
province?: string | null;
|
|
11
|
+
metadata?: Record<string, unknown> | null;
|
|
12
|
+
created_at?: string | Date;
|
|
13
|
+
updated_at?: string | Date;
|
|
14
|
+
deleted_at?: string | Date | null;
|
|
15
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/address/common.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./common";
|
|
@@ -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
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/address/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAwB"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export declare type CartDTO = {
|
|
2
|
+
id?: string;
|
|
3
|
+
email?: string;
|
|
4
|
+
billing_address_id?: string;
|
|
5
|
+
shipping_address_id?: string;
|
|
6
|
+
region_id?: string;
|
|
7
|
+
customer_id?: string;
|
|
8
|
+
payment_id?: string;
|
|
9
|
+
completed_at?: Date;
|
|
10
|
+
payment_authorized_at?: Date;
|
|
11
|
+
idempotency_key?: string;
|
|
12
|
+
context?: Record<string, unknown>;
|
|
13
|
+
metadata?: Record<string, unknown>;
|
|
14
|
+
sales_channel_id?: string | null;
|
|
15
|
+
shipping_total?: number;
|
|
16
|
+
discount_total?: number;
|
|
17
|
+
raw_discount_total?: number;
|
|
18
|
+
item_tax_total?: number | null;
|
|
19
|
+
shipping_tax_total?: number | null;
|
|
20
|
+
tax_total?: number | null;
|
|
21
|
+
refunded_total?: number;
|
|
22
|
+
total?: number;
|
|
23
|
+
subtotal?: number;
|
|
24
|
+
refundable_amount?: number;
|
|
25
|
+
gift_card_total?: number;
|
|
26
|
+
gift_card_tax_total?: number;
|
|
27
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/cart/common.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./common";
|
|
@@ -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
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cart/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAwB"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,18 +1,20 @@
|
|
|
1
|
+
export * from "./address";
|
|
1
2
|
export * from "./bundles";
|
|
2
3
|
export * from "./cache";
|
|
4
|
+
export * from "./cart";
|
|
3
5
|
export * from "./common";
|
|
6
|
+
export * from "./dal";
|
|
4
7
|
export * from "./event-bus";
|
|
8
|
+
export * from "./feature-flag";
|
|
5
9
|
export * from "./inventory";
|
|
6
10
|
export * from "./joiner";
|
|
11
|
+
export * from "./logger";
|
|
7
12
|
export * from "./modules-sdk";
|
|
8
13
|
export * from "./product";
|
|
9
14
|
export * from "./product-category";
|
|
15
|
+
export * from "./sales-channel";
|
|
10
16
|
export * from "./search";
|
|
11
17
|
export * from "./shared-context";
|
|
12
18
|
export * from "./stock-location";
|
|
13
19
|
export * from "./transaction-base";
|
|
14
|
-
export * from "./dal";
|
|
15
|
-
export * from "./logger";
|
|
16
|
-
export * from "./feature-flag";
|
|
17
|
-
export * from "./sales-channel";
|
|
18
20
|
export * from "./workflow";
|
package/dist/index.js
CHANGED
|
@@ -14,22 +14,24 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./address"), exports);
|
|
17
18
|
__exportStar(require("./bundles"), exports);
|
|
18
19
|
__exportStar(require("./cache"), exports);
|
|
20
|
+
__exportStar(require("./cart"), exports);
|
|
19
21
|
__exportStar(require("./common"), exports);
|
|
22
|
+
__exportStar(require("./dal"), exports);
|
|
20
23
|
__exportStar(require("./event-bus"), exports);
|
|
24
|
+
__exportStar(require("./feature-flag"), exports);
|
|
21
25
|
__exportStar(require("./inventory"), exports);
|
|
22
26
|
__exportStar(require("./joiner"), exports);
|
|
27
|
+
__exportStar(require("./logger"), exports);
|
|
23
28
|
__exportStar(require("./modules-sdk"), exports);
|
|
24
29
|
__exportStar(require("./product"), exports);
|
|
25
30
|
__exportStar(require("./product-category"), exports);
|
|
31
|
+
__exportStar(require("./sales-channel"), exports);
|
|
26
32
|
__exportStar(require("./search"), exports);
|
|
27
33
|
__exportStar(require("./shared-context"), exports);
|
|
28
34
|
__exportStar(require("./stock-location"), exports);
|
|
29
35
|
__exportStar(require("./transaction-base"), exports);
|
|
30
|
-
__exportStar(require("./dal"), exports);
|
|
31
|
-
__exportStar(require("./logger"), exports);
|
|
32
|
-
__exportStar(require("./feature-flag"), exports);
|
|
33
|
-
__exportStar(require("./sales-channel"), exports);
|
|
34
36
|
__exportStar(require("./workflow"), exports);
|
|
35
37
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAAyB;AACzB,0CAAuB;AACvB,2CAAwB;AACxB,8CAA2B;AAC3B,8CAA2B;AAC3B,2CAAwB;AACxB,gDAA6B;AAC7B,4CAAyB;AACzB,qDAAkC;AAClC,2CAAwB;AACxB,mDAAgC;AAChC,mDAAgC;AAChC,qDAAkC;AAClC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAAyB;AACzB,4CAAyB;AACzB,0CAAuB;AACvB,yCAAsB;AACtB,2CAAwB;AACxB,wCAAqB;AACrB,8CAA2B;AAC3B,iDAA8B;AAC9B,8CAA2B;AAC3B,2CAAwB;AACxB,2CAAwB;AACxB,gDAA6B;AAC7B,4CAAyB;AACzB,qDAAkC;AAClC,kDAA+B;AAC/B,2CAAwB;AACxB,mDAAgC;AAChC,mDAAgC;AAChC,qDAAkC;AAClC,6CAA0B"}
|
|
@@ -76,7 +76,11 @@ export declare type ModuleExports = {
|
|
|
76
76
|
};
|
|
77
77
|
export interface ModuleServiceInitializeOptions {
|
|
78
78
|
database: {
|
|
79
|
-
|
|
79
|
+
/**
|
|
80
|
+
* Forces to use a shared knex connection
|
|
81
|
+
*/
|
|
82
|
+
connection?: any;
|
|
83
|
+
clientUrl?: string;
|
|
80
84
|
schema?: string;
|
|
81
85
|
driverOptions?: Record<string, unknown>;
|
|
82
86
|
debug?: boolean;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { AddressDTO } from "../../address";
|
|
2
|
+
export interface CreateLineItemInputDTO {
|
|
3
|
+
variant_id: string;
|
|
4
|
+
quantity: number;
|
|
5
|
+
}
|
|
6
|
+
export interface CreateCartWorkflowInputDTO {
|
|
7
|
+
region_id?: string;
|
|
8
|
+
country_code?: string;
|
|
9
|
+
items?: CreateLineItemInputDTO[];
|
|
10
|
+
context?: object;
|
|
11
|
+
sales_channel_id?: string;
|
|
12
|
+
shipping_address_id?: string;
|
|
13
|
+
billing_address_id?: string;
|
|
14
|
+
billing_address?: AddressDTO;
|
|
15
|
+
shipping_address?: AddressDTO;
|
|
16
|
+
customer_id?: string;
|
|
17
|
+
email?: string;
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-cart.js","sourceRoot":"","sources":["../../../src/workflow/cart/create-cart.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./create-cart";
|
|
@@ -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("./create-cart"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/workflow/cart/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA6B"}
|
package/dist/workflow/index.d.ts
CHANGED
package/dist/workflow/index.js
CHANGED
|
@@ -23,7 +23,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.CommonWorkflow = exports.
|
|
27
|
-
exports.
|
|
26
|
+
exports.ProductWorkflow = exports.CommonWorkflow = exports.CartWorkflow = void 0;
|
|
27
|
+
exports.CartWorkflow = __importStar(require("./cart"));
|
|
28
28
|
exports.CommonWorkflow = __importStar(require("./common"));
|
|
29
|
+
exports.ProductWorkflow = __importStar(require("./product"));
|
|
29
30
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/workflow/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/workflow/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uDAAsC;AACtC,2DAA0C;AAC1C,6DAA4C"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ProductStatus } from "../../product";
|
|
2
|
-
import { WorkflowInputConfig } from "../common";
|
|
3
2
|
export interface CreateProductTypeInputDTO {
|
|
4
3
|
id?: string;
|
|
5
4
|
value: string;
|
|
@@ -77,12 +76,7 @@ export interface CreateProductInputDTO {
|
|
|
77
76
|
material?: string;
|
|
78
77
|
metadata?: Record<string, unknown>;
|
|
79
78
|
sales_channels?: CreateProductSalesChannelInputDTO[];
|
|
80
|
-
listConfig: {
|
|
81
|
-
select: string[];
|
|
82
|
-
relations: string[];
|
|
83
|
-
};
|
|
84
79
|
}
|
|
85
80
|
export interface CreateProductsWorkflowInputDTO {
|
|
86
81
|
products: CreateProductInputDTO[];
|
|
87
|
-
config?: WorkflowInputConfig;
|
|
88
82
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@medusajs/types",
|
|
3
|
-
"version": "1.10.
|
|
3
|
+
"version": "1.10.2-next-20230816100952",
|
|
4
4
|
"description": "Medusa Types definition",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"winston": "^3.8.2"
|
|
28
28
|
},
|
|
29
29
|
"scripts": {
|
|
30
|
-
"
|
|
30
|
+
"prepublishOnly": "cross-env NODE_ENV=production tsc --build",
|
|
31
31
|
"build": "rimraf dist && tsc --build",
|
|
32
32
|
"watch": "tsc --build --watch",
|
|
33
33
|
"test": "exit 0"
|