@prodoctors/contracts 1.0.3 → 1.0.5

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/gen/inventory.ts CHANGED
@@ -1,78 +1,164 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
3
  // protoc-gen-ts_proto v2.11.5
4
- // protoc v3.21.12
4
+ // protoc v7.34.0
5
5
  // source: inventory.proto
6
6
 
7
7
  /* eslint-disable */
8
8
  import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
9
9
  import { Observable } from "rxjs";
10
- import { BoolResponse, Empty, IdRequest, PaginationMeta, PaginationRequest } from "./common";
10
+ import { Brand, Category, InternationalName, Manufacturer } from "./catalog";
11
+ import { BoolResponse, IdRequest, PaginationMeta, PaginationRequest } from "./common";
11
12
  import { Timestamp } from "./google/protobuf/timestamp";
12
13
 
13
14
  export const protobufPackage = "inventory.v1";
14
15
 
15
- export interface Branch {
16
- id: string;
17
- name: string;
18
- phone: string;
19
- address?: string | undefined;
20
- lat?: string | undefined;
21
- lng?: string | undefined;
22
- createdAt: Timestamp | undefined;
23
- updatedAt: Timestamp | undefined;
16
+ export enum ProductStatus {
17
+ PRODUCT_STATUS_UNSPECIFIED = 0,
18
+ PRODUCT_STATUS_ACTIVE = 1,
19
+ PRODUCT_STATUS_INACTIVE = 2,
20
+ UNRECOGNIZED = -1,
21
+ }
22
+
23
+ export enum UnitType {
24
+ UNIT_TYPE_UNSPECIFIED = 0,
25
+ UNIT_TYPE_PIECE = 1,
26
+ UNIT_TYPE_BOX = 2,
27
+ UNIT_TYPE_BOTTLE = 3,
28
+ UNIT_TYPE_PACK = 4,
29
+ UNIT_TYPE_BLISTER = 5,
30
+ UNIT_TYPE_TUBE = 6,
31
+ UNIT_TYPE_AMPULE = 7,
32
+ UNIT_TYPE_VIAL = 8,
33
+ UNRECOGNIZED = -1,
34
+ }
35
+
36
+ export enum ProductForm {
37
+ PRODUCT_FORM_UNSPECIFIED = 0,
38
+ PRODUCT_FORM_TABLET = 1,
39
+ PRODUCT_FORM_CAPSULE = 2,
40
+ PRODUCT_FORM_SYRUP = 3,
41
+ PRODUCT_FORM_INJECTION = 4,
42
+ PRODUCT_FORM_OINTMENT = 5,
43
+ PRODUCT_FORM_CREAM = 6,
44
+ PRODUCT_FORM_GEL = 7,
45
+ PRODUCT_FORM_DROPS = 8,
46
+ PRODUCT_FORM_SPRAY = 9,
47
+ PRODUCT_FORM_POWDER = 10,
48
+ PRODUCT_FORM_SOLUTION = 11,
49
+ PRODUCT_FORM_SUPPOSITORY = 12,
50
+ PRODUCT_FORM_OTHER = 13,
51
+ UNRECOGNIZED = -1,
52
+ }
53
+
54
+ export enum BatchStatus {
55
+ BATCH_STATUS_UNSPECIFIED = 0,
56
+ BATCH_STATUS_ACTIVE = 1,
57
+ BATCH_STATUS_EXPIRED = 2,
58
+ BATCH_STATUS_DEPLETED = 3,
59
+ BATCH_STATUS_BLOCKED = 4,
60
+ UNRECOGNIZED = -1,
61
+ }
62
+
63
+ export enum StockMovementType {
64
+ STOCK_MOVEMENT_TYPE_UNSPECIFIED = 0,
65
+ STOCK_MOVEMENT_TYPE_IN = 1,
66
+ STOCK_MOVEMENT_TYPE_OUT = 2,
67
+ STOCK_MOVEMENT_TYPE_RETURN_IN = 3,
68
+ STOCK_MOVEMENT_TYPE_RETURN_OUT = 4,
69
+ STOCK_MOVEMENT_TYPE_WRITE_OFF = 5,
70
+ STOCK_MOVEMENT_TYPE_ADJUSTMENT = 6,
71
+ STOCK_MOVEMENT_TYPE_TRANSFER_OUT = 7,
72
+ STOCK_MOVEMENT_TYPE_TRANSFER_IN = 8,
73
+ UNRECOGNIZED = -1,
24
74
  }
25
75
 
26
76
  export interface Product {
27
77
  id: string;
28
78
  name: string;
29
79
  sku: string;
30
- barcode: string;
80
+ barcode?: string | undefined;
81
+ dosage?: string | undefined;
82
+ description?: string | undefined;
83
+ form: ProductForm;
84
+ unit: UnitType;
85
+ requiresPrescription: boolean;
86
+ status: ProductStatus;
87
+ brandId?: string | undefined;
88
+ categoryId?: string | undefined;
89
+ internationalNameId?: string | undefined;
90
+ manufacturerId?: string | undefined;
31
91
  price: string;
32
92
  costPrice?: string | undefined;
93
+ brand?: Brand | undefined;
94
+ category?: Category | undefined;
95
+ internationalName?: InternationalName | undefined;
96
+ manufacturer?: Manufacturer | undefined;
33
97
  createdAt: Timestamp | undefined;
34
98
  updatedAt: Timestamp | undefined;
35
99
  }
36
100
 
37
- export interface InventoryItem {
101
+ export interface ProductBarcode {
38
102
  id: string;
39
- branchId: string;
40
103
  productId: string;
41
- quantity: number;
42
- minQuantity: number;
43
- expireAt?: Timestamp | undefined;
44
- batchNumber?: string | undefined;
45
- branch: Branch | undefined;
46
- product: Product | undefined;
104
+ barcode: string;
105
+ isPrimary: boolean;
106
+ packageType?: string | undefined;
107
+ note?: string | undefined;
47
108
  createdAt: Timestamp | undefined;
48
109
  updatedAt: Timestamp | undefined;
49
110
  }
50
111
 
51
- export interface CreateBranchRequest {
52
- name: string;
53
- address?: string | undefined;
54
- phone?: string | undefined;
55
- }
56
-
57
- export interface UpdateBranchRequest {
112
+ export interface ProductBatch {
58
113
  id: string;
59
- name?: string | undefined;
60
- address?: string | undefined;
61
- phone?: string | undefined;
114
+ productId: string;
115
+ branchId: string;
116
+ batchNumber: string;
117
+ expiryDate: Timestamp | undefined;
118
+ manufactureDate?: Timestamp | undefined;
119
+ purchasePrice: string;
120
+ sellingPrice: string;
121
+ initialQuantity: number;
122
+ remainingQuantity: number;
123
+ status: BatchStatus;
124
+ purchaseItemId?: string | undefined;
125
+ product?: Product | undefined;
126
+ createdAt: Timestamp | undefined;
127
+ updatedAt: Timestamp | undefined;
62
128
  }
63
129
 
64
- export interface ListBranchesResponse {
65
- items: Branch[];
130
+ export interface StockMovement {
131
+ id: string;
132
+ branchId: string;
133
+ productId: string;
134
+ productBatchId: string;
135
+ type: StockMovementType;
136
+ quantity: number;
137
+ balanceBefore: number;
138
+ balanceAfter: number;
139
+ referenceType?: string | undefined;
140
+ referenceId?: string | undefined;
141
+ performedById?: string | undefined;
142
+ note?: string | undefined;
143
+ createdAt: Timestamp | undefined;
66
144
  }
67
145
 
68
146
  export interface CreateProductRequest {
69
147
  name: string;
70
148
  sku: string;
71
- barcode: string;
72
- /** / Kirim narxi */
73
- costPrice: string;
74
- /** / Sotuv narxi */
75
- price?: string | undefined;
149
+ barcode?: string | undefined;
150
+ dosage?: string | undefined;
151
+ description?: string | undefined;
152
+ form: ProductForm;
153
+ unit: UnitType;
154
+ requiresPrescription?: boolean | undefined;
155
+ status?: ProductStatus | undefined;
156
+ brandId?: string | undefined;
157
+ categoryId?: string | undefined;
158
+ internationalNameId?: string | undefined;
159
+ manufacturerId?: string | undefined;
160
+ price: string;
161
+ costPrice?: string | undefined;
76
162
  }
77
163
 
78
164
  export interface UpdateProductRequest {
@@ -80,17 +166,28 @@ export interface UpdateProductRequest {
80
166
  name?: string | undefined;
81
167
  sku?: string | undefined;
82
168
  barcode?: string | undefined;
169
+ dosage?: string | undefined;
170
+ description?: string | undefined;
171
+ form?: ProductForm | undefined;
172
+ unit?: UnitType | undefined;
173
+ requiresPrescription?: boolean | undefined;
174
+ status?: ProductStatus | undefined;
175
+ brandId?: string | undefined;
176
+ categoryId?: string | undefined;
177
+ internationalNameId?: string | undefined;
178
+ manufacturerId?: string | undefined;
83
179
  price?: string | undefined;
84
180
  costPrice?: string | undefined;
85
181
  }
86
182
 
87
- export interface GetProductByIdRequest {
88
- id: string;
89
- }
90
-
91
183
  export interface ListProductsRequest {
92
184
  pagination: PaginationRequest | undefined;
93
185
  search?: string | undefined;
186
+ brandId?: string | undefined;
187
+ categoryId?: string | undefined;
188
+ internationalNameId?: string | undefined;
189
+ manufacturerId?: string | undefined;
190
+ status?: ProductStatus | undefined;
94
191
  }
95
192
 
96
193
  export interface ListProductsResponse {
@@ -98,104 +195,102 @@ export interface ListProductsResponse {
98
195
  meta: PaginationMeta | undefined;
99
196
  }
100
197
 
101
- export interface CreateInventoryRequest {
102
- branchId: string;
198
+ export interface CreateProductBarcodeRequest {
103
199
  productId: string;
104
- quantity: number;
105
- minQuantity: number;
106
- expireAt?: Timestamp | undefined;
107
- batchNumber?: string | undefined;
200
+ barcode: string;
201
+ isPrimary?: boolean | undefined;
202
+ packageType?: string | undefined;
203
+ note?: string | undefined;
108
204
  }
109
205
 
110
- export interface UpdateInventoryRequest {
206
+ export interface UpdateProductBarcodeRequest {
111
207
  id: string;
112
- quantity?: number | undefined;
113
- minQuantity?: number | undefined;
114
- expireAt?: Timestamp | undefined;
115
- batchNumber?: string | undefined;
208
+ barcode?: string | undefined;
209
+ isPrimary?: boolean | undefined;
210
+ packageType?: string | undefined;
211
+ note?: string | undefined;
116
212
  }
117
213
 
118
- export interface AdjustInventoryQuantityRequest {
119
- inventoryId: string;
120
- quantityChange: number;
121
- reason: string;
214
+ export interface ListProductBarcodesResponse {
215
+ items: ProductBarcode[];
122
216
  }
123
217
 
124
- export interface TransferInventoryRequest {
218
+ export interface CreateProductBatchRequest {
125
219
  productId: string;
126
- fromBranchId: string;
127
- toBranchId: string;
128
- quantity: number;
129
- batchNumber?: string | undefined;
220
+ branchId: string;
221
+ batchNumber: string;
222
+ expiryDate: Timestamp | undefined;
223
+ manufactureDate?: Timestamp | undefined;
224
+ purchasePrice: string;
225
+ sellingPrice: string;
226
+ initialQuantity: number;
227
+ remainingQuantity?: number | undefined;
228
+ status?: BatchStatus | undefined;
229
+ purchaseItemId?: string | undefined;
130
230
  }
131
231
 
132
- export interface GetInventoryByIdRequest {
232
+ export interface UpdateProductBatchRequest {
133
233
  id: string;
234
+ batchNumber?: string | undefined;
235
+ expiryDate?: Timestamp | undefined;
236
+ manufactureDate?: Timestamp | undefined;
237
+ purchasePrice?: string | undefined;
238
+ sellingPrice?: string | undefined;
239
+ initialQuantity?: number | undefined;
240
+ remainingQuantity?: number | undefined;
241
+ status?: BatchStatus | undefined;
134
242
  }
135
243
 
136
- export interface ListInventoryRequest {
244
+ export interface ListProductBatchesRequest {
137
245
  pagination: PaginationRequest | undefined;
138
246
  branchId?: string | undefined;
139
247
  productId?: string | undefined;
140
- search?: string | undefined;
248
+ batchNumber?: string | undefined;
249
+ status?: BatchStatus | undefined;
141
250
  lowStockOnly?: boolean | undefined;
142
251
  expiringSoonOnly?: boolean | undefined;
143
252
  }
144
253
 
145
- export interface ListInventoryResponse {
146
- items: InventoryItem[];
254
+ export interface ListProductBatchesResponse {
255
+ items: ProductBatch[];
147
256
  meta: PaginationMeta | undefined;
148
257
  }
149
258
 
150
- export const INVENTORY_V1_PACKAGE_NAME = "inventory.v1";
151
-
152
- export interface BranchServiceClient {
153
- createBranch(request: CreateBranchRequest): Observable<Branch>;
154
-
155
- updateBranch(request: UpdateBranchRequest): Observable<Branch>;
156
-
157
- getBranchById(request: IdRequest): Observable<Branch>;
158
-
159
- listBranches(request: Empty): Observable<ListBranchesResponse>;
160
-
161
- deleteBranch(request: IdRequest): Observable<BoolResponse>;
259
+ export interface CreateStockMovementRequest {
260
+ branchId: string;
261
+ productId: string;
262
+ productBatchId: string;
263
+ type: StockMovementType;
264
+ quantity: number;
265
+ balanceBefore: number;
266
+ balanceAfter: number;
267
+ referenceType?: string | undefined;
268
+ referenceId?: string | undefined;
269
+ performedById?: string | undefined;
270
+ note?: string | undefined;
162
271
  }
163
272
 
164
- export interface BranchServiceController {
165
- createBranch(request: CreateBranchRequest): Promise<Branch> | Observable<Branch> | Branch;
166
-
167
- updateBranch(request: UpdateBranchRequest): Promise<Branch> | Observable<Branch> | Branch;
168
-
169
- getBranchById(request: IdRequest): Promise<Branch> | Observable<Branch> | Branch;
170
-
171
- listBranches(request: Empty): Promise<ListBranchesResponse> | Observable<ListBranchesResponse> | ListBranchesResponse;
172
-
173
- deleteBranch(request: IdRequest): Promise<BoolResponse> | Observable<BoolResponse> | BoolResponse;
273
+ export interface ListStockMovementsRequest {
274
+ pagination: PaginationRequest | undefined;
275
+ branchId?: string | undefined;
276
+ productId?: string | undefined;
277
+ productBatchId?: string | undefined;
278
+ type?: StockMovementType | undefined;
174
279
  }
175
280
 
176
- export function BranchServiceControllerMethods() {
177
- return function (constructor: Function) {
178
- const grpcMethods: string[] = ["createBranch", "updateBranch", "getBranchById", "listBranches", "deleteBranch"];
179
- for (const method of grpcMethods) {
180
- const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
181
- GrpcMethod("BranchService", method)(constructor.prototype[method], method, descriptor);
182
- }
183
- const grpcStreamMethods: string[] = [];
184
- for (const method of grpcStreamMethods) {
185
- const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
186
- GrpcStreamMethod("BranchService", method)(constructor.prototype[method], method, descriptor);
187
- }
188
- };
281
+ export interface ListStockMovementsResponse {
282
+ items: StockMovement[];
283
+ meta: PaginationMeta | undefined;
189
284
  }
190
285
 
191
- export const BRANCH_SERVICE_NAME = "BranchService";
286
+ export const INVENTORY_V1_PACKAGE_NAME = "inventory.v1";
192
287
 
193
288
  export interface ProductServiceClient {
194
289
  createProduct(request: CreateProductRequest): Observable<Product>;
195
290
 
196
291
  updateProduct(request: UpdateProductRequest): Observable<Product>;
197
292
 
198
- getProductById(request: GetProductByIdRequest): Observable<Product>;
293
+ getProductById(request: IdRequest): Observable<Product>;
199
294
 
200
295
  listProducts(request: ListProductsRequest): Observable<ListProductsResponse>;
201
296
 
@@ -207,7 +302,7 @@ export interface ProductServiceController {
207
302
 
208
303
  updateProduct(request: UpdateProductRequest): Promise<Product> | Observable<Product> | Product;
209
304
 
210
- getProductById(request: GetProductByIdRequest): Promise<Product> | Observable<Product> | Product;
305
+ getProductById(request: IdRequest): Promise<Product> | Observable<Product> | Product;
211
306
 
212
307
  listProducts(
213
308
  request: ListProductsRequest,
@@ -233,65 +328,145 @@ export function ProductServiceControllerMethods() {
233
328
 
234
329
  export const PRODUCT_SERVICE_NAME = "ProductService";
235
330
 
236
- export interface InventoryServiceClient {
237
- createInventory(request: CreateInventoryRequest): Observable<InventoryItem>;
331
+ export interface ProductBarcodeServiceClient {
332
+ createProductBarcode(request: CreateProductBarcodeRequest): Observable<ProductBarcode>;
333
+
334
+ updateProductBarcode(request: UpdateProductBarcodeRequest): Observable<ProductBarcode>;
238
335
 
239
- updateInventory(request: UpdateInventoryRequest): Observable<InventoryItem>;
336
+ getProductBarcodeById(request: IdRequest): Observable<ProductBarcode>;
240
337
 
241
- adjustQuantity(request: AdjustInventoryQuantityRequest): Observable<InventoryItem>;
338
+ listProductBarcodes(request: IdRequest): Observable<ListProductBarcodesResponse>;
242
339
 
243
- transferInventory(request: TransferInventoryRequest): Observable<BoolResponse>;
340
+ deleteProductBarcode(request: IdRequest): Observable<BoolResponse>;
341
+ }
342
+
343
+ export interface ProductBarcodeServiceController {
344
+ createProductBarcode(
345
+ request: CreateProductBarcodeRequest,
346
+ ): Promise<ProductBarcode> | Observable<ProductBarcode> | ProductBarcode;
244
347
 
245
- getInventoryById(request: GetInventoryByIdRequest): Observable<InventoryItem>;
348
+ updateProductBarcode(
349
+ request: UpdateProductBarcodeRequest,
350
+ ): Promise<ProductBarcode> | Observable<ProductBarcode> | ProductBarcode;
246
351
 
247
- listInventory(request: ListInventoryRequest): Observable<ListInventoryResponse>;
352
+ getProductBarcodeById(request: IdRequest): Promise<ProductBarcode> | Observable<ProductBarcode> | ProductBarcode;
248
353
 
249
- deleteInventory(request: IdRequest): Observable<BoolResponse>;
354
+ listProductBarcodes(
355
+ request: IdRequest,
356
+ ): Promise<ListProductBarcodesResponse> | Observable<ListProductBarcodesResponse> | ListProductBarcodesResponse;
357
+
358
+ deleteProductBarcode(request: IdRequest): Promise<BoolResponse> | Observable<BoolResponse> | BoolResponse;
359
+ }
360
+
361
+ export function ProductBarcodeServiceControllerMethods() {
362
+ return function (constructor: Function) {
363
+ const grpcMethods: string[] = [
364
+ "createProductBarcode",
365
+ "updateProductBarcode",
366
+ "getProductBarcodeById",
367
+ "listProductBarcodes",
368
+ "deleteProductBarcode",
369
+ ];
370
+ for (const method of grpcMethods) {
371
+ const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
372
+ GrpcMethod("ProductBarcodeService", method)(constructor.prototype[method], method, descriptor);
373
+ }
374
+ const grpcStreamMethods: string[] = [];
375
+ for (const method of grpcStreamMethods) {
376
+ const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
377
+ GrpcStreamMethod("ProductBarcodeService", method)(constructor.prototype[method], method, descriptor);
378
+ }
379
+ };
250
380
  }
251
381
 
252
- export interface InventoryServiceController {
253
- createInventory(request: CreateInventoryRequest): Promise<InventoryItem> | Observable<InventoryItem> | InventoryItem;
382
+ export const PRODUCT_BARCODE_SERVICE_NAME = "ProductBarcodeService";
383
+
384
+ export interface ProductBatchServiceClient {
385
+ createProductBatch(request: CreateProductBatchRequest): Observable<ProductBatch>;
254
386
 
255
- updateInventory(request: UpdateInventoryRequest): Promise<InventoryItem> | Observable<InventoryItem> | InventoryItem;
387
+ updateProductBatch(request: UpdateProductBatchRequest): Observable<ProductBatch>;
256
388
 
257
- adjustQuantity(
258
- request: AdjustInventoryQuantityRequest,
259
- ): Promise<InventoryItem> | Observable<InventoryItem> | InventoryItem;
389
+ getProductBatchById(request: IdRequest): Observable<ProductBatch>;
260
390
 
261
- transferInventory(request: TransferInventoryRequest): Promise<BoolResponse> | Observable<BoolResponse> | BoolResponse;
391
+ listProductBatches(request: ListProductBatchesRequest): Observable<ListProductBatchesResponse>;
392
+
393
+ deleteProductBatch(request: IdRequest): Observable<BoolResponse>;
394
+ }
262
395
 
263
- getInventoryById(
264
- request: GetInventoryByIdRequest,
265
- ): Promise<InventoryItem> | Observable<InventoryItem> | InventoryItem;
396
+ export interface ProductBatchServiceController {
397
+ createProductBatch(
398
+ request: CreateProductBatchRequest,
399
+ ): Promise<ProductBatch> | Observable<ProductBatch> | ProductBatch;
266
400
 
267
- listInventory(
268
- request: ListInventoryRequest,
269
- ): Promise<ListInventoryResponse> | Observable<ListInventoryResponse> | ListInventoryResponse;
401
+ updateProductBatch(
402
+ request: UpdateProductBatchRequest,
403
+ ): Promise<ProductBatch> | Observable<ProductBatch> | ProductBatch;
270
404
 
271
- deleteInventory(request: IdRequest): Promise<BoolResponse> | Observable<BoolResponse> | BoolResponse;
405
+ getProductBatchById(request: IdRequest): Promise<ProductBatch> | Observable<ProductBatch> | ProductBatch;
406
+
407
+ listProductBatches(
408
+ request: ListProductBatchesRequest,
409
+ ): Promise<ListProductBatchesResponse> | Observable<ListProductBatchesResponse> | ListProductBatchesResponse;
410
+
411
+ deleteProductBatch(request: IdRequest): Promise<BoolResponse> | Observable<BoolResponse> | BoolResponse;
272
412
  }
273
413
 
274
- export function InventoryServiceControllerMethods() {
414
+ export function ProductBatchServiceControllerMethods() {
275
415
  return function (constructor: Function) {
276
416
  const grpcMethods: string[] = [
277
- "createInventory",
278
- "updateInventory",
279
- "adjustQuantity",
280
- "transferInventory",
281
- "getInventoryById",
282
- "listInventory",
283
- "deleteInventory",
417
+ "createProductBatch",
418
+ "updateProductBatch",
419
+ "getProductBatchById",
420
+ "listProductBatches",
421
+ "deleteProductBatch",
284
422
  ];
285
423
  for (const method of grpcMethods) {
286
424
  const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
287
- GrpcMethod("InventoryService", method)(constructor.prototype[method], method, descriptor);
425
+ GrpcMethod("ProductBatchService", method)(constructor.prototype[method], method, descriptor);
426
+ }
427
+ const grpcStreamMethods: string[] = [];
428
+ for (const method of grpcStreamMethods) {
429
+ const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
430
+ GrpcStreamMethod("ProductBatchService", method)(constructor.prototype[method], method, descriptor);
431
+ }
432
+ };
433
+ }
434
+
435
+ export const PRODUCT_BATCH_SERVICE_NAME = "ProductBatchService";
436
+
437
+ export interface StockMovementServiceClient {
438
+ createStockMovement(request: CreateStockMovementRequest): Observable<StockMovement>;
439
+
440
+ getStockMovementById(request: IdRequest): Observable<StockMovement>;
441
+
442
+ listStockMovements(request: ListStockMovementsRequest): Observable<ListStockMovementsResponse>;
443
+ }
444
+
445
+ export interface StockMovementServiceController {
446
+ createStockMovement(
447
+ request: CreateStockMovementRequest,
448
+ ): Promise<StockMovement> | Observable<StockMovement> | StockMovement;
449
+
450
+ getStockMovementById(request: IdRequest): Promise<StockMovement> | Observable<StockMovement> | StockMovement;
451
+
452
+ listStockMovements(
453
+ request: ListStockMovementsRequest,
454
+ ): Promise<ListStockMovementsResponse> | Observable<ListStockMovementsResponse> | ListStockMovementsResponse;
455
+ }
456
+
457
+ export function StockMovementServiceControllerMethods() {
458
+ return function (constructor: Function) {
459
+ const grpcMethods: string[] = ["createStockMovement", "getStockMovementById", "listStockMovements"];
460
+ for (const method of grpcMethods) {
461
+ const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
462
+ GrpcMethod("StockMovementService", method)(constructor.prototype[method], method, descriptor);
288
463
  }
289
464
  const grpcStreamMethods: string[] = [];
290
465
  for (const method of grpcStreamMethods) {
291
466
  const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
292
- GrpcStreamMethod("InventoryService", method)(constructor.prototype[method], method, descriptor);
467
+ GrpcStreamMethod("StockMovementService", method)(constructor.prototype[method], method, descriptor);
293
468
  }
294
469
  };
295
470
  }
296
471
 
297
- export const INVENTORY_SERVICE_NAME = "InventoryService";
472
+ export const STOCK_MOVEMENT_SERVICE_NAME = "StockMovementService";