@nomalism-com/types 0.22.73 → 0.22.75

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.
Files changed (56) hide show
  1. package/dist/index.min.js +1 -1
  2. package/dist/main.d.ts +1 -45
  3. package/dist/modules/stock/product/interface.d.ts +10 -39
  4. package/dist/modules/stock/productGoogleSheets/interface.d.ts +4 -4
  5. package/dist/modules/stock/productImage/interface.d.ts +1 -1
  6. package/dist/modules/stock/unitOfMeasure/interface.d.ts +6 -8
  7. package/dist/modules/stock/unitOfMeasure/route.schema.d.ts +1 -1
  8. package/dist/modules/supply/cabide/interface.d.ts +16 -15
  9. package/dist/modules/user/purchaseConditions/interface.d.ts +9 -16
  10. package/dist/shared/entities/index.d.ts +0 -22
  11. package/dist/shared/entities/stock.d.ts +4 -235
  12. package/package.json +1 -1
  13. package/dist/modules/stock/attribute/interfaces.d.ts +0 -51
  14. package/dist/modules/stock/attribute/route.schema.d.ts +0 -5
  15. package/dist/modules/stock/attributeValue/interfaces.d.ts +0 -36
  16. package/dist/modules/stock/attributeValue/route.schema.d.ts +0 -5
  17. package/dist/modules/stock/color/interfaces.d.ts +0 -36
  18. package/dist/modules/stock/color/route.schema.d.ts +0 -5
  19. package/dist/modules/stock/composition/interfaces.d.ts +0 -36
  20. package/dist/modules/stock/composition/route.schema.d.ts +0 -5
  21. package/dist/modules/stock/compositionMaterial/interfaces.d.ts +0 -32
  22. package/dist/modules/stock/compositionMaterial/route.schema.d.ts +0 -5
  23. package/dist/modules/stock/maintenance/interface.d.ts +0 -37
  24. package/dist/modules/stock/maintenance/route.schema.d.ts +0 -5
  25. package/dist/modules/stock/maintenanceAssoc/interface.d.ts +0 -35
  26. package/dist/modules/stock/maintenanceAssoc/route.schema.d.ts +0 -5
  27. package/dist/modules/stock/maintenancePreset/interfaces.d.ts +0 -28
  28. package/dist/modules/stock/maintenancePreset/route.schema.d.ts +0 -5
  29. package/dist/modules/stock/maintenancePresetAssoc/interfaces.d.ts +0 -31
  30. package/dist/modules/stock/maintenancePresetAssoc/route.schema.d.ts +0 -4
  31. package/dist/modules/stock/maintenanceType/interface.d.ts +0 -32
  32. package/dist/modules/stock/maintenanceType/route.schema.d.ts +0 -5
  33. package/dist/modules/stock/primaryColor/interface.d.ts +0 -32
  34. package/dist/modules/stock/primaryColor/route.schema.d.ts +0 -5
  35. package/dist/modules/stock/productAttribute/interface.d.ts +0 -36
  36. package/dist/modules/stock/productAttribute/route.schema.d.ts +0 -5
  37. package/dist/modules/stock/productCategory/interface.d.ts +0 -32
  38. package/dist/modules/stock/productCategory/route.schema.d.ts +0 -5
  39. package/dist/modules/stock/productColor/interface.d.ts +0 -36
  40. package/dist/modules/stock/productColor/route.schema.d.ts +0 -5
  41. package/dist/modules/stock/productName/interface.d.ts +0 -32
  42. package/dist/modules/stock/productName/route.schema.d.ts +0 -5
  43. package/dist/modules/stock/productNamePreset/interface.d.ts +0 -32
  44. package/dist/modules/stock/productNamePreset/route.schema.d.ts +0 -5
  45. package/dist/modules/stock/productPart/interface.d.ts +0 -40
  46. package/dist/modules/stock/productPart/route.schema.d.ts +0 -5
  47. package/dist/modules/stock/productSubCategory/interface.d.ts +0 -38
  48. package/dist/modules/stock/productSubCategory/route.schema.d.ts +0 -5
  49. package/dist/modules/stock/productUse/interface.d.ts +0 -32
  50. package/dist/modules/stock/productUse/route.schema.d.ts +0 -5
  51. package/dist/modules/stock/productUseAssoc/interface.d.ts +0 -34
  52. package/dist/modules/stock/productUseAssoc/route.schema.d.ts +0 -5
  53. package/dist/modules/stock/similarProduct/interface.d.ts +0 -38
  54. package/dist/modules/stock/similarProduct/route.schema.d.ts +0 -5
  55. package/dist/modules/stock/typeOfInventory/interface.d.ts +0 -34
  56. package/dist/modules/stock/typeOfInventory/route.schema.d.ts +0 -5
