@nomalism-com/types 1.1.2 → 1.1.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.
Files changed (238) hide show
  1. package/dist/index.d.ts +2 -0
  2. package/dist/index.js +140 -172
  3. package/dist/main.d.ts +226 -0
  4. package/dist/modules/document/billOfLading/interfaces.d.ts +22 -0
  5. package/dist/modules/document/billOfLading/route.schema.d.ts +2 -0
  6. package/dist/modules/document/inventario/interface.d.ts +15 -0
  7. package/dist/modules/document/inventario/route.schema.d.ts +2 -0
  8. package/dist/modules/document/materialEntrance/interfaces.d.ts +134 -0
  9. package/dist/modules/document/materialEntrance/route.schema.d.ts +7 -0
  10. package/dist/modules/document/order/interfaces.d.ts +113 -0
  11. package/dist/modules/document/order/route.schema.d.ts +9 -0
  12. package/dist/modules/document/productionOrder/interfaces.d.ts +9 -0
  13. package/dist/modules/document/productionOrder/route.schema.d.ts +2 -0
  14. package/dist/modules/document/proforma/interfaces.d.ts +12 -0
  15. package/dist/modules/document/proforma/route.schema.d.ts +3 -0
  16. package/dist/modules/document/propostaFornecedor/interfaces.d.ts +13 -0
  17. package/dist/modules/document/propostaFornecedor/route.schema.d.ts +2 -0
  18. package/dist/modules/document/propostaSheets/interface.d.ts +74 -0
  19. package/dist/modules/document/propostaSheets/route.schema.d.ts +6 -0
  20. package/dist/modules/document/providerCreditNoteFromReturn/interfaces.d.ts +38 -0
  21. package/dist/modules/document/providerCreditNoteFromReturn/route.schema.d.ts +3 -0
  22. package/dist/modules/document/providerFinancialCreditNote/interfaces.d.ts +27 -0
  23. package/dist/modules/document/providerFinancialCreditNote/route.schema.d.ts +3 -0
  24. package/dist/modules/document/providerServiceInvoice/interfaces.d.ts +16 -0
  25. package/dist/modules/document/providerServiceInvoice/route.schema.d.ts +2 -0
  26. package/dist/modules/document/purchase/interfaces.d.ts +91 -0
  27. package/dist/modules/document/purchase/route.schema.d.ts +4 -0
  28. package/dist/modules/document/quebra/interfaces.d.ts +36 -0
  29. package/dist/modules/document/quebra/route.schema.d.ts +3 -0
  30. package/dist/modules/document/returnToProvider/interface.d.ts +40 -0
  31. package/dist/modules/document/returnToProvider/route.schema.d.ts +2 -0
  32. package/dist/modules/document/transformado/interfaces.d.ts +19 -0
  33. package/dist/modules/document/transformado/route.schema.d.ts +2 -0
  34. package/dist/modules/document/upfrontReturn/interfaces.d.ts +12 -0
  35. package/dist/modules/document/upfrontReturn/route.schema.d.ts +2 -0
  36. package/dist/modules/documentManagement/multimedia/interfaces.d.ts +16 -0
  37. package/dist/modules/documentManagement/multimedia/route.schema.d.ts +2 -0
  38. package/dist/modules/integration/emailLog/interfaces.d.ts +85 -0
  39. package/dist/modules/integration/emailLog/route.schema.d.ts +4 -0
  40. package/dist/modules/integration/emailTemplate/interfaces.d.ts +46 -0
  41. package/dist/modules/integration/emailTemplate/route.schema.d.ts +4 -0
  42. package/dist/modules/integration/emailTemplateAttachment/interfaces.d.ts +17 -0
  43. package/dist/modules/integration/emailTemplateAttachment/route.schema.d.ts +2 -0
  44. package/dist/modules/integration/emailVerification/interfaces.d.ts +23 -0
  45. package/dist/modules/integration/emailVerification/route.schema.d.ts +5 -0
  46. package/dist/modules/integration/googleFilePermission/interfaces.d.ts +26 -0
  47. package/dist/modules/integration/googleFilePermission/route.schema.d.ts +5 -0
  48. package/dist/modules/integration/googleSheets/interfaces.d.ts +54 -0
  49. package/dist/modules/integration/googleSheets/route.schema.d.ts +4 -0
  50. package/dist/modules/integration/observation/interfaces.d.ts +45 -0
  51. package/dist/modules/integration/observation/route.schema.d.ts +5 -0
  52. package/dist/modules/integration/observationType/interfaces.d.ts +27 -0
  53. package/dist/modules/integration/observationType/route.schema.d.ts +7 -0
  54. package/dist/modules/integration/projectInfo/interfaces.d.ts +16 -0
  55. package/dist/modules/integration/projectInfo/route.schema.d.ts +2 -0
  56. package/dist/modules/integration/settings/interfaces.d.ts +25 -0
  57. package/dist/modules/integration/settings/route.schema.d.ts +4 -0
  58. package/dist/modules/print/npc/interfaces.d.ts +30 -0
  59. package/dist/modules/print/npc/route.schema.d.ts +3 -0
  60. package/dist/modules/print/printer/interfaces.d.ts +38 -0
  61. package/dist/modules/print/printer/route.schema.d.ts +4 -0
  62. package/dist/modules/print/schedulePrintJob/interfaces.d.ts +39 -0
  63. package/dist/modules/print/schedulePrintJob/route.schema.d.ts +5 -0
  64. package/dist/modules/stock/chat/interfaces.d.ts +61 -0
  65. package/dist/modules/stock/chat/route.schema.d.ts +3 -0
  66. package/dist/modules/stock/chatRapidMessage/interface.d.ts +26 -0
  67. package/dist/modules/stock/chatRapidMessage/route.schema.d.ts +3 -0
  68. package/dist/modules/stock/dashboard/interface.d.ts +22 -0
  69. package/dist/modules/stock/dashboard/route.schema.d.ts +2 -0
  70. package/dist/modules/stock/file/interface.d.ts +32 -0
  71. package/dist/modules/stock/file/route.schema.d.ts +5 -0
  72. package/dist/modules/stock/location/interface.d.ts +58 -0
  73. package/dist/modules/stock/location/route.schema.d.ts +5 -0
  74. package/dist/modules/stock/prison/interface.d.ts +49 -0
  75. package/dist/modules/stock/prison/route.schema.d.ts +4 -0
  76. package/dist/modules/stock/productGoogleSheets/interface.d.ts +237 -0
  77. package/dist/modules/stock/productGoogleSheets/route.schema.d.ts +13 -0
  78. package/dist/modules/stock/productImage/interface.d.ts +44 -0
  79. package/dist/modules/stock/productImage/route.schema.d.ts +5 -0
  80. package/dist/modules/stock/promotion/interface.d.ts +42 -0
  81. package/dist/modules/stock/promotion/route.schema.d.ts +5 -0
  82. package/dist/modules/stock/promotionAssoc/interface.d.ts +40 -0
  83. package/dist/modules/stock/promotionAssoc/route.schema.d.ts +5 -0
  84. package/dist/modules/stock/queryList/interfaces.d.ts +44 -0
  85. package/dist/modules/stock/queryList/route.schema.d.ts +7 -0
  86. package/dist/modules/stock/queryParameter/interfaces.d.ts +51 -0
  87. package/dist/modules/stock/queryParameter/route.schema.d.ts +3 -0
  88. package/dist/modules/stock/recurrentTasks/interface.d.ts +9 -0
  89. package/dist/modules/stock/returnReason/interfaces.d.ts +19 -0
  90. package/dist/modules/stock/returnReason/route.schema.d.ts +3 -0
  91. package/dist/modules/stock/savedEmPicking/interfaces.d.ts +27 -0
  92. package/dist/modules/stock/savedEmPicking/route.schema.d.ts +5 -0
  93. package/dist/modules/stock/savedProviderProposal/interfaces.d.ts +23 -0
  94. package/dist/modules/stock/savedProviderProposal/route.schema.d.ts +3 -0
  95. package/dist/modules/stock/sideMenu/interface.d.ts +37 -0
  96. package/dist/modules/stock/sideMenu/route.schema.d.ts +3 -0
  97. package/dist/modules/stock/stockMovement/interface.d.ts +49 -0
  98. package/dist/modules/stock/stockMovement/route.schema.d.ts +3 -0
  99. package/dist/modules/stock/task/interface.d.ts +82 -0
  100. package/dist/modules/stock/task/route.schema.d.ts +4 -0
  101. package/dist/modules/stock/taskMessage/interface.d.ts +14 -0
  102. package/dist/modules/stock/taskMessage/route.schema.d.ts +3 -0
  103. package/dist/modules/stock/taskRead/interface.d.ts +13 -0
  104. package/dist/modules/stock/taskRead/route.schema.d.ts +3 -0
  105. package/dist/modules/stock/typeOfLocation/interface.d.ts +32 -0
  106. package/dist/modules/stock/typeOfLocation/route.schema.d.ts +5 -0
  107. package/dist/modules/stock/unitOfMeasure/interface.d.ts +42 -0
  108. package/dist/modules/stock/unitOfMeasure/route.schema.d.ts +5 -0
  109. package/dist/modules/stock/vatTax/interface.d.ts +34 -0
  110. package/dist/modules/stock/vatTax/route.schema.d.ts +5 -0
  111. package/dist/modules/stock/vatTaxZone/interface.d.ts +42 -0
  112. package/dist/modules/stock/vatTaxZone/route.schema.d.ts +5 -0
  113. package/dist/modules/stock/vatValidation/interfaces.d.ts +8 -0
  114. package/dist/modules/stock/vatValidation/route.schema.d.ts +2 -0
  115. package/dist/modules/stock/workflow/interfaces.d.ts +45 -0
  116. package/dist/modules/stock/workflow/route.schema.d.ts +4 -0
  117. package/dist/modules/supply/batch/interface.d.ts +0 -0
  118. package/dist/modules/supply/documentHeader/interfaces.d.ts +364 -0
  119. package/dist/modules/supply/documentHeader/route.schema.d.ts +15 -0
  120. package/dist/modules/supply/documentLine/interfaces.d.ts +145 -0
  121. package/dist/modules/supply/documentLine/route.schema.d.ts +9 -0
  122. package/dist/modules/supply/documentLineAssoc/interfaces.d.ts +34 -0
  123. package/dist/modules/supply/documentLineAssoc/route.schema.d.ts +3 -0
  124. package/dist/modules/supply/documentLineMT/interface.d.ts +19 -0
  125. package/dist/modules/supply/documentLineMT/route.schema.d.ts +2 -0
  126. package/dist/modules/supply/documentLineNote/interfaces.d.ts +33 -0
  127. package/dist/modules/supply/documentLineNote/route.schema.d.ts +6 -0
  128. package/dist/modules/supply/documentLineRM/interface.d.ts +25 -0
  129. package/dist/modules/supply/documentLineRM/route.schema.d.ts +2 -0
  130. package/dist/modules/supply/documentSet/interface.d.ts +27 -0
  131. package/dist/modules/supply/documentSet/route.schema.d.ts +3 -0
  132. package/dist/modules/supply/documentType/interfaces.d.ts +131 -0
  133. package/dist/modules/supply/documentType/route.schema.d.ts +3 -0
  134. package/dist/modules/supply/externalDocumentHeader/interface.d.ts +89 -0
  135. package/dist/modules/supply/externalDocumentHeader/route.schema.d.ts +8 -0
  136. package/dist/modules/supply/externalDocumentType/interface.d.ts +11 -0
  137. package/dist/modules/supply/orderManagement/interface.d.ts +41 -0
  138. package/dist/modules/supply/orderManagement/route.schema.d.ts +0 -0
  139. package/dist/modules/supply/payment/interface.d.ts +164 -0
  140. package/dist/modules/supply/payment/route.schema.d.ts +11 -0
  141. package/dist/modules/supply/preSale/interface.d.ts +71 -0
  142. package/dist/modules/supply/preSale/route.schema.d.ts +8 -0
  143. package/dist/modules/supply/preSaleProduct/interface.d.ts +12 -0
  144. package/dist/modules/supply/preSaleProduct/route.schema.d.ts +2 -0
  145. package/dist/modules/supply/schedule/interface.d.ts +23 -0
  146. package/dist/modules/supply/schedule/route.schema.d.ts +2 -0
  147. package/dist/modules/supply/startDocumentHeaderLastUpdate/interface.d.ts +10 -0
  148. package/dist/modules/tickets/channel/interfaces.d.ts +29 -0
  149. package/dist/modules/tickets/channel/route.schema.d.ts +3 -0
  150. package/dist/modules/tickets/clt/interfaces.d.ts +20 -0
  151. package/dist/modules/tickets/clt/route.schema.d.ts +3 -0
  152. package/dist/modules/tickets/language/interfaces.d.ts +20 -0
  153. package/dist/modules/tickets/language/route.schema.d.ts +3 -0
  154. package/dist/modules/tickets/tickets/interfaces.d.ts +68 -0
  155. package/dist/modules/tickets/tickets/route.schema.d.ts +3 -0
  156. package/dist/modules/user/bankData/interface.d.ts +42 -0
  157. package/dist/modules/user/bankData/route.schema.d.ts +5 -0
  158. package/dist/modules/user/chatSubscribers/interfaces.d.ts +25 -0
  159. package/dist/modules/user/chatSubscribers/route.schema.d.ts +2 -0
  160. package/dist/modules/user/clientType/interface.d.ts +30 -0
  161. package/dist/modules/user/clientType/route.schema.d.ts +6 -0
  162. package/dist/modules/user/clients/interface.d.ts +86 -0
  163. package/dist/modules/user/clients/route.schema.d.ts +5 -0
  164. package/dist/modules/user/commissioner/interface.d.ts +64 -0
  165. package/dist/modules/user/commissioner/route.schema.d.ts +5 -0
  166. package/dist/modules/user/country/interface.d.ts +35 -0
  167. package/dist/modules/user/country/route.schema.d.ts +5 -0
  168. package/dist/modules/user/deliveryMethods/interfaces.d.ts +23 -0
  169. package/dist/modules/user/deliveryMethods/route.schema.d.ts +3 -0
  170. package/dist/modules/user/favorites/interfaces.d.ts +22 -0
  171. package/dist/modules/user/favorites/route.schema.d.ts +8 -0
  172. package/dist/modules/user/groupPermissions/interface.d.ts +25 -0
  173. package/dist/modules/user/groupPermissions/route.schema.d.ts +2 -0
  174. package/dist/modules/user/language/interface.d.ts +30 -0
  175. package/dist/modules/user/language/route.schema.d.ts +5 -0
  176. package/dist/modules/user/maturityDates/interfaces.d.ts +25 -0
  177. package/dist/modules/user/maturityDates/route.schema.d.ts +3 -0
  178. package/dist/modules/user/password/interfaces.d.ts +15 -0
  179. package/dist/modules/user/password/route.schema.d.ts +3 -0
  180. package/dist/modules/user/paymentMethods/interfaces.d.ts +49 -0
  181. package/dist/modules/user/paymentMethods/route.schema.d.ts +3 -0
  182. package/dist/modules/user/permissions/interface.d.ts +25 -0
  183. package/dist/modules/user/permissions/route.schema.d.ts +2 -0
  184. package/dist/modules/user/persona/interface.d.ts +113 -0
  185. package/dist/modules/user/persona/route.schema.d.ts +7 -0
  186. package/dist/modules/user/providerType/interface.d.ts +30 -0
  187. package/dist/modules/user/providerType/route.schema.d.ts +5 -0
  188. package/dist/modules/user/providers/interface.d.ts +82 -0
  189. package/dist/modules/user/providers/route.schema.d.ts +5 -0
  190. package/dist/modules/user/purchaseConditions/interface.d.ts +37 -0
  191. package/dist/modules/user/purchaseConditions/route.schema.d.ts +5 -0
  192. package/dist/modules/user/reasonForExemption/interface.d.ts +34 -0
  193. package/dist/modules/user/reasonForExemption/route.schema.d.ts +5 -0
  194. package/dist/modules/user/refreshToken/interface.d.ts +15 -0
  195. package/dist/modules/user/refreshToken/route.schema.d.ts +2 -0
  196. package/dist/modules/user/segmentsArea/interface.d.ts +32 -0
  197. package/dist/modules/user/segmentsArea/route.schema.d.ts +5 -0
  198. package/dist/modules/user/sessions/interface.d.ts +19 -0
  199. package/dist/modules/user/sessions/route.schema.d.ts +2 -0
  200. package/dist/modules/user/shippings/interface.d.ts +38 -0
  201. package/dist/modules/user/shippings/route.schema.d.ts +5 -0
  202. package/dist/modules/user/storeOperator/interface.d.ts +33 -0
  203. package/dist/modules/user/storeOperator/route.schema.d.ts +4 -0
  204. package/dist/modules/user/swift/interface.d.ts +38 -0
  205. package/dist/modules/user/swift/route.schema.d.ts +5 -0
  206. package/dist/modules/user/tenant/interface.d.ts +49 -0
  207. package/dist/modules/user/tenant/route.schema.d.ts +3 -0
  208. package/dist/modules/user/theme/interfaces.d.ts +18 -0
  209. package/dist/modules/user/theme/route.schema.d.ts +2 -0
  210. package/dist/modules/user/userPermissions/interface.d.ts +23 -0
  211. package/dist/modules/user/userPermissions/route.schema.d.ts +2 -0
  212. package/dist/modules/user/userPositions/interface.d.ts +30 -0
  213. package/dist/modules/user/userPositions/route.schema.d.ts +5 -0
  214. package/dist/modules/user/userTokens/interface.d.ts +30 -0
  215. package/dist/modules/user/userTokens/route.schema.d.ts +3 -0
  216. package/dist/modules/user/users/interface.d.ts +114 -0
  217. package/dist/modules/user/users/route.schema.d.ts +7 -0
  218. package/dist/modules/user/vehicles/interfaces.d.ts +25 -0
  219. package/dist/modules/user/vehicles/route.schema.d.ts +3 -0
  220. package/dist/modules/user/zipCode/interfaces.d.ts +23 -0
  221. package/dist/modules/user/zipCode/route.schema.d.ts +3 -0
  222. package/dist/modules/view/adminPanel/interfaces.d.ts +140 -0
  223. package/dist/modules/view/errorLog/interfaces.d.ts +30 -0
  224. package/dist/modules/view/errorLog/route.schema.d.ts +2 -0
  225. package/dist/shared/entities/documentManagement.d.ts +15 -0
  226. package/dist/shared/entities/integration.d.ts +127 -0
  227. package/dist/shared/entities/print.d.ts +46 -0
  228. package/dist/shared/entities/stock.d.ts +1058 -0
  229. package/dist/shared/entities/tickets.d.ts +78 -0
  230. package/dist/shared/entities/user.d.ts +507 -0
  231. package/dist/shared/errors/documentManagementErrors.d.ts +14 -0
  232. package/dist/shared/errors/integrationErrors.d.ts +45 -0
  233. package/dist/shared/errors/stockErrors.d.ts +267 -0
  234. package/dist/shared/errors/userErrors.d.ts +104 -0
  235. package/dist/shared/errors/viewErrors.d.ts +7 -0
  236. package/dist/shared/interface.d.ts +343 -0
  237. package/dist/shared/messages.d.ts +2 -0
  238. package/package.json +2 -2
