@nomalism-com/types 1.2.3 → 1.3.1
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.
- package/dist/index.js +338 -164
- package/dist/main.d.ts +16 -3
- package/dist/modules/document/NPF/interface.d.ts +17 -0
- package/dist/modules/document/NPF/route.schema.d.ts +2 -0
- package/dist/modules/document/NRCL/interface.d.ts +26 -0
- package/dist/modules/document/NRCL/route.schema.d.ts +2 -0
- package/dist/modules/document/inventario/interface.d.ts +2 -0
- package/dist/modules/document/inventario/route.schema.d.ts +1 -0
- package/dist/modules/document/materialEntrance/interfaces.d.ts +1 -0
- package/dist/modules/document/order/interfaces.d.ts +1 -0
- package/dist/modules/document/proforma/interfaces.d.ts +7 -0
- package/dist/modules/document/proforma/route.schema.d.ts +2 -1
- package/dist/modules/document/propostaSheets/interface.d.ts +18 -4
- package/dist/modules/integration/projectInfo/interfaces.d.ts +1 -1
- package/dist/modules/stock/dashboard/interface.d.ts +7 -3
- package/dist/modules/stock/gmails/interface.d.ts +66 -0
- package/dist/modules/stock/gmails/route.schema.d.ts +2 -0
- package/dist/modules/stock/googleSheetPool/interface.d.ts +10 -0
- package/dist/modules/stock/prison/interface.d.ts +4 -1
- package/dist/modules/stock/productGoogleSheets/interface.d.ts +5 -0
- package/dist/modules/stock/savedProviderProposal/interfaces.d.ts +2 -5
- package/dist/modules/stock/savedProviderProposal/route.schema.d.ts +1 -2
- package/dist/modules/supply/currentAccount/interface.d.ts +146 -0
- package/dist/modules/supply/currentAccount/route.schema.d.ts +9 -0
- package/dist/modules/supply/documentHeader/interfaces.d.ts +3 -55
- package/dist/modules/supply/documentHeader/route.schema.d.ts +0 -1
- package/dist/modules/supply/documentLine/interfaces.d.ts +1 -0
- package/dist/modules/supply/documentLine/route.schema.d.ts +2 -2
- package/dist/modules/supply/documentLineNote/interfaces.d.ts +2 -8
- package/dist/modules/supply/documentLineNote/route.schema.d.ts +1 -5
- package/dist/modules/supply/documentType/interfaces.d.ts +1 -0
- package/dist/modules/supply/externalDocumentHeader/interface.d.ts +20 -50
- package/dist/modules/supply/externalDocumentHeader/route.schema.d.ts +0 -2
- package/dist/modules/supply/orderManagement/interface.d.ts +2 -2
- package/dist/modules/supply/payment/interface.d.ts +2 -108
- package/dist/modules/supply/payment/route.schema.d.ts +0 -6
- package/dist/modules/supply/paymentBatch/interface.d.ts +57 -0
- package/dist/modules/supply/paymentBatch/route.schema.d.ts +4 -0
- package/dist/modules/ui/portal/interface.d.ts +36 -0
- package/dist/modules/ui/portal/route.schema.d.ts +3 -0
- package/dist/modules/{stock → ui}/sideMenu/interface.d.ts +18 -15
- package/dist/modules/user/chatSubscribers/interfaces.d.ts +7 -5
- package/dist/modules/user/chatSubscribers/route.schema.d.ts +1 -0
- package/dist/modules/user/persona/interface.d.ts +9 -0
- package/dist/modules/user/persona/route.schema.d.ts +1 -0
- package/dist/modules/user/providers/interface.d.ts +8 -0
- package/dist/modules/user/providers/route.schema.d.ts +1 -0
- package/dist/modules/user/storeOperator/interface.d.ts +16 -6
- package/dist/modules/user/storeOperator/route.schema.d.ts +1 -0
- package/dist/modules/user/users/interface.d.ts +3 -3
- package/dist/shared/entities/integration.d.ts +2 -1
- package/dist/shared/entities/stock.d.ts +44 -7
- package/dist/shared/entities/user.d.ts +2 -0
- package/dist/shared/interface.d.ts +20 -10
- package/package.json +3 -3
- package/dist/modules/{stock → ui}/sideMenu/route.schema.d.ts +1 -1
|
@@ -9,9 +9,9 @@ interface IMainPersona extends Persona {
|
|
|
9
9
|
country: Country | null;
|
|
10
10
|
reason_for_exemption: ReasonForExemption | null;
|
|
11
11
|
}
|
|
12
|
-
interface IStoreOperator extends Pick<StoreOperator, 'id' | 'location_id'> {
|
|
12
|
+
interface IStoreOperator extends Pick<StoreOperator, 'id' | 'location_id' | 'superuser'> {
|
|
13
13
|
main_persona: Pick<Persona, 'name' | 'email'>;
|
|
14
|
-
theme: Pick<Theme, 'colors'
|
|
14
|
+
theme: Pick<Theme, 'colors'> | null;
|
|
15
15
|
}
|
|
16
16
|
export interface IFindByAccountResponse extends Pick<Entity, 'id' | 'account'> {
|
|
17
17
|
store_operator: IStoreOperator;
|
|
@@ -39,7 +39,7 @@ export interface IFindByIdResponse extends EntityWithoutPassword {
|
|
|
39
39
|
default_vehicle: Vehicles | null;
|
|
40
40
|
main_persona: IMainPersona;
|
|
41
41
|
}) | null;
|
|
42
|
-
store_operator: (StoreOperator & {
|
|
42
|
+
store_operator: (Omit<StoreOperator, 'pin'> & {
|
|
43
43
|
user_position: UserPositions | null;
|
|
44
44
|
support_language: Language | null;
|
|
45
45
|
main_persona: IMainPersona;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IConflict } from '../../modules/document/propostaSheets/interface';
|
|
2
2
|
import { IDocumentTypeUserType, IDocumentTypeCodeType } from '../../modules/supply/documentType/interfaces';
|
|
3
|
-
import { IBatchType } from '../../modules/supply/
|
|
3
|
+
import { IBatchType } from '../../modules/supply/paymentBatch/interface';
|
|
4
4
|
import { IProductType } from '../../modules/stock/productGoogleSheets/interface';
|
|
5
5
|
import { IImageType } from '../../modules/stock/productImage/interface';
|
|
6
6
|
import { ITagType } from '../../modules/stock/tag/interface';
|
|
@@ -10,7 +10,8 @@ import { ISavedEmPickingData } from '../../modules/stock/savedEmPicking/interfac
|
|
|
10
10
|
import { IDocumentLineNoteType } from '../../modules/supply/documentLineNote/interfaces';
|
|
11
11
|
import { IProductSheetState } from '../../modules/stock/productGoogleSheets/interface';
|
|
12
12
|
import { ITaskStatusDataType } from '../../modules/stock/task/interface';
|
|
13
|
-
import type {
|
|
13
|
+
import type { IRsaHashData, ITaxEntry } from '../../modules/supply/documentHeader/interfaces';
|
|
14
|
+
import type { ProjectInfo } from './integration';
|
|
14
15
|
/**
|
|
15
16
|
* Model Chat
|
|
16
17
|
*
|
|
@@ -302,6 +303,7 @@ export type DocumentHeader = {
|
|
|
302
303
|
is_void: boolean;
|
|
303
304
|
is_void_reason: string | null;
|
|
304
305
|
is_force_adjudicated: boolean;
|
|
306
|
+
confirmed: boolean;
|
|
305
307
|
origin_id: string | null;
|
|
306
308
|
who_handles: string | null;
|
|
307
309
|
warning: string | null;
|
|
@@ -310,7 +312,7 @@ export type DocumentHeader = {
|
|
|
310
312
|
atcud: string | null;
|
|
311
313
|
hash: string | null;
|
|
312
314
|
hash_data: IRsaHashData | {};
|
|
313
|
-
project_info:
|
|
315
|
+
project_info: ProjectInfo | {};
|
|
314
316
|
paired_with: string | null;
|
|
315
317
|
comercial_discount_value: number | null;
|
|
316
318
|
gross_value: number | null;
|
|
@@ -870,9 +872,8 @@ export type DocumentLineBaseVirtuals = {
|
|
|
870
872
|
client_start_id: string | null;
|
|
871
873
|
provider_start_id: string | null;
|
|
872
874
|
invoice_id: string | null;
|
|
873
|
-
invoice_document_header_external_id: string | null;
|
|
874
|
-
invoice_external_id: string | null;
|
|
875
875
|
credit_note_id: string | null;
|
|
876
|
+
df_pdf: boolean;
|
|
876
877
|
levantar_df: boolean;
|
|
877
878
|
df_enviada: boolean;
|
|
878
879
|
df_fechada: boolean;
|
|
@@ -931,10 +932,9 @@ export type DocumentLineVirtuals = {
|
|
|
931
932
|
awaiting_production: boolean;
|
|
932
933
|
ordered: boolean;
|
|
933
934
|
provider_invoice: boolean;
|
|
934
|
-
invoice_external_id: string | null;
|
|
935
|
-
invoice_document_header_external_id: string | null;
|
|
936
935
|
invoice_id: string | null;
|
|
937
936
|
credit_note_id: string | null;
|
|
937
|
+
df_pdf: boolean;
|
|
938
938
|
client_start_id: string | null;
|
|
939
939
|
provider_start_id: string | null;
|
|
940
940
|
state: string;
|
|
@@ -988,3 +988,40 @@ export type DocumentHeaderVirtuals = {
|
|
|
988
988
|
provider_total_without_tax: number;
|
|
989
989
|
provider_total: number;
|
|
990
990
|
};
|
|
991
|
+
/**
|
|
992
|
+
* Model Gmails
|
|
993
|
+
*
|
|
994
|
+
*/
|
|
995
|
+
export type Gmails = {
|
|
996
|
+
id: string;
|
|
997
|
+
gmail_from: string;
|
|
998
|
+
gmail_to: string;
|
|
999
|
+
gmail_cc: string;
|
|
1000
|
+
gmail_subject: string;
|
|
1001
|
+
gmail_id: string;
|
|
1002
|
+
gmail_history_id: string;
|
|
1003
|
+
gmail_labels: string[];
|
|
1004
|
+
gmail_internal_date: string;
|
|
1005
|
+
gmail_payload: unknown;
|
|
1006
|
+
gmail_size_estimate: number;
|
|
1007
|
+
gmail_snippet: string;
|
|
1008
|
+
gmail_thread_id: string;
|
|
1009
|
+
gmail_headers: unknown[];
|
|
1010
|
+
gmail_attachments: unknown[];
|
|
1011
|
+
gmail_dump: string;
|
|
1012
|
+
owner_id: string | null;
|
|
1013
|
+
document_header_id: string | null;
|
|
1014
|
+
chat_persona_name: string | null;
|
|
1015
|
+
chat_type: string | null;
|
|
1016
|
+
action: string | null;
|
|
1017
|
+
text_to_chat: string | null;
|
|
1018
|
+
done: Date | null;
|
|
1019
|
+
};
|
|
1020
|
+
/**
|
|
1021
|
+
* Model GoogleSheetPool
|
|
1022
|
+
*
|
|
1023
|
+
*/
|
|
1024
|
+
export type GoogleSheetPool = {
|
|
1025
|
+
id: string;
|
|
1026
|
+
sheet_id: string;
|
|
1027
|
+
};
|
|
@@ -4,10 +4,12 @@ import type { ILastTicketCalledTodayByChannel, IRemainingTodayTickets } from '..
|
|
|
4
4
|
import type { IGetUserData } from '../modules/integration/googleSheets/interfaces';
|
|
5
5
|
import type { IDocumentTypeUserType } from '../modules/supply/documentType/interfaces';
|
|
6
6
|
import type { IScheduleType } from '../modules/supply/schedule/interface';
|
|
7
|
-
import type { IWarningType
|
|
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
10
|
import type { File } from './entities/stock';
|
|
11
|
+
import type { ProjectInfo } from './entities/integration';
|
|
12
|
+
import type { IAttachment } from '../modules/supply/externalDocumentHeader/interface';
|
|
11
13
|
export { messages };
|
|
12
14
|
type CreatedAt = 'created_at';
|
|
13
15
|
type UpdatedAt = 'updated_at';
|
|
@@ -78,6 +80,12 @@ export interface IFindOptionalByOwnerIdRequest {
|
|
|
78
80
|
export interface IUpdateManyResponse {
|
|
79
81
|
count: number;
|
|
80
82
|
}
|
|
83
|
+
export interface ILogGoogleApiRequest {
|
|
84
|
+
type: string;
|
|
85
|
+
method: string;
|
|
86
|
+
info: string;
|
|
87
|
+
error?: string;
|
|
88
|
+
}
|
|
81
89
|
export declare const IDataTypeEnum: {
|
|
82
90
|
date: 'date';
|
|
83
91
|
datetime: 'datetime';
|
|
@@ -110,7 +118,12 @@ export declare const findByOwnerIdQueryKeys: IRouteRequest<IFindByOwnerIdRequest
|
|
|
110
118
|
export declare const findByOwnerIdQuery: joi.ObjectSchema<any>;
|
|
111
119
|
export declare const idParam: joi.ObjectSchema<any>;
|
|
112
120
|
export declare const idNumberParam: joi.ObjectSchema<any>;
|
|
113
|
-
export declare const findMinifiedReponse: joi.ArraySchema<
|
|
121
|
+
export declare const findMinifiedReponse: joi.ArraySchema<{
|
|
122
|
+
name: unknown;
|
|
123
|
+
id: unknown;
|
|
124
|
+
group: unknown;
|
|
125
|
+
multimedia_id: unknown;
|
|
126
|
+
}[]>;
|
|
114
127
|
export declare const joiValidateStamps: IRouteResponseWithoutStamps<WithTimestampsOriginID>;
|
|
115
128
|
export declare const IUserSendEmailDocumentTemplateEnum: {
|
|
116
129
|
generic: 'generic';
|
|
@@ -160,7 +173,8 @@ export declare enum IBrokerTopic {
|
|
|
160
173
|
googlesheet_proposta_log = "googlesheet_proposta_log",
|
|
161
174
|
googlesheet_task_log = "googlesheet_task_log",
|
|
162
175
|
googlesheet_stock_log = "googlesheet_stock_log",
|
|
163
|
-
googlesheet_encomenda_log = "googlesheet_encomenda_log"
|
|
176
|
+
googlesheet_encomenda_log = "googlesheet_encomenda_log",
|
|
177
|
+
log_google_api_request = "log_google_api_request"
|
|
164
178
|
}
|
|
165
179
|
export type IBrokerTopicPayload = {
|
|
166
180
|
[IBrokerTopic.create]: Record<string, unknown>;
|
|
@@ -191,12 +205,7 @@ export type IBrokerTopicPayload = {
|
|
|
191
205
|
owner_id: string;
|
|
192
206
|
document_header_id: string;
|
|
193
207
|
start_document_name: string;
|
|
194
|
-
|
|
195
|
-
document_header_id: string;
|
|
196
|
-
document_name: string;
|
|
197
|
-
document_fullname: string;
|
|
198
|
-
multimedia_id: string;
|
|
199
|
-
}[];
|
|
208
|
+
attachments: IAttachment[];
|
|
200
209
|
};
|
|
201
210
|
[IBrokerTopic.grant_access]: {
|
|
202
211
|
email: string;
|
|
@@ -278,7 +287,7 @@ export type IBrokerTopicPayload = {
|
|
|
278
287
|
email_subject?: string;
|
|
279
288
|
created_by: string;
|
|
280
289
|
};
|
|
281
|
-
[IBrokerTopic.create_site_proposal]:
|
|
290
|
+
[IBrokerTopic.create_site_proposal]: ProjectInfo;
|
|
282
291
|
[IBrokerTopic.verification_email]: {
|
|
283
292
|
email: string;
|
|
284
293
|
token: string;
|
|
@@ -336,6 +345,7 @@ export type IBrokerTopicPayload = {
|
|
|
336
345
|
[IBrokerTopic.googlesheet_task_log]: ITask;
|
|
337
346
|
[IBrokerTopic.googlesheet_stock_log]: IStock;
|
|
338
347
|
[IBrokerTopic.googlesheet_encomenda_log]: IEncomenda;
|
|
348
|
+
[IBrokerTopic.log_google_api_request]: ILogGoogleApiRequest;
|
|
339
349
|
};
|
|
340
350
|
export interface IBrokerMessage<T extends IBrokerTopic = IBrokerTopic> {
|
|
341
351
|
topic: T;
|
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.
|
|
4
|
+
"version": "1.3.1",
|
|
5
5
|
"author": "Nomalism <it.nomalism@gmail.com> (https://nomalism.com/)",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"type": "module",
|
|
@@ -23,11 +23,11 @@
|
|
|
23
23
|
"prepack": "npm run lint && npm run build"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"joi": "^
|
|
26
|
+
"joi": "^18.0.1"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@swc/core": "^1.11.29",
|
|
30
|
-
"@types/node": "^
|
|
30
|
+
"@types/node": "^24.3.0",
|
|
31
31
|
"@typescript-eslint/eslint-plugin": "^8.32.1",
|
|
32
32
|
"@typescript-eslint/parser": "^8.32.1",
|
|
33
33
|
"eslint": "^9.27.0",
|