@nomalism-com/types 0.49.43 → 0.50.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.cjs +654 -844
- package/dist/index.js +652 -832
- package/dist/main.d.ts +3 -13
- package/dist/modules/document/NRCL/interface.d.ts +0 -2
- package/dist/modules/document/billOfLading/interfaces.d.ts +9 -0
- package/dist/modules/document/materialEntrance/interfaces.d.ts +0 -6
- package/dist/modules/document/order/interfaces.d.ts +0 -14
- package/dist/modules/document/providerCreditNoteFromReturn/interfaces.d.ts +1 -1
- package/dist/modules/document/providerFinancialCreditNote/interfaces.d.ts +1 -1
- package/dist/modules/document/providerServiceInvoice/interfaces.d.ts +1 -1
- package/dist/modules/document/upfrontReturn/interfaces.d.ts +0 -1
- package/dist/modules/documentManagement/multimedia/interfaces.d.ts +0 -3
- package/dist/modules/integration/emailLog/interfaces.d.ts +0 -3
- package/dist/modules/integration/emailTemplateAttachment/interfaces.d.ts +0 -13
- package/dist/modules/integration/emailVerification/interfaces.d.ts +0 -2
- package/dist/modules/integration/googleFilePermission/interfaces.d.ts +0 -8
- package/dist/modules/integration/observation/interfaces.d.ts +2 -7
- package/dist/modules/integration/patchNotes/interfaces.d.ts +0 -4
- package/dist/modules/integration/projectInfo/interfaces.d.ts +0 -2
- package/dist/modules/integration/settings/interfaces.d.ts +0 -1
- package/dist/modules/llm/llm/interfaces.d.ts +0 -2
- package/dist/modules/print/printer/interfaces.d.ts +0 -1
- package/dist/modules/sms/smsSender/interfaces.d.ts +0 -7
- package/dist/modules/sms/smsTemplate/interfaces.d.ts +0 -9
- package/dist/modules/stock/chat/interfaces.d.ts +0 -1
- package/dist/modules/stock/conferirEncomenda/interface.d.ts +0 -3
- package/dist/modules/stock/emailAccount/interface.d.ts +0 -1
- package/dist/modules/stock/gmails/interface.d.ts +0 -4
- package/dist/modules/stock/googleSheetPool/interface.d.ts +0 -2
- package/dist/modules/stock/location/interface.d.ts +2 -50
- package/dist/modules/stock/mobilePrint/interface.d.ts +0 -2
- package/dist/modules/stock/productGoogleSheets/interface.d.ts +33 -8
- package/dist/modules/stock/productImage/interface.d.ts +2 -19
- package/dist/modules/stock/promotion/interface.d.ts +0 -39
- package/dist/modules/stock/queryList/interfaces.d.ts +0 -18
- package/dist/modules/stock/queryParameter/interfaces.d.ts +0 -34
- package/dist/modules/stock/recurrentTasks/interface.d.ts +0 -2
- package/dist/modules/stock/returnReason/interfaces.d.ts +0 -9
- package/dist/modules/stock/saft/interfaces.d.ts +60 -0
- package/dist/modules/stock/stockMovement/interface.d.ts +0 -6
- package/dist/modules/stock/task/interface.d.ts +0 -2
- package/dist/modules/stock/unitOfMeasure/interface.d.ts +0 -9
- package/dist/modules/stock/vatTax/interface.d.ts +0 -9
- package/dist/modules/stock/vatTaxZone/interface.d.ts +0 -9
- package/dist/modules/supply/currentAccount/interface.d.ts +0 -88
- package/dist/modules/supply/documentHeader/interfaces.d.ts +78 -1
- package/dist/modules/supply/documentHeaderHistory/interfaces.d.ts +0 -1
- package/dist/modules/supply/documentHeaderSurvey/interfaces.d.ts +0 -2
- package/dist/modules/supply/documentLine/interfaces.d.ts +0 -5
- package/dist/modules/supply/documentSet/interface.d.ts +0 -8
- package/dist/modules/supply/documentType/interfaces.d.ts +12 -2
- package/dist/modules/supply/externalDocumentHeader/interface.d.ts +2 -0
- package/dist/modules/supply/externalDocumentType/interface.d.ts +0 -7
- package/dist/modules/supply/payment/interface.d.ts +0 -5
- package/dist/modules/supply/paymentBatch/interface.d.ts +0 -2
- package/dist/modules/supply/preSale/interface.d.ts +0 -1
- package/dist/modules/supply/preSaleProduct/interface.d.ts +0 -1
- package/dist/modules/supply/schedule/interface.d.ts +0 -1
- package/dist/modules/tickets/tickets/interfaces.d.ts +1 -2
- package/dist/modules/ui/sidemenuHighlight/interface.d.ts +0 -11
- package/dist/modules/ui/storeOperatorSaftLock/interface.d.ts +9 -0
- package/dist/modules/ui/tenantSaftLock/interface.d.ts +10 -0
- package/dist/modules/user/bankData/interface.d.ts +0 -9
- package/dist/modules/user/clientType/interface.d.ts +0 -16
- package/dist/modules/user/clients/interface.d.ts +1 -7
- package/dist/modules/user/commissioner/interface.d.ts +0 -12
- package/dist/modules/user/country/interface.d.ts +0 -14
- package/dist/modules/user/deliveryMethods/interfaces.d.ts +0 -1
- package/dist/modules/user/favorites/interfaces.d.ts +0 -3
- package/dist/modules/user/language/interface.d.ts +0 -9
- package/dist/modules/user/maturityDates/interfaces.d.ts +0 -1
- package/dist/modules/user/paymentMethods/interfaces.d.ts +4 -15
- package/dist/modules/user/persona/interface.d.ts +1 -4
- package/dist/modules/user/providerType/interface.d.ts +0 -13
- package/dist/modules/user/providers/interface.d.ts +0 -8
- package/dist/modules/user/purchaseConditions/interface.d.ts +0 -9
- package/dist/modules/user/reasonForExemption/interface.d.ts +0 -3
- package/dist/modules/user/segmentsArea/interface.d.ts +0 -17
- package/dist/modules/user/sessions/interface.d.ts +1 -0
- package/dist/modules/user/shippings/interface.d.ts +0 -8
- package/dist/modules/user/storeOperator/interface.d.ts +1 -2
- package/dist/modules/user/swift/interface.d.ts +0 -17
- package/dist/modules/user/systemModule/interface.d.ts +0 -11
- package/dist/modules/user/timeSheet/interfaces.d.ts +0 -3
- package/dist/modules/user/userTokens/interface.d.ts +0 -6
- package/dist/modules/user/users/interface.d.ts +2 -29
- package/dist/modules/view/adminPanel/interfaces.d.ts +0 -3
- package/dist/modules/view/errorLog/interfaces.d.ts +0 -1
- package/dist/modules/view/webSocket/interfaces.d.ts +0 -1
- package/dist/shared/entities/integration.d.ts +0 -13
- package/dist/shared/entities/stock.d.ts +18 -31
- package/dist/shared/entities/user.d.ts +2 -17
- package/dist/shared/errors/integrationErrors.d.ts +0 -8
- package/dist/shared/errors/stockErrors.d.ts +0 -8
- package/dist/shared/interface.d.ts +2 -34
- package/package.json +2 -2
- package/dist/modules/integration/observationType/interfaces.d.ts +0 -25
- package/dist/modules/stock/typeOfLocation/interface.d.ts +0 -30
- package/dist/modules/user/userPositions/interface.d.ts +0 -28
|
@@ -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,
|
|
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;
|
|
@@ -54,11 +53,6 @@ export interface IFindByIdResponse extends EntityWithoutPassword {
|
|
|
54
53
|
main_persona: IMainPersona;
|
|
55
54
|
}) | null;
|
|
56
55
|
}
|
|
57
|
-
export type IFindRequest = Record<string, unknown>;
|
|
58
|
-
export type IFindResponse = EntityWithoutPassword;
|
|
59
|
-
export interface IFindPaginatedRequest extends IFindRequest, IShared.IPaginationRequest {
|
|
60
|
-
}
|
|
61
|
-
export type IFindWithPaginationResponse = IShared.IPaginationResponse<EntityWithoutPassword>;
|
|
62
56
|
export interface IFindProvidersWithClientIdResponse {
|
|
63
57
|
name: string;
|
|
64
58
|
provider_id: string;
|
|
@@ -67,23 +61,9 @@ export interface IFindProvidersWithClientIdResponse {
|
|
|
67
61
|
export interface IFindProvidersWithClientIdRequest {
|
|
68
62
|
provider_ids: string[];
|
|
69
63
|
}
|
|
70
|
-
export interface ICreateRequest {
|
|
71
|
-
password: string;
|
|
72
|
-
}
|
|
73
|
-
export interface IUpdateRequest {
|
|
74
|
-
old_password?: string;
|
|
75
|
-
password?: string;
|
|
76
|
-
}
|
|
77
64
|
export interface IUpdatePassword {
|
|
78
65
|
password: string;
|
|
79
66
|
}
|
|
80
|
-
export interface ISendForgotPassword {
|
|
81
|
-
token: string;
|
|
82
|
-
user: {
|
|
83
|
-
name: string;
|
|
84
|
-
email: string;
|
|
85
|
-
};
|
|
86
|
-
}
|
|
87
67
|
export interface IFindFromClientOrProviderRequest {
|
|
88
68
|
ids: string[];
|
|
89
69
|
}
|
|
@@ -96,17 +76,10 @@ export interface IFindFromClientOrProviderResponse {
|
|
|
96
76
|
}
|
|
97
77
|
export interface IRepository {
|
|
98
78
|
findById(selector: IShared.IFindByIdRequest): Promise<IFindByIdResponse | null>;
|
|
99
|
-
findMinified(params?: IShared.IFindMinifiedRequest): Promise<IShared.IFindMinifiedResponse[]>;
|
|
100
|
-
find(selector: IFindRequest): Promise<IFindResponse[]>;
|
|
101
|
-
findPaginated(selector: IFindPaginatedRequest): Promise<IFindWithPaginationResponse>;
|
|
102
79
|
resetPassword(id: string, data: IUpdatePassword): Promise<Users>;
|
|
103
|
-
removeAccess(user_id: string): Promise<boolean>;
|
|
104
|
-
create(data: ICreateRequest): Promise<IFindResponse>;
|
|
105
|
-
update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<IFindResponse | null>;
|
|
106
|
-
deleteOne(selector: IShared.IFindByIdRequest): Promise<IFindResponse | null>;
|
|
107
80
|
findProvidersWithClientId(data: IFindProvidersWithClientIdRequest): Promise<IFindProvidersWithClientIdResponse[]>;
|
|
108
81
|
findFromClientOrProviderId(data: IFindFromClientOrProviderRequest): Promise<IFindFromClientOrProviderResponse[]>;
|
|
109
82
|
}
|
|
110
83
|
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
111
|
-
export type IApi = Omit<IRepository, "resetPassword"
|
|
84
|
+
export type IApi = Omit<IRepository, "resetPassword">;
|
|
112
85
|
export {};
|
|
@@ -120,7 +120,6 @@ export declare const IDataTypeEnum: {
|
|
|
120
120
|
all: "all";
|
|
121
121
|
};
|
|
122
122
|
export type IDataType = (typeof IDataTypeEnum)[keyof typeof IDataTypeEnum];
|
|
123
|
-
export declare const dataTypes: string[];
|
|
124
123
|
export declare const IServiceEnum: {
|
|
125
124
|
prints: "prints";
|
|
126
125
|
eventstores: "eventstores";
|
|
@@ -136,7 +135,6 @@ export declare const IServiceEnum: {
|
|
|
136
135
|
kafka: "kafka";
|
|
137
136
|
};
|
|
138
137
|
export type IService = (typeof IServiceEnum)[keyof typeof IServiceEnum];
|
|
139
|
-
export declare const adminPanelServices: string[];
|
|
140
138
|
export declare const IServerEnum: {
|
|
141
139
|
services: "services";
|
|
142
140
|
logs: "logs";
|
|
@@ -145,7 +143,6 @@ export declare const IServerEnum: {
|
|
|
145
143
|
backups: "backups";
|
|
146
144
|
};
|
|
147
145
|
export type IServer = (typeof IServerEnum)[keyof typeof IServerEnum];
|
|
148
|
-
export declare const adminPanelServers: string[];
|
|
149
146
|
export interface IGetDataRequest {
|
|
150
147
|
token: string;
|
|
151
148
|
dataType: IDataType;
|
|
@@ -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
|
*
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { IMotivosDeEsperaData } from "../../modules/document/order/interfaces";
|
|
2
2
|
import { IConflict } from "../../modules/document/propostaSheets/interface";
|
|
3
3
|
import { IEstadoEncomenda } from "../../modules/stock/conferirEncomenda/interface";
|
|
4
|
-
import { IExpectDeliveryDates, IProductType } from "../../modules/stock/productGoogleSheets/interface";
|
|
4
|
+
import { IExpectDeliveryDates, IInventoryCategory, IProductType, ISaftProductType } from "../../modules/stock/productGoogleSheets/interface";
|
|
5
5
|
import { IProductSheetState } from "../../modules/stock/productGoogleSheets/interface";
|
|
6
6
|
import { IImageType } from "../../modules/stock/productImage/interface";
|
|
7
7
|
import { IQueryParameterDatatype } from "../../modules/stock/queryParameter/interfaces";
|
|
8
8
|
import { ISavedEmPickingData } from "../../modules/stock/savedEmPicking/interfaces";
|
|
9
9
|
import { ITagType } from "../../modules/stock/tag/interface";
|
|
10
10
|
import { ITaskStatusDataType } from "../../modules/stock/task/interface";
|
|
11
|
-
import type {
|
|
11
|
+
import type { ITaxEntry } from "../../modules/supply/documentHeader/interfaces";
|
|
12
12
|
import { IData, IDataDocumentoPago, IDataPagamento, type IImportedFromSheets, IPromotions } from "../../modules/supply/documentLine/interfaces";
|
|
13
13
|
import { IDocumentLineNoteType } from "../../modules/supply/documentLineNote/interfaces";
|
|
14
14
|
import { IDocumentTypeCodeType, IDocumentTypeUserType } from "../../modules/supply/documentType/interfaces";
|
|
@@ -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;
|
|
@@ -182,19 +181,6 @@ export type PromotionAssoc = {
|
|
|
182
181
|
created_by: string;
|
|
183
182
|
updated_by: string;
|
|
184
183
|
};
|
|
185
|
-
/**
|
|
186
|
-
* Model TypeOfLocation
|
|
187
|
-
*
|
|
188
|
-
*/
|
|
189
|
-
export type TypeOfLocation = {
|
|
190
|
-
id: string;
|
|
191
|
-
name: string;
|
|
192
|
-
origin_id: string | null;
|
|
193
|
-
created_at: Date;
|
|
194
|
-
updated_at: Date;
|
|
195
|
-
created_by: string;
|
|
196
|
-
updated_by: string;
|
|
197
|
-
};
|
|
198
184
|
/**
|
|
199
185
|
* Model VatTax
|
|
200
186
|
*
|
|
@@ -273,14 +259,10 @@ export type DocumentHeader = {
|
|
|
273
259
|
from_document_header_id: string | null;
|
|
274
260
|
document_type_id: number;
|
|
275
261
|
document_number: number;
|
|
276
|
-
document_set_id: string;
|
|
277
262
|
external_id: string | null;
|
|
278
263
|
pdf_link: string | null;
|
|
279
264
|
google_sheet_id: string | null;
|
|
280
265
|
emission_date: Date;
|
|
281
|
-
source_billing: string;
|
|
282
|
-
hash_control: string | null;
|
|
283
|
-
copy_from_document: string | null;
|
|
284
266
|
chat_document_header_id: string;
|
|
285
267
|
external_pdf_link: string | null;
|
|
286
268
|
external_data: unknown;
|
|
@@ -331,18 +313,11 @@ export type DocumentHeader = {
|
|
|
331
313
|
is_prepared: boolean;
|
|
332
314
|
is_rejected: boolean;
|
|
333
315
|
is_archived: boolean;
|
|
334
|
-
is_void: boolean;
|
|
335
|
-
is_void_reason: string | null;
|
|
336
316
|
is_force_adjudicated: boolean;
|
|
337
317
|
confirmed: boolean;
|
|
338
318
|
origin_id: string | null;
|
|
339
319
|
who_handles: string | null;
|
|
340
320
|
warning: string | null;
|
|
341
|
-
sequence_number: number | null;
|
|
342
|
-
tenant_nif: string;
|
|
343
|
-
atcud: string | null;
|
|
344
|
-
hash: string | null;
|
|
345
|
-
hash_data?: IRsaHashData;
|
|
346
321
|
project_info?: ProjectInfo;
|
|
347
322
|
paired_with: string | null;
|
|
348
323
|
comercial_discount_value: number | null;
|
|
@@ -351,8 +326,7 @@ export type DocumentHeader = {
|
|
|
351
326
|
taxes_value: number | null;
|
|
352
327
|
taxes: ITaxEntry[];
|
|
353
328
|
document_name: string;
|
|
354
|
-
|
|
355
|
-
qrcode: string | null;
|
|
329
|
+
external_reference: string | null;
|
|
356
330
|
seller: string | null;
|
|
357
331
|
created_at: Date;
|
|
358
332
|
updated_at: Date;
|
|
@@ -411,6 +385,8 @@ export type DocumentLine = {
|
|
|
411
385
|
sent_to_client: boolean;
|
|
412
386
|
sent_to_provider: boolean;
|
|
413
387
|
global_discount: boolean;
|
|
388
|
+
split_from_document_line_id?: string | null;
|
|
389
|
+
merged_at?: Date | null;
|
|
414
390
|
created_at: Date;
|
|
415
391
|
updated_at: Date;
|
|
416
392
|
created_by: string;
|
|
@@ -701,7 +677,8 @@ export type ProductSheet = {
|
|
|
701
677
|
name: string | null;
|
|
702
678
|
designation: string;
|
|
703
679
|
origin_id: string | null;
|
|
704
|
-
|
|
680
|
+
saft_product_type: ISaftProductType;
|
|
681
|
+
type_of_inventory: IInventoryCategory | null;
|
|
705
682
|
external_id: string | null;
|
|
706
683
|
max_discount: number;
|
|
707
684
|
maintenances: string;
|
|
@@ -860,6 +837,16 @@ export type ProductBaseVirtuals = {
|
|
|
860
837
|
last_avg_unit_cost: number;
|
|
861
838
|
margin: number | null;
|
|
862
839
|
};
|
|
840
|
+
/**
|
|
841
|
+
* Model ProductSaftLockVirtuals
|
|
842
|
+
*
|
|
843
|
+
* Ponto 9.1 — isolada de ProductBaseVirtuals/ProductVirtuals de propósito
|
|
844
|
+
* (ver nota no schema.prisma / nomalism-db/productSheetSaftLockView).
|
|
845
|
+
*/
|
|
846
|
+
export type ProductSaftLockVirtuals = {
|
|
847
|
+
product_id: string;
|
|
848
|
+
has_saft_document: boolean;
|
|
849
|
+
};
|
|
863
850
|
/**
|
|
864
851
|
* Model ProductVirtuals
|
|
865
852
|
*
|
|
@@ -1011,7 +998,7 @@ export type StartDocumentHeaderLastUpdateVirtuals = {
|
|
|
1011
998
|
*/
|
|
1012
999
|
export type StartDocumentHeaderVirtuals = {
|
|
1013
1000
|
parent_document_header_id: string;
|
|
1014
|
-
|
|
1001
|
+
invoiced: number;
|
|
1015
1002
|
total_without_tax: number;
|
|
1016
1003
|
total: number;
|
|
1017
1004
|
total_discount: number;
|
|
@@ -283,7 +283,6 @@ export type ReasonForExemption = {
|
|
|
283
283
|
export type StoreOperator = {
|
|
284
284
|
id: string;
|
|
285
285
|
user_id: string;
|
|
286
|
-
user_position_id: string | null;
|
|
287
286
|
number: number;
|
|
288
287
|
internal_email: string | null;
|
|
289
288
|
support_language_id: string | null;
|
|
@@ -300,19 +299,6 @@ export type StoreOperator = {
|
|
|
300
299
|
updated_by: string;
|
|
301
300
|
origin_id: string | null;
|
|
302
301
|
};
|
|
303
|
-
/**
|
|
304
|
-
* Model UserPositions
|
|
305
|
-
*
|
|
306
|
-
*/
|
|
307
|
-
export type UserPositions = {
|
|
308
|
-
id: string;
|
|
309
|
-
name: string;
|
|
310
|
-
created_at: Date;
|
|
311
|
-
updated_at: Date;
|
|
312
|
-
created_by: string;
|
|
313
|
-
updated_by: string;
|
|
314
|
-
origin_id: string | null;
|
|
315
|
-
};
|
|
316
302
|
/**
|
|
317
303
|
* Model PaymentMethods
|
|
318
304
|
*
|
|
@@ -322,10 +308,8 @@ export type PaymentMethods = {
|
|
|
322
308
|
payment_method_id: number | null;
|
|
323
309
|
name: string;
|
|
324
310
|
hidden: boolean | null;
|
|
325
|
-
is_numerary: boolean;
|
|
326
|
-
is_mb: boolean;
|
|
327
|
-
is_credit: boolean;
|
|
328
311
|
saft_code: IPaymentMethodsSaftCodeEnum;
|
|
312
|
+
incluir_no_apuro_caixa: boolean;
|
|
329
313
|
created_at: Date;
|
|
330
314
|
updated_at: Date;
|
|
331
315
|
created_by: string;
|
|
@@ -417,6 +401,7 @@ export type Persona = {
|
|
|
417
401
|
postal_code: string | null;
|
|
418
402
|
locality: string | null;
|
|
419
403
|
country_id: string | null;
|
|
404
|
+
vat_taxpayer: boolean;
|
|
420
405
|
reason_for_exemption_id: string | null;
|
|
421
406
|
language_id: string | null;
|
|
422
407
|
provider_id: string | null;
|
|
@@ -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;
|
|
@@ -95,14 +95,6 @@ declare const _default: {
|
|
|
95
95
|
notDeleted: string;
|
|
96
96
|
notUpdated: string;
|
|
97
97
|
};
|
|
98
|
-
TypeOfLocation: {
|
|
99
|
-
dontExist: string;
|
|
100
|
-
notFound: string;
|
|
101
|
-
alreadyExists: string;
|
|
102
|
-
childExists: string;
|
|
103
|
-
notDeleted: string;
|
|
104
|
-
notUpdated: string;
|
|
105
|
-
};
|
|
106
98
|
VatTaxes: {
|
|
107
99
|
dontExist: string;
|
|
108
100
|
notFound: string;
|
|
@@ -6,7 +6,7 @@ import type { IDocumentTypeUserType } from "../modules/supply/documentType/inter
|
|
|
6
6
|
import type { IAttachment } from "../modules/supply/externalDocumentHeader/interface";
|
|
7
7
|
import type { IScheduleType } from "../modules/supply/schedule/interface";
|
|
8
8
|
import type { ISystemModule } from "../modules/user/systemModule/interface";
|
|
9
|
-
import type { IChat, IEmail, IEncomenda, IMultimedia, IMultimediaSummary,
|
|
9
|
+
import type { IChat, IEmail, IEncomenda, IMultimedia, IMultimediaSummary, IPrint, IProjectInfo, IProposta, IServiceLogs, IServiceStatus, IStock, ITask } from "../modules/view/adminPanel/interfaces";
|
|
10
10
|
import type * as ErrorLog from "../modules/view/errorLog/interfaces";
|
|
11
11
|
import type { ChatSocketEvent, SupplyDocumentSocketEvent, TicketsSocketEvent } from "../modules/view/webSocket/interfaces";
|
|
12
12
|
import type { ProjectInfo } from "./entities/integration";
|
|
@@ -14,32 +14,13 @@ 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;
|
|
42
22
|
system_modules?: ISystemModule[];
|
|
23
|
+
seller_id?: string;
|
|
43
24
|
}
|
|
44
25
|
export interface IJwtSub {
|
|
45
26
|
user_id: string;
|
|
@@ -53,8 +34,6 @@ export interface ICachedUserTokens {
|
|
|
53
34
|
export type IEntityWithUserToken<T> = {
|
|
54
35
|
[K in keyof T]: T[K] extends (...params: infer U) => unknown ? (...params: [...U, IUserToken]) => ReturnType<T[K]> : T[K];
|
|
55
36
|
};
|
|
56
|
-
export type WithStamps = WithTimestamps & WithUserstamps;
|
|
57
|
-
export type WithStampsResponse<T> = T & WithStamps;
|
|
58
37
|
export type WithoutStamps<T> = Omit<T, CreatedAt | UpdatedAt | CreatedBy | UpdatedBy>;
|
|
59
38
|
export interface IPaginationRequest {
|
|
60
39
|
per_page?: number;
|
|
@@ -88,18 +67,12 @@ export interface IFindByOwnerIdRequest {
|
|
|
88
67
|
export interface IFindOptionalByOwnerIdRequest {
|
|
89
68
|
owner_id?: string;
|
|
90
69
|
}
|
|
91
|
-
export interface IUpdateManyResponse {
|
|
92
|
-
count: number;
|
|
93
|
-
}
|
|
94
70
|
export interface ILogGoogleApiRequest {
|
|
95
71
|
type: string;
|
|
96
72
|
method: string;
|
|
97
73
|
info: string;
|
|
98
74
|
error?: string;
|
|
99
75
|
}
|
|
100
|
-
export interface ILastMoloniRequest {
|
|
101
|
-
stamp: string | number;
|
|
102
|
-
}
|
|
103
76
|
export declare const IDataTypeEnum: {
|
|
104
77
|
date: "date";
|
|
105
78
|
datetime: "datetime";
|
|
@@ -119,14 +92,11 @@ export declare const IDataTypeEnum: {
|
|
|
119
92
|
json: "json";
|
|
120
93
|
userstamp: "userstamp";
|
|
121
94
|
};
|
|
122
|
-
export type IDatatype = (typeof IDataTypeEnum)[keyof typeof IDataTypeEnum];
|
|
123
|
-
export declare const dataTypes: string[];
|
|
124
95
|
export declare const IUserSendEmailDocumentTemplateEnum: {
|
|
125
96
|
generic: "generic";
|
|
126
97
|
provider_payment_order: "provider_payment_order";
|
|
127
98
|
};
|
|
128
99
|
export type IUserSendEmailDocumentTemplate = (typeof IUserSendEmailDocumentTemplateEnum)[keyof typeof IUserSendEmailDocumentTemplateEnum];
|
|
129
|
-
export declare const IUserSendEmailDocumentTemplateTypes: string[];
|
|
130
100
|
export declare enum IBrokerTopic {
|
|
131
101
|
tickets_change = "tickets_change",
|
|
132
102
|
push_notification = "push_notification",
|
|
@@ -165,7 +135,6 @@ export declare enum IBrokerTopic {
|
|
|
165
135
|
cron_log = "cron_log",
|
|
166
136
|
moloni_log = "moloni_log",
|
|
167
137
|
server_service_log = "server_service_log",
|
|
168
|
-
server_backup_log = "server_backup_log",
|
|
169
138
|
server_docker_log = "server_docker_log",
|
|
170
139
|
server_certificate_log = "server_certificate_log",
|
|
171
140
|
server_filesystem_log = "server_filesystem_log",
|
|
@@ -353,7 +322,6 @@ export type IBrokerTopicPayload = {
|
|
|
353
322
|
response_body: unknown;
|
|
354
323
|
};
|
|
355
324
|
[IBrokerTopic.server_service_log]: IServiceStatus;
|
|
356
|
-
[IBrokerTopic.server_backup_log]: IPostgresBackup;
|
|
357
325
|
[IBrokerTopic.server_docker_log]: IServiceLogs;
|
|
358
326
|
[IBrokerTopic.server_certificate_log]: string;
|
|
359
327
|
[IBrokerTopic.server_filesystem_log]: string;
|
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": "0.
|
|
4
|
+
"version": "0.50.1",
|
|
5
5
|
"author": "Nomalism <it.nomalism@gmail.com> (https://nomalism.com/)",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"type": "module",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"lint-staged": "^17.6.0",
|
|
40
40
|
"prettier": "^3.9.10",
|
|
41
41
|
"tsup": "^8.5.1",
|
|
42
|
-
"typescript-eslint": "^8.71.
|
|
42
|
+
"typescript-eslint": "^8.71.2"
|
|
43
43
|
},
|
|
44
44
|
"repository": {
|
|
45
45
|
"type": "git",
|
|
@@ -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 {};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { UserPositions } from "../../../shared/entities/user";
|
|
2
|
-
import * as IShared from "../../../shared/interface";
|
|
3
|
-
export type Entity = UserPositions;
|
|
4
|
-
export declare const Route = "user_positions";
|
|
5
|
-
type IFindDetailedResponse = Entity;
|
|
6
|
-
export type IFindByIdResponse = Omit<IFindDetailedResponse, "">;
|
|
7
|
-
export type IFindRequest = Record<string, unknown>;
|
|
8
|
-
export type IFindResponse = Omit<IFindDetailedResponse, "">;
|
|
9
|
-
export interface IFindPaginatedRequest extends IFindRequest, IShared.IPaginationRequest {
|
|
10
|
-
}
|
|
11
|
-
export type IFindWithPaginationResponse = IShared.IPaginationResponse<Omit<IFindDetailedResponse, "">>;
|
|
12
|
-
export interface ICreateRequest {
|
|
13
|
-
name: string;
|
|
14
|
-
}
|
|
15
|
-
export interface IUpdateRequest {
|
|
16
|
-
name?: string;
|
|
17
|
-
}
|
|
18
|
-
export interface IRepository {
|
|
19
|
-
findById(selector: IShared.IFindByIdRequest): Promise<IFindByIdResponse | null>;
|
|
20
|
-
findMinified(params?: IShared.IFindMinifiedRequest): Promise<IShared.IFindMinifiedResponse[]>;
|
|
21
|
-
find(selector: IFindRequest): Promise<IFindResponse[]>;
|
|
22
|
-
findPaginated(selector: IFindPaginatedRequest): Promise<IFindWithPaginationResponse>;
|
|
23
|
-
create(data: ICreateRequest): Promise<Entity>;
|
|
24
|
-
update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<Entity | null>;
|
|
25
|
-
deleteOne(selector: IShared.IFindByIdRequest): Promise<Entity | null>;
|
|
26
|
-
}
|
|
27
|
-
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
28
|
-
export {};
|