@@ -0,0 +1,49 @@
1
+ import * as IShared from '../../../shared/interface';
2
+ import { StockMovement } from '../../../shared/entities/stock';
3
+ export type Entity = StockMovement;
4
+ export declare const Route = "stock_movement";
5
+ export declare const UpperName = "StockMovement";
6
+ export declare const LowerName: string;
7
+ export interface IFindByProviderResponse extends Omit<StockMovement, 'product_id' | 'stock_to_date'> {
8
+ reference: string;
9
+ }
10
+ export type IFindByOwnerIdResponse = Omit<StockMovement, 'document_line_id' | 'product_id'>;
11
+ export declare const ExportFormatEnum: {
12
+ csv: 'csv';
13
+ xml: 'xml';
14
+ };
15
+ export type IExportFormat = (typeof ExportFormatEnum)[keyof typeof ExportFormatEnum];
16
+ export declare const exportFormats: string[];
17
+ export declare const ExportVersionEnum: {
18
+ v1_02: 'v1_02';
19
+ v2_01: 'v2_01';
20
+ };
21
+ export type IExportVersion = (typeof ExportVersionEnum)[keyof typeof ExportVersionEnum];
22
+ export declare const exportVersions: string[];
23
+ export interface IExportRequest {
24
+ date: Date;
25
+ format: IExportFormat;
26
+ version: IExportVersion;
27
+ token: string;
28
+ }
29
+ export interface IExportCsvResponse {
30
+ productCategory: string;
31
+ productCode: string;
32
+ productDescription: string;
33
+ productNumberCode: string;
34
+ closingStockQuantity: number;
35
+ unitOfMeasure: string;
36
+ closingStockValue: number;
37
+ }
38
+ export interface IFindStockMovementPaginatedRequest extends IShared.IFindByOwnerIdRequest, IShared.IPaginationRequest {
39
+ }
40
+ export interface IRepository {
41
+ findByProvider(selector: IShared.IFindByIdNumberRequest): Promise<IFindByProviderResponse[]>;
42
+ findByOwnerId(selector: IShared.IFindByOwnerIdRequest): Promise<IFindByOwnerIdResponse[]>;
43
+ exportCsv(selector: IExportRequest): Promise<IExportCsvResponse[]>;
44
+ findStockMovementPaginated(selector: IFindStockMovementPaginatedRequest): Promise<IShared.IPaginationResponse<IFindByOwnerIdResponse>>;
45
+ }
46
+ export interface IController extends IRepository {
47
+ findByOwnerId(selector: IShared.IFindByOwnerIdRequest): Promise<IFindByOwnerIdResponse[]>;
48
+ exportCsv(selector: IExportRequest): Promise<IExportCsvResponse[]>;
49
+ }
@@ -0,0 +1,3 @@
1
+ import joi from 'joi';
2
+ export declare const exportCsvQuery: joi.ObjectSchema<any>;
3
+ export declare const findStockMovementWithPaginationQuery: joi.ObjectSchema<any>;
@@ -0,0 +1,82 @@
1
+ import * as IShared from '../../../shared/interface';
2
+ import { Task, TaskMessage, DocumentHeader, File } from '../../../shared/entities/stock';
3
+ export type Entity = Task;
4
+ export declare const Route = "task";
5
+ export declare const UpperName = "Task";
6
+ export declare const LowerName: string;
7
+ export declare const ITaskStatusDataTypeEnum: {
8
+ Normal: 'Normal';
9
+ Urgent: 'Urgent';
10
+ Problem: 'Problem';
11
+ };
12
+ export type ITaskStatusDataType = (typeof ITaskStatusDataTypeEnum)[keyof typeof ITaskStatusDataTypeEnum];
13
+ export declare const taskStatusDataType: string[];
14
+ export type ICreateRequest = {
15
+ task: string;
16
+ };
17
+ export type IUpdateRequest = {
18
+ from?: string;
19
+ to?: string | null;
20
+ task?: string;
21
+ read?: boolean;
22
+ finished?: boolean;
23
+ archived?: boolean;
24
+ status?: ITaskStatusDataType;
25
+ future_date?: Date | null;
26
+ };
27
+ export declare const IHistoryStatusDataTypeEnum: {
28
+ created_task: 'created_task';
29
+ updated_task: 'updated_task';
30
+ created_message: 'created_message';
31
+ updated_message: 'updated_message';
32
+ deleted_message: 'deleted_message';
33
+ };
34
+ export type IHistoryStatusDataType = (typeof IHistoryStatusDataTypeEnum)[keyof typeof IHistoryStatusDataTypeEnum];
35
+ export declare const historyStatusDataType: string[];
36
+ export interface ITaskHistoryData {
37
+ status: IHistoryStatusDataType | null;
38
+ data: string;
39
+ changedAt: Date;
40
+ changedBy: string;
41
+ }
42
+ export interface ITaskHistoryResponse {
43
+ status: IHistoryStatusDataType | null;
44
+ data: string;
45
+ changedAt: Date;
46
+ changedBy: string;
47
+ }
48
+ export type IFindResponse = Omit<Entity, 'history'> & {
49
+ task_read: boolean;
50
+ };
51
+ export type ITaskFileType = Pick<File, 'multimedia_id' | 'filename' | 'created_at' | 'created_by'> & {
52
+ id?: string;
53
+ };
54
+ export interface IFindWithMessagesResponse extends Entity {
55
+ messages: TaskMessage[];
56
+ document_headers: Pick<DocumentHeader, 'id' | 'document_number'>[];
57
+ task_read: boolean;
58
+ task_files: ITaskFileType[];
59
+ }
60
+ export type IFindTasksRequest = {
61
+ archived?: boolean;
62
+ };
63
+ export type IFindByOwnerResponse = {
64
+ task_id: string;
65
+ from: string;
66
+ to: string | null;
67
+ task: string;
68
+ created_at: Date;
69
+ task_read: boolean;
70
+ number: number;
71
+ status: ITaskStatusDataType;
72
+ future_date: Date | null;
73
+ };
74
+ export interface IRepository {
75
+ find(selector: IFindTasksRequest): Promise<IFindResponse[]>;
76
+ findWithMessages(id: IShared.IFindByIdRequest): Promise<IFindWithMessagesResponse>;
77
+ create(data: ICreateRequest): Promise<Entity>;
78
+ update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<void>;
79
+ delete(selector: IShared.IFindByIdRequest): Promise<void>;
80
+ findByOwnerId: (selector: IShared.IFindByOwnerIdRequest) => Promise<IFindByOwnerResponse[]>;
81
+ }
82
+ export type IController = IShared.IEntityWithUserToken<IRepository>;
@@ -0,0 +1,4 @@
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 findTaskParams: joi.ObjectSchema<any>;
@@ -0,0 +1,14 @@
1
+ import * as IShared from '../../../shared/interface';
2
+ import { TaskMessage } from '../../../shared/entities/stock';
3
+ export type Entity = TaskMessage;
4
+ export declare const Route = "task_message";
5
+ export declare const UpperName = "TaskMessage";
6
+ export declare const LowerName: string;
7
+ export type ICreateRequest = Pick<Entity, 'message' | 'task_id'>;
8
+ export type IUpdateRequest = Pick<Entity, 'message' | 'task_id'>;
9
+ export interface IRepository {
10
+ create(data: ICreateRequest): Promise<Entity>;
11
+ update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<void>;
12
+ delete(selector: IShared.IFindByIdRequest): Promise<void>;
13
+ }
14
+ export type IController = IShared.IEntityWithUserToken<IRepository>;
@@ -0,0 +1,3 @@
1
+ import joi from 'joi';
2
+ export declare const createBody: joi.ObjectSchema<any>;
3
+ export declare const updateBody: joi.ObjectSchema<any>;
@@ -0,0 +1,13 @@
1
+ import * as IShared from '../../../shared/interface';
2
+ import { TaskRead } from '../../../shared/entities/stock';
3
+ export type Entity = TaskRead;
4
+ export declare const Route = "task_read";
5
+ export declare const UpperName = "TaskRead";
6
+ export declare const LowerName: string;
7
+ export type ICreateRequest = Pick<Entity, 'user_id' | 'task_id'>;
8
+ export type IDeleteRequest = Pick<Entity, 'user_id' | 'task_id'>;
9
+ export interface IRepository {
10
+ create(data: ICreateRequest): Promise<void>;
11
+ delete(selector: IDeleteRequest): Promise<void>;
12
+ }
13
+ export type IController = IShared.IEntityWithUserToken<IRepository>;
@@ -0,0 +1,3 @@
1
+ import joi from 'joi';
2
+ export declare const createBody: joi.ObjectSchema<any>;
3
+ export declare const deleteBody: joi.ObjectSchema<any>;
@@ -0,0 +1,32 @@
1
+ import * as IShared from '../../../shared/interface';
2
+ import { TypeOfLocation } from '../../../shared/entities/stock';
3
+ export type Entity = TypeOfLocation;
4
+ export declare const Route = "type_of_location";
5
+ export declare const UpperName = "TypeOfLocation";
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 {};
@@ -0,0 +1,5 @@
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>;
@@ -0,0 +1,42 @@
1
+ import * as IShared from '../../../shared/interface';
2
+ import { UnitOfMeasure } from '../../../shared/entities/stock';
3
+ export type Entity = UnitOfMeasure;
4
+ export declare const UpperName = "UnitOfMeasure";
5
+ export declare const LowerName: string;
6
+ export declare const Route = "unit_of_measure";
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
+ notation: string;
18
+ type: string;
19
+ default_quantity?: boolean;
20
+ integer_only?: boolean;
21
+ divisible?: boolean;
22
+ }
23
+ export interface IUpdateRequest {
24
+ name?: string;
25
+ notation?: string;
26
+ type?: string;
27
+ default_quantity?: boolean;
28
+ integer_only?: boolean;
29
+ divisible?: boolean;
30
+ }
31
+ export interface IRepository {
32
+ findById(selector: IShared.IFindByIdRequest): Promise<IFindByIdResponse | null>;
33
+ findByOwnerId(params: IShared.IFindByOwnerIdRequest): Promise<IFindByOwnerIdResponse[]>;
34
+ findMinified(params?: IShared.IFindMinifiedRequest): Promise<IShared.IFindMinifiedResponse[]>;
35
+ find(selector: IFindRequest): Promise<IFindResponse[]>;
36
+ findPaginated(selector: IFindPaginatedRequest): Promise<IFindWithPaginationResponse>;
37
+ create(data: ICreateRequest): Promise<Entity>;
38
+ update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<Entity | null>;
39
+ deleteOne(selector: IShared.IFindByIdRequest): Promise<Entity | null>;
40
+ }
41
+ export type IController = IShared.IEntityWithUserToken<IRepository>;
42
+ export {};
@@ -0,0 +1,5 @@
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>;
@@ -0,0 +1,34 @@
1
+ import * as IShared from '../../../shared/interface';
2
+ import { VatTax } from '../../../shared/entities/stock';
3
+ export type Entity = VatTax;
4
+ export declare const Route = "vat_tax";
5
+ export declare const UpperName = "VatTax";
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
+ saft_code: string;
18
+ }
19
+ export interface IUpdateRequest {
20
+ name?: string;
21
+ saft_code?: string;
22
+ }
23
+ export interface IRepository {
24
+ findById(selector: IShared.IFindByIdRequest): Promise<IFindByIdResponse | null>;
25
+ findByOwnerId(params: IShared.IFindByOwnerIdRequest): Promise<IFindByOwnerIdResponse[]>;
26
+ findMinified(params?: IShared.IFindMinifiedRequest): Promise<IShared.IFindMinifiedResponse[]>;
27
+ find(selector: IFindRequest): Promise<IFindResponse[]>;
28
+ findPaginated(selector: IFindPaginatedRequest): Promise<IFindWithPaginationResponse>;
29
+ create(data: ICreateRequest): Promise<Entity>;
30
+ update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<Entity | null>;
31
+ deleteOne(selector: IShared.IFindByIdRequest): Promise<Entity | null>;
32
+ }
33
+ export type IController = IShared.IEntityWithUserToken<IRepository>;
34
+ export {};
@@ -0,0 +1,5 @@
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>;
@@ -0,0 +1,42 @@
1
+ import * as IShared from '../../../shared/interface';
2
+ import { VatTaxZone, VatTax } from '../../../shared/entities/stock';
3
+ export type Entity = VatTaxZone;
4
+ export declare const Route = "vat_tax_zone";
5
+ export declare const UpperName = "VatTaxZone";
6
+ export declare const LowerName: string;
7
+ interface IFindDetailedResponse extends Entity {
8
+ vat_tax: VatTax;
9
+ }
10
+ export type IFindByIdResponse = Omit<IFindDetailedResponse, 'vat_tax'>;
11
+ export type IFindByOwnerIdResponse = Omit<IFindDetailedResponse, 'vat_tax'>;
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, 'vat_tax'>>;
17
+ export interface ICreateRequest {
18
+ name: string;
19
+ value: number;
20
+ vat_tax_id: string;
21
+ country_id: string;
22
+ saft_code: string;
23
+ }
24
+ export interface IUpdateRequest {
25
+ name?: string;
26
+ value?: number;
27
+ vat_tax_id?: string;
28
+ country_id?: string;
29
+ saft_code?: string;
30
+ }
31
+ export interface IRepository {
32
+ findById(selector: IShared.IFindByIdRequest): Promise<IFindByIdResponse | null>;
33
+ findByOwnerId(params: IShared.IFindByOwnerIdRequest): Promise<IFindByOwnerIdResponse[]>;
34
+ findMinified(selector: IShared.IFindMinifiedRequest): Promise<IShared.IFindMinifiedResponse[]>;
35
+ find(selector: IFindRequest): Promise<IFindResponse[]>;
36
+ findPaginated(selector: IFindPaginatedRequest): Promise<IFindWithPaginationResponse>;
37
+ create(data: ICreateRequest): Promise<IFindResponse>;
38
+ update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<IFindResponse | null>;
39
+ deleteOne(selector: IShared.IFindByIdRequest): Promise<IFindResponse | null>;
40
+ }
41
+ export type IController = IShared.IEntityWithUserToken<IRepository>;
42
+ export {};
@@ -0,0 +1,5 @@
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>;
@@ -0,0 +1,8 @@
1
+ import { VatValidation } from '../../../shared/entities/stock';
2
+ export type Entity = VatValidation;
3
+ export declare const Route = "vat_validation";
4
+ export declare const UpperName = "VatValidation";
5
+ export declare const LowerName: string;
6
+ export interface IRepository {
7
+ findByLatest(nif: string): Promise<Entity | null>;
8
+ }
@@ -0,0 +1,2 @@
1
+ import joi from 'joi';
2
+ export declare const findByLatestBody: joi.ObjectSchema<any>;
@@ -0,0 +1,45 @@
1
+ import * as IShared from '../../../shared/interface';
2
+ import { Workflow } from '../../../shared/entities/stock';
3
+ import * as DocumentType from '../../supply/documentType/interfaces';
4
+ import { IDocumentTypeUserType } from '../../supply/documentType/interfaces';
5
+ export type Entity = Workflow;
6
+ export declare const Route = "workflow";
7
+ export declare const UpperName = "Workflow";
8
+ export declare const LowerName: string;
9
+ export type IFindRequest = Record<string, unknown>;
10
+ export interface ICreateRequest {
11
+ from_document_type_id: number;
12
+ to_document_type_id: number;
13
+ transition_name: string;
14
+ is_active: boolean;
15
+ }
16
+ export interface IUpdateRequest {
17
+ from_document_type_id?: number;
18
+ to_document_type_id?: number;
19
+ transition_name?: string;
20
+ is_active?: boolean;
21
+ }
22
+ export interface IFindByQueryRequest extends IShared.IPaginationRequest {
23
+ id?: number;
24
+ from?: number;
25
+ }
26
+ export interface IFindByOwnerIdRequest {
27
+ from?: number;
28
+ to?: number;
29
+ user_type?: IDocumentTypeUserType;
30
+ }
31
+ export interface IFindByOwnerIdResponse extends Entity {
32
+ from_document_type: DocumentType.Entity | null;
33
+ to_document_type: DocumentType.Entity | null;
34
+ }
35
+ export interface IRepository {
36
+ findById(id: number): Promise<Workflow | null>;
37
+ findByQuery(data: IFindByQueryRequest): Promise<IShared.IPaginationResponse<Workflow>>;
38
+ findByOwnerId(data: IFindByOwnerIdRequest): Promise<IFindByOwnerIdResponse[]>;
39
+ find(data: IFindRequest): Promise<IFindByOwnerIdResponse[]>;
40
+ create(data: ICreateRequest): Promise<IFindByOwnerIdResponse>;
41
+ update(selector: IShared.IFindByIdNumberRequest, data: IUpdateRequest): Promise<IFindByOwnerIdResponse | null>;
42
+ deleteOne(selector: IShared.IFindByIdNumberRequest): Promise<IFindByOwnerIdResponse | null>;
43
+ }
44
+ export type IController = IShared.IEntityWithUserToken<IRepository>;
45
+ export type IApi = Omit<IRepository, 'findById' | 'findByQuery'>;
@@ -0,0 +1,4 @@
1
+ import joi from 'joi';
2
+ export declare const postBodyValidator: joi.ObjectSchema<any>;
3
+ export declare const putBodyValidator: joi.ObjectSchema<any>;
4
+ export declare const getByOwnerQuery: joi.ObjectSchema<any>;
File without changes