@nomalism-com/types 0.22.102 → 0.22.104
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.min.js +1 -1
- package/dist/main.d.ts +10 -1
- package/dist/modules/document/materialEntrance/interfaces.d.ts +2 -2
- package/dist/modules/document/order/interfaces.d.ts +1 -6
- package/dist/modules/document/purchase/interfaces.d.ts +1 -3
- package/dist/modules/document/returnToProvider/interface.d.ts +1 -1
- package/dist/modules/integration/emailLog/interfaces.d.ts +1 -0
- package/dist/modules/integration/emailVerification/interfaces.d.ts +23 -0
- package/dist/modules/integration/emailVerification/route.schema.d.ts +5 -0
- package/dist/modules/integration/file/interface.d.ts +11 -3
- package/dist/modules/integration/file/route.schema.d.ts +3 -1
- package/dist/modules/integration/googleSheets/interfaces.d.ts +2 -2
- package/dist/modules/integration/projectInfo/interfaces.d.ts +5 -5
- package/dist/modules/stock/chat/interfaces.d.ts +55 -0
- package/dist/modules/stock/chat/route.schema.d.ts +5 -0
- package/dist/modules/stock/chatToken/interfaces.d.ts +10 -0
- package/dist/modules/stock/prison/interface.d.ts +1 -1
- package/dist/modules/stock/queryList/route.schema.d.ts +3 -3
- package/dist/modules/stock/queryParameter/interfaces.d.ts +1 -0
- package/dist/modules/stock/savedProviderProposal/interfaces.d.ts +3 -3
- package/dist/modules/stock/task/interface.d.ts +53 -0
- package/dist/modules/stock/task/route.schema.d.ts +4 -0
- package/dist/modules/stock/taskMessage/interface.d.ts +14 -0
- package/dist/modules/stock/taskMessage/route.schema.d.ts +3 -0
- package/dist/modules/supply/documentHeader/interfaces.d.ts +22 -17
- package/dist/modules/supply/documentLine/interfaces.d.ts +6 -5
- package/dist/modules/supply/documentLineAssoc/interfaces.d.ts +6 -4
- package/dist/modules/supply/orderManagement/interface.d.ts +4 -7
- package/dist/modules/supply/payment/interface.d.ts +1 -0
- package/dist/modules/user/clients/route.schema.d.ts +1 -1
- package/dist/modules/user/persona/interface.d.ts +6 -7
- package/dist/modules/user/persona/route.schema.d.ts +1 -0
- package/dist/modules/user/purchaseConditions/interface.d.ts +12 -6
- package/dist/modules/user/users/interface.d.ts +1 -3
- package/dist/shared/entities/index.d.ts +5 -0
- package/dist/shared/entities/integration.d.ts +17 -0
- package/dist/shared/entities/stock.d.ts +51 -4
- package/dist/shared/interface.d.ts +28 -1
- package/package.json +7 -7
package/dist/main.d.ts
CHANGED
|
@@ -12,6 +12,9 @@ import * as ClientType from "./modules/user/clientType/interface";
|
|
|
12
12
|
import * as ClientTypeRoutes from "./modules/user/clientType/route.schema";
|
|
13
13
|
import * as ZipCode from "./modules/user/zipCode/interfaces";
|
|
14
14
|
import * as ZipCodeRoutes from "./modules/user/zipCode/route.schema";
|
|
15
|
+
import * as Chat from "./modules/stock/chat/interfaces";
|
|
16
|
+
import * as ChatRoutes from "./modules/stock/chat/route.schema";
|
|
17
|
+
import * as ChatToken from "./modules/stock/chatToken/interfaces";
|
|
15
18
|
import * as Commissioner from "./modules/user/commissioner/interface";
|
|
16
19
|
import * as CommissionerRoutes from "./modules/user/commissioner/route.schema";
|
|
17
20
|
import * as Counter from "./modules/supply/counter/interfaces";
|
|
@@ -174,6 +177,8 @@ import * as Persona from "./modules/user/persona/interface";
|
|
|
174
177
|
import * as PersonaRoutes from "./modules/user/persona/route.schema";
|
|
175
178
|
import * as ProjectInfo from "./modules/integration/projectInfo/interfaces";
|
|
176
179
|
import * as ProjectInfoRoutes from "./modules/integration/projectInfo/route.schema";
|
|
180
|
+
import * as EmailVerification from "./modules/integration/emailVerification/interfaces";
|
|
181
|
+
import * as EmailVerificationRoutes from "./modules/integration/emailVerification/route.schema";
|
|
177
182
|
import * as EmailLog from "./modules/integration/emailLog/interfaces";
|
|
178
183
|
import * as EmailLogRoutes from "./modules/integration/emailLog/route.schema";
|
|
179
184
|
import * as Purchase from "./modules/document/purchase/interfaces";
|
|
@@ -206,4 +211,8 @@ import * as SavedProviderProposal from "./modules/stock/savedProviderProposal/in
|
|
|
206
211
|
import * as SavedProviderProposalRoutes from "./modules/stock/savedProviderProposal/route.schema";
|
|
207
212
|
import * as ProductGoogleSheets from "./modules/stock/productGoogleSheets/interface";
|
|
208
213
|
import * as ProductGoogleSheetsRoutes from "./modules/stock/productGoogleSheets/route.schema";
|
|
209
|
-
|
|
214
|
+
import * as Task from "./modules/stock/task/interface";
|
|
215
|
+
import * as TaskRoutes from "./modules/stock/task/route.schema";
|
|
216
|
+
import * as TaskMessage from "./modules/stock/taskMessage/interface";
|
|
217
|
+
import * as TaskMessageRoutes from "./modules/stock/taskMessage/route.schema";
|
|
218
|
+
export { shared, viewErrors, stockErrors, userErrors, documentManagementErrors, integrationErrors, ZipCode, ZipCodeRoutes, BankData, BankDataRoutes, Client, ClientRoutes, ClientType, ClientTypeRoutes, ClientCurrentAccount, ClientCurrentAccountRoutes, Chat, ChatRoutes, ChatToken, Commissioner, CommissionerRoutes, Counter, CounterRoutes, Country, CountryRoutes, DeliveryMethods, DeliveryMethodsRoutes, DocumentHeader, DocumentHeaderRoutes, DocumentLine, DocumentLineRoutes, DocumentLineAssoc, DocumentLineAssocRoutes, DocumentLineFolder, DocumentLineFolderRoutes, DocumentSet, DocumentSetRoutes, DocumentType, DocumentTypeRoutes, ExternalDocumentType, ExternalDocumentHeader, ExternalDocumentHeaderRoutes, EventHistory, EventHistoryRoutes, Favorites, FavoritesRoutes, Field, File, FileRoutes, GroupPermissions, GroupPermissionsRoutes, GoogleSheets, GoogleSheetsRoutes, Language, LanguageRoutes, Location, LocationRoutes, MaturityDates, MaturityDatesRoutes, Multimedia, MultimediaRoutes, OrderManagement, Observation, ObservationRoutes, ObservationType, ObservationTypeRoutes, Password, PasswordRoutes, Payment, PaymentRoutes, PaymentConditions, PaymentConditionsRoutes, PaymentMethods, PaymentMethodsRoutes, Permissions, PermissionsRoutes, Product, ProductRoutes, ProductImage, ProductImageRoutes, Promotion, PromotionRoutes, PromotionAssoc, PromotionAssocRoutes, Providers, ProvidersRoutes, ProviderType, ProviderTypeRoutes, ProviderCurrentAccount, ProviderCurrentAccountRoutes, PurchaseConditions, PurchaseConditionsRoutes, ReasonForExemption, ReasonForExemptionRoutes, RefreshToken, RefreshTokenRoutes, SegmentsArea, SegmentsAreaRoutes, Sessions, SessionsRoutes, Shippings, ShippingsRoutes, SocialMedia, SocialMediaRoutes, 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, MoloniRequest, MoloniRequestRoutes, StockMovement, StockMovementRoutes, Tenant, TenantRoutes, PreSale, PreSaleRoutes, PreSaleProduct, PreSaleProductRoutes, Cabide, CabideRoutes, CabideProduct, CabideProductRoutes, 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, ErrorHandler, ErrorHandlerRoutes, 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, };
|
|
@@ -14,7 +14,6 @@ export declare const createMaterialEntranceClientOrderOptions: string[];
|
|
|
14
14
|
export interface IGetMaterialEntranceInfoClientOrder {
|
|
15
15
|
ef_dla_id: string;
|
|
16
16
|
ordered_quantity: number;
|
|
17
|
-
pc_owner_id: string;
|
|
18
17
|
pc_dh_id: string;
|
|
19
18
|
pc_dh_number: number;
|
|
20
19
|
pc_virtual_name: string;
|
|
@@ -84,7 +83,8 @@ export interface IUnfinishedPickingLineGroup {
|
|
|
84
83
|
export type IUnfinishedPickingLineGroupExtended = IUnfinishedPickingLineGroup & IGetMaterialEntranceInfoResponse;
|
|
85
84
|
export interface IUnfinishedPickingsResponse extends Pick<DocumentHeader, "id" | "owner_id"> {
|
|
86
85
|
identifier: string;
|
|
87
|
-
|
|
86
|
+
start_document_header_id: string | null;
|
|
87
|
+
order_date: Date;
|
|
88
88
|
lineGroups: IUnfinishedPickingLineGroupExtended[];
|
|
89
89
|
}
|
|
90
90
|
export interface IUndoEntradaDeMaterialRequest {
|
|
@@ -11,6 +11,7 @@ export declare const ConferirEncomendaClienteOptionsEnum: {
|
|
|
11
11
|
"Espera Info Cliente": "Espera Info Cliente";
|
|
12
12
|
"Espera Dev. Catálogo": "Espera Dev. Catálogo";
|
|
13
13
|
"Espera Envio (RM)": "Espera Envio (RM)";
|
|
14
|
+
"Espera Envio (RM com aconselhamento)": "Espera Envio (RM com aconselhamento)";
|
|
14
15
|
"Espera Marcação (RM)": "Espera Marcação (RM)";
|
|
15
16
|
"Espera Folha (RM)": "Espera Folha (RM)";
|
|
16
17
|
"Espera Vendedor Retificar (RM)": "Espera Vendedor Retificar (RM)";
|
|
@@ -20,8 +21,6 @@ export declare const ConferirEncomendaClienteOptionsEnum: {
|
|
|
20
21
|
"Espera Receção (Consulta)": "Espera Receção (Consulta)";
|
|
21
22
|
"Espera Vendedor Retificar (Consulta)": "Espera Vendedor Retificar (Consulta)";
|
|
22
23
|
"Cliente Foi Pensar": "Cliente Foi Pensar";
|
|
23
|
-
"Espera 2º Contacto": "Espera 2º Contacto";
|
|
24
|
-
"Espera 3º Contacto": "Espera 3º Contacto";
|
|
25
24
|
"Espera Atelier": "Espera Atelier";
|
|
26
25
|
"Espera Produção Interna": "Espera Produção Interna";
|
|
27
26
|
"Espera Estofador": "Espera Estofador";
|
|
@@ -72,12 +71,8 @@ export interface IFindRequest {
|
|
|
72
71
|
export type IOrderType = "VA" | "Stock";
|
|
73
72
|
export interface IFindResponse {
|
|
74
73
|
order_type: IOrderType;
|
|
75
|
-
client_id?: string;
|
|
76
74
|
pc_id?: string;
|
|
77
|
-
pc_closed?: boolean;
|
|
78
|
-
provider_id?: string;
|
|
79
75
|
pf_id?: string;
|
|
80
|
-
pf_closed?: boolean;
|
|
81
76
|
document_line_id: string;
|
|
82
77
|
document_line_quantity: number;
|
|
83
78
|
product_id: string;
|
|
@@ -9,7 +9,7 @@ export interface IUnpaidMaterialEntranceLineDetails {
|
|
|
9
9
|
quantity: number;
|
|
10
10
|
notes: DocumentLineNote[];
|
|
11
11
|
pc_name: string | null;
|
|
12
|
-
|
|
12
|
+
pc_id: string | null;
|
|
13
13
|
}
|
|
14
14
|
export interface IUnpaidMaterialEntranceLineResponse {
|
|
15
15
|
group: string;
|
|
@@ -19,10 +19,8 @@ export interface IUnpaidMaterialEntranceLineResponse {
|
|
|
19
19
|
designation: string;
|
|
20
20
|
multimedia_id: string | null;
|
|
21
21
|
provider_ref: string | null;
|
|
22
|
-
pf_owner_id: string;
|
|
23
22
|
pf_id: string;
|
|
24
23
|
ef_name: string;
|
|
25
|
-
pf_closed: boolean;
|
|
26
24
|
quantity: number;
|
|
27
25
|
discount: number;
|
|
28
26
|
provider_purchase_discount: number;
|
|
@@ -21,7 +21,7 @@ export interface IFindLinesToReturnResponse {
|
|
|
21
21
|
updated_by: string | null;
|
|
22
22
|
updated_at: Date;
|
|
23
23
|
}
|
|
24
|
-
export declare const checkLinesToReturnOptions: readonly ["Por tratar", "Levantar", "Enviar email", "Quebrar", "
|
|
24
|
+
export declare const checkLinesToReturnOptions: readonly ["Por tratar", "Levantar", "Enviar email", "Quebrar", "Cancelar devolução", "Fechar"];
|
|
25
25
|
export type ICheckLinesToReturnOptions = (typeof checkLinesToReturnOptions)[number];
|
|
26
26
|
export interface ICheckLinesToReturnLinesRequest {
|
|
27
27
|
document_line_assoc_id: string;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { EmailVerification } from "../../../shared/entities";
|
|
2
|
+
import * as IShared from '../../../shared/interface';
|
|
3
|
+
export type Entity = EmailVerification;
|
|
4
|
+
export declare const Route = "email_verification";
|
|
5
|
+
export declare const UpperName = "EmailVerification";
|
|
6
|
+
export declare const LowerName: string;
|
|
7
|
+
export interface IIsVerifiedRequest {
|
|
8
|
+
email: string;
|
|
9
|
+
}
|
|
10
|
+
export interface ISendVerificationRequest {
|
|
11
|
+
email: string;
|
|
12
|
+
}
|
|
13
|
+
export interface IMarkAsVerifiedRequest {
|
|
14
|
+
email: string;
|
|
15
|
+
token: string;
|
|
16
|
+
}
|
|
17
|
+
export interface IRepository {
|
|
18
|
+
isVerified(selector: IIsVerifiedRequest): Promise<boolean>;
|
|
19
|
+
sendVerificationEmail(data: ISendVerificationRequest): Promise<void>;
|
|
20
|
+
markAsVerified(data: IMarkAsVerifiedRequest): Promise<void>;
|
|
21
|
+
}
|
|
22
|
+
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
23
|
+
export type IApi = IRepository;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import joi from "joi";
|
|
2
|
+
import { IIsVerifiedRequest, ISendVerificationRequest, IMarkAsVerifiedRequest } from "./interfaces";
|
|
3
|
+
export declare const isVerifiedQuery: joi.ObjectSchema<IIsVerifiedRequest>;
|
|
4
|
+
export declare const sendVerificationBody: joi.ObjectSchema<ISendVerificationRequest>;
|
|
5
|
+
export declare const markAsVerifiedBody: joi.ObjectSchema<IMarkAsVerifiedRequest>;
|
|
@@ -1,17 +1,25 @@
|
|
|
1
|
-
import * as IShared from
|
|
2
|
-
import { File } from
|
|
1
|
+
import * as IShared from "../../../shared/interface";
|
|
2
|
+
import { File } from "../../../shared/entities";
|
|
3
3
|
export type Entity = File;
|
|
4
4
|
export declare const Route = "file";
|
|
5
5
|
export declare const UpperName = "File";
|
|
6
6
|
export declare const LowerName: string;
|
|
7
|
+
export interface IFindByOwnerRequest {
|
|
8
|
+
owner_id: string;
|
|
9
|
+
shared_only: boolean;
|
|
10
|
+
}
|
|
7
11
|
export interface ICreateRequest {
|
|
8
12
|
title: string;
|
|
9
13
|
owner_id: string;
|
|
10
14
|
multimedia_id: string;
|
|
11
15
|
filename: string;
|
|
16
|
+
is_customer?: boolean;
|
|
17
|
+
is_private: boolean;
|
|
18
|
+
tags: string;
|
|
19
|
+
username: string;
|
|
12
20
|
}
|
|
13
21
|
export interface IRepository {
|
|
14
|
-
findByOwnerId(params:
|
|
22
|
+
findByOwnerId(params: IFindByOwnerRequest): Promise<Entity[]>;
|
|
15
23
|
create(data: ICreateRequest): Promise<Entity>;
|
|
16
24
|
deleteOne(selector: IShared.IFindByIdRequest): Promise<Entity | null>;
|
|
17
25
|
}
|
|
@@ -20,8 +20,8 @@ export interface ICloneRequest {
|
|
|
20
20
|
export interface ICloneResponse {
|
|
21
21
|
spreadsheetId: string;
|
|
22
22
|
}
|
|
23
|
-
export type IGetProductGroup = "cortinado" | "tapete" | "estore" | "estofo" | "almofada" | "outros" | "calhas&varões" | "papel" | "varoes";
|
|
24
|
-
export type IGetProductType = "confecção" | "calha" | "tecido 1" | "tecido 2" | "
|
|
23
|
+
export type IGetProductGroup = "cortinado" | "tapete" | "estore" | "estofo" | "almofada" | "outros" | "calhas&varões" | "papel" | "varoes" | "terceiros";
|
|
24
|
+
export type IGetProductType = "confecção" | "calha" | "tecido 1" | "tecido 2" | "varoes" | "livre" | "papel";
|
|
25
25
|
export type IReferenceType = "noma" | "sheets" | undefined;
|
|
26
26
|
export interface IGetProduct {
|
|
27
27
|
index: number;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { ProjectInfo } from
|
|
1
|
+
import { ProjectInfo } from "../../../shared/entities";
|
|
2
2
|
export type Entity = ProjectInfo;
|
|
3
3
|
export declare const Route = "project_info";
|
|
4
4
|
export declare const UpperName = "ProjectInfo";
|
|
5
5
|
export declare const LowerName: string;
|
|
6
6
|
export declare const IProjectInfoTypeEnum: {
|
|
7
|
-
particular:
|
|
8
|
-
professional:
|
|
9
|
-
company:
|
|
7
|
+
particular: "particular";
|
|
8
|
+
professional: "professional";
|
|
9
|
+
company: "company";
|
|
10
10
|
};
|
|
11
11
|
export type IProjectInfoType = (typeof IProjectInfoTypeEnum)[keyof typeof IProjectInfoTypeEnum];
|
|
12
12
|
export declare const projectInfoTypes: string[];
|
|
13
|
-
export type ISendEmail = Omit<Entity,
|
|
13
|
+
export type ISendEmail = Omit<Entity, "created_at" | "updated_at" | "document_header_id" | "id">;
|
|
14
14
|
export interface IController {
|
|
15
15
|
sendEmail(data: ISendEmail): Promise<void>;
|
|
16
16
|
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import * as IShared from "../../../shared/interface";
|
|
2
|
+
import { Chat, File, DocumentHeader } from "../../../shared/entities";
|
|
3
|
+
export type Entity = Chat;
|
|
4
|
+
export declare const Route = "chat";
|
|
5
|
+
export declare const UpperName = "Chat";
|
|
6
|
+
export declare const LowerName: string;
|
|
7
|
+
export interface IFindByTokenRequest {
|
|
8
|
+
token: string;
|
|
9
|
+
}
|
|
10
|
+
export interface IChatBalloon {
|
|
11
|
+
chat?: Pick<Entity, "message"> & {
|
|
12
|
+
id?: string;
|
|
13
|
+
};
|
|
14
|
+
file?: Pick<File, "multimedia_id" | "filename"> & {
|
|
15
|
+
id?: string;
|
|
16
|
+
};
|
|
17
|
+
created_at: Date;
|
|
18
|
+
created_by: string;
|
|
19
|
+
is_customer: boolean;
|
|
20
|
+
}
|
|
21
|
+
export interface IFindByTokenResponse {
|
|
22
|
+
documentHeader: Pick<DocumentHeader, "id" | "document_number" | "contact_persona_name" | "contact_persona_email" | "contact_persona_telephone">;
|
|
23
|
+
chat: IChatBalloon[];
|
|
24
|
+
}
|
|
25
|
+
export type IReport = Pick<Entity, "email_processed" | "email_delivered" | "email_opened" | "email_clicked">;
|
|
26
|
+
export interface IFindByOwnerIdResponse {
|
|
27
|
+
last_group_report?: IReport;
|
|
28
|
+
chat: Pick<Entity, "id" | "message" | "created_at" | "created_by" | "is_customer" | "read" | "deleted">[];
|
|
29
|
+
}
|
|
30
|
+
export interface ICreateRequest {
|
|
31
|
+
document_header_id: string;
|
|
32
|
+
message: string;
|
|
33
|
+
username: string;
|
|
34
|
+
is_customer: boolean;
|
|
35
|
+
}
|
|
36
|
+
export interface IUpdateRequest {
|
|
37
|
+
message?: string;
|
|
38
|
+
email_processed?: boolean;
|
|
39
|
+
email_delivered?: boolean;
|
|
40
|
+
email_opened?: boolean;
|
|
41
|
+
email_clicked?: boolean;
|
|
42
|
+
whatsapp_sent?: boolean;
|
|
43
|
+
read?: boolean;
|
|
44
|
+
username?: string;
|
|
45
|
+
}
|
|
46
|
+
export interface IRepository {
|
|
47
|
+
findByToken(query: IFindByTokenRequest): Promise<IFindByTokenResponse>;
|
|
48
|
+
findByOwnerId(params: IShared.IFindByOwnerIdRequest): Promise<IFindByOwnerIdResponse>;
|
|
49
|
+
create(data: ICreateRequest): Promise<Chat>;
|
|
50
|
+
update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<void>;
|
|
51
|
+
deleteOne(selector: IShared.IFindByIdRequest): Promise<void>;
|
|
52
|
+
markAllAsRead(params: IShared.IFindByOwnerIdRequest): Promise<void>;
|
|
53
|
+
markAllAsUnread(params: IShared.IFindByOwnerIdRequest): Promise<void>;
|
|
54
|
+
}
|
|
55
|
+
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import joi from "joi";
|
|
2
|
+
import { IFindByTokenRequest } from "./interfaces";
|
|
3
|
+
export declare const createBody: joi.ObjectSchema<any>;
|
|
4
|
+
export declare const updateBody: joi.ObjectSchema<any>;
|
|
5
|
+
export declare const findByTokenQuery: joi.ObjectSchema<IFindByTokenRequest>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as IShared from "../../../shared/interface";
|
|
2
|
+
import { ChatToken } from "../../../shared/entities";
|
|
3
|
+
export type Entity = ChatToken;
|
|
4
|
+
export declare const Route = "chat_token";
|
|
5
|
+
export declare const UpperName = "ChatToken";
|
|
6
|
+
export declare const LowerName: string;
|
|
7
|
+
export interface IRepository {
|
|
8
|
+
isActive(params: IShared.IFindByIdRequest): Promise<boolean>;
|
|
9
|
+
}
|
|
10
|
+
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -20,7 +20,7 @@ export interface IFindLinesInPrisonResponse {
|
|
|
20
20
|
updated_by: string;
|
|
21
21
|
updated_at: Date;
|
|
22
22
|
}
|
|
23
|
-
export declare const checkLineInPrisonOptions: readonly ["Por confirmar", "
|
|
23
|
+
export declare const checkLineInPrisonOptions: readonly ["Por confirmar", "Desprender", "Quebrar", "Devolver a fornecedor"];
|
|
24
24
|
export type ICheckLineInPrisonOptions = (typeof checkLineInPrisonOptions)[number];
|
|
25
25
|
export interface ICheckLinesInPrisonLinesRequest {
|
|
26
26
|
id_provider: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import joi from
|
|
2
|
-
import * as IShared from
|
|
3
|
-
import { IExecuteRequest } from
|
|
1
|
+
import joi from "joi";
|
|
2
|
+
import * as IShared from "../../../shared/interface";
|
|
3
|
+
import { IExecuteRequest } from "./interfaces";
|
|
4
4
|
export declare const createBody: joi.ObjectSchema<any>;
|
|
5
5
|
export declare const updateBody: joi.ObjectSchema<any>;
|
|
6
6
|
export declare const executeBodyKeys: IShared.IRouteRequest<IExecuteRequest>;
|
|
@@ -14,6 +14,7 @@ export declare const QueryParameterDatatypeEnum: {
|
|
|
14
14
|
idnr: "idnr";
|
|
15
15
|
link: "link";
|
|
16
16
|
user: "user";
|
|
17
|
+
hidden: "hidden";
|
|
17
18
|
};
|
|
18
19
|
export type IQueryParameterDatatype = (typeof QueryParameterDatatypeEnum)[keyof typeof QueryParameterDatatypeEnum];
|
|
19
20
|
export declare const queryParametersDatatypes: string[];
|
|
@@ -16,8 +16,8 @@ export interface IFindManyResponse {
|
|
|
16
16
|
export type IUpdateRequest = Omit<ICreateRequest, 'provider_id' | 'product_id'>;
|
|
17
17
|
export interface IRepository {
|
|
18
18
|
findByProviderId(selector: IShared.IFindByIdRequest): Promise<IFindManyResponse[]>;
|
|
19
|
-
create(data: ICreateRequest): Promise<
|
|
20
|
-
update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<
|
|
21
|
-
deleteOne(selector: IShared.IFindByIdRequest): Promise<
|
|
19
|
+
create(data: ICreateRequest): Promise<void>;
|
|
20
|
+
update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<void>;
|
|
21
|
+
deleteOne(selector: IShared.IFindByIdRequest): Promise<void>;
|
|
22
22
|
}
|
|
23
23
|
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import * as IShared from "../../../shared/interface";
|
|
2
|
+
import { Task, TaskMessage } from "../../../shared/entities";
|
|
3
|
+
export type Entity = Task;
|
|
4
|
+
export declare const Route = "task";
|
|
5
|
+
export declare const UpperName = "Task";
|
|
6
|
+
export declare const LowerName: string;
|
|
7
|
+
export type ICreateRequest = {
|
|
8
|
+
task: string;
|
|
9
|
+
};
|
|
10
|
+
export type IUpdateRequest = {
|
|
11
|
+
from?: string;
|
|
12
|
+
to?: string;
|
|
13
|
+
task?: string;
|
|
14
|
+
read?: boolean;
|
|
15
|
+
finished?: boolean;
|
|
16
|
+
archived?: boolean;
|
|
17
|
+
};
|
|
18
|
+
export declare const IHistoryStatusDataTypeEnum: {
|
|
19
|
+
created_task: "created_task";
|
|
20
|
+
updated_task: "updated_task";
|
|
21
|
+
created_message: "created_message";
|
|
22
|
+
updated_message: "updated_message";
|
|
23
|
+
deleted_message: "deleted_message";
|
|
24
|
+
};
|
|
25
|
+
export type IHistoryStatusDataType = (typeof IHistoryStatusDataTypeEnum)[keyof typeof IHistoryStatusDataTypeEnum];
|
|
26
|
+
export declare const historyStatusDataType: string[];
|
|
27
|
+
export interface ITaskHistoryData {
|
|
28
|
+
status: IHistoryStatusDataType | null;
|
|
29
|
+
data: string;
|
|
30
|
+
changedAt: Date;
|
|
31
|
+
changedBy: string;
|
|
32
|
+
}
|
|
33
|
+
export interface ITaskHistoryResponse {
|
|
34
|
+
status: IHistoryStatusDataType | null;
|
|
35
|
+
data: string;
|
|
36
|
+
changedAt: Date;
|
|
37
|
+
changedBy: string;
|
|
38
|
+
}
|
|
39
|
+
export type IFindResponse = Omit<Entity, "history">;
|
|
40
|
+
export interface IFindWithMessagesResponse extends Entity {
|
|
41
|
+
messages: TaskMessage[];
|
|
42
|
+
}
|
|
43
|
+
export type IFindTasksRequest = {
|
|
44
|
+
archived?: boolean;
|
|
45
|
+
};
|
|
46
|
+
export interface IRepository {
|
|
47
|
+
find(selector: IFindTasksRequest): Promise<IFindResponse[]>;
|
|
48
|
+
findWithMessages(id: IShared.IFindByIdRequest): Promise<IFindWithMessagesResponse>;
|
|
49
|
+
create(data: ICreateRequest): Promise<Entity>;
|
|
50
|
+
update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<void>;
|
|
51
|
+
delete(selector: IShared.IFindByIdRequest): Promise<void>;
|
|
52
|
+
}
|
|
53
|
+
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as IShared from "../../../shared/interface";
|
|
2
|
+
import { TaskMessage } from "../../../shared/entities";
|
|
3
|
+
export type Entity = TaskMessage;
|
|
4
|
+
export declare const Route = "task_message";
|
|
5
|
+
export declare const UpperName = "TaskMessage";
|
|
6
|
+
export declare const LowerName: string;
|
|
7
|
+
export type ICreateRequest = Pick<Entity, "message" | "task_id">;
|
|
8
|
+
export type IUpdateRequest = Pick<Entity, "message" | "task_id">;
|
|
9
|
+
export interface IRepository {
|
|
10
|
+
create(data: ICreateRequest): Promise<Entity>;
|
|
11
|
+
update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<void>;
|
|
12
|
+
delete(selector: IShared.IFindByIdRequest): Promise<void>;
|
|
13
|
+
}
|
|
14
|
+
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as IShared from "../../../shared/interface";
|
|
2
|
-
import { DocumentHeader, DocumentHeaderClientVirtuals, DocumentHeaderProviderVirtuals, DocumentHeaderVirtuals, DocumentHeaderBaseVirtuals, DocumentType, StartDocumentHeaderVirtuals, DocumentHeaderClientPaymentVirtuals, DocumentLineNote } from "../../../shared/entities";
|
|
2
|
+
import { DocumentHeader, DocumentHeaderClientVirtuals, DocumentHeaderProviderVirtuals, DocumentHeaderVirtuals, DocumentHeaderBaseVirtuals, DocumentType, StartDocumentHeaderVirtuals, DocumentHeaderClientPaymentVirtuals, DocumentLineNote, ChatToken } from "../../../shared/entities";
|
|
3
3
|
import * as IDocumentType from "../documentType/interfaces";
|
|
4
4
|
import * as IPayment from "../payment/interface";
|
|
5
5
|
export type Entity = Omit<DocumentHeader, "external_data">;
|
|
@@ -12,20 +12,15 @@ export type IDocumentHeaderClientVirtuals = DocumentHeaderClientVirtuals;
|
|
|
12
12
|
export type IDocumentHeaderProviderVirtuals = DocumentHeaderProviderVirtuals;
|
|
13
13
|
export type IStartDocumentHeaderVirtuals = StartDocumentHeaderVirtuals;
|
|
14
14
|
export type IDocumentHeaderClientPaymentVirtuals = DocumentHeaderClientPaymentVirtuals;
|
|
15
|
-
interface IFindOneBase extends Omit<Entity, "external_data"> {
|
|
15
|
+
export interface IFindOneBase extends Omit<Entity, "external_data"> {
|
|
16
16
|
document_type: IDocumentType.IEntityExtended;
|
|
17
17
|
}
|
|
18
|
+
export interface IFindOneStartResponse extends IFindOneBase {
|
|
19
|
+
chat_token: Pick<ChatToken, "active">;
|
|
20
|
+
}
|
|
18
21
|
export interface IFindOneResponse extends IFindOneBase {
|
|
19
22
|
base_virtual: IDocumentHeaderBaseVirtuals | null;
|
|
20
23
|
}
|
|
21
|
-
export interface IFindStartResponse extends IFindOneBase {
|
|
22
|
-
start_virtual: StartDocumentHeaderVirtuals | null;
|
|
23
|
-
last_google_sheet_import: {
|
|
24
|
-
done: boolean;
|
|
25
|
-
error: string | null;
|
|
26
|
-
} | null;
|
|
27
|
-
client_balance?: number | null;
|
|
28
|
-
}
|
|
29
24
|
export interface IFindByDocumentLineStateRequest {
|
|
30
25
|
document_type_id: 100 | 116;
|
|
31
26
|
document_line_state: string;
|
|
@@ -38,8 +33,8 @@ export interface IFindByDocumentLineStateResponse {
|
|
|
38
33
|
created_by: string;
|
|
39
34
|
who_handles: string | null;
|
|
40
35
|
tags: string | null;
|
|
41
|
-
url: string;
|
|
42
36
|
upfront_total: number;
|
|
37
|
+
unread: boolean;
|
|
43
38
|
}
|
|
44
39
|
export interface IBasicSearchRequest extends IShared.IPaginationRequest {
|
|
45
40
|
search_value: string | null;
|
|
@@ -51,7 +46,8 @@ export interface IBasicSearchResponse {
|
|
|
51
46
|
name: string | null;
|
|
52
47
|
user_number: number;
|
|
53
48
|
document_line_count: number;
|
|
54
|
-
|
|
49
|
+
document_header_id: string | null;
|
|
50
|
+
start_document_header_id: string | null;
|
|
55
51
|
pdf_link: string | null;
|
|
56
52
|
updated_at: Date;
|
|
57
53
|
}
|
|
@@ -211,6 +207,7 @@ export interface IUpdateRequest {
|
|
|
211
207
|
tags?: string | null;
|
|
212
208
|
warning?: IWarningType;
|
|
213
209
|
created_by?: string;
|
|
210
|
+
chat_token_active?: boolean;
|
|
214
211
|
}
|
|
215
212
|
export interface IGetActionsResponse {
|
|
216
213
|
document_type: DocumentType;
|
|
@@ -303,12 +300,18 @@ export interface ITransferOwnershipRequest {
|
|
|
303
300
|
document_header_id: string;
|
|
304
301
|
client_id: string;
|
|
305
302
|
}
|
|
306
|
-
export
|
|
303
|
+
export interface IFindResponse {
|
|
304
|
+
document_header_id: string;
|
|
305
|
+
document_number: number;
|
|
307
306
|
legacy_id: string | null;
|
|
308
307
|
total: number;
|
|
309
308
|
emission_date: string;
|
|
310
309
|
line_count: number;
|
|
311
|
-
|
|
310
|
+
tags: string;
|
|
311
|
+
is_void: boolean;
|
|
312
|
+
is_archived: boolean;
|
|
313
|
+
adjudicado: boolean;
|
|
314
|
+
}
|
|
312
315
|
export type IUpdateManyWithPersona = {
|
|
313
316
|
id: string;
|
|
314
317
|
name: string | null;
|
|
@@ -369,6 +372,7 @@ export interface IDocumentListResponse {
|
|
|
369
372
|
stock_in: boolean;
|
|
370
373
|
stock_out: boolean;
|
|
371
374
|
cativado: boolean;
|
|
375
|
+
client_upfront: boolean;
|
|
372
376
|
}
|
|
373
377
|
export interface IProviderProposalData {
|
|
374
378
|
product_id: string;
|
|
@@ -415,7 +419,8 @@ export interface ICreateProForma {
|
|
|
415
419
|
}
|
|
416
420
|
export interface IRepository {
|
|
417
421
|
findOne(selector: IShared.IFindByIdRequest): Promise<IFindOneResponse | null>;
|
|
418
|
-
findStart(selector: IShared.IFindByIdRequest): Promise<
|
|
422
|
+
findStart(selector: IShared.IFindByIdRequest): Promise<IFindOneStartResponse | null>;
|
|
423
|
+
findStartVirtual(selector: IShared.IFindByIdRequest): Promise<IStartDocumentHeaderVirtuals | null>;
|
|
419
424
|
findByDocumentLineState(params: IFindByDocumentLineStateRequest): Promise<IFindByDocumentLineStateResponse[]>;
|
|
420
425
|
findByType(params: IFindByTypeRequest): Promise<IFindByTypeResponse[]>;
|
|
421
426
|
findByBasicSearch(data: IBasicSearchRequest): Promise<IShared.IPaginationResponse<IBasicSearchResponse>>;
|
|
@@ -438,7 +443,6 @@ export interface IRepository {
|
|
|
438
443
|
transferClientOwnership(params: ITransferOwnershipRequest): Promise<void>;
|
|
439
444
|
deleteOne(selector: IShared.IFindByIdRequest): Promise<void>;
|
|
440
445
|
sendClientNotification(selector: IShared.IFindByIdRequest, data: ISendClientNotificationRequest): Promise<void>;
|
|
441
|
-
markAsSentClientNotification(selector: IShared.IFindByIdRequest): Promise<void>;
|
|
442
446
|
markUnsentClientNotification(selector: IShared.IFindByIdRequest): Promise<void>;
|
|
443
447
|
documentPdf(selector: IShared.IFindByIdRequest, data: IDocumentPdfRequest): Promise<string>;
|
|
444
448
|
documentList(selector: IShared.IFindByIdRequest, params: IDocumentListRequest): Promise<IDocumentListResponse[]>;
|
|
@@ -446,12 +450,13 @@ export interface IRepository {
|
|
|
446
450
|
createBillOfLading(data: ICreateBillOfLadingRequest): Promise<ICreateBillOfLadingResponse>;
|
|
447
451
|
getAllRelatedDocumentHeaderIds(params: IShared.IFindByIdRequest): Promise<string[]>;
|
|
448
452
|
createProForma(params: ICreateProForma): Promise<ICreateFromHeaderResponse>;
|
|
453
|
+
findSideMenuStoreOperators(): Promise<string[]>;
|
|
449
454
|
}
|
|
450
455
|
export type IApi = Omit<IRepository, "createFromHeader" | "createProductionOrder" | "createBillOfLading" | "createProForma"> & {
|
|
451
456
|
createFromHeader(data: ICreateFromHeaderRequest): Promise<IShared.ITaskCluster[]>;
|
|
452
457
|
createProductionOrder(data: ICreateProductionOrderRequest): Promise<void>;
|
|
453
458
|
createBillOfLading(data: ICreateBillOfLadingRequest): Promise<IShared.ITaskCluster[]>;
|
|
454
459
|
createProForma(params: ICreateProForma): Promise<IShared.ITaskCluster[]>;
|
|
460
|
+
findSideMenuStoreOperators(): Promise<string[]>;
|
|
455
461
|
};
|
|
456
462
|
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
457
|
-
export {};
|
|
@@ -9,7 +9,7 @@ export declare const LowerName: string;
|
|
|
9
9
|
export type IDocumentLineVirtuals = DocumentLineVirtuals;
|
|
10
10
|
export type IDocumentLineBaseVirtuals = DocumentLineBaseVirtuals;
|
|
11
11
|
export type IPromotions = Pick<ProductPromotionVirtuals, "exclusive_to_location_id" | "exclusive_to_client_id" | "discount">;
|
|
12
|
-
export type IDataKeys = "Encomendar" | "Quantidade Encomendada Originalmente" | "Linha criada na EM" | "Entrada de Material" | "Opcao EM" | "Levantar DF" | "Enviar Email NCF" | "DF Rejeitada" | "Fechar DF" | "Documento pago" | "Fatura Devolvida" | "Devolucao Cliente" | "Recibo do documento" | "Cancelar" | "OriginalProductId" | "imported_from_sheets" | "sheets_line_position" | "Emitir" | "Backup PDF" | "Conferir" | "Conferir Encomenda" | "Continuar" | "Saldos Migrados" | "Estado PHC" | "Pagamento" | "PHC origin_id" | "PHC ef_stamp";
|
|
12
|
+
export type IDataKeys = "AvisoCliente" | "Encomendar" | "Quantidade Encomendada Originalmente" | "Linha criada na EM" | "Entrada de Material" | "Opcao EM" | "Levantar DF" | "Enviar Email NCF" | "DF Rejeitada" | "Fechar DF" | "Documento pago" | "Fatura Devolvida" | "Devolucao Cliente" | "Recibo do documento" | "Cancelar" | "OriginalProductId" | "imported_from_sheets" | "sheets_line_position" | "Emitir" | "Backup PDF" | "Conferir" | "Conferir Encomenda" | "Continuar" | "Saldos Migrados" | "Estado PHC" | "Pagamento" | "PHC origin_id" | "PHC ef_stamp";
|
|
13
13
|
export interface IDataPayload {
|
|
14
14
|
value: unknown;
|
|
15
15
|
updated_at: Date;
|
|
@@ -36,7 +36,7 @@ export interface IDataPagamento {
|
|
|
36
36
|
export interface IDocumentLineDocuments {
|
|
37
37
|
code: IDocumentTypeCodeType;
|
|
38
38
|
user_type: IDocumentTypeUserType;
|
|
39
|
-
|
|
39
|
+
start_document_header_id: string | null;
|
|
40
40
|
pdf_link: string | null;
|
|
41
41
|
}
|
|
42
42
|
export interface IHistory {
|
|
@@ -45,8 +45,8 @@ export interface IHistory {
|
|
|
45
45
|
who: string;
|
|
46
46
|
}
|
|
47
47
|
export interface IEntityExtended extends Omit<DocumentLine, "data"> {
|
|
48
|
+
group: string;
|
|
48
49
|
data: IHistory[];
|
|
49
|
-
virtual: IDocumentLineVirtuals | null;
|
|
50
50
|
document_headers: IDocumentLineDocuments[];
|
|
51
51
|
document_line_folder: DocumentLineFolder | null;
|
|
52
52
|
pending_conflict: DocumentLinePendingConflict | null;
|
|
@@ -103,11 +103,12 @@ export interface IUpdateDataRequestWithoutStamps extends Omit<IUpdateDataRequest
|
|
|
103
103
|
}
|
|
104
104
|
export interface IFindByDocumentLineStateRequest {
|
|
105
105
|
document_type_id: number;
|
|
106
|
-
search_value
|
|
106
|
+
search_value?: string | null;
|
|
107
107
|
}
|
|
108
108
|
export interface IFindByDocumentLineStateResponse {
|
|
109
109
|
name: string;
|
|
110
110
|
count: number;
|
|
111
|
+
unread: boolean;
|
|
111
112
|
}
|
|
112
113
|
export interface IUpdateLineStatesTriggerResponse {
|
|
113
114
|
document_header_id: string;
|
|
@@ -122,7 +123,7 @@ export interface IPrintLabelQueryRequest {
|
|
|
122
123
|
}
|
|
123
124
|
export interface IRepository {
|
|
124
125
|
findByState(data: IFindByDocumentLineStateRequest): Promise<IFindByDocumentLineStateResponse[]>;
|
|
125
|
-
create(data: ICreateRequest[]): Promise<IDocumentLineAssoc.
|
|
126
|
+
create(data: ICreateRequest[]): Promise<IDocumentLineAssoc.IEntityExtended[]>;
|
|
126
127
|
update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<void>;
|
|
127
128
|
updateData(data: IUpdateDataRequest): Promise<IUpdateLineStatesTriggerResponse>;
|
|
128
129
|
updateMany(data: IUpdateManyRequest): Promise<void>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import * as IShared from
|
|
2
|
-
import { DocumentLineAssoc, DocumentLine } from
|
|
3
|
-
import * as IDocumentLine from
|
|
1
|
+
import * as IShared from "../../../shared/interface";
|
|
2
|
+
import { DocumentLineAssoc, DocumentLine } from "../../../shared/entities";
|
|
3
|
+
import * as IDocumentLine from "../documentLine/interfaces";
|
|
4
|
+
import { IDocumentLineVirtuals } from "../documentLine/interfaces";
|
|
4
5
|
export type Entity = DocumentLineAssoc;
|
|
5
6
|
export declare const Route = "documentLineAssoc";
|
|
6
7
|
export declare const UpperName = "DocumentLineAssoc";
|
|
@@ -25,8 +26,9 @@ export interface IUpdateGroupRequest {
|
|
|
25
26
|
export interface IRepository {
|
|
26
27
|
findById(selector: IShared.IFindByIdRequest): Promise<Entity | null>;
|
|
27
28
|
findByOwnerId(data: IShared.IFindByOwnerIdRequest): Promise<IEntityExtended[]>;
|
|
29
|
+
findVirtualsByOwnerId(data: IShared.IFindByOwnerIdRequest): Promise<IDocumentLineVirtuals[]>;
|
|
28
30
|
create(data: ICreateRequest[]): Promise<IEntityWithDocumentLine[]>;
|
|
29
31
|
update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<IEntityWithDocumentLine>;
|
|
30
32
|
}
|
|
31
|
-
export type IApi = Omit<IRepository,
|
|
33
|
+
export type IApi = Omit<IRepository, "findById">;
|
|
32
34
|
export type IController = IShared.IEntityWithUserToken<IRepository>;
|