@nomalism-com/types 1.1.5 → 1.2.2
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 +788 -716
- package/dist/main.d.ts +4 -1
- package/dist/modules/document/materialEntrance/interfaces.d.ts +2 -2
- package/dist/modules/document/order/interfaces.d.ts +4 -10
- package/dist/modules/document/order/route.schema.d.ts +0 -1
- package/dist/modules/document/transformado/interfaces.d.ts +10 -4
- package/dist/modules/document/transformado/route.schema.d.ts +2 -1
- package/dist/modules/integration/googleSheets/interfaces.d.ts +0 -2
- package/dist/modules/stock/sideMenu/interface.d.ts +1 -1
- package/dist/modules/stock/tag/interface.d.ts +22 -0
- package/dist/modules/stock/tag/route.schema.d.ts +3 -0
- package/dist/modules/stock/task/interface.d.ts +6 -0
- package/dist/modules/stock/task/route.schema.d.ts +1 -0
- package/dist/modules/supply/documentHeader/interfaces.d.ts +4 -5
- package/dist/modules/supply/documentHeaderHistory/interfaces.d.ts +11 -0
- package/dist/modules/supply/documentLine/interfaces.d.ts +1 -1
- package/dist/modules/supply/documentLineMT/interface.d.ts +1 -0
- package/dist/modules/supply/externalDocumentHeader/interface.d.ts +8 -8
- package/dist/modules/user/persona/interface.d.ts +15 -0
- package/dist/modules/user/persona/route.schema.d.ts +1 -0
- package/dist/shared/entities/stock.d.ts +32 -4
- package/dist/shared/interface.d.ts +11 -0
- package/package.json +1 -1
package/dist/main.d.ts
CHANGED
|
@@ -22,6 +22,7 @@ import * as DeliveryMethods from './modules/user/deliveryMethods/interfaces';
|
|
|
22
22
|
import * as DeliveryMethodsRoutes from './modules/user/deliveryMethods/route.schema';
|
|
23
23
|
import * as DocumentHeader from './modules/supply/documentHeader/interfaces';
|
|
24
24
|
import * as DocumentHeaderRoutes from './modules/supply/documentHeader/route.schema';
|
|
25
|
+
import * as DocumentHeaderHistory from './modules/supply/documentHeaderHistory/interfaces';
|
|
25
26
|
import * as BillOfLading from './modules/document/billOfLading/interfaces';
|
|
26
27
|
import * as BillOfLadingRoutes from './modules/document/billOfLading/route.schema';
|
|
27
28
|
import * as ProductionOrder from './modules/document/productionOrder/interfaces';
|
|
@@ -223,4 +224,6 @@ import * as DocumentLineMt from './modules/supply/documentLineMT/interface';
|
|
|
223
224
|
import * as DocumentLineMtRoutes from './modules/supply/documentLineMT/route.schema';
|
|
224
225
|
import * as ChatSubscriber from './modules/user/chatSubscribers/interfaces';
|
|
225
226
|
import * as ChatSubscriberRoutes from './modules/user/chatSubscribers/route.schema';
|
|
226
|
-
|
|
227
|
+
import * as Tag from './modules/stock/tag/interface';
|
|
228
|
+
import * as TagRoutes from './modules/stock/tag/route.schema';
|
|
229
|
+
export { shared, viewErrors, stockErrors, userErrors, documentManagementErrors, integrationErrors, ZipCode, ZipCodeRoutes, BankData, BankDataRoutes, Client, ClientRoutes, ClientType, ClientTypeRoutes, Chat, ChatRoutes, Commissioner, CommissionerRoutes, Country, CountryRoutes, DeliveryMethods, DeliveryMethodsRoutes, DocumentHeader, DocumentHeaderRoutes, DocumentHeaderHistory, BillOfLading, BillOfLadingRoutes, ProductionOrder, ProductionOrderRoutes, Proforma, ProformaRoutes, PropostaFornecedor, PropostaFornecedorRoutes, ProviderCreditNoteFromReturn, ProviderCreditNoteFromReturnRoutes, ProviderFinancialCreditNote, ProviderFinancialCreditNoteRoutes, ProviderServiceInvoice, ProviderServiceInvoiceRoutes, DocumentLine, DocumentLineRoutes, DocumentLineAssoc, DocumentLineAssocRoutes, DocumentSet, DocumentSetRoutes, DocumentType, DocumentTypeRoutes, ExternalDocumentType, ExternalDocumentHeader, ExternalDocumentHeaderRoutes, Favorites, FavoritesRoutes, File, FileRoutes, GroupPermissions, GroupPermissionsRoutes, GoogleSheets, GoogleSheetsRoutes, Language, LanguageRoutes, Location, LocationRoutes, MaturityDates, MaturityDatesRoutes, Multimedia, MultimediaRoutes, OrderManagement, Observation, ObservationRoutes, ObservationType, ObservationTypeRoutes, Password, PasswordRoutes, Payment, PaymentRoutes, PaymentMethods, PaymentMethodsRoutes, Permissions, PermissionsRoutes, ProductImage, ProductImageRoutes, Promotion, PromotionRoutes, PromotionAssoc, PromotionAssocRoutes, Providers, ProvidersRoutes, ProviderType, ProviderTypeRoutes, PurchaseConditions, PurchaseConditionsRoutes, ReasonForExemption, ReasonForExemptionRoutes, RefreshToken, RefreshTokenRoutes, SegmentsArea, SegmentsAreaRoutes, Sessions, SessionsRoutes, Shippings, ShippingsRoutes, StoreOperator, StoreOperatorRoutes, Swift, SwiftRoutes, TypeOfLocation, TypeOfLocationRoutes, UnitOfMeasure, UnitOfMeasureRoutes, UserPermissions, UserPermissionsRoutes, UserPositions, UserPositionsRoutes, Users, UsersRoutes, UserTokens, UserTokensRoutes, VatValidation, VatValidationRoutes, VatTax, VatTaxRoutes, VatTaxZone, VatTaxZoneRoutes, Vehicles, VehiclesRoutes, Workflow, WorkflowRoutes, StockMovement, StockMovementRoutes, Tenant, TenantRoutes, PreSale, PreSaleRoutes, PreSaleProduct, PreSaleProductRoutes, Npc, NpcRoutes, Printer, PrinterRoutes, SchedulePrintJob, SchedulePrintJobRoutes, QueryList, QueryListRoutes, QueryParameter, QueryParameterRoutes, ReturnReason, ReturnReasonRoutes, PropostaSheets, PropostaSheetsRoutes, Schedule, ScheduleRoutes, GoogleFilePermission, GoogleFilePermissionRoutes, Settings, SettingsRoutes, Tickets, TicketsRoutes, Channel, ChannelRoutes, TicketsLanguage, TicketsLanguageRoutes, CLT, CLTRoutes, StartDocumentHeaderLastUpdate, Persona, PersonaRoutes, ProjectInfo, ProjectInfoRoutes, EmailVerification, EmailVerificationRoutes, EmailLog, EmailLogRoutes, Purchase, PurchaseRoutes, Order, OrderRoutes, MaterialEntrance, MaterialEntranceRoutes, Transformado, TransformadoRoutes, Quebra, QuebraRoutes, UpfrontReturn, UpfrontReturnRoutes, SavedEmPicking, SavedEmPickingRoutes, EmailTemplate, EmailTemplateRoutes, EmailTemplateAttachment, EmailTemplateAttachmentRoutes, Inventario, InventarioRoutes, ReturnToProvider, ReturnToProviderRoutes, Prison, PrisonRoutes, DocumentLineNote, DocumentLineNoteRoutes, SavedProviderProposal, SavedProviderProposalRoutes, ProductGoogleSheets, ProductGoogleSheetsRoutes, Task, TaskRoutes, TaskMessage, TaskMessageRoutes, RecurrentTasks, TaskRead, TaskReadRoutes, Theme, ThemeRoutes, Dashboard, DashboardRoutes, ChatRapidMessage, ChatRapidMessageRoutes, SideMenu, SideMenuRoutes, AdminPanel, ErrorLog, ErrorLogRoutes, DocumentLineRm, DocumentLineRmRoutes, DocumentLineMt, DocumentLineMtRoutes, ChatSubscriber, ChatSubscriberRoutes, Tag, TagRoutes, };
|
|
@@ -49,7 +49,7 @@ export interface IGetMaterialEntranceInfoStock {
|
|
|
49
49
|
ordered_quantity: number;
|
|
50
50
|
}
|
|
51
51
|
export interface IEntradaDeMaterialStock extends IGetMaterialEntranceInfoStock {
|
|
52
|
-
document_line_id: string;
|
|
52
|
+
document_line_id: string | null;
|
|
53
53
|
quantity: number;
|
|
54
54
|
option: ICreateMaterialEntranceStockOption | ICreateMaterialEntranceStockWithoutOrderOption | null;
|
|
55
55
|
note: string | null;
|
|
@@ -66,7 +66,7 @@ export interface IEntradaDeMaterialNC {
|
|
|
66
66
|
}
|
|
67
67
|
export interface IGetMaterialEntranceInfoResponse {
|
|
68
68
|
clientOrders: IEntradaDeMaterialClientOrder[];
|
|
69
|
-
stock: IEntradaDeMaterialStock;
|
|
69
|
+
stock: IEntradaDeMaterialStock[];
|
|
70
70
|
not_ok: IEntradaDeMaterialNC;
|
|
71
71
|
saved_id: string | null;
|
|
72
72
|
}
|
|
@@ -29,8 +29,10 @@ export declare const ConferirEncomendaClienteOptionsEnum: {
|
|
|
29
29
|
'Espera Corte Tecidos': 'Espera Corte Tecidos';
|
|
30
30
|
'Espera Confecção (tecidos cortados)': 'Espera Confecção (tecidos cortados)';
|
|
31
31
|
'Encomendar Serviço': 'Encomendar Serviço';
|
|
32
|
+
'Encomendar Serviço c/ Anexos': 'Encomendar Serviço c/ Anexos';
|
|
32
33
|
'Encomendar Serviço Sem Notificação': 'Encomendar Serviço Sem Notificação';
|
|
33
34
|
'Encomendar VA': 'Encomendar VA';
|
|
35
|
+
'Encomendar VA c/ Anexos': 'Encomendar VA c/ Anexos';
|
|
34
36
|
'Encomendar VA Sem Notificação': 'Encomendar VA Sem Notificação';
|
|
35
37
|
'Encomendar Stock': 'Encomendar Stock';
|
|
36
38
|
'Cancelar Encomendar': 'Cancelar Encomendar';
|
|
@@ -38,22 +40,17 @@ export declare const ConferirEncomendaClienteOptionsEnum: {
|
|
|
38
40
|
Refaturar: 'Refaturar';
|
|
39
41
|
'Desligar do Sheets': 'Desligar do Sheets';
|
|
40
42
|
'Fechar Linha': 'Fechar Linha';
|
|
41
|
-
'Encomendar RM': 'Encomendar RM';
|
|
42
|
-
'Encomendar MT': 'Encomendar MT';
|
|
43
|
-
'M - terminado': 'M - terminado';
|
|
44
43
|
};
|
|
45
44
|
export type IConferirEncomendaClienteOptions = (typeof ConferirEncomendaClienteOptionsEnum)[keyof typeof ConferirEncomendaClienteOptionsEnum];
|
|
46
45
|
export declare const conferirEncomendaClienteOptions: string[];
|
|
47
46
|
export interface IConferirEncomendaClienteRequest {
|
|
48
47
|
option: IConferirEncomendaClienteOptions;
|
|
49
48
|
document_line_ids: string[];
|
|
49
|
+
reinvoicing_nc_observation?: string;
|
|
50
50
|
}
|
|
51
51
|
export interface IConferirEncomendaClienteResponse {
|
|
52
52
|
document_line_id: string;
|
|
53
53
|
}
|
|
54
|
-
export interface IFindStockToOrderRequest {
|
|
55
|
-
id_provider: number;
|
|
56
|
-
}
|
|
57
54
|
export interface IFindStockToOrderResponse {
|
|
58
55
|
document_line_assoc_id: string;
|
|
59
56
|
document_line_id: string;
|
|
@@ -99,15 +96,12 @@ export interface IFindByIdsRequest {
|
|
|
99
96
|
ids: string[];
|
|
100
97
|
}
|
|
101
98
|
export interface IRepository {
|
|
102
|
-
findStockToOrder(data: IFindStockToOrderRequest): Promise<IFindStockToOrderResponse[]>;
|
|
103
99
|
conferirEncomendaCliente(data: IConferirEncomendaClienteRequest): Promise<IConferirEncomendaClienteResponse[]>;
|
|
104
|
-
undoEncomendaVA(selector: IFindByIdsRequest): Promise<void>;
|
|
105
100
|
setProvider(data: ISetProviderRequest): Promise<void>;
|
|
106
101
|
unsetProvider(selector: IShared.IFindByIdRequest): Promise<void>;
|
|
107
|
-
|
|
102
|
+
unlinkFromProviderOrder(selector: IFindByIdsRequest): Promise<void>;
|
|
108
103
|
undoProviderOrder(data: IUndoProviderOrderRequest): Promise<void>;
|
|
109
104
|
unsetCativado(data: IUnsetCativado): Promise<void>;
|
|
110
105
|
find(params: IFindRequest): Promise<IFindResponse[]>;
|
|
111
106
|
}
|
|
112
|
-
export type IApi = IRepository;
|
|
113
107
|
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -2,7 +2,6 @@ import joi from 'joi';
|
|
|
2
2
|
import { IConferirEncomendaClienteRequest, IFindRequest, IFindByIdsRequest } from './interfaces';
|
|
3
3
|
export declare const undoProviderOrderBody: joi.ObjectSchema<any>;
|
|
4
4
|
export declare const conferirEncomendaClienteBody: joi.ObjectSchema<IConferirEncomendaClienteRequest>;
|
|
5
|
-
export declare const findStockToOrderParamsBodyKeys: joi.ObjectSchema<any>;
|
|
6
5
|
export declare const setProviderBody: joi.ObjectSchema<any>;
|
|
7
6
|
export declare const unsetCativadoBody: joi.ObjectSchema<any>;
|
|
8
7
|
export declare const findQuery: joi.ObjectSchema<IFindRequest>;
|
|
@@ -2,18 +2,24 @@ import * as IShared from '../../../shared/interface';
|
|
|
2
2
|
export declare const Route = "transformado";
|
|
3
3
|
export declare const UpperName = "Transformado";
|
|
4
4
|
export declare const LowerName: string;
|
|
5
|
-
export interface
|
|
5
|
+
export interface IProducts {
|
|
6
6
|
id: string;
|
|
7
7
|
quantity: number;
|
|
8
8
|
}
|
|
9
|
-
export interface
|
|
9
|
+
export interface ITransformar {
|
|
10
10
|
product_id: string;
|
|
11
11
|
quantity: number;
|
|
12
12
|
price_sale: number;
|
|
13
13
|
price_cost: number;
|
|
14
|
-
|
|
14
|
+
out_products: IProducts[];
|
|
15
|
+
}
|
|
16
|
+
export interface IDestransformar {
|
|
17
|
+
product_id: string;
|
|
18
|
+
quantity: number;
|
|
19
|
+
in_products: IProducts[];
|
|
15
20
|
}
|
|
16
21
|
export interface IRepository {
|
|
17
|
-
|
|
22
|
+
transformar(data: ITransformar): Promise<string>;
|
|
23
|
+
destransformar(data: IDestransformar): Promise<string>;
|
|
18
24
|
}
|
|
19
25
|
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -26,7 +26,6 @@ export interface ICloneResponse {
|
|
|
26
26
|
}
|
|
27
27
|
export type IGetProductGroup = 'cortinado' | 'tapete' | 'estore' | 'estofo' | 'almofada' | 'outros' | 'calhas&varões' | 'papel' | 'varoes' | 'terceiros';
|
|
28
28
|
export type IGetProductType = 'confecção' | 'calha' | 'tecido 1' | 'tecido 2' | 'varoes' | 'livre' | 'papel';
|
|
29
|
-
export type IReferenceType = 'noma' | 'sheets' | undefined;
|
|
30
29
|
export interface IGetProduct {
|
|
31
30
|
index: number;
|
|
32
31
|
group: IGetProductGroup;
|
|
@@ -37,7 +36,6 @@ export interface IGetProduct {
|
|
|
37
36
|
discount: number;
|
|
38
37
|
price_sale: number;
|
|
39
38
|
price_cost: number;
|
|
40
|
-
reference_type?: IReferenceType;
|
|
41
39
|
}
|
|
42
40
|
export interface IGetDataResponse {
|
|
43
41
|
products: IGetProduct[];
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as IShared from '../../../shared/interface';
|
|
2
|
+
import { Tag } from '../../../shared/entities/stock';
|
|
3
|
+
export type Entity = Tag;
|
|
4
|
+
export declare const Route = "tag";
|
|
5
|
+
export declare const UpperName = "Tag";
|
|
6
|
+
export declare const LowerName: string;
|
|
7
|
+
export declare const ITagTypeEnum: {
|
|
8
|
+
private: 'private';
|
|
9
|
+
public: 'public';
|
|
10
|
+
};
|
|
11
|
+
export type ITagType = (typeof ITagTypeEnum)[keyof typeof ITagTypeEnum];
|
|
12
|
+
export declare const ITagType: string[];
|
|
13
|
+
export type ICreateRequest = Omit<Entity, 'id' | 'created_at' | 'updated_at' | 'created_by' | 'updated_by'>;
|
|
14
|
+
export type IUpdateManyRequest = Pick<Entity, 'id' | 'index' | 'type'>;
|
|
15
|
+
export type IFindResponse = Omit<Entity, 'created_at' | 'updated_at'>;
|
|
16
|
+
export interface IRepository {
|
|
17
|
+
create(data: ICreateRequest): Promise<void>;
|
|
18
|
+
findByDocumentHeaderId(selector: IShared.IFindByIdRequest): Promise<IFindResponse[]>;
|
|
19
|
+
updateMany(data: IUpdateManyRequest[]): Promise<void>;
|
|
20
|
+
delete(selector: IShared.IFindByIdRequest): Promise<void>;
|
|
21
|
+
}
|
|
22
|
+
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -14,6 +14,11 @@ export declare const taskStatusDataType: string[];
|
|
|
14
14
|
export type ICreateRequest = {
|
|
15
15
|
task: string;
|
|
16
16
|
};
|
|
17
|
+
export type ICreateFromDossierRequest = {
|
|
18
|
+
from: string;
|
|
19
|
+
to: string | null;
|
|
20
|
+
task: string;
|
|
21
|
+
};
|
|
17
22
|
export type IUpdateRequest = {
|
|
18
23
|
from?: string;
|
|
19
24
|
to?: string | null;
|
|
@@ -75,6 +80,7 @@ export interface IRepository {
|
|
|
75
80
|
find(selector: IFindTasksRequest): Promise<IFindResponse[]>;
|
|
76
81
|
findWithMessages(id: IShared.IFindByIdRequest): Promise<IFindWithMessagesResponse>;
|
|
77
82
|
create(data: ICreateRequest): Promise<Entity>;
|
|
83
|
+
createFromDossier(data: ICreateFromDossierRequest): Promise<Entity>;
|
|
78
84
|
update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<void>;
|
|
79
85
|
delete(selector: IShared.IFindByIdRequest): Promise<void>;
|
|
80
86
|
findByOwnerId: (selector: IShared.IFindByOwnerIdRequest) => Promise<IFindByOwnerResponse[]>;
|
|
@@ -190,8 +190,8 @@ export interface IUpdateRequest {
|
|
|
190
190
|
is_archived?: boolean;
|
|
191
191
|
is_void?: boolean;
|
|
192
192
|
is_void_reason?: string | null;
|
|
193
|
+
is_force_adjudicated?: boolean;
|
|
193
194
|
who_handles?: string | null;
|
|
194
|
-
tags?: string | null;
|
|
195
195
|
warning?: IWarningType;
|
|
196
196
|
created_by?: string;
|
|
197
197
|
}
|
|
@@ -224,10 +224,10 @@ export interface IFindResponse {
|
|
|
224
224
|
total: number;
|
|
225
225
|
emission_date: string;
|
|
226
226
|
line_count: number;
|
|
227
|
-
tags: string;
|
|
228
227
|
is_void: boolean;
|
|
229
228
|
is_archived: boolean;
|
|
230
229
|
adjudicado: boolean;
|
|
230
|
+
tags: string | null;
|
|
231
231
|
}
|
|
232
232
|
export type IUpdateManyWithPersona = {
|
|
233
233
|
id: string;
|
|
@@ -289,7 +289,7 @@ export interface IDocumentListResponse {
|
|
|
289
289
|
stock_in: boolean;
|
|
290
290
|
stock_out: boolean;
|
|
291
291
|
cativado: boolean;
|
|
292
|
-
|
|
292
|
+
adjudicated: boolean;
|
|
293
293
|
}
|
|
294
294
|
export declare const IWarningEnum: {
|
|
295
295
|
AvisoTotal: 'AvisoTotal';
|
|
@@ -308,8 +308,7 @@ export interface IFindRmOpenDocuments {
|
|
|
308
308
|
document_header_id: string;
|
|
309
309
|
document_number: string;
|
|
310
310
|
identifier: string;
|
|
311
|
-
|
|
312
|
-
upfront_total: number | null;
|
|
311
|
+
adjudicated: boolean;
|
|
313
312
|
who_handles: string | null;
|
|
314
313
|
document_lines: {
|
|
315
314
|
document_line_id: string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as IShared from '../../../shared/interface';
|
|
2
|
+
import { DocumentHeaderHistory } from '../../../shared/entities/stock';
|
|
3
|
+
export type Entity = DocumentHeaderHistory;
|
|
4
|
+
export declare const Route = "documentHeaderHistory";
|
|
5
|
+
export declare const UpperName = "DocumentHeaderHistory";
|
|
6
|
+
export declare const LowerName: string;
|
|
7
|
+
export type IFindByOwnerIdResponse = Omit<DocumentHeaderHistory, 'id' | 'document_header_id'>;
|
|
8
|
+
export interface IRepository {
|
|
9
|
+
findByOwnerId(selector: IShared.IFindByOwnerIdRequest): Promise<IFindByOwnerIdResponse[]>;
|
|
10
|
+
}
|
|
11
|
+
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -12,7 +12,7 @@ export type IDocumentLineVirtuals = DocumentLineVirtuals;
|
|
|
12
12
|
export type IDocumentLineBaseVirtuals = DocumentLineBaseVirtuals;
|
|
13
13
|
export type IDocumentLineRM = DocumentLineRM;
|
|
14
14
|
export type IPromotions = Pick<ProductPromotionVirtuals, 'exclusive_to_location_id' | 'exclusive_to_client_id' | 'discount'>;
|
|
15
|
-
export type IDataKeys = 'AvisoCliente' | 'Quantidade Encomendada Originalmente' | 'Linha criada na EM' | '
|
|
15
|
+
export type IDataKeys = 'Conferir Encomenda' | 'AvisoCliente' | 'Quantidade Encomendada Originalmente' | 'Linha criada na EM' | 'Opcao EM' | 'Levantar DF' | 'Enviar Email NCF' | 'Fechar DF' | 'Documento pago' | 'Pagamento' | 'Recibo do documento' | 'Emitir' | 'Backup PDF';
|
|
16
16
|
export interface IDataPayload {
|
|
17
17
|
value: unknown;
|
|
18
18
|
updated_at: Date;
|
|
@@ -11,6 +11,7 @@ export interface IUpdateRequest {
|
|
|
11
11
|
mt_execution_by?: string | null;
|
|
12
12
|
mt_execution_date?: Date | null;
|
|
13
13
|
mt_execution_when?: Date | null;
|
|
14
|
+
mt_order_with_notification?: boolean;
|
|
14
15
|
}
|
|
15
16
|
export interface IRepository {
|
|
16
17
|
update(data: IUpdateRequest): Promise<void>;
|
|
@@ -42,14 +42,14 @@ export interface ISendEmailDocument {
|
|
|
42
42
|
email: string;
|
|
43
43
|
};
|
|
44
44
|
}
|
|
45
|
-
export declare enum
|
|
45
|
+
export declare enum IPublicDocumentHeaderNoteType {
|
|
46
46
|
Provider = "Provider",
|
|
47
47
|
Client = "Client"
|
|
48
48
|
}
|
|
49
|
-
export interface
|
|
49
|
+
export interface PublicDocumentHeaderNote {
|
|
50
50
|
id: string;
|
|
51
51
|
note: string;
|
|
52
|
-
type:
|
|
52
|
+
type: IPublicDocumentHeaderNoteType;
|
|
53
53
|
created_at: Date;
|
|
54
54
|
updated_at: Date;
|
|
55
55
|
created_by: string;
|
|
@@ -64,12 +64,12 @@ export interface IPublicFindByOwnerIdResponse {
|
|
|
64
64
|
new_chat_messages: number;
|
|
65
65
|
pc_tags: string[];
|
|
66
66
|
}
|
|
67
|
-
export interface
|
|
67
|
+
export interface PublicDocumentHeaderNoteCreateRequest {
|
|
68
68
|
document_header_id: string;
|
|
69
69
|
note: string;
|
|
70
|
-
type:
|
|
70
|
+
type: IPublicDocumentHeaderNoteType;
|
|
71
71
|
}
|
|
72
|
-
export interface
|
|
72
|
+
export interface PublicDocumentHeaderNoteUpdateRequest {
|
|
73
73
|
note: string;
|
|
74
74
|
}
|
|
75
75
|
export interface IRepository {
|
|
@@ -82,8 +82,8 @@ export interface IRepository {
|
|
|
82
82
|
create(data: ICreateRequest): Promise<Entity>;
|
|
83
83
|
update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<Entity | null>;
|
|
84
84
|
deleteOne(selector: IShared.IFindByIdRequest): Promise<Entity | null>;
|
|
85
|
-
|
|
86
|
-
|
|
85
|
+
createPublicDocumentHeaderNote: (data: PublicDocumentHeaderNoteCreateRequest[]) => Promise<PublicDocumentHeaderNote[]>;
|
|
86
|
+
updatePublicDocumentHeaderNote: (selector: IShared.IFindByIdRequest, data: PublicDocumentHeaderNoteUpdateRequest[]) => Promise<PublicDocumentHeaderNote[]>;
|
|
87
87
|
}
|
|
88
88
|
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
89
89
|
export {};
|
|
@@ -99,6 +99,20 @@ export interface IFindByEmailResponse {
|
|
|
99
99
|
chat_type: IChatType;
|
|
100
100
|
} | null;
|
|
101
101
|
}
|
|
102
|
+
export interface IFindClientOrProviderRequest {
|
|
103
|
+
nif?: string | null;
|
|
104
|
+
email?: string | null;
|
|
105
|
+
telephone?: string | null;
|
|
106
|
+
user_type: 'client' | 'provider';
|
|
107
|
+
}
|
|
108
|
+
export interface IFindClientOrProviderResponse {
|
|
109
|
+
client_id: string | null;
|
|
110
|
+
provider_id: string | null;
|
|
111
|
+
nif: string | null;
|
|
112
|
+
name: string | null;
|
|
113
|
+
email: string | null;
|
|
114
|
+
telephone: string | null;
|
|
115
|
+
}
|
|
102
116
|
export interface IRepository {
|
|
103
117
|
findById(selector: IShared.IFindByIdRequest): Promise<IEntityExtended | null>;
|
|
104
118
|
findByOwnerId(params: IShared.IFindByOwnerIdRequest): Promise<IFindByOwnerIdResponse[]>;
|
|
@@ -109,5 +123,6 @@ export interface IRepository {
|
|
|
109
123
|
findByBasic(data: IBasicSearchRequest): Promise<IShared.IPaginationResponse<IBasicSearchResponse>>;
|
|
110
124
|
find(data: IFindRequest): Promise<IFindResponse[]>;
|
|
111
125
|
findByEmail(data: IFindByEmailRequest): Promise<IFindByEmailResponse[]>;
|
|
126
|
+
findClientOrProvider(data: IFindClientOrProviderRequest): Promise<IFindClientOrProviderResponse[]>;
|
|
112
127
|
}
|
|
113
128
|
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -5,3 +5,4 @@ export declare const findQuery: joi.ObjectSchema<any>;
|
|
|
5
5
|
export declare const getBasicSearchParamsValidate: joi.ObjectSchema<any>;
|
|
6
6
|
export declare const deleteQueryValidate: joi.ObjectSchema<any>;
|
|
7
7
|
export declare const FindByEmailQueryValidate: joi.ObjectSchema<any>;
|
|
8
|
+
export declare const FindClientOrProviderQueryValidate: joi.ObjectSchema<any>;
|
|
@@ -3,6 +3,7 @@ import { IDocumentTypeUserType, IDocumentTypeCodeType } from '../../modules/supp
|
|
|
3
3
|
import { IBatchType, IPaymentOrigin } from '../../modules/supply/payment/interface';
|
|
4
4
|
import { IProductType } from '../../modules/stock/productGoogleSheets/interface';
|
|
5
5
|
import { IImageType } from '../../modules/stock/productImage/interface';
|
|
6
|
+
import { ITagType } from '../../modules/stock/tag/interface';
|
|
6
7
|
import { IQueryParameterDatatype } from '../../modules/stock/queryParameter/interfaces';
|
|
7
8
|
import { IData, IDataDocumentoPago, IDataPagamento, IPromotions, type IImportedFromSheets } from '../../modules/supply/documentLine/interfaces';
|
|
8
9
|
import { ISavedEmPickingData } from '../../modules/stock/savedEmPicking/interfaces';
|
|
@@ -301,9 +302,9 @@ export type DocumentHeader = {
|
|
|
301
302
|
is_archived: boolean;
|
|
302
303
|
is_void: boolean;
|
|
303
304
|
is_void_reason: string | null;
|
|
305
|
+
is_force_adjudicated: boolean;
|
|
304
306
|
origin_id: string | null;
|
|
305
307
|
who_handles: string | null;
|
|
306
|
-
tags: string | null;
|
|
307
308
|
warning: string | null;
|
|
308
309
|
sequence_number: number | null;
|
|
309
310
|
tenant_nif: string;
|
|
@@ -325,6 +326,17 @@ export type DocumentHeader = {
|
|
|
325
326
|
created_by: string;
|
|
326
327
|
updated_by: string;
|
|
327
328
|
};
|
|
329
|
+
/**
|
|
330
|
+
* Model DocumentHeaderHistory
|
|
331
|
+
*
|
|
332
|
+
*/
|
|
333
|
+
export type DocumentHeaderHistory = {
|
|
334
|
+
id: string;
|
|
335
|
+
document_header_id: string;
|
|
336
|
+
text: string;
|
|
337
|
+
created_at: Date;
|
|
338
|
+
created_by: string;
|
|
339
|
+
};
|
|
328
340
|
/**
|
|
329
341
|
* Model DocumentLine
|
|
330
342
|
*
|
|
@@ -348,6 +360,8 @@ export type DocumentLine = {
|
|
|
348
360
|
cancelled: boolean;
|
|
349
361
|
original_product_id: string | null;
|
|
350
362
|
imported_from_sheets: IImportedFromSheets | null;
|
|
363
|
+
reinvoicing: boolean;
|
|
364
|
+
force_closed: boolean;
|
|
351
365
|
quantity: number;
|
|
352
366
|
preco_custo: number;
|
|
353
367
|
provider_discount: number;
|
|
@@ -633,7 +647,6 @@ export type DocumentLineBaseVirtuals = {
|
|
|
633
647
|
already_client_order: boolean;
|
|
634
648
|
already_material_entrance: boolean;
|
|
635
649
|
to_order: boolean;
|
|
636
|
-
rejected_return_to_provider: boolean;
|
|
637
650
|
inventory_loss: boolean;
|
|
638
651
|
return_to_provider_without_credit_note: boolean;
|
|
639
652
|
returned_to_provider: boolean;
|
|
@@ -650,7 +663,6 @@ export type DocumentLineBaseVirtuals = {
|
|
|
650
663
|
provider_start_id: string | null;
|
|
651
664
|
invoice_id: string | null;
|
|
652
665
|
credit_note_id: string | null;
|
|
653
|
-
df_rejeitada: boolean;
|
|
654
666
|
levantar_df: boolean;
|
|
655
667
|
df_enviada: boolean;
|
|
656
668
|
df_fechada: boolean;
|
|
@@ -737,7 +749,6 @@ export type StartDocumentHeaderLastUpdateVirtuals = {
|
|
|
737
749
|
export type StartDocumentHeaderVirtuals = {
|
|
738
750
|
parent_document_header_id: string;
|
|
739
751
|
name: string;
|
|
740
|
-
external_name: string | null;
|
|
741
752
|
paid: number;
|
|
742
753
|
total_without_tax: number;
|
|
743
754
|
total: number;
|
|
@@ -747,6 +758,7 @@ export type StartDocumentHeaderVirtuals = {
|
|
|
747
758
|
upfront_name: string | null;
|
|
748
759
|
upfront_external_name: string | null;
|
|
749
760
|
upfront_total: number;
|
|
761
|
+
adjudicated: boolean;
|
|
750
762
|
closed: boolean;
|
|
751
763
|
state: string;
|
|
752
764
|
};
|
|
@@ -1051,6 +1063,22 @@ export type DocumentLineMT = {
|
|
|
1051
1063
|
mt_execution_by: string | null;
|
|
1052
1064
|
mt_execution_date: Date | null;
|
|
1053
1065
|
mt_execution_when: Date | null;
|
|
1066
|
+
mt_order_with_notification: boolean;
|
|
1067
|
+
created_by: string;
|
|
1068
|
+
updated_by: string;
|
|
1069
|
+
created_at: Date;
|
|
1070
|
+
updated_at: Date;
|
|
1071
|
+
};
|
|
1072
|
+
/**
|
|
1073
|
+
* Model Tag
|
|
1074
|
+
*
|
|
1075
|
+
*/
|
|
1076
|
+
export type Tag = {
|
|
1077
|
+
id: string;
|
|
1078
|
+
text: string;
|
|
1079
|
+
index: number;
|
|
1080
|
+
type: ITagType;
|
|
1081
|
+
document_header_id: string;
|
|
1054
1082
|
created_by: string;
|
|
1055
1083
|
updated_by: string;
|
|
1056
1084
|
created_at: Date;
|
|
@@ -7,6 +7,7 @@ import type { IScheduleType } from '../modules/supply/schedule/interface';
|
|
|
7
7
|
import type { IWarningType, IProjectInfo as KafkaProjectInfo } 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 { File } from './entities/stock';
|
|
10
11
|
export { messages };
|
|
11
12
|
type CreatedAt = 'created_at';
|
|
12
13
|
type UpdatedAt = 'updated_at';
|
|
@@ -130,6 +131,7 @@ export declare enum IBrokerTopic {
|
|
|
130
131
|
google_sheet_update = "google_sheet_update",
|
|
131
132
|
google_sheet_import = "google_sheet_import",
|
|
132
133
|
import_master_artigos = "import_master_artigos",
|
|
134
|
+
undo_provider_order_schedule_email = "undo_provider_order_schedule_email",
|
|
133
135
|
provider_order_schedule_email = "provider_order_schedule_email",
|
|
134
136
|
client_notice_schedule_email = "client_notice_schedule_email",
|
|
135
137
|
retry_errored_emails = "retry_errored_emails",
|
|
@@ -222,6 +224,15 @@ export type IBrokerTopicPayload = {
|
|
|
222
224
|
pf_number: string;
|
|
223
225
|
provider_name: string;
|
|
224
226
|
provider_email: string;
|
|
227
|
+
attachments: Pick<File, 'title' | 'multimedia_id'>[];
|
|
228
|
+
};
|
|
229
|
+
[IBrokerTopic.undo_provider_order_schedule_email]: {
|
|
230
|
+
provider_id: string;
|
|
231
|
+
ef_dh_id: string;
|
|
232
|
+
ef_pdf_link: string;
|
|
233
|
+
pf_number: string;
|
|
234
|
+
provider_name: string;
|
|
235
|
+
provider_email: string;
|
|
225
236
|
};
|
|
226
237
|
[IBrokerTopic.client_notice_schedule_email]: {
|
|
227
238
|
client_id: 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": "1.
|
|
4
|
+
"version": "1.2.2",
|
|
5
5
|
"author": "Nomalism <it.nomalism@gmail.com> (https://nomalism.com/)",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"type": "module",
|