@medusajs/store 0.1.2-snapshot-20240704123604 → 0.1.2-snapshot-20240711051411

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,6 @@
1
- import { ModuleExports } from "@medusajs/types";
2
- export declare const moduleDefinition: ModuleExports;
3
- export default moduleDefinition;
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;
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAA;;;;AAG9C,wBAEE"}
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
- exports.moduleDefinition = {
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
+ });
@@ -2,3 +2,4 @@ import { Migration } from "@mikro-orm/migrations";
2
2
  export declare class InitialSetup20240226130829 extends Migration {
3
3
  up(): Promise<void>;
4
4
  }
5
+ //# sourceMappingURL=InitialSetup20240227075933.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InitialSetup20240227075933.d.ts","sourceRoot":"","sources":["../../src/migrations/InitialSetup20240227075933.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAEjD,qBAAa,0BAA2B,SAAQ,SAAS;IACjD,EAAE,IAAI,OAAO,CAAC,IAAI,CAAC;CA8D1B"}
@@ -2,3 +2,4 @@ import { Migration } from "@mikro-orm/migrations";
2
2
  export declare class Migration20240621145944 extends Migration {
3
3
  up(): Promise<void>;
4
4
  }
5
+ //# sourceMappingURL=Migration20240621145944.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Migration20240621145944.d.ts","sourceRoot":"","sources":["../../src/migrations/Migration20240621145944.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAEjD,qBAAa,uBAAwB,SAAQ,SAAS;IAC9C,EAAE,IAAI,OAAO,CAAC,IAAI,CAAC;CAiB1B"}
@@ -11,3 +11,4 @@ export default class StoreCurrency {
11
11
  onCreate(): void;
12
12
  onInit(): void;
13
13
  }
14
+ //# sourceMappingURL=currency.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"currency.d.ts","sourceRoot":"","sources":["../../src/models/currency.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,MAAM,SAAS,CAAA;AAU3B,MAAM,CAAC,OAAO,OAAO,aAAa;IAEhC,EAAE,EAAE,MAAM,CAAA;IAIV,aAAa,EAAE,MAAM,CAAA;IAGrB,UAAU,CAAC,EAAE,OAAO,CAAA;IASpB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;IAMvB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAA;IAOnB,UAAU,EAAE,IAAI,CAAA;IAQhB,UAAU,EAAE,IAAI,CAAA;IAIhB,UAAU,EAAE,IAAI,GAAG,IAAI,CAAO;IAG9B,QAAQ;IAKR,MAAM;CAGP"}
@@ -1,2 +1,3 @@
1
1
  export { default as Store } from "./store";
2
2
  export { default as StoreCurrency } from "./currency";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAA;AAC1C,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,YAAY,CAAA"}
@@ -1,7 +1,7 @@
1
1
  import { DAL } from "@medusajs/types";
2
2
  import { OptionalProps, Collection } from "@mikro-orm/core";
3
3
  import StoreCurrency from "./currency";
