@nomalism-com/types 1.3.61 → 1.3.63

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 (93) hide show
  1. package/dist/index.cjs +678 -893
  2. package/dist/index.js +570 -774
  3. package/dist/main.d.ts +1 -12
  4. package/dist/modules/document/NRCL/interface.d.ts +0 -2
  5. package/dist/modules/document/materialEntrance/interfaces.d.ts +0 -6
  6. package/dist/modules/document/order/interfaces.d.ts +0 -14
  7. package/dist/modules/document/upfrontReturn/interfaces.d.ts +0 -1
  8. package/dist/modules/documentManagement/multimedia/interfaces.d.ts +0 -3
  9. package/dist/modules/integration/emailLog/interfaces.d.ts +0 -3
  10. package/dist/modules/integration/emailTemplateAttachment/interfaces.d.ts +0 -13
  11. package/dist/modules/integration/emailVerification/interfaces.d.ts +0 -2
  12. package/dist/modules/integration/googleFilePermission/interfaces.d.ts +0 -8
  13. package/dist/modules/integration/observation/interfaces.d.ts +2 -7
  14. package/dist/modules/integration/patchNotes/interfaces.d.ts +0 -4
  15. package/dist/modules/integration/projectInfo/interfaces.d.ts +0 -2
  16. package/dist/modules/integration/settings/interfaces.d.ts +0 -1
  17. package/dist/modules/llm/llm/interfaces.d.ts +0 -2
  18. package/dist/modules/print/printer/interfaces.d.ts +0 -1
  19. package/dist/modules/sms/smsSender/interfaces.d.ts +0 -7
  20. package/dist/modules/sms/smsTemplate/interfaces.d.ts +0 -9
  21. package/dist/modules/stock/conferirEncomenda/interface.d.ts +0 -3
  22. package/dist/modules/stock/emailAccount/interface.d.ts +0 -1
  23. package/dist/modules/stock/gmails/interface.d.ts +0 -4
  24. package/dist/modules/stock/googleSheetPool/interface.d.ts +0 -2
  25. package/dist/modules/stock/location/interface.d.ts +2 -50
  26. package/dist/modules/stock/mobilePrint/interface.d.ts +0 -2
  27. package/dist/modules/stock/productGoogleSheets/interface.d.ts +0 -7
  28. package/dist/modules/stock/productImage/interface.d.ts +3 -1
  29. package/dist/modules/stock/promotion/interface.d.ts +0 -2
  30. package/dist/modules/stock/queryList/interfaces.d.ts +0 -18
  31. package/dist/modules/stock/queryParameter/interfaces.d.ts +0 -34
  32. package/dist/modules/stock/recurrentTasks/interface.d.ts +0 -2
  33. package/dist/modules/stock/returnReason/interfaces.d.ts +0 -9
  34. package/dist/modules/stock/stockMovement/interface.d.ts +0 -3
  35. package/dist/modules/stock/task/interface.d.ts +0 -2
  36. package/dist/modules/stock/unitOfMeasure/interface.d.ts +0 -9
  37. package/dist/modules/stock/vatTax/interface.d.ts +0 -9
  38. package/dist/modules/stock/vatTaxZone/interface.d.ts +0 -9
  39. package/dist/modules/supply/currentAccount/interface.d.ts +0 -88
  40. package/dist/modules/supply/documentHeaderHistory/interfaces.d.ts +0 -1
  41. package/dist/modules/supply/documentHeaderSurvey/interfaces.d.ts +0 -2
  42. package/dist/modules/supply/documentLine/interfaces.d.ts +0 -5
  43. package/dist/modules/supply/documentSet/interface.d.ts +0 -7
  44. package/dist/modules/supply/documentType/interfaces.d.ts +0 -2
  45. package/dist/modules/supply/externalDocumentType/interface.d.ts +0 -7
  46. package/dist/modules/supply/payment/interface.d.ts +0 -5
  47. package/dist/modules/supply/paymentBatch/interface.d.ts +0 -2
  48. package/dist/modules/supply/preSale/interface.d.ts +0 -1
  49. package/dist/modules/supply/preSaleProduct/interface.d.ts +0 -1
  50. package/dist/modules/supply/schedule/interface.d.ts +0 -1
  51. package/dist/modules/tickets/tickets/interfaces.d.ts +1 -2
  52. package/dist/modules/ui/sidemenuHighlight/interface.d.ts +0 -11
  53. package/dist/modules/user/bankData/interface.d.ts +0 -9
  54. package/dist/modules/user/clientType/interface.d.ts +0 -16
  55. package/dist/modules/user/country/interface.d.ts +0 -12
  56. package/dist/modules/user/deliveryMethods/interfaces.d.ts +0 -1
  57. package/dist/modules/user/favorites/interfaces.d.ts +0 -3
  58. package/dist/modules/user/language/interface.d.ts +0 -9
  59. package/dist/modules/user/maturityDates/interfaces.d.ts +0 -1
  60. package/dist/modules/user/paymentMethods/interfaces.d.ts +0 -1
  61. package/dist/modules/user/providerType/interface.d.ts +0 -13
  62. package/dist/modules/user/purchaseConditions/interface.d.ts +0 -9
  63. package/dist/modules/user/reasonForExemption/interface.d.ts +0 -3
  64. package/dist/modules/user/segmentsArea/interface.d.ts +0 -17
  65. package/dist/modules/user/shippings/interface.d.ts +0 -8
  66. package/dist/modules/user/storeOperator/interface.d.ts +0 -2
  67. package/dist/modules/user/swift/interface.d.ts +0 -17
  68. package/dist/modules/user/systemModule/interface.d.ts +0 -11
  69. package/dist/modules/user/timeSheet/interfaces.d.ts +0 -3
  70. package/dist/modules/user/userTokens/interface.d.ts +0 -6
  71. package/dist/modules/user/users/interface.d.ts +1 -9
  72. package/dist/modules/view/adminPanel/interfaces.d.ts +0 -3
  73. package/dist/modules/view/errorLog/interfaces.d.ts +0 -1
  74. package/dist/modules/view/webSocket/interfaces.d.ts +0 -1
  75. package/dist/shared/entities/integration.d.ts +0 -13
  76. package/dist/shared/entities/stock.d.ts +0 -14
  77. package/dist/shared/entities/user.d.ts +0 -14
  78. package/dist/shared/errors/integrationErrors.d.ts +0 -8
  79. package/dist/shared/errors/stockErrors.d.ts +0 -8
  80. package/dist/shared/interface.d.ts +0 -31
  81. package/package.json +2 -2
  82. package/dist/modules/document/adiantamento/interfaces.d.ts +0 -24
  83. package/dist/modules/document/faturaCredito/interfaces.d.ts +0 -26
  84. package/dist/modules/document/faturaRecibo/interfaces.d.ts +0 -25
  85. package/dist/modules/document/faturaSimplificada/interfaces.d.ts +0 -24
  86. package/dist/modules/document/notaCredito/interfaces.d.ts +0 -29
  87. package/dist/modules/document/notaCreditoAdiantamento/interfaces.d.ts +0 -25
  88. package/dist/modules/document/productionOrder/interfaces.d.ts +0 -10
  89. package/dist/modules/document/recibo/interfaces.d.ts +0 -21
  90. package/dist/modules/integration/observationType/interfaces.d.ts +0 -25
  91. package/dist/modules/stock/typeOfLocation/interface.d.ts +0 -30
  92. package/dist/modules/supply/batch/interface.d.ts +0 -0
  93. package/dist/modules/user/userPositions/interface.d.ts +0 -28
