@medusajs/stock-location 1.0.2 → 1.0.3

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/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # @medusajs/stock-location
2
2
 
3
+ ## 1.0.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [#3065](https://github.com/medusajs/medusa/pull/3065) [`2d525237b`](https://github.com/medusajs/medusa/commit/2d525237b682e89495b6cc8e3aa677bfad4d0726) Thanks [@carlos-r-l-rodrigues](https://github.com/carlos-r-l-rodrigues)! - Fix (stock-location): stock location address required
8
+
9
+ - Updated dependencies [[`ce866475b`](https://github.com/medusajs/medusa/commit/ce866475b4b6c8b453638000f7b1df7a27daf45d), [`53532df8d`](https://github.com/medusajs/medusa/commit/53532df8d597ed5471c07296981b6959cba4ddc3), [`d8ffbe25b`](https://github.com/medusajs/medusa/commit/d8ffbe25b047fda0f644240c9f518f95e74f03cb), [`2d525237b`](https://github.com/medusajs/medusa/commit/2d525237b682e89495b6cc8e3aa677bfad4d0726), [`5b63533c7`](https://github.com/medusajs/medusa/commit/5b63533c77528cab31755cedab9e768f7461f373), [`09dc9c667`](https://github.com/medusajs/medusa/commit/09dc9c6677c0d64cf765b27290e707ea75edd4aa), [`4105405f2`](https://github.com/medusajs/medusa/commit/4105405f28c3f3e54a6077c95a575a268fb5569f), [`ee42b60a2`](https://github.com/medusajs/medusa/commit/ee42b60a20db2afc5e9b6b958502f9e86ec37d80), [`d0adaf57e`](https://github.com/medusajs/medusa/commit/d0adaf57ed1018f29bebf01e5cffde5f7192f89f), [`f65f590a2`](https://github.com/medusajs/medusa/commit/f65f590a2771d6e526d7dfc7ca721be74c8f79a9), [`5ec6d438f`](https://github.com/medusajs/medusa/commit/5ec6d438fb1f909be925461c788f3a3a958528e4), [`5c1d2a5e8`](https://github.com/medusajs/medusa/commit/5c1d2a5e83c3654ae468d17c900892c32ef76060), [`8e41c6996`](https://github.com/medusajs/medusa/commit/8e41c6996601142661bde877b9ee1d80b8325f5f), [`d50db84a3`](https://github.com/medusajs/medusa/commit/d50db84a336da2de9c06a59aa79f2a5e9aa558f1), [`82da3605f`](https://github.com/medusajs/medusa/commit/82da3605fb50cef182699900552109ad654f0df2), [`b242e2232`](https://github.com/medusajs/medusa/commit/b242e22326ce74d5437d0da6863f22facbb5964c), [`4339d47e1`](https://github.com/medusajs/medusa/commit/4339d47e1f6c9f6c8f100b3ac72c8a394b6dd44d), [`2e7e16b91`](https://github.com/medusajs/medusa/commit/2e7e16b9173e2779946776b9b07ce7232c683f36), [`9ebb50104`](https://github.com/medusajs/medusa/commit/9ebb50104cc1f6c8ef1cea446ae595fb2eb532a2), [`08324355a`](https://github.com/medusajs/medusa/commit/08324355a4466b017a0bc7ab1d333ee3cd27b8c4), [`e22a383f4`](https://github.com/medusajs/medusa/commit/e22a383f4738e8bc80394ccaba3ac9a4ae678955), [`dc156861d`](https://github.com/medusajs/medusa/commit/dc156861d413ecfe3fd264bcd5ad736d83d8a08e), [`8f4c84121`](https://github.com/medusajs/medusa/commit/8f4c84121bd9b8c7067d72f03125e13afe4d2571), [`bfa33f444`](https://github.com/medusajs/medusa/commit/bfa33f444cd225906149777c5c6e842685f3dd7c), [`f776ed234`](https://github.com/medusajs/medusa/commit/f776ed234fcfccf23041ffebecbae6c9a8b7e922), [`4d6e63d68`](https://github.com/medusajs/medusa/commit/4d6e63d68f4e64c365ecbba133876d95e6528763), [`fcba70570`](https://github.com/medusajs/medusa/commit/fcba705701b8013183fafb39e8dda4a85718080a), [`4f0d8992a`](https://github.com/medusajs/medusa/commit/4f0d8992a091a05e93dd5be3762dfa47f074610e), [`d25a53104`](https://github.com/medusajs/medusa/commit/d25a531045143d3be68d3cd3b5764bbbc792ee3a), [`86c87c7b1`](https://github.com/medusajs/medusa/commit/86c87c7b1020ab6bb02f931e1ee113f2857cf527), [`78650ea66`](https://github.com/medusajs/medusa/commit/78650ea66517b0a77100228615d8122f84ad235b), [`b9bda3bf4`](https://github.com/medusajs/medusa/commit/b9bda3bf4e0f95675041085cea5008268c37edd5), [`e581d3bd9`](https://github.com/medusajs/medusa/commit/e581d3bd90f9bc40105e7eaf34e0c94d4f657f7a), [`4d3210bfb`](https://github.com/medusajs/medusa/commit/4d3210bfbb84877d951f7319d2e87c1acbdd6aad)]:
10
+ - @medusajs/medusa@1.7.6
11
+ - medusa-interfaces@1.3.5
12
+
3
13
  ## 1.0.2
4
14
 
5
15
  ### Patch Changes
@@ -101,7 +101,7 @@ var setup1665749860179 = /** @class */ (function () {
101
101
  return __awaiter(this, void 0, void 0, function () {
102
102
  return __generator(this, function (_a) {
103
103
  switch (_a.label) {
104
- case 0: return [4 /*yield*/, queryRunner.query("\n CREATE TABLE \"stock_location_address\"\n (\n \"id\" CHARACTER VARYING NOT NULL,\n \"created_at\" TIMESTAMP WITH TIME zone NOT NULL DEFAULT Now(),\n \"updated_at\" TIMESTAMP WITH TIME zone NOT NULL DEFAULT Now(),\n \"deleted_at\" TIMESTAMP WITH TIME zone,\n \"address_1\" TEXT NOT NULL,\n \"address_2\" TEXT,\n \"city\" TEXT,\n \"country_code\" TEXT NOT NULL,\n \"phone\" TEXT,\n \"province\" TEXT,\n \"postal_code\" TEXT,\n \"metadata\" JSONB,\n CONSTRAINT \"PK_b79bc27285bede680501b7b81a5\" PRIMARY KEY (\"id\")\n );\n\n CREATE INDEX \"IDX_stock_location_address_country_code\" ON \"stock_location_address\" (\"country_code\");\n\n CREATE TABLE \"stock_location\"\n (\n \"id\" CHARACTER VARYING NOT NULL,\n \"created_at\" TIMESTAMP WITH time zone NOT NULL DEFAULT Now(),\n \"updated_at\" TIMESTAMP WITH time zone NOT NULL DEFAULT Now(),\n \"deleted_at\" TIMESTAMP WITH time zone,\n \"name\" TEXT NOT NULL,\n \"address_id\" TEXT NOT NULL,\n \"metadata\" JSONB,\n CONSTRAINT \"PK_adf770067d0df1421f525fa25cc\" PRIMARY KEY (\"id\")\n );\n\n CREATE INDEX \"IDX_stock_location_address_id\" ON \"stock_location\" (\"address_id\");\n ")];
104
+ case 0: return [4 /*yield*/, queryRunner.query("\n CREATE TABLE \"stock_location_address\"\n (\n \"id\" CHARACTER VARYING NOT NULL,\n \"created_at\" TIMESTAMP WITH TIME zone NOT NULL DEFAULT Now(),\n \"updated_at\" TIMESTAMP WITH TIME zone NOT NULL DEFAULT Now(),\n \"deleted_at\" TIMESTAMP WITH TIME zone,\n \"address_1\" TEXT NOT NULL,\n \"address_2\" TEXT,\n \"company\" TEXT,\n \"city\" TEXT,\n \"country_code\" TEXT NOT NULL,\n \"phone\" TEXT,\n \"province\" TEXT,\n \"postal_code\" TEXT,\n \"metadata\" JSONB,\n CONSTRAINT \"PK_b79bc27285bede680501b7b81a5\" PRIMARY KEY (\"id\")\n );\n\n CREATE INDEX \"IDX_stock_location_address_country_code\" ON \"stock_location_address\" (\"country_code\");\n\n CREATE TABLE \"stock_location\"\n (\n \"id\" CHARACTER VARYING NOT NULL,\n \"created_at\" TIMESTAMP WITH time zone NOT NULL DEFAULT Now(),\n \"updated_at\" TIMESTAMP WITH time zone NOT NULL DEFAULT Now(),\n \"deleted_at\" TIMESTAMP WITH time zone,\n \"name\" TEXT NOT NULL,\n \"address_id\" TEXT,\n \"metadata\" JSONB,\n CONSTRAINT \"PK_adf770067d0df1421f525fa25cc\" PRIMARY KEY (\"id\")\n );\n\n CREATE INDEX \"IDX_stock_location_address_id\" ON \"stock_location\" (\"address_id\") WHERE deleted_at IS NOT NULL;\n ")];
105
105
  case 1:
106
106
  _a.sent();
107
107
  return [2 /*return*/];
@@ -1 +1 @@
1
- {"version":3,"file":"1665749860179-setup.js","sourceRoot":"","sources":["../../../src/migrations/schema-migrations/1665749860179-setup.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,mCAKgB;AAEhB,uCAA8C;AAEvC,IAAM,EAAE,GAAG,UAAO,EAAgD;QAA9C,YAAY,kBAAA;;;;;wBA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gD7B,CAAC;IA9Cc,+BAAE,GAAf,UAAgB,WAAwB;;;;4BACtC,qBAAM,WAAW,CAAC,KAAK,CAAC,4zCAiCvB,CAAC,EAAA;;wBAjCF,SAiCE,CAAA;;;;;KACH;IAEY,iCAAI,GAAjB,UAAkB,WAAwB;;;;4BACxC,qBAAM,WAAW,CAAC,KAAK,CAAC,kNAMvB,CAAC,EAAA;;wBANF,SAME,CAAA;;;;;KACH;IACH,yBAAC;AAAD,CAAC,AAjDD,IAiDC;AAjDY,gDAAkB"}
1
+ {"version":3,"file":"1665749860179-setup.js","sourceRoot":"","sources":["../../../src/migrations/schema-migrations/1665749860179-setup.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,mCAKgB;AAEhB,uCAA8C;AAEvC,IAAM,EAAE,GAAG,UAAO,EAAgD;QAA9C,YAAY,kBAAA;;;;;wBAClB,qBAAM,IAAA,0BAAgB,EAAC;wBACxC,IAAI,EAAE,wBAAe;wBACrB,IAAI,EAAE,YAAY,CAAC,aAAa,CAAC,aAAa;wBAC9C,GAAG,EAAE,YAAY,CAAC,aAAa,CAAC,YAAY;wBAC5C,QAAQ,EAAE,YAAY,CAAC,aAAa,CAAC,iBAAiB;wBACtD,MAAM,EAAE,YAAY,CAAC,aAAa,CAAC,eAAe;wBAClD,KAAK,EAAE,YAAY,CAAC,aAAa,CAAC,cAAc,IAAI,EAAE;wBACtD,UAAU,EAAE,CAAC,kBAAkB,CAAC;wBAChC,OAAO,EAAE,IAAI;qBACO,CAAC,EAAA;;oBATjB,UAAU,GAAG,SASI;oBAEvB,qBAAM,UAAU,CAAC,aAAa,EAAE,EAAA;;oBAAhC,SAAgC,CAAA;;;;;CACjC,CAAA;AAbY,QAAA,EAAE,MAad;AAEM,IAAM,IAAI,GAAG,UAAO,EAI1B;QAHC,YAAY,kBAAA;;;;;wBAIO,qBAAM,IAAA,0BAAgB,EAAC;wBACxC,IAAI,EAAE,wBAAe;wBACrB,IAAI,EAAE,YAAY,CAAC,aAAa,CAAC,aAAa;wBAC9C,GAAG,EAAE,YAAY,CAAC,aAAa,CAAC,YAAY;wBAC5C,QAAQ,EAAE,YAAY,CAAC,aAAa,CAAC,iBAAiB;wBACtD,MAAM,EAAE,YAAY,CAAC,aAAa,CAAC,eAAe;wBAClD,KAAK,EAAE,YAAY,CAAC,aAAa,CAAC,cAAc,IAAI,EAAE;wBACtD,UAAU,EAAE,CAAC,kBAAkB,CAAC;wBAChC,OAAO,EAAE,IAAI;qBACO,CAAC,EAAA;;oBATjB,UAAU,GAAG,SASI;oBAEvB,qBAAM,UAAU,CAAC,iBAAiB,CAAC,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC,EAAA;;oBAA1D,SAA0D,CAAA;;;;;CAC3D,CAAA;AAjBY,QAAA,IAAI,QAiBhB;AAED;IAAA;QACE,SAAI,GAAG,oBAAoB,CAAA;IAiD7B,CAAC;IA/Cc,+BAAE,GAAf,UAAgB,WAAwB;;;;4BACtC,qBAAM,WAAW,CAAC,KAAK,CAAC,22CAkCvB,CAAC,EAAA;;wBAlCF,SAkCE,CAAA;;;;;KACH;IAEY,iCAAI,GAAjB,UAAkB,WAAwB;;;;4BACxC,qBAAM,WAAW,CAAC,KAAK,CAAC,kNAMvB,CAAC,EAAA;;wBANF,SAME,CAAA;;;;;KACH;IACH,yBAAC;AAAD,CAAC,AAlDD,IAkDC;AAlDY,gDAAkB"}
@@ -2,6 +2,7 @@ import { SoftDeletableEntity } from "@medusajs/medusa";
2
2
  export declare class StockLocationAddress extends SoftDeletableEntity {
3
3
  address_1: string;
4
4
  address_2: string | null;
5
+ company: string | null;
5
6
  city: string | null;
6
7
  country_code: string;
7
8
  phone: string | null;
@@ -43,6 +43,10 @@ var StockLocationAddress = /** @class */ (function (_super) {
43
43
  (0, typeorm_1.Column)({ type: "text", nullable: true }),
44
44
  __metadata("design:type", Object)
45
45
  ], StockLocationAddress.prototype, "address_2", void 0);
46
+ __decorate([
47
+ (0, typeorm_1.Column)({ type: "text", nullable: true }),
48
+ __metadata("design:type", Object)
49
+ ], StockLocationAddress.prototype, "company", void 0);
46
50
  __decorate([
47
51
  (0, typeorm_1.Column)({ type: "text", nullable: true }),
48
52
  __metadata("design:type", Object)
@@ -1 +1 @@
1
- {"version":3,"file":"stock-location-address.js","sourceRoot":"","sources":["../../src/models/stock-location-address.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mCAA6D;AAC7D,2CAAwE;AAGxE;IAA0C,wCAAmB;IAA7D;;IA8BA,CAAC;IAHS,2CAAY,GAApB;QACE,IAAI,CAAC,EAAE,GAAG,IAAA,yBAAgB,EAAC,IAAI,CAAC,EAAE,EAAE,OAAO,CAAC,CAAA;IAC9C,CAAC;IA3BD;QADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;2DACR;IAGjB;QADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2DACjB;IAGxB;QADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sDACtB;IAInB;QAFC,IAAA,eAAK,GAAE;QACP,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;8DACL;IAGpB;QADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uDACrB;IAGpB;QADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0DAClB;IAGvB;QADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6DACf;IAG1B;QADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,IAA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M,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6DACf;IAG1B;QADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0DACF;IAGxC;QADC,IAAA,sBAAY,GAAE;;;;4DAGd;IAhCU,oBAAoB;QADhC,IAAA,gBAAM,GAAE;OACI,oBAAoB,CAiChC;IAAD,2BAAC;CAAA,AAjCD,CAA0C,4BAAmB,GAiC5D;AAjCY,oDAAoB"}
@@ -2,7 +2,7 @@ import { SoftDeletableEntity } from "@medusajs/medusa";
2
2
  import { StockLocationAddress } from ".";
3
3
  export declare class StockLocation extends SoftDeletableEntity {
4
4
  name: string;
5
- address_id: string;
5
+ address_id: string | null;
6
6
  address: StockLocationAddress | null;
7
7
  metadata: Record<string, unknown> | null;
8
8
  private beforeInsert;
@@ -42,8 +42,8 @@ var StockLocation = /** @class */ (function (_super) {
42
42
  ], StockLocation.prototype, "name", void 0);
43
43
  __decorate([
44
44
  (0, typeorm_1.Index)(),
45
- (0, typeorm_1.Column)({ type: "text" }),
46
- __metadata("design:type", String)
45
+ (0, typeorm_1.Column)({ type: "text", nullable: true }),
46
+ __metadata("design:type", Object)
47
47
  ], StockLocation.prototype, "address_id", void 0);
48
48
  __decorate([
49
49
  (0, typeorm_1.ManyToOne)(function () { return _1.StockLocationAddress; }),
@@ -1 +1 @@
1
- {"version":3,"file":"stock-location.js","sourceRoot":"","sources":["../../src/models/stock-location.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mCAOgB;AAChB,2CAAwE;AAExE,sBAAwC;AAGxC;IAAmC,iCAAmB;IAAtD;;IAmBA,CAAC;IAHS,oCAAY,GAApB;QACE,IAAI,CAAC,EAAE,GAAG,IAAA,yBAAgB,EAAC,IAAI,CAAC,EAAE,EAAE,MAAM,CAAC,CAAA;IAC7C,CAAC;IAhBD;QADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MA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E,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mDACF;IAGxC;QADC,IAAA,sBAAY,GAAE;;;;qDAGd;IAlBU,aAAa;QADzB,IAAA,gBAAM,GAAE;OACI,aAAa,CAmBzB;IAAD,oBAAC;CAAA,AAnBD,CAAmC,4BAAmB,GAmBrD;AAnBY,sCAAa"}
@@ -21,51 +21,50 @@ export default class StockLocationService extends TransactionBaseService {
21
21
  private getManager;
22
22
  /**
23
23
  * Lists all stock locations that match the given selector.
24
- * @param {FilterableStockLocationProps} [selector={}] - Properties to filter by.
25
- * @param {FindConfig} [config={ relations: [], skip: 0, take: 10 }] - Additional configuration for the query.
26
- * @return {Promise<StockLocation[]>} A list of stock locations.
24
+ * @param selector - Properties to filter by.
25
+ * @param config - Additional configuration for the query.
26
+ * @return A list of stock locations.
27
27
  */
28
28
  list(selector?: FilterableStockLocationProps, config?: FindConfig<StockLocation>): Promise<StockLocation[]>;
29
29
  /**
30
30
  * Lists all stock locations that match the given selector and returns the count of matching stock locations.
31
- * @param {FilterableStockLocationProps} [selector={}] - Properties to filter by.
32
- * @param {FindConfig} [config={ relations: [], skip: 0, take: 10 }] - Additional configuration for the query.
33
- * @return {Promise<[StockLocation[], number]>} A list of stock locations and the count of matching stock locations.
31
+ * @param selector - Properties to filter by.
32
+ * @param config - Additional configuration for the query.
33
+ * @return A list of stock locations and the count of matching stock locations.
34
34
  */
35
35
  listAndCount(selector?: FilterableStockLocationProps, config?: FindConfig<StockLocation>): Promise<[StockLocation[], number]>;
36
36
  /**
37
- * Retrieves a stock location by its ID.
38
- * @param {string} stockLocationId - The ID of the stock location.
39
- * @param {FindConfig} [config={}] - Additional configuration for the query.
40
- * @return {Promise<StockLocation>} The stock location.
41
- * @throws {MedusaError} If the stock location ID is not defined.
42
- * @throws {MedusaError} If the stock location with the given ID was not found.
37
+ * Retrieves a Stock Location by its ID.
38
+ * @param stockLocationId - The ID of the stock location.
39
+ * @param config - Additional configuration for the query.
40
+ * @return The stock location.
41
+ * @throws If the stock location ID is not definedor the stock location with the given ID was not found.
43
42
  */
44
43
  retrieve(stockLocationId: string, config?: FindConfig<StockLocation>): Promise<StockLocation>;
45
44
  /**
46
45
  * Creates a new stock location.
47
- * @param {CreateStockLocationInput} data - The input data for creating a stock location.
48
- * @returns {Promise<StockLocation>} - The created stock location.
46
+ * @param data - The input data for creating a Stock Location.
47
+ * @returns The created stock location.
49
48
  */
50
49
  create(data: CreateStockLocationInput): Promise<StockLocation>;
51
50
  /**
52
51
  * Updates an existing stock location.
53
- * @param {string} stockLocationId - The ID of the stock location to update.
54
- * @param {UpdateStockLocationInput} updateData - The update data for the stock location.
55
- * @returns {Promise<StockLocation>} - The updated stock location.
52
+ * @param stockLocationId - The ID of the stock location to update.
53
+ * @param updateData - The update data for the stock location.
54
+ * @returns The updated stock location.
56
55
  */
57
56
  update(stockLocationId: string, updateData: UpdateStockLocationInput): Promise<StockLocation>;
58
57
  /**
59
- * Updates an address for a stock location.
60
- * @param {string} addressId - The ID of the address to update.
61
- * @param {StockLocationAddressInput} address - The update data for the address.
62
- * @returns {Promise<StockLocationAddress>} - The updated stock location address.
58
+ * Updates an address for a Stock Location.
59
+ * @param addressId - The ID of the address to update.
60
+ * @param address - The update data for the address.
61
+ * @returns The updated stock location address.
63
62
  */
64
63
  protected updateAddress(addressId: string, address: StockLocationAddressInput): Promise<StockLocationAddress>;
65
64
  /**
66
- * Deletes a stock location.
67
- * @param {string} id - The ID of the stock location to delete.
68
- * @returns {Promise<void>} - An empty promise.
65
+ * Deletes a Stock Location.
66
+ * @param id - The ID of the stock location to delete.
67
+ * @returns An empty promise.
69
68
  */
70
69
  delete(id: string): Promise<void>;
71
70
  }
@@ -111,9 +111,9 @@ var StockLocationService = /** @class */ (function (_super) {
111
111
  };
112
112
  /**
113
113
  * Lists all stock locations that match the given selector.
114
- * @param {FilterableStockLocationProps} [selector={}] - Properties to filter by.
115
- * @param {FindConfig} [config={ relations: [], skip: 0, take: 10 }] - Additional configuration for the query.
116
- * @return {Promise<StockLocation[]>} A list of stock locations.
114
+ * @param selector - Properties to filter by.
115
+ * @param config - Additional configuration for the query.
116
+ * @return A list of stock locations.
117
117
  */
118
118
  StockLocationService.prototype.list = function (selector, config) {
119
119
  if (selector === void 0) { selector = {}; }
@@ -134,9 +134,9 @@ var StockLocationService = /** @class */ (function (_super) {
134
134
  };
135
135
  /**
136
136
  * Lists all stock locations that match the given selector and returns the count of matching stock locations.
137
- * @param {FilterableStockLocationProps} [selector={}] - Properties to filter by.
138
- * @param {FindConfig} [config={ relations: [], skip: 0, take: 10 }] - Additional configuration for the query.
139
- * @return {Promise<[StockLocation[], number]>} A list of stock locations and the count of matching stock locations.
137
+ * @param selector - Properties to filter by.
138
+ * @param config - Additional configuration for the query.
139
+ * @return A list of stock locations and the count of matching stock locations.
140
140
  */
141
141
  StockLocationService.prototype.listAndCount = function (selector, config) {
142
142
  if (selector === void 0) { selector = {}; }
@@ -156,12 +156,11 @@ var StockLocationService = /** @class */ (function (_super) {
156
156
  });
157
157
  };
158
158
  /**
159
- * Retrieves a stock location by its ID.
160
- * @param {string} stockLocationId - The ID of the stock location.
161
- * @param {FindConfig} [config={}] - Additional configuration for the query.
162
- * @return {Promise<StockLocation>} The stock location.
163
- * @throws {MedusaError} If the stock location ID is not defined.
164
- * @throws {MedusaError} If the stock location with the given ID was not found.
159
+ * Retrieves a Stock Location by its ID.
160
+ * @param stockLocationId - The ID of the stock location.
161
+ * @param config - Additional configuration for the query.
162
+ * @return The stock location.
163
+ * @throws If the stock location ID is not definedor the stock location with the given ID was not found.
165
164
  */
166
165
  StockLocationService.prototype.retrieve = function (stockLocationId, config) {
167
166
  if (config === void 0) { config = {}; }
@@ -189,8 +188,8 @@ var StockLocationService = /** @class */ (function (_super) {
189
188
  };
190
189
  /**
191
190
  * Creates a new stock location.
192
- * @param {CreateStockLocationInput} data - The input data for creating a stock location.
193
- * @returns {Promise<StockLocation>} - The created stock location.
191
+ * @param data - The input data for creating a Stock Location.
192
+ * @returns The created stock location.
194
193
  */
195
194
  StockLocationService.prototype.create = function (data) {
196
195
  return __awaiter(this, void 0, void 0, function () {
@@ -198,7 +197,7 @@ var StockLocationService = /** @class */ (function (_super) {
198
197
  return __generator(this, function (_a) {
199
198
  switch (_a.label) {
200
199
  case 0: return [4 /*yield*/, this.atomicPhase_(function (manager) { return __awaiter(_this, void 0, void 0, function () {
201
- var locationRepo, loc, addrId, address, locAddressRepo, locAddress, addressResult, metadata, result;
200
+ var locationRepo, loc, addrId, locAddressRepo, locAddress, addressResult, metadata, result;
202
201
  var _a;
203
202
  return __generator(this, function (_b) {
204
203
  switch (_b.label) {
@@ -207,38 +206,33 @@ var StockLocationService = /** @class */ (function (_super) {
207
206
  loc = locationRepo.create({
208
207
  name: data.name,
209
208
  });
210
- if (!((0, medusa_core_utils_1.isDefined)(data.address) || (0, medusa_core_utils_1.isDefined)(data.address_id))) return [3 /*break*/, 4];
211
- if (!(typeof data.address === "string" || data.address_id)) return [3 /*break*/, 2];
209
+ if (!((0, medusa_core_utils_1.isDefined)(data.address) || (0, medusa_core_utils_1.isDefined)(data.address_id))) return [3 /*break*/, 3];
210
+ if (!(typeof data.address === "string" || data.address_id)) return [3 /*break*/, 1];
212
211
  addrId = ((_a = data.address) !== null && _a !== void 0 ? _a : data.address_id);
213
- return [4 /*yield*/, this.retrieve(addrId, {
214
- select: ["id"],
215
- })];
212
+ loc.address_id = addrId;
213
+ return [3 /*break*/, 3];
216
214
  case 1:
217
- address = _b.sent();
218
- loc.address_id = address.id;
219
- return [3 /*break*/, 4];
220
- case 2:
221
215
  locAddressRepo = manager.getRepository(models_1.StockLocationAddress);
222
216
  locAddress = locAddressRepo.create(data.address);
223
217
  return [4 /*yield*/, locAddressRepo.save(locAddress)];
224
- case 3:
218
+ case 2:
225
219
  addressResult = _b.sent();
226
220
  loc.address_id = addressResult.id;
227
- _b.label = 4;
228
- case 4:
221
+ _b.label = 3;
222
+ case 3:
229
223
  metadata = data.metadata;
230
224
  if (metadata) {
231
225
  loc.metadata = (0, medusa_1.setMetadata)(loc, metadata);
232
226
  }
233
227
  return [4 /*yield*/, locationRepo.save(loc)];
234
- case 5:
228
+ case 4:
235
229
  result = _b.sent();
236
230
  return [4 /*yield*/, this.eventBusService_
237
231
  .withTransaction(manager)
238
232
  .emit(StockLocationService.Events.CREATED, {
239
233
  id: result.id,
240
234
  })];
241
- case 6:
235
+ case 5:
242
236
  _b.sent();
243
237
  return [2 /*return*/, result];
244
238
  }
@@ -251,9 +245,9 @@ var StockLocationService = /** @class */ (function (_super) {
251
245
  };
252
246
  /**
253
247
  * Updates an existing stock location.
254
- * @param {string} stockLocationId - The ID of the stock location to update.
255
- * @param {UpdateStockLocationInput} updateData - The update data for the stock location.
256
- * @returns {Promise<StockLocation>} - The updated stock location.
248
+ * @param stockLocationId - The ID of the stock location to update.
249
+ * @param updateData - The update data for the stock location.
250
+ * @returns The updated stock location.
257
251
  */
258
252
  StockLocationService.prototype.update = function (stockLocationId, updateData) {
259
253
  return __awaiter(this, void 0, void 0, function () {
@@ -285,7 +279,7 @@ var StockLocationService = /** @class */ (function (_super) {
285
279
  data.address_id = addressResult.id;
286
280
  _a.label = 5;
287
281
  case 5:
288
- metadata = updateData.metadata, fields = __rest(updateData, ["metadata"]);
282
+ metadata = data.metadata, fields = __rest(data, ["metadata"]);
289
283
  toSave = locationRepo.merge(item, fields);
290
284
  if (metadata) {
291
285
  toSave.metadata = (0, medusa_1.setMetadata)(toSave, metadata);
@@ -310,10 +304,10 @@ var StockLocationService = /** @class */ (function (_super) {
310
304
  });
311
305
  };
312
306
  /**
313
- * Updates an address for a stock location.
314
- * @param {string} addressId - The ID of the address to update.
315
- * @param {StockLocationAddressInput} address - The update data for the address.
316
- * @returns {Promise<StockLocationAddress>} - The updated stock location address.
307
+ * Updates an address for a Stock Location.
308
+ * @param addressId - The ID of the address to update.
309
+ * @param address - The update data for the address.
310
+ * @returns The updated stock location address.
317
311
  */
318
312
  StockLocationService.prototype.updateAddress = function (addressId, address) {
319
313
  return __awaiter(this, void 0, void 0, function () {
@@ -354,9 +348,9 @@ var StockLocationService = /** @class */ (function (_super) {
354
348
  });
355
349
  };
356
350
  /**
357
- * Deletes a stock location.
358
- * @param {string} id - The ID of the stock location to delete.
359
- * @returns {Promise<void>} - An empty promise.
351
+ * Deletes a Stock Location.
352
+ * @param id - The ID of the stock location to delete.
353
+ * @returns An empty promise.
360
354
  */
361
355
  StockLocationService.prototype.delete = function (id) {
362
356
  return __awaiter(this, void 0, void 0, function () {
@@ -1 +1 @@
1
- {"version":3,"file":"stock-location.js","sourceRoot":"","sources":["../../src/services/stock-location.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAYyB;AACzB,uDAA0D;AAG1D,oCAA+D;AAO/D;;GAEG;AAEH;IAAkD,wCAAsB;IAYtE,8BACE,EAAkD,EAClD,OAAiB,EACjB,iBAAiD;YAF/C,eAAe,qBAAA,EAAE,OAAO,aAAA;QAD5B,wDAMW,SAAS,mBAWnB;QATC,IAAI,CAAA,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,SAAS,MAAK,6BAAoB,CAAC,MAAM,EAAE;YAChE,MAAM,IAAI,+BAAW,CACnB,+BAAW,CAAC,KAAK,CAAC,gBAAgB,EAClC,kEAAkE,CACnE,CAAA;SACF;QAED,KAAI,CAAC,gBAAgB,GAAG,eAAe,CAAA;QACvC,KAAI,CAAC,QAAQ,GAAG,OAAO,CAAA;;IACzB,CAAC;IAEO,yCAAU,GAAlB;;QACE,OAAO,MAAA,IAAI,CAAC,mBAAmB,mCAAI,IAAI,CAAC,QAAQ,CAAA;IAClD,CAAC;IAED;;;;;OAKG;IACG,mCAAI,GAAV,UACE,QAA2C,EAC3C,MAAwE;QADxE,yBAAA,EAAA,aAA2C;QAC3C,uBAAA,EAAA,WAAsC,SAAS,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CAAF,CAAY;4CAEjC,MAAM,GAAG,mBAAmB,CAAC,KAAK,CAAC,eAAe,EAAE,MAAM,CAAC,CAAA;4CACjE,IAAI,QAAQ,EAAE;gDACZ,MAAM,CAAC,QAAQ,GAAG,IAAA,oBAAW,EAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;6CAChD;4CAEM,qBAAM,mBAAmB,CAAC,IAAI,CAAC,MAAM,CAAC,EAAA;gDAA7C,sBAAO,SAAsC,EAAA;;;iCAC9C,CAAC,EAAA;4BArBF,sBAAO,SAqBL,EAAA;;;;KACH;IAED;;;;OAIG;IACG,qCAAM,GAAZ,UAAa,EAAU;;;;;4BACd,qBAAM,IAAI,CAAC,YAAY,CAAC,UAAO,OAAO;;;;;wCACrC,YAAY,GAAG,OAAO,CAAC,aAAa,CAAC,sBAAa,CAAC,CAAA;wCAEzD,qBAAM,YAAY,CAAC,UAAU,CAAC,EAAE,EAAE,IAAA,EAAE,CAAC,EAAA;;wCAArC,SAAqC,CAAA;wCAErC,qBAAM,IAAI,CAAC,gBAAgB;iDACxB,eAAe,CAAC,OAAO,CAAC;iDACxB,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC,OAAO,EAAE;gDACzC,EAAE,IAAA;6CACH,CAAC,EAAA;;wCAJJ,SAII,CAAA;;;;6BACL,CAAC,EAAA;4BAVF,sBAAO,SAUL,EAAA;;;;KACH;IA3PM,2BAAM,GAAG;QACd,OAAO,EAAE,wBAAwB;QACjC,OAAO,EAAE,wBAAwB;QACjC,OAAO,EAAE,wBAAwB;KAClC,CAAA;IAwPH,2BAAC;CAAA,AA7PD,CAAkD,+BAAsB,GA6PvE;kBA7PoB,oBAAoB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@medusajs/stock-location",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "Stock Location Module for Medusa",
5
5
  "main": "dist/index.js",
6
6
  "repository": {
@@ -14,9 +14,9 @@
14
14
  "author": "Medusa",
15
15
  "license": "MIT",
16
16
  "devDependencies": {
17
- "@medusajs/medusa": "^1.7.4",
17
+ "@medusajs/medusa": "^1.7.6",
18
18
  "cross-env": "^5.2.1",
19
- "jest": "^25.5.2",
19
+ "jest": "^25.5.4",
20
20
  "ts-jest": "^25.5.1",
21
21
  "typescript": "^4.4.4"
22
22
  },
@@ -28,8 +28,8 @@
28
28
  "test:unit": "jest --passWithNoTests"
29
29
  },
30
30
  "peerDependencies": {
31
- "@medusajs/medusa": "^1.7.4",
32
- "medusa-interfaces": "1.3.4",
31
+ "@medusajs/medusa": "^1.7.6",
32
+ "medusa-interfaces": "1.3.5",
33
33
  "typeorm": "^0.2.31"
34
34
  }
35
35
  }