4
- type StoreOptionalProps = DAL.SoftDeletableEntityDateColumns;
4
+ type StoreOptionalProps = DAL.SoftDeletableModelDateColumns;
5
5
  export default class Store {
6
6
  [OptionalProps]?: StoreOptionalProps;
7
7
  id: string;
@@ -18,3 +18,4 @@ export default class Store {
18
18
  onInit(): void;
19
19
  }
20
20
  export {};
21
+ //# sourceMappingURL=store.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../src/models/store.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAA;AAErC,OAAO,EAOL,aAAa,EAEb,UAAU,EAEX,MAAM,iBAAiB,CAAA;AACxB,OAAO,aAAa,MAAM,YAAY,CAAA;AAEtC,KAAK,kBAAkB,GAAG,GAAG,CAAC,6BAA6B,CAAA;AAU3D,MAAM,CAAC,OAAO,OAAO,KAAK;IACxB,CAAC,aAAa,CAAC,CAAC,EAAE,kBAAkB,CAAA;IAGpC,EAAE,EAAE,MAAM,CAAA;IAIV,IAAI,EAAE,MAAM,CAAA;IAKZ,oBAAoB,oCAAsC;IAG1D,wBAAwB,EAAE,MAAM,GAAG,IAAI,CAAO;IAG9C,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAO;IAGvC,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAO;IAGzC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAO;IAO/C,UAAU,EAAE,IAAI,CAAA;IAQhB,UAAU,EAAE,IAAI,CAAA;IAIhB,UAAU,EAAE,IAAI,GAAG,IAAI,CAAO;IAG9B,QAAQ;IAKR,MAAM;CAGP"}
@@ -1 +1,2 @@
1
1
  export { default as StoreModuleService } from "./store-module-service";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/services/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,wBAAwB,CAAA"}
@@ -1,4 +1,4 @@
1
- import { Context, DAL, InternalModuleDeclaration, IStoreModuleService, ModuleJoinerConfig, ModulesSdkTypes, StoreTypes } from "@medusajs/types";
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[]>;
@@ -32,3 +31,4 @@ export default class StoreModuleService extends StoreModuleService_base implemen
32
31
  private static validateUpdateRequest;
33
32
  }
34
33
  export {};
34
+ //# sourceMappingURL=store-module-service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"store-module-service.d.ts","sourceRoot":"","sources":["../../src/services/store-module-service.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,GAAG,EACH,yBAAyB,EACzB,mBAAmB,EACnB,eAAe,EACf,UAAU,EACX,MAAM,iBAAiB,CAAA;AAaxB,OAAO,EAAE,KAAK,EAAiB,MAAM,SAAS,CAAA;AAC9C,OAAO,EAAE,gBAAgB,EAAE,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,CAAC,QAAQ,CAAC;IA8BzB,YAAY,CAChB,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,UAAU,CAAC,cAAc,EAC/B,aAAa,CAAC,EAAE,OAAO,GACtB,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC;IACzB,YAAY,CAChB,QAAQ,EAAE,UAAU,CAAC,oBAAoB,EACzC,IAAI,EAAE,UAAU,CAAC,cAAc,EAC/B,aAAa,CAAC,EAAE,OAAO,GACtB,OAAO,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC;cAiCjB,OAAO,CACrB,IAAI,EAAE,gBAAgB,EAAE,EACP,aAAa,GAAE,OAAY,GAC3C,OAAO,CAAC,KAAK,EAAE,CAAC;IAanB,OAAO,CAAC,MAAM,CAAC,cAAc;IAe7B,OAAO,CAAC,MAAM,CAAC,qBAAqB;IAuCpC,OAAO,CAAC,MAAM,CAAC,qBAAqB;CAGrC"}
@@ -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);
@@ -7,3 +7,4 @@ export type InitializeModuleInjectableDependencies = {
7
7
  export type UpdateStoreInput = StoreTypes.UpdateStoreDTO & {
8
8
  id: string;
9
9
  };
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC5C,OAAO,EAAE,sBAAsB,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AAEhE,MAAM,MAAM,sCAAsC,GAAG;IACnD,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,qBAAqB,CAAC,EAAE,sBAAsB,CAAA;CAC/C,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC,cAAc,GAAG;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@medusajs/store",
3
- "version": "0.1.2-snapshot-20240704123604",
3
+ "version": "0.1.2-snapshot-20240711051411",
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-snapshot-20240704123604",
37
+ "@medusajs/types": "1.12.0-snapshot-20240711051411",
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/modules-sdk": "1.13.0-snapshot-20240704123604",
49
- "@medusajs/utils": "1.12.0-snapshot-20240704123604",
48
+ "@medusajs/utils": "1.12.0-snapshot-20240711051411",
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
  }
@@ -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">>;
@@ -1,5 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.joinerConfig = void 0;
4
- const utils_1 = require("@medusajs/utils");
5
- exports.joinerConfig = (0, utils_1.defineJoinerConfig)(utils_1.Modules.STORE);