@@ -1,5 +1,4 @@
1
1
  import { IConflict } from "../../modules/document/propostaSheets/interface";
2
- import { IAttributeDatatype } from "../../modules/stock/attribute/interfaces";
3
2
  import { ICabideType } from "../../modules/supply/cabide/interface";
4
3
  import { IDocumentTypeUserType, IDocumentTypeCodeType } from "../../modules/supply/documentType/interfaces";
5
4
  import { IBatchType, IPaymentOrigin } from "../../modules/supply/payment/interface";
@@ -12,59 +11,6 @@ import { ISavedEmPickingData } from "../../modules/stock/savedEmPicking/interfac
12
11
  import { IDocumentLineNoteType } from "../../modules/supply/documentLineNote/interfaces";
13
12
  import { IProductBase } from "../../modules/supply/cabideProduct/interface";
14
13
  import { IProductState } from "../../modules/stock/productGoogleSheets/interface";
15
- export type Attribute = {
16
- id: string;
17
- name: string;
18
- datatype: IAttributeDatatype;
19
- is_mandatory: boolean;
20
- product_category_id: string;
21
- order: number;
22
- origin_id: string | null;
23
- created_at: Date;
24
- updated_at: Date;
25
- created_by: string;
26
- updated_by: string;
27
- };
28
- export type AttributeValue = {
29
- id: string;
30
- attribute_id: string;
31
- value: string;
32
- origin_id: string | null;
33
- created_at: Date;
34
- updated_at: Date;
35
- created_by: string;
36
- updated_by: string;
37
- };
38
- export type Color = {
39
- id: string;
40
- primary_color_id: string;
41
- name: string;
42
- created_at: Date;
43
- updated_at: Date;
44
- created_by: string;
45
- updated_by: string;
46
- origin_id: string | null;
47
- };
48
- export type Composition = {
49
- id: string;
50
- product_part_id: string;
51
- composition_material_id: string;
52
- value: number;
53
- origin_id: string | null;
54
- created_at: Date;
55
- updated_at: Date;
56
- created_by: string;
57
- updated_by: string;
58
- };
59
- export type CompositionMaterial = {
60
- id: string;
61
- name: string;
62
- origin_id: string | null;
63
- created_at: Date;
64
- updated_at: Date;
65
- created_by: string;
66
- updated_by: string;
67
- };
68
14
  export type Location = {
69
15
  id: string;
70
16
  type_of_location_id: string;
@@ -83,55 +29,6 @@ export type Location = {
83
29
  created_by: string;
84
30
  updated_by: string;
85
31
  };
86
- export type MaintenanceType = {
87
- id: string;
88
- name: string;
89
- origin_id: string | null;
90
- created_at: Date;
91
- updated_at: Date;
92
- created_by: string;
93
- updated_by: string;
94
- };
95
- export type Maintenance = {
96
- id: string;
97
- name: string;
98
- multimedia_id: string | null;
99
- maintenance_type_id: string;
100
- origin_id: string | null;
101
- created_at: Date;
102
- updated_at: Date;
103
- created_by: string;
104
- updated_by: string;
105
- };
106
- export type MaintenanceAssoc = {
107
- id: string;
108
- product_part_id: string;
109
- maintenance_id: string;
110
- origin_id: string | null;
111
- created_at: Date;
112
- updated_at: Date;
113
- created_by: string;
114
- updated_by: string;
115
- };
116
- export type MaintenancePreset = {
117
- id: string;
118
- name: string;
119
- origin_id: string | null;
120
- created_at: Date;
121
- updated_at: Date;
122
- created_by: string;
123
- updated_by: string;
124
- };
125
- export type MaintenancePresetAssoc = {
126
- id: string;
127
- preset_id: string;
128
- maintenance_id: string;
129
- origin_id: string | null;
130
- created_at: Date;
131
- updated_at: Date;
132
- created_by: string;
133
- updated_by: string;
134
- };
135
32
  export type PreSale = {
136
33
  id: string;
137
34
  counter: number;
@@ -152,21 +49,11 @@ export type PreSaleProduct = {
152
49
  created_by: string;
153
50
  updated_by: string;
154
51
  };
155
- export type PrimaryColor = {
156
- id: string;
157
- name: string;
158
- created_at: Date;
159
- updated_at: Date;
160
- origin_id: string | null;
161
- created_by: string;
162
- updated_by: string;
163
- };
164
52
  export type Product = {
165
53
  id: string;
166
54
  reference: number;
167
55
  id_provider: number;
168
56
  provider_ref: string | null;
169
- name_id: string | null;
170
57
  designation: string | null;
171
58
  designation_saft: string;
172
59
  barcode: string | null;
@@ -184,8 +71,6 @@ export type Product = {
184
71
  cabide_product_color: string | null;
185
72
  unit_of_measure_weight_id: string;
186
73
  unit_of_measure_quantity_id: string;
187
- type_of_inventory_id: string;
188
- product_sub_category_id: string;
189
74
  vat_tax_id: string;
190
75
  cabide_product_id: string | null;
191
76
  origin_cabide_product_id: string | null;
@@ -260,50 +145,9 @@ export type ProductPrices = {
260
145
  created_by: string;
261
146
  updated_by: string;
262
147
  };
263
- export type ProductName = {
264
- id: string;
265
- name: string;
266
- origin_id: string | null;
267
- created_at: Date;
268
- updated_at: Date;
269
- created_by: string;
270
- updated_by: string;
271
- };
272
- export type ProductAttribute = {
273
- id: string;
274
- value: string;
275
- product_id: string;
276
- attribute_id: string;
277
- origin_id: string | null;
278
- created_at: Date;
279
- updated_at: Date;
280
- created_by: string;
281
- updated_by: string;
282
- };
283
- export type ProductCategory = {
284
- id: string;
285
- name: string;
286
- created_at: Date;
287
- updated_at: Date;
288
- origin_id: string | null;
289
- created_by: string;
290
- updated_by: string;
291
- };
292
- export type ProductColor = {
293
- id: string;
294
- product_id: string;
295
- color_id: string;
296
- multimedia_id: string | null;
297
- origin_id: string | null;
298
- created_at: Date;
299
- updated_at: Date;
300
- created_by: string;
301
- updated_by: string;
302
- };
303
148
  export type ProductImage = {
304
149
  id: string;
305
- product_id: string | null;
306
- product_sheet_id: string | null;
150
+ product_id: string;
307
151
  multimedia_id: string;
308
152
  type: IImageType;
309
153
  created_at: Date;
@@ -312,53 +156,11 @@ export type ProductImage = {
312
156
  created_by: string;
313
157
  updated_by: string;
314
158
  };
315
- export type ProductPart = {
316
- id: string;
317
- name: string;
318
- product_id: string;
319
- origin_id: string | null;
320
- created_at: Date;
321
- updated_at: Date;
322
- created_by: string;
323
- updated_by: string;
324
- };
325
- export type ProductSubCategory = {
326
- id: string;
327
- name: string;
328
- product_category_id: string;
329
- created_at: Date;
330
- updated_at: Date;
331
- origin_id: string | null;
332
- created_by: string;
333
- updated_by: string;
334
- external_id: string | null;
335
- };
336
- export type ProductUse = {
337
- id: string;
338
- name: string;
339
- origin_id: string | null;
340
- multimedia_id: string | null;
341
- created_at: Date;
342
- updated_at: Date;
343
- created_by: string;
344
- updated_by: string;
345
- };
346
- export type ProductUseAssoc = {
347
- id: string;
348
- product_use_id: string;
349
- product_id: string;
350
- origin_id: string | null;
351
- created_at: Date;
352
- updated_at: Date;
353
- created_by: string;
354
- updated_by: string;
355
- };
356
159
  export type UnitOfMeasure = {
357
160
  id: string;
358
161
  name: string;
359
162
  notation: string;
360
163
  type: string;
361
- default_weight: boolean;
362
164
  default_quantity: boolean;
363
165
  integer_only: boolean;
364
166
  divisible: boolean;
@@ -395,26 +197,6 @@ export type PromotionAssoc = {
395
197
  created_by: string;
396
198
  updated_by: string;
397
199
  };
398
- export type SimilarProduct = {
399
- id: string;
400
- product_id: string;
401
- similar_product_id: string;
402
- origin_id: string | null;
403
- created_at: Date;
404
- updated_at: Date;
405
- created_by: string;
406
- updated_by: string;
407
- };
408
- export type TypeOfInventory = {
409
- id: string;
410
- name: string;
411
- saft_code: string;
412
- created_at: Date;
413
- updated_at: Date;
414
- origin_id: string | null;
415
- created_by: string;
416
- updated_by: string;
417
- };
418
200
  export type TypeOfLocation = {
419
201
  id: string;
420
202
  name: string;
@@ -447,15 +229,6 @@ export type VatTaxZone = {
447
229
  country_id: string;
448
230
  external_id: string | null;
449
231
  };
450
- export type ProductNamePreset = {
451
- id: string;
452
- name: string;
453
- created_at: Date;
454
- updated_at: Date;
455
- origin_id: string | null;
456
- created_by: string;
457
- updated_by: string;
458
- };
459
232
  export type Counter = {
460
233
  document_type: number;
461
234
  year: number;
@@ -897,18 +670,12 @@ export type ProductPromotionVirtuals = {
897
670
  };
898
671
  export type ProductBaseVirtuals = {
899
672
  product_id: string;
900
- reference: string;
901
- designation: string;
902
673
  price_cost: number;
903
674
  price_sale: number;
904
675
  last_avg_unit_cost: number;
905
676
  };
906
677
  export type ProductVirtuals = {
907
678
  product_id: string;
908
- inactive: boolean;
909
- there_is_no_more: boolean;
910
- reference: string;
911
- designation: string;
912
679
  price_cost: number;
913
680
  price_sale: number;
914
681
  last_avg_unit_cost: number;
@@ -1238,7 +1005,9 @@ export type ProductSheet = {
1238
1005
  name: string | null;
1239
1006
  designation: string;
1240
1007
  origin_id: string | null;
1241
- type_of_inventory_id: string;
1008
+ type_of_inventory: string;
1009
+ max_discount: number;
1010
+ external_id: string | null;
1242
1011
  created_at: Date;
1243
1012
  updated_at: Date;
1244
1013
  created_by: string;
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "typescript",
10
10
  "helper"
11
11
  ],
12
- "version": "0.22.73",
12
+ "version": "0.22.75",
13
13
  "main": "./dist/index.min.js",
14
14
  "types": "./dist/index.d.ts",
15
15
  "files": [
@@ -1,51 +0,0 @@
1
- import * as IShared from '../../../shared/interface';
2
- import { Attribute, ProductCategory } from '../../../shared/entities';
3
- export type Entity = Attribute;
4
- export declare const Route = "attribute";
5
- export declare const UpperName = "Attribute";
6
- export declare const LowerName: string;
7
- export declare const AttributeDatatypeEnum: {
8
- boolean: 'boolean';
9
- decimal: 'decimal';
10
- integer: 'integer';
11
- text: 'text';
12
- select: 'select';
13
- };
14
- export type IAttributeDatatype = (typeof AttributeDatatypeEnum)[keyof typeof AttributeDatatypeEnum];
15
- export declare const attributeDatatypes: string[];
16
- interface IFindDetailedResponse extends Entity {
17
- product_category: ProductCategory;
18
- }
19
- export type IFindByIdResponse = Omit<IFindDetailedResponse, 'product_category'>;
20
- export type IFindByOwnerIdResponse = Omit<IFindDetailedResponse, 'product_category'>;
21
- export type IFindRequest = Record<string, unknown>;
22
- export type IFindResponse = Omit<IFindDetailedResponse, ''>;
23
- export interface IFindPaginatedRequest extends IFindRequest, IShared.IPaginationRequest {
24
- }
25
- export type IFindWithPaginationResponse = IShared.IPaginationResponse<Omit<IFindDetailedResponse, 'product_category'>>;
26
- export interface ICreateRequest {
27
- name: string;
28
- datatype: IAttributeDatatype;
29
- is_mandatory: boolean;
30
- product_category_id: string;
31
- order: number;
32
- }
33
- export interface IUpdateRequest {
34
- name?: string;
35
- datatype?: IAttributeDatatype;
36
- is_mandatory?: boolean;
37
- product_category_id?: string;
38
- order?: number;
39
- }
40
- export interface IRepository {
41
- findById(selector: IShared.IFindByIdRequest): Promise<IFindByIdResponse | null>;
42
- findByOwnerId(params: IShared.IFindByOwnerIdRequest): Promise<IFindByOwnerIdResponse[]>;
43
- findMinified(params?: IShared.IFindMinifiedRequest): Promise<IShared.IFindMinifiedResponse[]>;
44
- find(selector: IFindRequest): Promise<IFindResponse[]>;
45
- findPaginated(selector: IFindPaginatedRequest): Promise<IFindWithPaginationResponse>;
46
- create(data: ICreateRequest): Promise<IFindResponse>;
47
- update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<IFindResponse | null>;
48
- deleteOne(selector: IShared.IFindByIdRequest): Promise<IFindResponse | null>;
49
- }
50
- export type IController = IShared.IEntityWithUserToken<IRepository>;
51
- export {};
@@ -1,5 +0,0 @@
1
- import joi from 'joi';
2
- export declare const createBody: joi.ObjectSchema<any>;
3
- export declare const updateBody: joi.ObjectSchema<any>;
4
- export declare const findQuery: joi.ObjectSchema<any>;
5
- export declare const findWithPaginationQuery: joi.ObjectSchema<any>;
@@ -1,36 +0,0 @@
1
- import * as IShared from '../../../shared/interface';
2
- import { AttributeValue, Attribute } from '../../../shared/entities';
3
- export type Entity = AttributeValue;
4
- export declare const Route = "attribute_value";
5
- export declare const UpperName = "AttributeValue";
6
- export declare const LowerName: string;
7
- interface IFindDetailedResponse extends Entity {
8
- attribute: Attribute;
9
- }
10
- export type IFindByIdResponse = Omit<IFindDetailedResponse, 'attribute'>;
11
- export type IFindByOwnerIdResponse = Omit<IFindDetailedResponse, 'attribute'>;
12
- export type IFindRequest = Record<string, unknown>;
13
- export type IFindResponse = Omit<IFindDetailedResponse, ''>;
14
- export interface IFindPaginatedRequest extends IFindRequest, IShared.IPaginationRequest {
15
- }
16
- export type IFindWithPaginationResponse = IShared.IPaginationResponse<Omit<IFindDetailedResponse, 'attribute'>>;
17
- export interface ICreateRequest {
18
- value: string;
19
- attribute_id: string;
20
- }
21
- export interface IUpdateRequest {
22
- value?: string;
23
- attribute_id?: string;
24
- }
25
- export interface IRepository {
26
- findById(selector: IShared.IFindByIdRequest): Promise<IFindByIdResponse | null>;
27
- findByOwnerId(params: IShared.IFindByOwnerIdRequest): Promise<IFindByOwnerIdResponse[]>;
28
- findMinified(params?: IShared.IFindMinifiedRequest): Promise<IShared.IFindMinifiedResponse[]>;
29
- find(selector: IFindRequest): Promise<IFindResponse[]>;
30
- findPaginated(selector: IFindPaginatedRequest): Promise<IFindWithPaginationResponse>;
31
- create(data: ICreateRequest): Promise<IFindResponse>;
32
- update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<IFindResponse | null>;
33
- deleteOne(selector: IShared.IFindByIdRequest): Promise<IFindResponse | null>;
34
- }
35
- export type IController = IShared.IEntityWithUserToken<IRepository>;
36
- export {};
@@ -1,5 +0,0 @@
1
- import joi from 'joi';
2
- export declare const createBody: joi.ObjectSchema<any>;
3
- export declare const updateBody: joi.ObjectSchema<any>;
4
- export declare const findQuery: joi.ObjectSchema<any>;
5
- export declare const findWithPaginationQuery: joi.ObjectSchema<any>;
@@ -1,36 +0,0 @@
1
- import * as IShared from '../../../shared/interface';
2
- import { Color, PrimaryColor } from '../../../shared/entities';
3
- export type Entity = Color;
4
- export declare const Route = "color";
5
- export declare const UpperName = "Color";
6
- export declare const LowerName: string;
7
- interface IFindDetailedResponse extends Entity {
8
- primary_color: PrimaryColor;
9
- }
10
- export type IFindByIdResponse = Omit<IFindDetailedResponse, 'primary_color'>;
11
- export type IFindByOwnerIdResponse = Omit<IFindDetailedResponse, 'primary_color'>;
12
- export type IFindRequest = Record<string, unknown>;
13
- export type IFindResponse = Omit<IFindDetailedResponse, ''>;
14
- export interface IFindPaginatedRequest extends IFindRequest, IShared.IPaginationRequest {
15
- }
16
- export type IFindWithPaginationResponse = IShared.IPaginationResponse<Omit<IFindDetailedResponse, 'primary_color'>>;
17
- export interface ICreateRequest {
18
- name: string;
19
- primary_color_id: string;
20
- }
21
- export interface IUpdateRequest {
22
- name?: string;
23
- primary_color_id?: string;
24
- }
25
- export interface IRepository {
26
- findById(selector: IShared.IFindByIdRequest): Promise<IFindByIdResponse | null>;
27
- findByOwnerId(params: IShared.IFindByOwnerIdRequest): Promise<IFindByOwnerIdResponse[]>;
28
- findMinified(params?: IShared.IFindMinifiedRequest): Promise<IShared.IFindMinifiedResponse[]>;
29
- find(selector: IFindRequest): Promise<IFindResponse[]>;
30
- findPaginated(selector: IFindPaginatedRequest): Promise<IFindWithPaginationResponse>;
31
- create(data: ICreateRequest): Promise<IFindResponse>;
32
- update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<IFindResponse | null>;
33
- deleteOne(selector: IShared.IFindByIdRequest): Promise<void>;
34
- }
35
- export type IController = IShared.IEntityWithUserToken<IRepository>;
36
- export {};
@@ -1,5 +0,0 @@
1
- import joi from 'joi';
2
- export declare const createBody: joi.ObjectSchema<any>;
3
- export declare const updateBody: joi.ObjectSchema<any>;
4
- export declare const findQuery: joi.ObjectSchema<any>;
5
- export declare const findWithPaginationQuery: joi.ObjectSchema<any>;
@@ -1,36 +0,0 @@
1
- import * as IShared from '../../../shared/interface';
2
- import { Composition, CompositionMaterial } from '../../../shared/entities';
3
- export type Entity = Composition;
4
- export declare const Route = "composition";
5
- export declare const UpperName = "Composition";
6
- export declare const LowerName: string;
7
- export interface IFindDetailedResponse extends Entity {
8
- composition_material: CompositionMaterial;
9
- }
10
- export type IFindByIdResponse = Omit<IFindDetailedResponse, 'composition_material'>;
11
- export type IFindByOwnerIdResponse = Omit<IFindDetailedResponse, ''>;
12
- export type IFindRequest = Record<string, unknown>;
13
- export type IFindResponse = Omit<IFindDetailedResponse, 'composition_material'>;
14
- export interface IFindPaginatedRequest extends IFindRequest, IShared.IPaginationRequest {
15
- }
16
- export type IFindWithPaginationResponse = IShared.IPaginationResponse<Omit<IFindDetailedResponse, 'composition_material'>>;
17
- export interface ICreateRequest {
18
- product_part_id: string;
19
- composition_material_id: string;
20
- value: number;
21
- }
22
- export interface IUpdateRequest {
23
- product_part_id?: string;
24
- composition_material_id?: string;
25
- value?: number;
26
- }
27
- export interface IRepository {
28
- findById(selector: IShared.IFindByIdRequest): Promise<IFindByIdResponse | null>;
29
- findByOwnerId(params: IShared.IFindByOwnerIdRequest): Promise<IFindByOwnerIdResponse[]>;
30
- find(selector: IFindRequest): Promise<IFindResponse[]>;
31
- findPaginated(selector: IFindPaginatedRequest): Promise<IFindWithPaginationResponse>;
32
- create(data: ICreateRequest): Promise<IFindByOwnerIdResponse>;
33
- update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<IFindByOwnerIdResponse | null>;
34
- deleteOne(selector: IShared.IFindByIdRequest): Promise<IFindByOwnerIdResponse | null>;
35
- }
36
- export type IController = IShared.IEntityWithUserToken<IRepository>;
@@ -1,5 +0,0 @@
1
- import joi from 'joi';
2
- export declare const createBody: joi.ObjectSchema<any>;
3
- export declare const updateBody: joi.ObjectSchema<any>;
4
- export declare const findQuery: joi.ObjectSchema<any>;
5
- export declare const findWithPaginationQuery: joi.ObjectSchema<any>;
@@ -1,32 +0,0 @@
1
- import * as IShared from '../../../shared/interface';
2
- import { CompositionMaterial } from '../../../shared/entities';
3
- export type Entity = CompositionMaterial;
4
- export declare const Route = "composition_material";
5
- export declare const UpperName = "CompositionMaterial";
6
- export declare const LowerName: string;
7
- type IFindDetailedResponse = Entity;
8
- export type IFindByIdResponse = Omit<IFindDetailedResponse, ''>;
9
- export type IFindByOwnerIdResponse = Omit<IFindDetailedResponse, ''>;
10
- export type IFindRequest = Record<string, unknown>;
11
- export type IFindResponse = Omit<IFindDetailedResponse, ''>;
12
- export interface IFindPaginatedRequest extends IFindRequest, IShared.IPaginationRequest {
13
- }
14
- export type IFindWithPaginationResponse = IShared.IPaginationResponse<Omit<IFindDetailedResponse, ''>>;
15
- export interface ICreateRequest {
16
- name: string;
17
- }
18
- export interface IUpdateRequest {
19
- name?: string;
20
- }
21
- export interface IRepository {
22
- findById(selector: IShared.IFindByIdRequest): Promise<IFindByIdResponse | null>;
23
- findByOwnerId(params: IShared.IFindByOwnerIdRequest): Promise<IFindByOwnerIdResponse[]>;
24
- findMinified(params?: IShared.IFindMinifiedRequest): Promise<IShared.IFindMinifiedResponse[]>;
25
- find(selector: IFindRequest): Promise<IFindResponse[]>;
26
- findPaginated(selector: IFindPaginatedRequest): Promise<IFindWithPaginationResponse>;
27
- create(data: ICreateRequest): Promise<Entity>;
28
- update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<Entity | null>;
29
- deleteOne(selector: IShared.IFindByIdRequest): Promise<Entity | null>;
30
- }
31
- export type IController = IShared.IEntityWithUserToken<IRepository>;
32
- export {};
@@ -1,5 +0,0 @@
1
- import joi from 'joi';
2
- export declare const createBody: joi.ObjectSchema<any>;
3
- export declare const updateBody: joi.ObjectSchema<any>;
4
- export declare const findQuery: joi.ObjectSchema<any>;
5
- export declare const findWithPaginationQuery: joi.ObjectSchema<any>;
@@ -1,37 +0,0 @@
1
- import * as IShared from '../../../shared/interface';
2
- import { Maintenance, MaintenanceType } from '../../../shared/entities';
3
- export type Entity = Maintenance;
4
- export declare const Route = "maintenance";
5
- export declare const UpperName = "Maintenance";
6
- export declare const LowerName: string;
7
- export interface IFindDetailedResponse extends Entity {
8
- maintenance_type: MaintenanceType;
9
- }
10
- export type IFindByIdResponse = Omit<IFindDetailedResponse, 'maintenance_type'>;
11
- export type IFindByOwnerIdResponse = Omit<IFindDetailedResponse, 'maintenance_type'>;
12
- export type IFindRequest = Record<string, unknown>;
13
- export type IFindResponse = Omit<IFindDetailedResponse, ''>;
14
- export interface IFindPaginatedRequest extends IFindRequest, IShared.IPaginationRequest {
15
- }
16
- export type IFindWithPaginationResponse = IShared.IPaginationResponse<Omit<IFindDetailedResponse, 'maintenance_type'>>;
17
- export interface ICreateRequest {
18
- name: string;
19
- multimedia_id: string;
20
- maintenance_type_id: string;
21
- }
22
- export interface IUpdateRequest {
23
- name?: string;
24
- multimedia_id?: string;
25
- maintenance_type_id?: string;
26
- }
27
- export interface IRepository {
28
- findById(selector: IShared.IFindByIdRequest): Promise<IFindByIdResponse | null>;
29
- findByOwnerId(params: IShared.IFindByOwnerIdRequest): Promise<IFindByOwnerIdResponse[]>;
30
- findMinified(params?: IShared.IFindMinifiedRequest): Promise<IShared.IFindMinifiedResponse[]>;
31
- find(selector: IFindRequest): Promise<IFindResponse[]>;
32
- findPaginated(selector: IFindPaginatedRequest): Promise<IFindWithPaginationResponse>;
33
- create(data: ICreateRequest): Promise<IFindResponse>;
34
- update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<IFindResponse | null>;
35
- deleteOne(selector: IShared.IFindByIdRequest): Promise<IFindResponse | null>;
36
- }
37
- export type IController = IShared.IEntityWithUserToken<IRepository>;
@@ -1,5 +0,0 @@
1
- import joi from 'joi';
2
- export declare const createBody: joi.ObjectSchema<any>;
3
- export declare const updateBody: joi.ObjectSchema<any>;
4
- export declare const findQuery: joi.ObjectSchema<any>;
5
- export declare const findWithPaginationQuery: joi.ObjectSchema<any>;
@@ -1,35 +0,0 @@
1
- import * as IShared from '../../../shared/interface';
2
- import { MaintenanceAssoc } from '../../../shared/entities';
3
- import * as IMaintenance from '../maintenance/interface';
4
- export type Entity = MaintenanceAssoc;
5
- export declare const Route = "maintenance_assoc";
6
- export declare const UpperName = "MaintenanceAssoc";
7
- export declare const LowerName: string;
8
- export interface IFindDetailedResponse extends Entity {
9
- maintenance: IMaintenance.IFindDetailedResponse;
10
- }
11
- export type IFindByIdResponse = Omit<IFindDetailedResponse, 'maintenance'>;
12
- export type IFindByOwnerIdResponse = Omit<IFindDetailedResponse, ''>;
13
- export type IFindRequest = Record<string, unknown>;
14
- export type IFindResponse = Omit<IFindDetailedResponse, 'maintenance'>;
15
- export interface IFindPaginatedRequest extends IFindRequest, IShared.IPaginationRequest {
16
- }
17
- export type IFindWithPaginationResponse = IShared.IPaginationResponse<Omit<IFindDetailedResponse, 'maintenance'>>;
18
- export interface ICreateRequest {
19
- product_part_id: string;
20
- maintenance_id: string;
21
- }
22
- export interface IUpdateRequest {
23
- product_part_id?: string;
24
- maintenance_id?: string;
25
- }
26
- export interface IRepository {
27
- findById(selector: IShared.IFindByIdRequest): Promise<IFindByIdResponse | null>;
28
- findByOwnerId(selector: IShared.IFindByOwnerIdRequest): Promise<IFindByOwnerIdResponse[]>;
29
- find(selector: IFindRequest): Promise<IFindResponse[]>;
30
- findPaginated(selector: IFindPaginatedRequest): Promise<IFindWithPaginationResponse>;
31
- create(data: ICreateRequest): Promise<IFindByOwnerIdResponse>;
32
- update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<IFindByOwnerIdResponse | null>;
33
- deleteOne(selector: IShared.IFindByIdRequest): Promise<IFindByOwnerIdResponse | null>;
34
- }
35
- export type IController = IShared.IEntityWithUserToken<IRepository>;
@@ -1,5 +0,0 @@
1
- import joi from 'joi';
2
- export declare const createBody: joi.ObjectSchema<any>;
3
- export declare const updateBody: joi.ObjectSchema<any>;
4
- export declare const findQuery: joi.ObjectSchema<any>;
5
- export declare const findWithPaginationQuery: joi.ObjectSchema<any>;