@medusajs/store 0.1.2-preview-20240705120620 → 0.1.2-preview-20240705150453
Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.d.ts
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
-
import {
|
2
|
-
|
3
|
-
|
1
|
+
import { StoreModuleService } from "./services";
|
2
|
+
declare const _default: import("@medusajs/types").ModuleExports<typeof StoreModuleService> & {
|
3
|
+
linkable: Record<string, any>;
|
4
|
+
};
|
5
|
+
export default _default;
|
package/dist/index.js
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.moduleDefinition = void 0;
|
4
3
|
const _services_1 = require("./services");
|
5
|
-
|
4
|
+
const utils_1 = require("@medusajs/utils");
|
5
|
+
exports.default = (0, utils_1.Module)(utils_1.Modules.STORE, {
|
6
6
|
service: _services_1.StoreModuleService,
|
7
|
-
};
|
8
|
-
exports.default = exports.moduleDefinition;
|
7
|
+
});
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { Context, DAL, InternalModuleDeclaration, IStoreModuleService,
|
1
|
+
import { Context, DAL, InternalModuleDeclaration, IStoreModuleService, ModulesSdkTypes, StoreTypes } from "@medusajs/types";
|
2
2
|
import { Store } from "../models";
|
3
3
|
import { UpdateStoreInput } from "../types";
|
4
4
|
type InjectedDependencies = {
|
@@ -18,7 +18,6 @@ export default class StoreModuleService extends StoreModuleService_base implemen
|
|
18
18
|
protected baseRepository_: DAL.RepositoryService;
|
19
19
|
protected readonly storeService_: ModulesSdkTypes.IMedusaInternalService<Store>;
|
20
20
|
constructor({ baseRepository, storeService }: InjectedDependencies, moduleDeclaration: InternalModuleDeclaration);
|
21
|
-
__joinerConfig(): ModuleJoinerConfig;
|
22
21
|
createStores(data: StoreTypes.CreateStoreDTO[], sharedContext?: Context): Promise<StoreTypes.StoreDTO[]>;
|
23
22
|
createStores(data: StoreTypes.CreateStoreDTO, sharedContext?: Context): Promise<StoreTypes.StoreDTO>;
|
24
23
|
create_(data: StoreTypes.CreateStoreDTO[], sharedContext?: Context): Promise<Store[]>;
|
@@ -15,7 +15,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
const types_1 = require("@medusajs/types");
|
16
16
|
const utils_1 = require("@medusajs/utils");
|
17
17
|
const _models_1 = require("../models");
|
18
|
-
const joiner_config_1 = require("../joiner-config");
|
19
18
|
class StoreModuleService extends (0, utils_1.MedusaService)({ Store: _models_1.Store, StoreCurrency: _models_1.StoreCurrency }) {
|
20
19
|
constructor({ baseRepository, storeService }, moduleDeclaration) {
|
21
20
|
// @ts-ignore
|
@@ -24,9 +23,6 @@ class StoreModuleService extends (0, utils_1.MedusaService)({ Store: _models_1.S
|
|
24
23
|
this.baseRepository_ = baseRepository;
|
25
24
|
this.storeService_ = storeService;
|
26
25
|
}
|
27
|
-
__joinerConfig() {
|
28
|
-
return joiner_config_1.joinerConfig;
|
29
|
-
}
|
30
26
|
async createStores(data, sharedContext = {}) {
|
31
27
|
const input = Array.isArray(data) ? data : [data];
|
32
28
|
const result = await this.create_(input, sharedContext);
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@medusajs/store",
|
3
|
-
"version": "0.1.2-preview-
|
3
|
+
"version": "0.1.2-preview-20240705150453",
|
4
4
|
"description": "Medusa Store module",
|
5
5
|
"main": "dist/index.js",
|
6
6
|
"types": "dist/index.d.ts",
|
@@ -34,7 +34,7 @@
|
|
34
34
|
"orm:cache:clear": " MIKRO_ORM_CLI=./mikro-orm.config.dev.ts mikro-orm cache:clear"
|
35
35
|
},
|
36
36
|
"devDependencies": {
|
37
|
-
"@medusajs/types": "1.12.0-preview-
|
37
|
+
"@medusajs/types": "1.12.0-preview-20240705150453",
|
38
38
|
"@mikro-orm/cli": "5.9.7",
|
39
39
|
"cross-env": "^5.2.1",
|
40
40
|
"jest": "^29.7.0",
|
@@ -45,13 +45,10 @@
|
|
45
45
|
"typescript": "^5.1.6"
|
46
46
|
},
|
47
47
|
"dependencies": {
|
48
|
-
"@medusajs/
|
49
|
-
"@medusajs/utils": "1.12.0-preview-20240705120620",
|
48
|
+
"@medusajs/utils": "1.12.0-preview-20240705150453",
|
50
49
|
"@mikro-orm/core": "5.9.7",
|
51
50
|
"@mikro-orm/migrations": "5.9.7",
|
52
51
|
"@mikro-orm/postgresql": "5.9.7",
|
53
|
-
"awilix": "^8.0.0"
|
54
|
-
"dotenv": "^16.4.5",
|
55
|
-
"knex": "2.4.2"
|
52
|
+
"awilix": "^8.0.0"
|
56
53
|
}
|
57
54
|
}
|
package/dist/joiner-config.d.ts
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
export declare const joinerConfig: Omit<import("@medusajs/types").ModuleJoinerConfig, "serviceName" | "primaryKeys" | "alias" | "linkableKeys"> & Required<Pick<import("@medusajs/types").ModuleJoinerConfig, "serviceName" | "primaryKeys" | "alias" | "linkableKeys">>;
|
package/dist/joiner-config.js
DELETED