@nomalism-com/types 1.3.22 → 1.3.24

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 (35) hide show
  1. package/dist/index.js +1275 -1174
  2. package/dist/main.d.ts +7 -7
  3. package/dist/modules/document/providerFinancialCreditNote/interfaces.d.ts +5 -2
  4. package/dist/modules/document/providerServiceInvoice/interfaces.d.ts +4 -1
  5. package/dist/modules/document/purchase/interfaces.d.ts +7 -0
  6. package/dist/modules/integration/patchNotes/interfaces.d.ts +47 -0
  7. package/dist/modules/integration/projectInfo/interfaces.d.ts +25 -2
  8. package/dist/modules/llm/llm/interfaces.d.ts +19 -0
  9. package/dist/modules/llm/llm/route.schema.d.ts +2 -0
  10. package/dist/modules/stock/accountCode/interface.d.ts +11 -0
  11. package/dist/modules/stock/accountCode/route.schema.d.ts +2 -0
  12. package/dist/modules/stock/chat/interfaces.d.ts +21 -3
  13. package/dist/modules/stock/conferirEncomenda/interface.d.ts +56 -0
  14. package/dist/modules/stock/dashboard/interface.d.ts +18 -11
  15. package/dist/modules/stock/gmails/interface.d.ts +0 -6
  16. package/dist/modules/supply/documentHeader/interfaces.d.ts +4 -2
  17. package/dist/modules/supply/documentType/interfaces.d.ts +3 -0
  18. package/dist/modules/ui/portal/interface.d.ts +16 -2
  19. package/dist/modules/ui/portal/route.schema.d.ts +1 -0
  20. package/dist/modules/user/chatSubscribers/interfaces.d.ts +20 -9
  21. package/dist/modules/user/clients/interface.d.ts +2 -1
  22. package/dist/modules/user/persona/interface.d.ts +8 -10
  23. package/dist/modules/user/providers/interface.d.ts +3 -0
  24. package/dist/modules/user/sessions/interface.d.ts +1 -2
  25. package/dist/shared/entities/integration.d.ts +41 -1
  26. package/dist/shared/entities/stock.d.ts +25 -0
  27. package/dist/shared/entities/user.d.ts +3 -0
  28. package/dist/shared/interface.d.ts +2 -7
  29. package/package.json +8 -8
  30. package/dist/modules/user/groupPermissions/interface.d.ts +0 -25
  31. package/dist/modules/user/groupPermissions/route.schema.d.ts +0 -2
  32. package/dist/modules/user/permissions/interface.d.ts +0 -25
  33. package/dist/modules/user/permissions/route.schema.d.ts +0 -2
  34. package/dist/modules/user/userPermissions/interface.d.ts +0 -23
  35. package/dist/modules/user/userPermissions/route.schema.d.ts +0 -2
@@ -1,4 +1,4 @@
1
- import { IProjectInfoType } from '../../modules/integration/projectInfo/interfaces';
1
+ import type { IProjectInfoType, IBudgetOptionsType, IProjectInfoOriginType } from '../../modules/integration/projectInfo/interfaces';
2
2
  /**
3
3
  * Model Observation
4
4
  *
@@ -59,9 +59,14 @@ export type ProjectInfo = {
59
59
  name: string;
60
60
  email: string;
61
61
  telephone: string;
62
+ address: string | null;
63
+ budget_options: IBudgetOptionsType;
62
64
  description: string;
63
65
  document_header_id: string;
64
66
  email_log: string;
67
+ origin: IProjectInfoOriginType;
68
+ persona_id: string | null;
69
+ client_id: string | null;
65
70
  created_at: Date;
66
71
  updated_at: Date;
67
72
  };
@@ -126,3 +131,38 @@ export type EmailVerification = {
126
131
  updated_by: string;
127
132
  updated_at: Date;
128
133
  };
134
+ /**
135
+ * Model PatchNotes
136
+ *
137
+ */
138
+ export type PatchNotes = {
139
+ id: number;
140
+ service: string;
141
+ container: string | null;
142
+ version: string;
143
+ deploy_ref: string;
144
+ environment: string | null;
145
+ commit_sha: string;
146
+ commit_short_sha: string | null;
147
+ commit_title: string;
148
+ commit_message: string;
149
+ commit_timestamp: string;
150
+ project_id: number;
151
+ project_path: string;
152
+ project_url: string;
153
+ pipeline_id: number;
154
+ pipeline_iid: number | null;
155
+ pipeline_source: string;
156
+ pipeline_url: string;
157
+ job_id: number | null;
158
+ job_name: string | null;
159
+ job_url: string | null;
160
+ merge_request_iid: number | null;
161
+ mergeRequest_id: number | null;
162
+ mr_source_branch: string | null;
163
+ mr_target_branch: string | null;
164
+ changes: unknown;
165
+ raw: unknown;
166
+ created_at: string;
167
+ updated_at: string;
168
+ };
@@ -12,6 +12,16 @@ import { IProductSheetState } from '../../modules/stock/productGoogleSheets/inte
12
12
  import { ITaskStatusDataType } from '../../modules/stock/task/interface';
