@prodoctors/contracts 1.0.2 → 1.0.4

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.
@@ -0,0 +1,472 @@
1
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
+ // versions:
3
+ // protoc-gen-ts_proto v2.11.5
4
+ // protoc v7.34.0
5
+ // source: inventory.proto
6
+
7
+ /* eslint-disable */
8
+ import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
9
+ import { Observable } from "rxjs";
10
+ import { Brand, Category, InternationalName, Manufacturer } from "./catalog";
11
+ import { BoolResponse, IdRequest, PaginationMeta, PaginationRequest } from "./common";
12
+ import { Timestamp } from "./google/protobuf/timestamp";
13
+
14
+ export const protobufPackage = "inventory.v1";
15
+
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,
74
+ }
75
+
76
+ export interface Product {
77
+ id: string;
78
+ name: string;
79
+ sku: 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;
91
+ price: string;
92
+ costPrice?: string | undefined;
93
+ brand?: Brand | undefined;
94
+ category?: Category | undefined;
95
+ internationalName?: InternationalName | undefined;
96
+ manufacturer?: Manufacturer | undefined;
97
+ createdAt: Timestamp | undefined;
98
+ updatedAt: Timestamp | undefined;
99
+ }
100
+
101
+ export interface ProductBarcode {
102
+ id: string;
103
+ productId: string;
104
+ barcode: string;
105
+ isPrimary: boolean;
106
+ packageType?: string | undefined;
107
+ note?: string | undefined;
108
+ createdAt: Timestamp | undefined;
109
+ updatedAt: Timestamp | undefined;
110
+ }
111
+
112
+ export interface ProductBatch {
113
+ id: string;
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;
128
+ }
129
+
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;
144
+ }
145
+
146
+ export interface CreateProductRequest {
147
+ name: string;
148
+ sku: string;
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;
162
+ }
163
+
164
+ export interface UpdateProductRequest {
165
+ id: string;
166
+ name?: string | undefined;
167
+ sku?: string | undefined;
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;
179
+ price?: string | undefined;
180
+ costPrice?: string | undefined;
181
+ }
182
+
183
+ export interface ListProductsRequest {
184
+ pagination: PaginationRequest | undefined;
185
+ search?: string | undefined;
186
+ brandId?: string | undefined;
187
+ categoryId?: string | undefined;
188
+ internationalNameId?: string | undefined;
189
+ manufacturerId?: string | undefined;
190
+ status?: ProductStatus | undefined;
191
+ }
192
+
193
+ export interface ListProductsResponse {
194
+ items: Product[];
195
+ meta: PaginationMeta | undefined;
196
+ }
197
+
198
+ export interface CreateProductBarcodeRequest {
199
+ productId: string;
200
+ barcode: string;
201
+ isPrimary?: boolean | undefined;
202
+ packageType?: string | undefined;
203
+ note?: string | undefined;
204
+ }
205
+
206
+ export interface UpdateProductBarcodeRequest {
207
+ id: string;
208
+ barcode?: string | undefined;
209
+ isPrimary?: boolean | undefined;
210
+ packageType?: string | undefined;
211
+ note?: string | undefined;
212
+ }
213
+
214
+ export interface ListProductBarcodesResponse {
215
+ items: ProductBarcode[];
216
+ }
217
+
218
+ export interface CreateProductBatchRequest {
219
+ productId: string;
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;
230
+ }
231
+
232
+ export interface UpdateProductBatchRequest {
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;
242
+ }
243
+
244
+ export interface ListProductBatchesRequest {
245
+ pagination: PaginationRequest | undefined;
246
+ branchId?: string | undefined;
247
+ productId?: string | undefined;
248
+ batchNumber?: string | undefined;
249
+ status?: BatchStatus | undefined;
250
+ lowStockOnly?: boolean | undefined;
251
+ expiringSoonOnly?: boolean | undefined;
252
+ }
253
+
254
+ export interface ListProductBatchesResponse {
255
+ items: ProductBatch[];
256
+ meta: PaginationMeta | undefined;
257
+ }
258
+
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;
271
+ }
272
+
273
+ export interface ListStockMovementsRequest {
274
+ pagination: PaginationRequest | undefined;
275
+ branchId?: string | undefined;
276
+ productId?: string | undefined;
277
+ productBatchId?: string | undefined;
278
+ type?: StockMovementType | undefined;
279
+ }
280
+
281
+ export interface ListStockMovementsResponse {
282
+ items: StockMovement[];
283
+ meta: PaginationMeta | undefined;
284
+ }
285
+
286
+ export const INVENTORY_V1_PACKAGE_NAME = "inventory.v1";
287
+
288
+ export interface ProductServiceClient {
289
+ createProduct(request: CreateProductRequest): Observable<Product>;
290
+
291
+ updateProduct(request: UpdateProductRequest): Observable<Product>;
292
+
293
+ getProductById(request: IdRequest): Observable<Product>;
294
+
295
+ listProducts(request: ListProductsRequest): Observable<ListProductsResponse>;
296
+
297
+ deleteProduct(request: IdRequest): Observable<BoolResponse>;
298
+ }
299
+
300
+ export interface ProductServiceController {
301
+ createProduct(request: CreateProductRequest): Promise<Product> | Observable<Product> | Product;
302
+
303
+ updateProduct(request: UpdateProductRequest): Promise<Product> | Observable<Product> | Product;
304
+
305
+ getProductById(request: IdRequest): Promise<Product> | Observable<Product> | Product;
306
+
307
+ listProducts(
308
+ request: ListProductsRequest,
309
+ ): Promise<ListProductsResponse> | Observable<ListProductsResponse> | ListProductsResponse;
310
+
311
+ deleteProduct(request: IdRequest): Promise<BoolResponse> | Observable<BoolResponse> | BoolResponse;
312
+ }
313
+
314
+ export function ProductServiceControllerMethods() {
315
+ return function (constructor: Function) {
316
+ const grpcMethods: string[] = ["createProduct", "updateProduct", "getProductById", "listProducts", "deleteProduct"];
317
+ for (const method of grpcMethods) {
318
+ const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
319
+ GrpcMethod("ProductService", method)(constructor.prototype[method], method, descriptor);
320
+ }
321
+ const grpcStreamMethods: string[] = [];
322
+ for (const method of grpcStreamMethods) {
323
+ const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
324
+ GrpcStreamMethod("ProductService", method)(constructor.prototype[method], method, descriptor);
325
+ }
326
+ };
327
+ }
328
+
329
+ export const PRODUCT_SERVICE_NAME = "ProductService";
330
+
331
+ export interface ProductBarcodeServiceClient {
332
+ createProductBarcode(request: CreateProductBarcodeRequest): Observable<ProductBarcode>;
333
+
334
+ updateProductBarcode(request: UpdateProductBarcodeRequest): Observable<ProductBarcode>;
335
+
336
+ getProductBarcodeById(request: IdRequest): Observable<ProductBarcode>;
337
+
338
+ listProductBarcodes(request: IdRequest): Observable<ListProductBarcodesResponse>;
339
+
340
+ deleteProductBarcode(request: IdRequest): Observable<BoolResponse>;
341
+ }
342
+
343
+ export interface ProductBarcodeServiceController {
344
+ createProductBarcode(
345
+ request: CreateProductBarcodeRequest,
346
+ ): Promise<ProductBarcode> | Observable<ProductBarcode> | ProductBarcode;
347
+
348
+ updateProductBarcode(
349
+ request: UpdateProductBarcodeRequest,
350
+ ): Promise<ProductBarcode> | Observable<ProductBarcode> | ProductBarcode;
351
+
352
+ getProductBarcodeById(request: IdRequest): Promise<ProductBarcode> | Observable<ProductBarcode> | ProductBarcode;
353
+
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
+ };
380
+ }
381
+
382
+ export const PRODUCT_BARCODE_SERVICE_NAME = "ProductBarcodeService";
383
+
384
+ export interface ProductBatchServiceClient {
385
+ createProductBatch(request: CreateProductBatchRequest): Observable<ProductBatch>;
386
+
387
+ updateProductBatch(request: UpdateProductBatchRequest): Observable<ProductBatch>;
388
+
389
+ getProductBatchById(request: IdRequest): Observable<ProductBatch>;
390
+
391
+ listProductBatches(request: ListProductBatchesRequest): Observable<ListProductBatchesResponse>;
392
+
393
+ deleteProductBatch(request: IdRequest): Observable<BoolResponse>;
394
+ }
395
+
396
+ export interface ProductBatchServiceController {
397
+ createProductBatch(
398
+ request: CreateProductBatchRequest,
399
+ ): Promise<ProductBatch> | Observable<ProductBatch> | ProductBatch;
400
+
401
+ updateProductBatch(
402
+ request: UpdateProductBatchRequest,
403
+ ): Promise<ProductBatch> | Observable<ProductBatch> | ProductBatch;
404
+
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;
412
+ }
413
+
414
+ export function ProductBatchServiceControllerMethods() {
415
+ return function (constructor: Function) {
416
+ const grpcMethods: string[] = [
417
+ "createProductBatch",
418
+ "updateProductBatch",
419
+ "getProductBatchById",
420
+ "listProductBatches",
421
+ "deleteProductBatch",
422
+ ];
423
+ for (const method of grpcMethods) {
424
+ const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
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);
463
+ }
464
+ const grpcStreamMethods: string[] = [];
465
+ for (const method of grpcStreamMethods) {
466
+ const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
467
+ GrpcStreamMethod("StockMovementService", method)(constructor.prototype[method], method, descriptor);
468
+ }
469
+ };
470
+ }
471
+
472
+ export const STOCK_MOVEMENT_SERVICE_NAME = "StockMovementService";
package/gen/partner.ts ADDED
@@ -0,0 +1,194 @@
1
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
+ // versions:
3
+ // protoc-gen-ts_proto v2.11.5
4
+ // protoc v7.34.0
5
+ // source: partner.proto
6
+
7
+ /* eslint-disable */
8
+ import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
9
+ import { Observable } from "rxjs";
10
+ import { BoolResponse, IdRequest, PaginationMeta, PaginationRequest } from "./common";
11
+ import { Timestamp } from "./google/protobuf/timestamp";
12
+
13
+ export const protobufPackage = "partner.v1";
14
+
15
+ export interface Supplier {
16
+ id: string;
17
+ name: string;
18
+ phone?: string | undefined;
19
+ email?: string | undefined;
20
+ address?: string | undefined;
21
+ taxNumber?: string | undefined;
22
+ isActive: boolean;
23
+ note?: string | undefined;
24
+ createdAt: Timestamp | undefined;
25
+ updatedAt: Timestamp | undefined;
26
+ }
27
+
28
+ export interface Customer {
29
+ id: string;
30
+ fullName?: string | undefined;
31
+ phone?: string | undefined;
32
+ code?: string | undefined;
33
+ branchId?: string | undefined;
34
+ createdAt: Timestamp | undefined;
35
+ updatedAt: Timestamp | undefined;
36
+ }
37
+
38
+ export interface CreateSupplierRequest {
39
+ name: string;
40
+ phone?: string | undefined;
41
+ email?: string | undefined;
42
+ address?: string | undefined;
43
+ taxNumber?: string | undefined;
44
+ isActive?: boolean | undefined;
45
+ note?: string | undefined;
46
+ }
47
+
48
+ export interface UpdateSupplierRequest {
49
+ id: string;
50
+ name?: string | undefined;
51
+ phone?: string | undefined;
52
+ email?: string | undefined;
53
+ address?: string | undefined;
54
+ taxNumber?: string | undefined;
55
+ isActive?: boolean | undefined;
56
+ note?: string | undefined;
57
+ }
58
+
59
+ export interface ListSuppliersRequest {
60
+ pagination: PaginationRequest | undefined;
61
+ isActive?: boolean | undefined;
62
+ search?: string | undefined;
63
+ }
64
+
65
+ export interface ListSuppliersResponse {
66
+ items: Supplier[];
67
+ meta: PaginationMeta | undefined;
68
+ }
69
+
70
+ export interface CreateCustomerRequest {
71
+ fullName?: string | undefined;
72
+ phone?: string | undefined;
73
+ code?: string | undefined;
74
+ branchId?: string | undefined;
75
+ }
76
+
77
+ export interface UpdateCustomerRequest {
78
+ id: string;
79
+ fullName?: string | undefined;
80
+ phone?: string | undefined;
81
+ code?: string | undefined;
82
+ branchId?: string | undefined;
83
+ }
84
+
85
+ export interface ListCustomersRequest {
86
+ pagination: PaginationRequest | undefined;
87
+ branchId?: string | undefined;
88
+ search?: string | undefined;
89
+ }
90
+
91
+ export interface ListCustomersResponse {
92
+ items: Customer[];
93
+ meta: PaginationMeta | undefined;
94
+ }
95
+
96
+ export const PARTNER_V1_PACKAGE_NAME = "partner.v1";
97
+
98
+ export interface SupplierServiceClient {
99
+ createSupplier(request: CreateSupplierRequest): Observable<Supplier>;
100
+
101
+ updateSupplier(request: UpdateSupplierRequest): Observable<Supplier>;
102
+
103
+ getSupplierById(request: IdRequest): Observable<Supplier>;
104
+
105
+ listSuppliers(request: ListSuppliersRequest): Observable<ListSuppliersResponse>;
106
+
107
+ deleteSupplier(request: IdRequest): Observable<BoolResponse>;
108
+ }
109
+
110
+ export interface SupplierServiceController {
111
+ createSupplier(request: CreateSupplierRequest): Promise<Supplier> | Observable<Supplier> | Supplier;
112
+
113
+ updateSupplier(request: UpdateSupplierRequest): Promise<Supplier> | Observable<Supplier> | Supplier;
114
+
115
+ getSupplierById(request: IdRequest): Promise<Supplier> | Observable<Supplier> | Supplier;
116
+
117
+ listSuppliers(
118
+ request: ListSuppliersRequest,
119
+ ): Promise<ListSuppliersResponse> | Observable<ListSuppliersResponse> | ListSuppliersResponse;
120
+
121
+ deleteSupplier(request: IdRequest): Promise<BoolResponse> | Observable<BoolResponse> | BoolResponse;
122
+ }
123
+
124
+ export function SupplierServiceControllerMethods() {
125
+ return function (constructor: Function) {
126
+ const grpcMethods: string[] = [
127
+ "createSupplier",
128
+ "updateSupplier",
129
+ "getSupplierById",
130
+ "listSuppliers",
131
+ "deleteSupplier",
132
+ ];
133
+ for (const method of grpcMethods) {
134
+ const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
135
+ GrpcMethod("SupplierService", method)(constructor.prototype[method], method, descriptor);
136
+ }
137
+ const grpcStreamMethods: string[] = [];
138
+ for (const method of grpcStreamMethods) {
139
+ const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
140
+ GrpcStreamMethod("SupplierService", method)(constructor.prototype[method], method, descriptor);
141
+ }
142
+ };
143
+ }
144
+
145
+ export const SUPPLIER_SERVICE_NAME = "SupplierService";
146
+
147
+ export interface CustomerServiceClient {
148
+ createCustomer(request: CreateCustomerRequest): Observable<Customer>;
149
+
150
+ updateCustomer(request: UpdateCustomerRequest): Observable<Customer>;
151
+
152
+ getCustomerById(request: IdRequest): Observable<Customer>;
153
+
154
+ listCustomers(request: ListCustomersRequest): Observable<ListCustomersResponse>;
155
+
156
+ deleteCustomer(request: IdRequest): Observable<BoolResponse>;
157
+ }
158
+
159
+ export interface CustomerServiceController {
160
+ createCustomer(request: CreateCustomerRequest): Promise<Customer> | Observable<Customer> | Customer;
161
+
162
+ updateCustomer(request: UpdateCustomerRequest): Promise<Customer> | Observable<Customer> | Customer;
163
+
164
+ getCustomerById(request: IdRequest): Promise<Customer> | Observable<Customer> | Customer;
165
+
166
+ listCustomers(
167
+ request: ListCustomersRequest,
168
+ ): Promise<ListCustomersResponse> | Observable<ListCustomersResponse> | ListCustomersResponse;
169
+
170
+ deleteCustomer(request: IdRequest): Promise<BoolResponse> | Observable<BoolResponse> | BoolResponse;
171
+ }
172
+
173
+ export function CustomerServiceControllerMethods() {
174
+ return function (constructor: Function) {
175
+ const grpcMethods: string[] = [
176
+ "createCustomer",
177
+ "updateCustomer",
178
+ "getCustomerById",
179
+ "listCustomers",
180
+ "deleteCustomer",
181
+ ];
182
+ for (const method of grpcMethods) {
183
+ const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
184
+ GrpcMethod("CustomerService", method)(constructor.prototype[method], method, descriptor);
185
+ }
186
+ const grpcStreamMethods: string[] = [];
187
+ for (const method of grpcStreamMethods) {
188
+ const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
189
+ GrpcStreamMethod("CustomerService", method)(constructor.prototype[method], method, descriptor);
190
+ }
191
+ };
192
+ }
193
+
194
+ export const CUSTOMER_SERVICE_NAME = "CustomerService";