@medusajs/sales-channel 0.1.2-snapshot-20240704130951 → 0.1.2-snapshot-20240711053716

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
- declare const moduleDefinition: ModuleExports;
3
- export default moduleDefinition;
1
+ import { SalesChannelModuleService } from "./services";
2
+ declare const _default: import("@medusajs/types").ModuleExports<typeof SalesChannelModuleService> & {
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":"AACA,OAAO,EAAE,yBAAyB,EAAE,MAAM,WAAW,CAAA;;;;AAErD,wBAEE"}
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ const utils_1 = require("@medusajs/utils");
3
4
  const _services_1 = require("./services");
4
- const moduleDefinition = {
5
+ exports.default = (0, utils_1.Module)(utils_1.Modules.SALES_CHANNEL, {
5
6
  service: _services_1.SalesChannelModuleService,
6
- };
7
- exports.default = moduleDefinition;
7
+ });
@@ -2,3 +2,4 @@ import { Migration } from "@mikro-orm/migrations";
2
2
  export declare class Migration20240115152146 extends Migration {
3
3
  up(): Promise<void>;
4
4
  }
5
+ //# sourceMappingURL=Migration20240115152146.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Migration20240115152146.d.ts","sourceRoot":"","sources":["../../src/migrations/Migration20240115152146.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAEjD,qBAAa,uBAAwB,SAAQ,SAAS;IAC9C,EAAE,IAAI,OAAO,CAAC,IAAI,CAAC;CAQ1B"}
@@ -1 +1,2 @@
1
1
  export { default as SalesChannel } from "./sales-channel";
2
+ //# 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,YAAY,EAAE,MAAM,iBAAiB,CAAA"}
@@ -1,6 +1,6 @@
1
1
  import { DAL } from "@medusajs/types";
2
2
  import { OptionalProps } from "@mikro-orm/core";
3
- type SalesChannelOptionalProps = "is_disabled" | DAL.EntityDateColumns;
3
+ type SalesChannelOptionalProps = "is_disabled" | DAL.ModelDateColumns;
4
4
  export default class SalesChannel {
5
5
  [OptionalProps]?: SalesChannelOptionalProps;
6
6
  id: string;
@@ -15,3 +15,4 @@ export default class SalesChannel {
15
15
  onInit(): void;
16
16
  }
17
17
  export {};
18
+ //# sourceMappingURL=sales-channel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sales-channel.d.ts","sourceRoot":"","sources":["../../src/models/sales-channel.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAA;AACrC,OAAO,EAML,aAAa,EAGd,MAAM,iBAAiB,CAAA;AAExB,KAAK,yBAAyB,GAAG,aAAa,GAAG,GAAG,CAAC,gBAAgB,CAAA;AAIrE,MAAM,CAAC,OAAO,OAAO,YAAY;IAC/B,CAAC,aAAa,CAAC,CAAC,EAAE,yBAAyB,CAAA;IAG3C,EAAE,EAAG,MAAM,CAAA;IAIX,IAAI,EAAG,MAAM,CAAA;IAIb,WAAW,EAAE,MAAM,GAAG,IAAI,CAAO;IAGjC,WAAW,EAAE,OAAO,CAAQ;IAO5B,UAAU,EAAE,IAAI,CAAA;IAGhB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAO;IAQ/C,UAAU,EAAE,IAAI,CAAA;IAIhB,UAAU,EAAE,IAAI,GAAG,IAAI,CAAO;IAG9B,QAAQ;IAKR,MAAM;CAGP"}
@@ -1 +1,2 @@
1
1
  export { default as SalesChannelModuleService } from "./sales-channel-module";
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,yBAAyB,EAAE,MAAM,wBAAwB,CAAA"}
@@ -1,4 +1,4 @@
1
- import { Context, CreateSalesChannelDTO, DAL, FilterableSalesChannelProps, InternalModuleDeclaration, ISalesChannelModuleService, ModuleJoinerConfig, ModulesSdkTypes, SalesChannelDTO, UpdateSalesChannelDTO, UpsertSalesChannelDTO } from "@medusajs/types";
1
+ import { Context, CreateSalesChannelDTO, DAL, FilterableSalesChannelProps, InternalModuleDeclaration, ISalesChannelModuleService, ModulesSdkTypes, SalesChannelDTO, UpdateSalesChannelDTO, UpsertSalesChannelDTO } from "@medusajs/types";
2
2
  import { SalesChannel } from "../models";
3
3
  type InjectedDependencies = {
4
4
  baseRepository: DAL.RepositoryService;
@@ -14,7 +14,6 @@ export default class SalesChannelModuleService extends SalesChannelModuleService
14
14
  protected baseRepository_: DAL.RepositoryService;
15
15
  protected readonly salesChannelService_: ModulesSdkTypes.IMedusaInternalService<SalesChannel>;
16
16
  constructor({ baseRepository, salesChannelService }: InjectedDependencies, moduleDeclaration: InternalModuleDeclaration);
17
- __joinerConfig(): ModuleJoinerConfig;
18
17
  createSalesChannels(data: CreateSalesChannelDTO[], sharedContext?: Context): Promise<SalesChannelDTO[]>;
19
18
  createSalesChannels(data: CreateSalesChannelDTO, sharedContext?: Context): Promise<SalesChannelDTO>;
20
19
  createSalesChannels_(data: CreateSalesChannelDTO[], sharedContext: Context): Promise<SalesChannel[]>;
@@ -25,3 +24,4 @@ export default class SalesChannelModuleService extends SalesChannelModuleService
25
24
  upsertSalesChannels(data: UpsertSalesChannelDTO, sharedContext?: Context): Promise<SalesChannelDTO>;
26
25
  }
27
26
  export {};
27
+ //# sourceMappingURL=sales-channel-module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"s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B,aAAa,CAAC,EAAE,OAAO,GACtB,OAAO,CAAC,eAAe,CAAC;IACrB,mBAAmB,CACvB,QAAQ,EAAE,2BAA2B,EACrC,IAAI,EAAE,qBAAqB,EAC3B,aAAa,CAAC,EAAE,OAAO,GACtB,OAAO,CAAC,eAAe,EAAE,CAAC;IAsCvB,oBAAoB,CACxB,IAAI,EAAE,qBAAqB,EAAE,EAC7B,aAAa,EAAE,OAAO;IAKlB,mBAAmB,CACvB,IAAI,EAAE,qBAAqB,EAAE,EAC7B,aAAa,CAAC,EAAE,OAAO,GACtB,OAAO,CAAC,eAAe,EAAE,CAAC;IACvB,mBAAmB,CACvB,IAAI,EAAE,qBAAqB,EAC3B,aAAa,CAAC,EAAE,OAAO,GACtB,OAAO,CAAC,eAAe,CAAC;CA4B5B"}
@@ -14,7 +14,6 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  const utils_1 = require("@medusajs/utils");
16
16
  const _models_1 = require("../models");
17
- const joiner_config_1 = require("../joiner-config");
18
17
  class SalesChannelModuleService extends (0, utils_1.MedusaService)({
19
18
  SalesChannel: _models_1.SalesChannel,
20
19
  }) {
@@ -25,9 +24,6 @@ class SalesChannelModuleService extends (0, utils_1.MedusaService)({
25
24
  this.baseRepository_ = baseRepository;
26
25
  this.salesChannelService_ = salesChannelService;
27
26
  }
28
- __joinerConfig() {
29
- return joiner_config_1.joinerConfig;
30
- }
31
27
  async createSalesChannels(data, sharedContext = {}) {
32
28
  const input = Array.isArray(data) ? data : [data];
33
29
  const result = await this.createSalesChannels_(input, sharedContext);
@@ -5,3 +5,4 @@ export type InitializeModuleInjectableDependencies = {
5
5
  export type UpdateSalesChanneInput = UpdateSalesChannelDTO & {
6
6
  id: string;
7
7
  };
8
+ //# 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,MAAM,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAA;AAE/D,MAAM,MAAM,sCAAsC,GAAG;IACnD,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,MAAM,MAAM,sBAAsB,GAAG,qBAAqB,GAAG;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@medusajs/sales-channel",
3
- "version": "0.1.2-snapshot-20240704130951",
3
+ "version": "0.1.2-snapshot-20240711053716",
4
4
  "description": "Medusa Sales Channel module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -34,24 +34,21 @@
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-20240711053716",
37
38
  "@mikro-orm/cli": "5.9.7",
38
39
  "cross-env": "^5.2.1",
39
40
  "jest": "^29.7.0",
40
- "medusa-test-utils": "1.1.45-snapshot-20240704130951",
41
+ "medusa-test-utils": "1.1.45-snapshot-20240711053716",
41
42
  "rimraf": "^3.0.2",
42
43
  "ts-node": "^10.9.1",
43
44
  "tsc-alias": "^1.8.6",
44
45
  "typescript": "^5.1.6"
45
46
  },
46
47
  "dependencies": {
47
- "@medusajs/modules-sdk": "1.13.0-snapshot-20240704130951",
48
- "@medusajs/types": "1.12.0-snapshot-20240704130951",
49
- "@medusajs/utils": "1.12.0-snapshot-20240704130951",
48
+ "@medusajs/utils": "1.12.0-snapshot-20240711053716",
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.SALES_CHANNEL);