13
13
  import type { IRsaHashData, ITaxEntry } from '../../modules/supply/documentHeader/interfaces';
14
14
  import type { ProjectInfo } from './integration';
15
+ import { IEstadoEncomenda } from '../../modules/stock/conferirEncomenda/interface';
16
+ /**
17
+ * Model AccountCode
18
+ *
19
+ */
20
+ export type AccountCode = {
21
+ id: string;
22
+ code: string;
23
+ description: string;
24
+ };
15
25
  /**
16
26
  * Model Chat
17
27
  *
@@ -264,6 +274,7 @@ export type DocumentHeader = {
264
274
  owner_id: string;
265
275
  owner_number: number;
266
276
  owner_name: string | null;
277
+ account_code: string | null;
267
278
  billing_persona_id: string | null;
268
279
  billing_persona_nif: string | null;
269
280
  billing_persona_name: string | null;
@@ -1030,3 +1041,17 @@ export type GoogleSheetPool = {
1030
1041
  id: string;
1031
1042
  sheet_id: string;
1032
1043
  };
1044
+ /**
1045
+ * Model ConferirEncomenda
1046
+ *
1047
+ */
1048
+ export type ConferirEncomenda = {
1049
+ id: string | null;
1050
+ document_line_id: string | null;
1051
+ data: unknown | null;
1052
+ estado: IEstadoEncomenda | null;
1053
+ created_at: Date | null;
1054
+ updated_at: Date | null;
1055
+ created_by: string | null;
1056
+ updated_by: string | null;
1057
+ };
@@ -103,6 +103,7 @@ export type Providers = {
103
103
  default_delivery_method_id: string | null;
104
104
  default_vehicle_id: string | null;
105
105
  default_discount: number;
106
+ default_account_code: string | null;
106
107
  created_at: Date;
107
108
  updated_at: Date;
108
109
  created_by: string;
@@ -172,6 +173,7 @@ export type Clients = {
172
173
  default_delivery_method_id: string | null;
173
174
  default_vehicle_id: string | null;
174
175
  deferred_payment: boolean;
176
+ is_donation_eligible: boolean;
175
177
  origin_id: string | null;
176
178
  created_at: Date;
177
179
  updated_at: Date;
@@ -461,6 +463,7 @@ export type Tenant = {
461
463
  */
462
464
  export type Persona = {
463
465
  id: string;
466
+ external: boolean;
464
467
  name: string | null;
465
468
  nif: string | null;
466
469
  telephone: string | null;
@@ -7,6 +7,7 @@ import type { IScheduleType } from '../modules/supply/schedule/interface';
7
7
  import type { IWarningType } from '../modules/supply/documentHeader/interfaces';
8
8
  import type { IChat, IEmail, IEncomenda, IMultimedia, IMultimediaSummary, IPostgresBackup, IPrint, IProjectInfo, IProposta, IServiceLogs, IServiceStatus, IStock, ITask } from '../modules/view/adminPanel/interfaces';
9
9
  import type * as ErrorLog from '../modules/view/errorLog/interfaces';
10
+ import type * as ChatSubscriber from '../modules/user/chatSubscribers/interfaces';
10
11
  import type { File } from './entities/stock';
11
12
  import type { ProjectInfo } from './entities/integration';
12
13
  import type { IAttachment } from '../modules/supply/externalDocumentHeader/interface';
@@ -272,13 +273,7 @@ export type IBrokerTopicPayload = {
272
273
  warningErrors: string[];
273
274
  };
274
275
  [IBrokerTopic.dispatch_chat_message]: {
275
- to: [
276
- {
277
- email: string;
278
- name: string;
279
- phone_number: string | null;
280
- }
281
- ];
276
+ to: [Pick<ChatSubscriber.IFindByOwnerResponse, 'email' | 'name' | 'telephone'>];
282
277
  reply_url: string;
283
278
  owner_id: string;
284
279
  document_header_id: string | null;
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.22",
4
+ "version": "1.3.24",
5
5
  "author": "Nomalism <it.nomalism@gmail.com> (https://nomalism.com/)",
6
6
  "license": "UNLICENSED",
7
7
  "type": "module",
@@ -26,15 +26,15 @@
26
26
  "joi": "^18.0.2"
27
27
  },
28
28
  "devDependencies": {
29
- "@swc/core": "^1.15.3",
30
- "@types/node": "^24.10.1",
31
- "@typescript-eslint/eslint-plugin": "^8.48.1",
32
- "@typescript-eslint/parser": "^8.48.1",
33
- "eslint": "^9.39.1",
29
+ "@swc/core": "^1.15.10",
30
+ "@types/node": "^24.10.9",
31
+ "@typescript-eslint/eslint-plugin": "^8.53.1",
32
+ "@typescript-eslint/parser": "^8.53.1",
33
+ "eslint": "^9.39.2",
34
34
  "eslint-config-prettier": "^10.1.8",
35
35
  "eslint-import-resolver-typescript": "^4.4.4",
36
- "eslint-plugin-prettier": "^5.5.4",
37
- "prettier": "^3.7.4",
36
+ "eslint-plugin-prettier": "^5.5.5",
37
+ "prettier": "^3.8.0",
38
38
  "tsup": "^8.5.1"
39
39
  },
40
40
  "repository": {
@@ -1,25 +0,0 @@
1
- import * as IShared from '../../../shared/interface';
2
- import { GroupPermissions } from '../../../shared/entities/user';
3
- export type Entity = GroupPermissions;
4
- export declare const Route = "group_permissions";
5
- export declare const UpperName = "GroupPermissions";
6
- export declare const LowerName: string;
7
- export interface ICreateRequest {
8
- code: string;
9
- description: string;
10
- }
11
- export interface IUpdateRequest {
12
- code: string;
13
- description: string;
14
- }
15
- export interface IRepository {
16
- findByCode(code: string): Promise<Entity | null>;
17
- findById(selector: IShared.IFindByIdNumberRequest): Promise<Entity | null>;
18
- changeEnable(selector: IShared.IFindByIdNumberRequest): Promise<boolean>;
19
- find(): Promise<Entity[]>;
20
- findMinified(params?: IShared.IFindMinifiedRequest): Promise<IShared.IFindMinifiedResponse[]>;
21
- create(data: ICreateRequest): Promise<Entity>;
22
- deleteOne(selector: IShared.IFindByIdNumberRequest): Promise<Entity | null>;
23
- }
24
- export type IController = IShared.IEntityWithUserToken<IRepository>;
25
- export type IApi = Omit<IRepository, 'findByCode' | 'findById' | 'changeEnable'>;
@@ -1,2 +0,0 @@
1
- import joi from 'joi';
2
- export declare const createBody: joi.ObjectSchema<any>;
@@ -1,25 +0,0 @@
1
- import * as IShared from '../../../shared/interface';
2
- import { Permissions } from '../../../shared/entities/user';
3
- export type Entity = Permissions;
4
- export declare const Route = "permission";
5
- export declare const UpperName = "Permissions";
6
- export declare const LowerName: string;
7
- export interface ICreateRequest {
8
- code: string;
9
- description: string;
10
- }
11
- export interface IUpdateRequest {
12
- code: string;
13
- description: string;
14
- }
15
- export interface IRepository {
16
- findById(selector: IShared.IFindByIdNumberRequest): Promise<Entity | null>;
17
- findByCode(code: string): Promise<Entity | null>;
18
- changeEnable(selector: IShared.IFindByIdNumberRequest): Promise<boolean>;
19
- find(): Promise<Entity[]>;
20
- findMinified(params?: IShared.IFindMinifiedRequest): Promise<IShared.IFindMinifiedResponse[]>;
21
- create(data: ICreateRequest): Promise<Entity>;
22
- deleteOne(selector: IShared.IFindByIdNumberRequest): Promise<Entity | null>;
23
- }
24
- export type IController = IShared.IEntityWithUserToken<IRepository>;
25
- export type IApi = Omit<IRepository, 'findById' | 'findByCode' | 'changeEnable'>;
@@ -1,2 +0,0 @@
1
- import joi from 'joi';
2
- export declare const createBody: joi.ObjectSchema<any>;
@@ -1,23 +0,0 @@
1
- import * as IShared from '../../../shared/interface';
2
- import { UserPermissions, GroupPermissions, Permissions } from '../../../shared/entities/user';
3
- export type Entity = UserPermissions;
4
- export declare const Route = "user_permissions";
5
- export declare const UpperName = "UserPermissions";
6
- export declare const LowerName: string;
7
- interface IFindDetailedResponse extends Entity {
8
- group_permission: GroupPermissions;
9
- permission: Permissions;
10
- }
11
- export type IFindByOwnerIdResponse = Omit<IFindDetailedResponse, ''>;
12
- export interface ICreateRequest {
13
- user_id: string;
14
- permission_id: number;
15
- group_id: number;
16
- }
17
- export interface IRepository {
18
- findByOwnerId(params: IShared.IFindByOwnerIdRequest): Promise<IFindByOwnerIdResponse[]>;
19
- create(data: ICreateRequest): Promise<IFindByOwnerIdResponse>;
20
- deleteOne(selector: IShared.IFindByIdNumberRequest): Promise<IFindByOwnerIdResponse | null>;
21
- }
22
- export type IController = IShared.IEntityWithUserToken<IRepository>;
23
- export {};
@@ -1,2 +0,0 @@
1
- import joi from 'joi';
2
- export declare const createBody: joi.ObjectSchema<any>;