@@ -33,12 +33,10 @@ export interface IUpdateOwnPinRequest {
33
33
  pin: string;
34
34
  }
35
35
  export interface IRepository {
36
- findMinified(params?: IShared.IFindMinifiedRequest): Promise<IShared.IFindMinifiedResponse[]>;
37
36
  find(): Promise<IFindResponse[]>;
38
37
  findPaginated(selector: IFindPaginatedRequest): Promise<IShared.IPaginationResponse<IFindResponse>>;
39
38
  create(data: ICreateRequest): Promise<string>;
40
39
  update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<void>;
41
- deleteOne(selector: IShared.IFindByIdRequest): Promise<void>;
42
40
  updatePassword(selector: IShared.IFindByIdRequest, data: IUpdatePasswordRequest): Promise<void>;
43
41
  updateOwnPin(data: IUpdateOwnPinRequest): Promise<void>;
44
42
  }
@@ -3,12 +3,7 @@ import * as IShared from "../../../shared/interface";
3
3
  export type Entity = Swift;
4
4
  export declare const Route = "swift";
5
5
  type IFindDetailedResponse = Entity;
6
- export type IFindByIdResponse = Omit<IFindDetailedResponse, "">;
7
- export type IFindRequest = Record<string, unknown>;
8
6
  export type IFindResponse = Omit<IFindDetailedResponse, "">;
9
- export interface IFindPaginatedRequest extends IFindRequest, IShared.IPaginationRequest {
10
- }
11
- export type IFindWithPaginationResponse = IShared.IPaginationResponse<Omit<IFindDetailedResponse, "">>;
12
7
  export interface ICreateRequest {
13
8
  bank: string;
14
9
  city: string;
@@ -16,21 +11,9 @@ export interface ICreateRequest {
16
11
  code: string;
17
12
  country_id: string;
18
13
  }
19
- export interface IUpdateRequest {
20
- bank?: string;
21
- city?: string;
22
- branch?: string | null;
23
- code?: string;
24
- country_id?: string;
25
- }
26
14
  export interface IRepository {
27
- findById(selector: IShared.IFindByIdRequest): Promise<IFindByIdResponse | null>;
28
15
  findMinified(params?: IShared.IFindMinifiedRequest): Promise<IShared.IFindMinifiedResponse[]>;
29
- find(selector: IFindRequest): Promise<IFindResponse[]>;
30
- findPaginated(selector: IFindPaginatedRequest): Promise<IFindWithPaginationResponse>;
31
16
  create(data: ICreateRequest): Promise<Entity>;
32
- update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<Entity | null>;
33
- deleteOne(selector: IShared.IFindByIdRequest): Promise<Entity | null>;
34
17
  }
35
18
  export type IController = IShared.IEntityWithUserToken<IRepository>;
36
19
  export {};
@@ -1,6 +1,4 @@
1
- import type { SystemModule } from "../../../shared/entities/user";
2
1
  import type * as IShared from "../../../shared/interface";
3
- export type Entity = SystemModule;
4
2
  export declare const Route = "system_module";
5
3
  export declare const SystemModuleEnum: {
6
4
  encomendas_stock: "encomendas_stock";
@@ -22,14 +20,6 @@ export declare const SystemModuleEnum: {
22
20
  clientes_duplicados: "clientes_duplicados";
23
21
  };
24
22
  export type ISystemModule = (typeof SystemModuleEnum)[keyof typeof SystemModuleEnum];
25
- export declare const systemModules: string[];
26
- export interface IFindByStoreOperatorIdRequest {
27
- store_operator_id: string;
28
- }
29
- export interface IFindByStoreOperatorIdResponse {
30
- store_operator_id: string;
31
- values: ISystemModule[];
32
- }
33
23
  export interface IFindResponseItem {
34
24
  store_operator_id: string;
35
25
  values: ISystemModule[];
@@ -40,7 +30,6 @@ export interface ISetStoreOperatorModulesRequest {
40
30
  }
41
31
  export interface IRepository {
42
32
  find(): Promise<IFindResponseItem[]>;
43
- findByStoreOperatorId(selector: IFindByStoreOperatorIdRequest): Promise<IFindByStoreOperatorIdResponse>;
44
33
  setStoreOperatorModules(data: ISetStoreOperatorModulesRequest): Promise<void>;
45
34
  }
46
35
  export type IController = IShared.IEntityWithUserToken<IRepository>;
@@ -9,13 +9,11 @@ export declare const ITimeSheetRecordTypeEnum: {
9
9
  readonly DEBIT: "DEBIT";
10
10
  };
11
11
  export type ITimeSheetRecordType = (typeof ITimeSheetRecordTypeEnum)[keyof typeof ITimeSheetRecordTypeEnum];
12
- export declare const timeSheetRecordTypes: ("ENTRY" | "EXIT" | "CREDIT" | "DEBIT")[];
13
12
  export declare const ITimeSheetRegistryTypeEnum: {
14
13
  readonly AUTOMATIC: "AUTOMATIC";
15
14
  readonly MANUAL: "MANUAL";
16
15
  };
17
16
  export type ITimeSheetRegistryType = (typeof ITimeSheetRegistryTypeEnum)[keyof typeof ITimeSheetRegistryTypeEnum];
18
- export declare const timeSheetRegistryTypes: ("AUTOMATIC" | "MANUAL")[];
19
17
  export interface IFindRequest {
20
18
  user_id?: string;
21
19
  start_date?: string;
@@ -48,5 +46,4 @@ export interface IRepository {
48
46
  findByUserAndDate(filters: IFindByDateRequest): Promise<Entity[]>;
49
47
  getDailySummary(filters: IDailySummaryRequest): Promise<IDailySummaryResponse[]>;
50
48
  }
51
- export type IController = IShared.IEntityWithUserToken<IRepository>;
52
49
  export type IApi = Omit<IRepository, "findById">;
@@ -1,16 +1,10 @@
1
1
  import { UserTokens } from "../../../shared/entities/user";
2
2
  import * as IShared from "../../../shared/interface";
3
3
  export type Entity = UserTokens;
4
- export declare const Route = "user_token";
5
4
  export type IFindRequest = Record<string, unknown>;
6
5
  export interface IFindPaginatedRequest extends IFindRequest, IShared.IPaginationRequest {
7
6
  }
8
7
  export type IFindWithPaginationResponse = IShared.IPaginationResponse<UserTokens>;
9
- export interface ICreateRequest {
10
- user_id: string;
11
- expires_date: Date;
12
- refresh_token: string;
13
- }
14
8
  export interface IUpdateRequest {
15
9
  consumed?: boolean;
16
10
  }
@@ -1,4 +1,4 @@
1
- import { Clients, ClientType, Commissioner, Country, DeliveryMethods, Language, MaturityDates, PaymentMethods, Persona, Providers, ProviderType, ReasonForExemption, SegmentsArea, StoreOperator, Theme, UserPositions, Users, Vehicles } from "../../../shared/entities/user";
1
+ import { Clients, ClientType, Commissioner, Country, DeliveryMethods, Language, MaturityDates, PaymentMethods, Persona, Providers, ProviderType, ReasonForExemption, SegmentsArea, StoreOperator, Theme, Users, Vehicles } from "../../../shared/entities/user";
2
2
  import * as IShared from "../../../shared/interface";
3
3
  import type { ISystemModule } from "../systemModule/interface";
4
4
  export type Entity = Users;
@@ -40,7 +40,6 @@ export interface IFindByIdResponse extends EntityWithoutPassword {
40
40
  main_persona: IMainPersona;
41
41
  }) | null;
42
42
  store_operator: (Omit<StoreOperator, "pin"> & {
43
- user_position: UserPositions | null;
44
43
  support_language: Language | null;
45
44
  main_persona: IMainPersona;
46
45
  }) | null;
@@ -65,13 +64,6 @@ export interface IFindProvidersWithClientIdRequest {
65
64
  export interface IUpdatePassword {
66
65
  password: string;
67
66
  }
68
- export interface ISendForgotPassword {
69
- token: string;
70
- user: {
71
- name: string;
72
- email: string;
73
- };
74
- }
75
67
  export interface IFindFromClientOrProviderRequest {
76
68
  ids: string[];
77
69
  }
@@ -110,7 +110,6 @@ export declare const IDataTypeEnum: {
110
110
  all: "all";
111
111
  };
112
112
  export type IDataType = (typeof IDataTypeEnum)[keyof typeof IDataTypeEnum];
113
- export declare const dataTypes: string[];
114
113
  export declare const IServiceEnum: {
115
114
  prints: "prints";
116
115
  eventstores: "eventstores";
@@ -126,7 +125,6 @@ export declare const IServiceEnum: {
126
125
  kafka: "kafka";
127
126
  };
128
127
  export type IService = (typeof IServiceEnum)[keyof typeof IServiceEnum];
129
- export declare const adminPanelServices: string[];
130
128
  export declare const IServerEnum: {
131
129
  services: "services";
132
130
  logs: "logs";
@@ -135,7 +133,6 @@ export declare const IServerEnum: {
135
133
  backups: "backups";
136
134
  };
137
135
  export type IServer = (typeof IServerEnum)[keyof typeof IServerEnum];
138
- export declare const adminPanelServers: string[];
139
136
  export interface IGetDataRequest {
140
137
  token: string;
141
138
  dataType: IDataType;
@@ -8,7 +8,6 @@ export declare const IErrorTypeEnum: {
8
8
  npc: "npc";
9
9
  };
10
10
  export type IErrorType = (typeof IErrorTypeEnum)[keyof typeof IErrorTypeEnum];
11
- export declare const errorTypes: string[];
12
11
  export type IErrorDetail = {
13
12
  name: string;
14
13
  message: string;
@@ -2,7 +2,6 @@ import type { IChatBalloon } from "../../stock/chat/interfaces";
2
2
  import type { IFindByOwnerIdItemWithVersions } from "../../supply/externalDocumentHeader/interface";
3
3
  import type { ILastTicketCalledTodayByChannel, IRemainingTodayTickets } from "../../tickets/tickets/interfaces";
4
4
  import type { IPublicDocument, IPublicFindBySubscriberId, ITags } from "../../ui/portal/interface";
5
- export declare const Route = "ws";
6
5
  export interface IEvent {
7
6
  type: string;
8
7
  }
@@ -7,7 +7,6 @@ import type { IBudgetOptionsType, IProjectInfoOriginType, IProjectInfoType } fro
7
7
  export type Observation = {
8
8
  id: string;
9
9
  owner_id: string;
10
- observation_type_id: string | null;
11
10
  description: string;
12
11
  internal: boolean;
13
12
  created_by: string;
@@ -15,18 +14,6 @@ export type Observation = {
15
14
  created_at: Date;
16
15
  updated_at: Date;
17
16
  };
18
- /**
19
- * Model ObservationType
20
- *
21
- */
22
- export type ObservationType = {
23
- id: string;
24
- name: string;
25
- created_by: string;
26
- updated_by: string;
27
- created_at: Date;
28
- updated_at: Date;
29
- };
30
17
  /**
31
18
  * Model GoogleFilePermission
32
19
  *
@@ -53,7 +53,6 @@ export type Chat = {
53
53
  */
54
54
  export type Location = {
55
55
  id: string;
56
- type_of_location_id: string;
57
56
  country_id: string;
58
57
  country_name: string;
59
58
  name: string;
@@ -181,19 +180,6 @@ export type PromotionAssoc = {
181
180
  created_by: string;
182
181
  updated_by: string;
183
182
  };
184
- /**
185
- * Model TypeOfLocation
186
- *
187
- */
188
- export type TypeOfLocation = {
189
- id: string;
190
- name: string;
191
- origin_id: string | null;
192
- created_at: Date;
193
- updated_at: Date;
194
- created_by: string;
195
- updated_by: string;
196
- };
197
183
  /**
198
184
  * Model VatTax
199
185
  *
@@ -281,7 +281,6 @@ export type ReasonForExemption = {
281
281
  export type StoreOperator = {
282
282
  id: string;
283
283
  user_id: string;
284
- user_position_id: string | null;
285
284
  number: number;
286
285
  internal_email: string | null;
287
286
  support_language_id: string | null;
@@ -298,19 +297,6 @@ export type StoreOperator = {
298
297
  updated_by: string;
299
298
  origin_id: string | null;
300
299
  };
301
- /**
302
- * Model UserPositions
303
- *
304
- */
305
- export type UserPositions = {
306
- id: string;
307
- name: string;
308
- created_at: Date;
309
- updated_at: Date;
310
- created_by: string;
311
- updated_by: string;
312
- origin_id: string | null;
313
- };
314
300
  /**
315
301
  * Model PaymentMethods
316
302
  *
@@ -33,13 +33,5 @@ declare const _default: {
33
33
  notDeleted: string;
34
34
  notUpdated: string;
35
35
  };
36
- moduleObservationType: {
37
- dontExist: string;
38
- notFound: string;
39
- alreadyExists: string;
40
- childExists: string;
41
- notDeleted: string;
42
- notUpdated: string;
43
- };
44
36
  };
45
37
  export default _default;
@@ -94,14 +94,6 @@ declare const _default: {
94
94
  notDeleted: string;
95
95
  notUpdated: string;
96
96
  };
97
- TypeOfLocation: {
98
- dontExist: string;
99
- notFound: string;
100
- alreadyExists: string;
101
- childExists: string;
102
- notDeleted: string;
103
- notUpdated: string;
104
- };
105
97
  VatTaxes: {
106
98
  dontExist: string;
107
99
  notFound: string;
@@ -14,28 +14,8 @@ import type { File } from "./entities/stock";
14
14
  import type { Persona } from "./entities/user";
15
15
  type CreatedAt = "created_at";
16
16
  type UpdatedAt = "updated_at";
17
- export interface WithCreatedAt {
18
- created_at: Date;
19
- }
20
- export interface WithUpdatedAt {
21
- updated_at: Date;
22
- }
23
- export interface WithOriginId {
24
- origin_id: string;
25
- }
26
- export type WithTimestamps = WithCreatedAt & WithUpdatedAt;
27
- export type WithTimestampsOriginID = (WithCreatedAt & WithUpdatedAt) | WithOriginId;
28
- export type WithoutTimestamps<T> = Omit<T, CreatedAt | UpdatedAt>;
29
17
  type CreatedBy = "created_by";
30
18
  type UpdatedBy = "updated_by";
31
- export interface WithCreatedBy {
32
- created_by?: string | null;
33
- }
34
- export interface WithUpdatedBy {
35
- updated_by?: string | null;
36
- }
37
- export type WithUserstamps = WithCreatedBy & WithUpdatedBy;
38
- export type WithoutUserstamps<T> = Omit<T, CreatedBy | UpdatedBy>;
39
19
  export interface IUserToken {
40
20
  id: string;
41
21
  superuser?: boolean;
@@ -54,8 +34,6 @@ export interface ICachedUserTokens {
54
34
  export type IEntityWithUserToken<T> = {
55
35
  [K in keyof T]: T[K] extends (...params: infer U) => unknown ? (...params: [...U, IUserToken]) => ReturnType<T[K]> : T[K];
56
36
  };
57
- export type WithStamps = WithTimestamps & WithUserstamps;
58
- export type WithStampsResponse<T> = T & WithStamps;
59
37
  export type WithoutStamps<T> = Omit<T, CreatedAt | UpdatedAt | CreatedBy | UpdatedBy>;
60
38
  export interface IPaginationRequest {
61
39
  per_page?: number;
@@ -89,18 +67,12 @@ export interface IFindByOwnerIdRequest {
89
67
  export interface IFindOptionalByOwnerIdRequest {
90
68
  owner_id?: string;
91
69
  }
92
- export interface IUpdateManyResponse {
93
- count: number;
94
- }
95
70
  export interface ILogGoogleApiRequest {
96
71
  type: string;
97
72
  method: string;
98
73
  info: string;
99
74
  error?: string;
100
75
  }
101
- export interface ILastMoloniRequest {
102
- stamp: string | number;
103
- }
104
76
  export declare const IDataTypeEnum: {
105
77
  date: "date";
106
78
  datetime: "datetime";
@@ -120,14 +92,11 @@ export declare const IDataTypeEnum: {
120
92
  json: "json";
121
93
  userstamp: "userstamp";
122
94
  };
123
- export type IDatatype = (typeof IDataTypeEnum)[keyof typeof IDataTypeEnum];
124
- export declare const dataTypes: string[];
125
95
  export declare const IUserSendEmailDocumentTemplateEnum: {
126
96
  generic: "generic";
127
97
  provider_payment_order: "provider_payment_order";
128
98
  };
129
99
  export type IUserSendEmailDocumentTemplate = (typeof IUserSendEmailDocumentTemplateEnum)[keyof typeof IUserSendEmailDocumentTemplateEnum];
130
- export declare const IUserSendEmailDocumentTemplateTypes: string[];
131
100
  export declare enum IBrokerTopic {
132
101
  tickets_change = "tickets_change",
133
102
  push_notification = "push_notification",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nomalism-com/types",
3
3
  "description": "A nomalism package with all necessary types and validations for developing APIs",
4
- "version": "1.3.61",
4
+ "version": "1.3.63",
5
5
  "author": "Nomalism <it.nomalism@gmail.com> (https://nomalism.com/)",
6
6
  "license": "UNLICENSED",
7
7
  "type": "module",
@@ -37,7 +37,7 @@
37
37
  "lint-staged": "^17.6.0",
38
38
  "prettier": "^3.9.10",
39
39
  "tsup": "^8.5.1",
40
- "typescript-eslint": "^8.71.1"
40
+ "typescript-eslint": "^8.71.2"
41
41
  },
42
42
  "repository": {
43
43
  "type": "git",
@@ -1,24 +0,0 @@
1
- import * as IShared from "../../../shared/interface";
2
- import * as IPayment from "../../supply/payment/interface";
3
- export declare const Route = "adiantamento";
4
- export interface ICreateRequestBase {
5
- document_type_id: number;
6
- document_set_id?: string;
7
- emission_date?: Date;
8
- external_document_name?: string;
9
- store_operator_id?: string | null;
10
- email?: string | null;
11
- }
12
- export interface ICreateRequest extends ICreateRequestBase {
13
- /** exatamente uma proposta */
14
- from_header: string[];
15
- payments: IPayment.ICreateForThisDocumentHeaderRequest[];
16
- owner_ref_document?: string | null;
17
- /** só nas recuperações (ADM / ADD) */
18
- copy_from_document?: string | null;
19
- }
20
- export interface IRepository {
21
- create(data: ICreateRequest): Promise<void>;
22
- }
23
- export type IController = IShared.IEntityWithUserToken<IRepository>;
24
- export type IApi = IRepository;
@@ -1,26 +0,0 @@
1
- import * as IShared from "../../../shared/interface";
2
- import * as IPayment from "../../supply/payment/interface";
3
- export declare const Route = "fatura_credito";
4
- export interface ICreateRequestBase {
5
- document_type_id: number;
6
- document_set_id?: string;
7
- emission_date?: Date;
8
- external_document_name?: string;
9
- store_operator_id?: string | null;
10
- email?: string | null;
11
- }
12
- export interface ICreateRequest extends ICreateRequestBase {
13
- from_header: string[];
14
- from_lines: string[];
15
- /** opcional: a fatura a crédito pode ficar total ou parcialmente em dívida */
16
- payments?: IPayment.ICreateForThisDocumentHeaderRequest[];
17
- maturity_date_id?: string | null;
18
- owner_ref_document?: string | null;
19
- /** só nas recuperações (FTM / FTD) */
20
- copy_from_document?: string | null;
21
- }
22
- export interface IRepository {
23
- create(data: ICreateRequest): Promise<void>;
24
- }
25
- export type IController = IShared.IEntityWithUserToken<IRepository>;
26
- export type IApi = IRepository;
@@ -1,25 +0,0 @@
1
- import * as IShared from "../../../shared/interface";
2
- import * as IPayment from "../../supply/payment/interface";
3
- export declare const Route = "fatura_recibo";
4
- export interface ICreateRequestBase {
5
- document_type_id: number;
6
- document_set_id?: string;
7
- emission_date?: Date;
8
- external_document_name?: string;
9
- store_operator_id?: string | null;
10
- email?: string | null;
11
- }
12
- export interface ICreateRequest extends ICreateRequestBase {
13
- from_header: string[];
14
- from_lines: string[];
15
- /** obrigatório: a fatura-recibo sai liquidada por inteiro */
16
- payments: IPayment.ICreateForThisDocumentHeaderRequest[];
17
- owner_ref_document?: string | null;
18
- /** só nas recuperações (FRM / FRD) */
19
- copy_from_document?: string | null;
20
- }
21
- export interface IRepository {
22
- create(data: ICreateRequest): Promise<void>;
23
- }
24
- export type IController = IShared.IEntityWithUserToken<IRepository>;
25
- export type IApi = IRepository;
@@ -1,24 +0,0 @@
1
- import * as IShared from "../../../shared/interface";
2
- import * as IPayment from "../../supply/payment/interface";
3
- export declare const Route = "fatura_simplificada";
4
- export interface ICreateRequestBase {
5
- document_type_id: number;
6
- document_set_id?: string;
7
- emission_date?: Date;
8
- external_document_name?: string;
9
- store_operator_id?: string | null;
10
- email?: string | null;
11
- }
12
- export interface ICreateRequest extends ICreateRequestBase {
13
- from_header: string[];
14
- from_lines: string[];
15
- /** obrigatório: a FS é liquidada no ato */
16
- payments: IPayment.ICreateForThisDocumentHeaderRequest[];
17
- /** só nas recuperações (FSM / FSD) */
18
- copy_from_document?: string | null;
19
- }
20
- export interface IRepository {
21
- create(data: ICreateRequest): Promise<void>;
22
- }
23
- export type IController = IShared.IEntityWithUserToken<IRepository>;
24
- export type IApi = IRepository;
@@ -1,29 +0,0 @@
1
- import * as IShared from "../../../shared/interface";
2
- import * as IPayment from "../../supply/payment/interface";
3
- export declare const Route = "nota_credito";
4
- export interface ICreateRequestBase {
5
- document_type_id: number;
6
- document_set_id?: string;
7
- emission_date?: Date;
8
- external_document_name?: string;
9
- store_operator_id?: string | null;
10
- email?: string | null;
11
- }
12
- export interface ICreateRequest extends ICreateRequestBase {
13
- /** as FATURAS a creditar */
14
- from_header: string[];
15
- from_lines: string[];
16
- /** obrigatório (Art. 78.º CIVA) */
17
- return_reason: string;
18
- /** true = regulariza em conta corrente, sem pagamentos */
19
- current_account?: boolean;
20
- payments?: IPayment.ICreateForThisDocumentHeaderRequest[];
21
- owner_ref_document?: string | null;
22
- /** só nas recuperações (NCM / NCD) */
23
- copy_from_document?: string | null;
24
- }
25
- export interface IRepository {
26
- create(data: ICreateRequest): Promise<void>;
27
- }
28
- export type IController = IShared.IEntityWithUserToken<IRepository>;
29
- export type IApi = IRepository;
@@ -1,25 +0,0 @@
1
- import * as IShared from "../../../shared/interface";
2
- import * as IPayment from "../../supply/payment/interface";
3
- export declare const Route = "nota_credito_adiantamento";
4
- export interface ICreateRequestBase {
5
- document_type_id: number;
6
- document_set_id?: string;
7
- emission_date?: Date;
8
- external_document_name?: string;
9
- store_operator_id?: string | null;
10
- email?: string | null;
11
- }
12
- export interface ICreateRequest extends ICreateRequestBase {
13
- /** exatamente uma proposta */
14
- from_header: string[];
15
- current_account?: boolean;
16
- payments?: IPayment.ICreateForThisDocumentHeaderRequest[];
17
- owner_ref_document?: string | null;
18
- /** só nas recuperações (NCADM / NCADD) */
19
- copy_from_document?: string | null;
20
- }
21
- export interface IRepository {
22
- create(data: ICreateRequest): Promise<void>;
23
- }
24
- export type IController = IShared.IEntityWithUserToken<IRepository>;
25
- export type IApi = IRepository;
@@ -1,10 +0,0 @@
1
- import * as IShared from "../../../shared/interface";
2
- export declare const Route = "production_order";
3
- export interface ICreateProductionOrderRequest {
4
- provider_id: string;
5
- group_id: string;
6
- }
7
- export interface IRepository {
8
- createProductionOrder(data: ICreateProductionOrderRequest): Promise<void>;
9
- }
10
- export type IController = IShared.IEntityWithUserToken<IRepository>;
@@ -1,21 +0,0 @@
1
- import * as IShared from "../../../shared/interface";
2
- import * as IPayment from "../../supply/payment/interface";
3
- export declare const Route = "recibo";
4
- export interface ICreateRequestBase {
5
- document_type_id: number;
6
- document_set_id?: string;
7
- emission_date?: Date;
8
- external_document_name?: string;
9
- store_operator_id?: string | null;
10
- email?: string | null;
11
- }
12
- export interface ICreateRequest extends ICreateRequestBase {
13
- /** a FATURA a liquidar */
14
- from_header: string[];
15
- payments: IPayment.ICreateForThisDocumentHeaderRequest[];
16
- }
17
- export interface IRepository {
18
- create(data: ICreateRequest): Promise<void>;
19
- }
20
- export type IController = IShared.IEntityWithUserToken<IRepository>;
21
- export type IApi = IRepository;
@@ -1,25 +0,0 @@
1
- import { ObservationType } from "../../../shared/entities/integration";
2
- import * as IShared from "../../../shared/interface";
3
- export type Entity = ObservationType;
4
- export declare const Route = "observation_type";
5
- export interface IFindByQueryRequest {
6
- id?: string;
7
- name?: string;
8
- }
9
- export interface ICreateRequest {
10
- name: string;
11
- }
12
- export interface IUpdateRequest {
13
- name: string;
14
- }
15
- export interface IRepository {
16
- findById(selector: IShared.IFindByIdRequest): Promise<Entity | null>;
17
- findByQuery(data: IFindByQueryRequest): Promise<Entity[]>;
18
- findMinified(params?: IShared.IFindMinifiedRequest): Promise<IShared.IFindMinifiedResponse[]>;
19
- find(): Promise<ObservationType[]>;
20
- create(data: ICreateRequest): Promise<Entity>;
21
- update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<Entity | null>;
22
- deleteOne(selector: IShared.IFindByIdRequest): Promise<Entity | null>;
23
- }
24
- export type IController = IShared.IEntityWithUserToken<IRepository>;
25
- export type IApi = Omit<IRepository, "findById" | "findByQuery">;
@@ -1,30 +0,0 @@
1
- import { TypeOfLocation } from "../../../shared/entities/stock";
2
- import * as IShared from "../../../shared/interface";
3
- export type Entity = TypeOfLocation;
4
- export declare const Route = "type_of_location";
5
- type IFindDetailedResponse = Entity;
6
- export type IFindByIdResponse = Omit<IFindDetailedResponse, "">;
7
- export type IFindByOwnerIdResponse = Omit<IFindDetailedResponse, "">;
8
- export type IFindRequest = Record<string, unknown>;
9
- export type IFindResponse = Omit<IFindDetailedResponse, "">;
10
- export interface IFindPaginatedRequest extends IFindRequest, IShared.IPaginationRequest {
11
- }
12
- export type IFindWithPaginationResponse = IShared.IPaginationResponse<Omit<IFindDetailedResponse, "">>;
13
- export interface ICreateRequest {
14
- name: string;
15
- }
16
- export interface IUpdateRequest {
17
- name?: string;
18
- }
19
- export interface IRepository {
20
- findById(selector: IShared.IFindByIdRequest): Promise<IFindByIdResponse | null>;
21
- findByOwnerId(params: IShared.IFindByOwnerIdRequest): Promise<IFindByOwnerIdResponse[]>;
22
- findMinified(params?: IShared.IFindMinifiedRequest): Promise<IShared.IFindMinifiedResponse[]>;
23
- find(selector: IFindRequest): Promise<IFindResponse[]>;
24
- findPaginated(selector: IFindPaginatedRequest): Promise<IFindWithPaginationResponse>;
25
- create(data: ICreateRequest): Promise<Entity>;
26
- update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<Entity | null>;
27
- deleteOne(selector: IShared.IFindByIdRequest): Promise<Entity | null>;
28
- }
29
- export type IController = IShared.IEntityWithUserToken<IRepository>;
30
- export {};
File without changes