@nomalism-com/types 1.3.34 → 1.3.36
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 +843 -789
- package/dist/main.d.ts +6 -2
- package/dist/modules/document/order/interfaces.d.ts +9 -0
- package/dist/modules/integration/emailTemplate/interfaces.d.ts +7 -0
- package/dist/modules/integration/emailTemplate/route.schema.d.ts +2 -0
- package/dist/modules/llm/llm/interfaces.d.ts +9 -0
- package/dist/modules/llm/llm/route.schema.d.ts +2 -0
- package/dist/modules/stock/chat/interfaces.d.ts +10 -21
- package/dist/modules/stock/chat/route.schema.d.ts +2 -0
- package/dist/modules/stock/googleCalendar/interface.d.ts +8 -0
- package/dist/modules/supply/documentHeader/interfaces.d.ts +3 -0
- package/dist/modules/supply/documentHeaderSubscriber/interface.d.ts +19 -0
- package/dist/modules/supply/documentHeaderSubscriber/route.schema.d.ts +2 -0
- package/dist/modules/supply/documentHeaderSurvey/interfaces.d.ts +16 -0
- package/dist/modules/supply/documentHeaderSurvey/route.schema.d.ts +3 -0
- package/dist/modules/supply/documentLine/interfaces.d.ts +11 -24
- package/dist/modules/supply/documentLine/route.schema.d.ts +0 -1
- package/dist/modules/supply/documentLineAssoc/interfaces.d.ts +1 -18
- package/dist/modules/supply/documentLineMT/interface.d.ts +0 -1
- package/dist/modules/supply/documentLineRM/interface.d.ts +0 -1
- package/dist/modules/supply/externalDocumentHeader/interface.d.ts +3 -16
- package/dist/modules/supply/externalDocumentHeader/route.schema.d.ts +0 -3
- package/dist/modules/ui/portal/interface.d.ts +25 -14
- package/dist/modules/ui/portal/route.schema.d.ts +0 -1
- package/dist/modules/ui/sideMenu/interface.d.ts +1 -0
- package/dist/modules/user/chatSubscribers/interfaces.d.ts +13 -15
- package/dist/modules/user/chatSubscribers/route.schema.d.ts +2 -1
- package/dist/modules/user/language/interface.d.ts +3 -0
- package/dist/modules/user/persona/interface.d.ts +6 -0
- package/dist/modules/user/persona/route.schema.d.ts +1 -0
- package/dist/modules/user/providers/interface.d.ts +1 -1
- package/dist/modules/user/sessions/interface.d.ts +1 -0
- package/dist/modules/view/errorLog/interfaces.d.ts +4 -0
- package/dist/shared/entities/stock.d.ts +66 -11
- package/dist/shared/entities/user.d.ts +4 -3
- package/dist/shared/interface.d.ts +24 -14
- package/package.json +8 -8
- package/dist/modules/supply/documentLineAssoc/route.schema.d.ts +0 -3
package/dist/main.d.ts
CHANGED
|
@@ -40,7 +40,6 @@ import * as ProviderServiceInvoiceRoutes from './modules/document/providerServic
|
|
|
40
40
|
import * as DocumentLine from './modules/supply/documentLine/interfaces';
|
|
41
41
|
import * as DocumentLineRoutes from './modules/supply/documentLine/route.schema';
|
|
42
42
|
import * as DocumentLineAssoc from './modules/supply/documentLineAssoc/interfaces';
|
|
43
|
-
import * as DocumentLineAssocRoutes from './modules/supply/documentLineAssoc/route.schema';
|
|
44
43
|
import * as DocumentSet from './modules/supply/documentSet/interface';
|
|
45
44
|
import * as DocumentSetRoutes from './modules/supply/documentSet/route.schema';
|
|
46
45
|
import * as DocumentType from './modules/supply/documentType/interfaces';
|
|
@@ -238,4 +237,9 @@ import * as LLM from './modules/llm/llm/interfaces';
|
|
|
238
237
|
import * as LLMRoutes from './modules/llm/llm/route.schema';
|
|
239
238
|
import * as PatchNotes from './modules/integration/patchNotes/interfaces';
|
|
240
239
|
import * as ConferirEncomenda from './modules/stock/conferirEncomenda/interface';
|
|
241
|
-
|
|
240
|
+
import * as DocumentHeaderSurvey from './modules/supply/documentHeaderSurvey/interfaces';
|
|
241
|
+
import * as DocumentHeaderSurveyRoutes from './modules/supply/documentHeaderSurvey/route.schema';
|
|
242
|
+
import * as DocumentHeaderSubscriber from './modules/supply/documentHeaderSubscriber/interface';
|
|
243
|
+
import * as DocumentHeaderSubscriberRoutes from './modules/supply/documentHeaderSubscriber/route.schema';
|
|
244
|
+
import * as GoogleCalendar from './modules/stock/googleCalendar/interface';
|
|
245
|
+
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, DocumentSet, DocumentSetRoutes, DocumentType, DocumentTypeRoutes, ExternalDocumentType, ExternalDocumentHeader, ExternalDocumentHeaderRoutes, Favorites, FavoritesRoutes, File, FileRoutes, GoogleSheets, GoogleSheetsRoutes, Language, LanguageRoutes, Location, LocationRoutes, MaturityDates, MaturityDatesRoutes, Multimedia, MultimediaRoutes, OrderManagement, Observation, ObservationRoutes, ObservationType, ObservationTypeRoutes, Password, PasswordRoutes, Payment, PaymentRoutes, PaymentMethods, PaymentMethodsRoutes, 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, 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, Gmails, NPF, NPFRoutes, NRCL, NRCLRoutes, CurrentAccount, CurrentAccountRoutes, PaymentBatch, PaymentBatchRoutes, Portal, PortalRoutes, GoogleSheetPool, AccountCode, AccountCodeRoutes, LLM, LLMRoutes, PatchNotes, ConferirEncomenda, DocumentHeaderSurvey, DocumentHeaderSurveyRoutes, DocumentHeaderSubscriber, DocumentHeaderSubscriberRoutes, GoogleCalendar, };
|
|
@@ -66,6 +66,13 @@ export interface IFindResponse {
|
|
|
66
66
|
export interface IFindByIdsRequest {
|
|
67
67
|
ids: string[];
|
|
68
68
|
}
|
|
69
|
+
export interface IPreviewChange {
|
|
70
|
+
document_line_id: string;
|
|
71
|
+
quantity: number;
|
|
72
|
+
}
|
|
73
|
+
export interface IPreviewResponse {
|
|
74
|
+
changes: IPreviewChange[];
|
|
75
|
+
}
|
|
69
76
|
export interface IRepository {
|
|
70
77
|
conferirEncomendaCliente(data: IConferirEncomendaClienteRequest): Promise<IConferirEncomendaClienteResponse[]>;
|
|
71
78
|
setProvider(data: ISetProviderRequest): Promise<void>;
|
|
@@ -74,5 +81,7 @@ export interface IRepository {
|
|
|
74
81
|
undoProviderOrder(data: IUndoProviderOrderRequest): Promise<void>;
|
|
75
82
|
unsetCativado(data: IUnsetCativado): Promise<void>;
|
|
76
83
|
find(params: IFindRequest): Promise<IFindResponse[]>;
|
|
84
|
+
previewRegroupLinesInProviderOrder(params: IShared.IFindByIdRequest): Promise<IPreviewResponse>;
|
|
85
|
+
regroupLinesInProviderOrder(params: IShared.IFindByIdRequest): Promise<void>;
|
|
77
86
|
}
|
|
78
87
|
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -32,12 +32,19 @@ export interface ISendRequest {
|
|
|
32
32
|
html: string;
|
|
33
33
|
attachments: IEmailAttachment[];
|
|
34
34
|
}
|
|
35
|
+
export interface EmailPreviewRequest {
|
|
36
|
+
body: string;
|
|
37
|
+
}
|
|
38
|
+
export interface EmailPreviewResponse {
|
|
39
|
+
html: string;
|
|
40
|
+
}
|
|
35
41
|
export interface IRepository {
|
|
36
42
|
find(): Promise<IEntityExtended[]>;
|
|
37
43
|
create(data: ICreateRequest): Promise<string>;
|
|
38
44
|
update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<void>;
|
|
39
45
|
deleteOne(selector: IShared.IFindByIdRequest): Promise<void>;
|
|
40
46
|
send(data: ISendRequest): Promise<void>;
|
|
47
|
+
preview(selector: IShared.IFindByIdRequest, data: EmailPreviewRequest): Promise<EmailPreviewResponse>;
|
|
41
48
|
}
|
|
42
49
|
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
43
50
|
export type IApi = IRepository;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import joi from 'joi';
|
|
2
|
+
import { EmailPreviewRequest } from './interfaces';
|
|
2
3
|
export declare const createBody: joi.ObjectSchema<any>;
|
|
3
4
|
export declare const updateBody: joi.ObjectSchema<any>;
|
|
4
5
|
export declare const sendBody: joi.ObjectSchema<any>;
|
|
6
|
+
export declare const previewBody: joi.ObjectSchema<EmailPreviewRequest>;
|
|
@@ -13,7 +13,16 @@ export interface IPromptResponse {
|
|
|
13
13
|
export interface IPromptAbortController {
|
|
14
14
|
abort(): void;
|
|
15
15
|
}
|
|
16
|
+
export interface ITranslateRequest {
|
|
17
|
+
message: string;
|
|
18
|
+
target_language: string;
|
|
19
|
+
}
|
|
20
|
+
export interface IIdentifyLanguageRequest {
|
|
21
|
+
message: string;
|
|
22
|
+
}
|
|
16
23
|
export interface IRepository {
|
|
17
24
|
prompt: (data: IPromptRequest, response: IPromptResponse) => IPromptAbortController;
|
|
25
|
+
translate(data: ITranslateRequest): Promise<string>;
|
|
26
|
+
identifyLanguage(data: IIdentifyLanguageRequest): Promise<string>;
|
|
18
27
|
}
|
|
19
28
|
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type * as IShared from '../../../shared/interface';
|
|
2
|
-
import type * as ChatSubscriber from '../../user/chatSubscribers/interfaces';
|
|
3
2
|
import { Chat, File } from '../../../shared/entities/stock';
|
|
4
3
|
export type Entity = Chat;
|
|
5
4
|
export declare const Route = "chat";
|
|
@@ -10,6 +9,8 @@ export interface IChatBalloon {
|
|
|
10
9
|
id?: string;
|
|
11
10
|
read?: boolean;
|
|
12
11
|
client_read?: boolean;
|
|
12
|
+
translation?: string;
|
|
13
|
+
lang?: string;
|
|
13
14
|
};
|
|
14
15
|
file?: Pick<File, 'multimedia_id' | 'filename'> & {
|
|
15
16
|
id?: string;
|
|
@@ -26,22 +27,6 @@ export interface IFindActiveByOwnerIdResponse {
|
|
|
26
27
|
chat: IChatBalloon[];
|
|
27
28
|
last_group_report?: IReport;
|
|
28
29
|
}
|
|
29
|
-
export interface IPublicFindBySubscriberId {
|
|
30
|
-
owner_id: string;
|
|
31
|
-
chat_document_header_id: string;
|
|
32
|
-
chat: IChatBalloon[];
|
|
33
|
-
persona: ChatSubscriber.IFindChatSubscriberPersona;
|
|
34
|
-
store_operator_name: string;
|
|
35
|
-
document_total: number;
|
|
36
|
-
}
|
|
37
|
-
export interface IPublicClientWebAppFindActiveByOwnerIdResponse {
|
|
38
|
-
owner_id: string;
|
|
39
|
-
user_type: 'client' | 'provider';
|
|
40
|
-
chat: IChatBalloon[];
|
|
41
|
-
personas: ChatSubscriber.IFindChatSubscriberPersona[];
|
|
42
|
-
store_operator_name: string;
|
|
43
|
-
document_total: number;
|
|
44
|
-
}
|
|
45
30
|
export interface ICreateRequest {
|
|
46
31
|
chat_document_header_id: string;
|
|
47
32
|
message: string;
|
|
@@ -63,16 +48,20 @@ export interface IMarkAllClientReadUnreadRequest {
|
|
|
63
48
|
chat_document_header_id: string;
|
|
64
49
|
client_read: boolean;
|
|
65
50
|
}
|
|
51
|
+
export interface ITranslateRequest {
|
|
52
|
+
chat_id: string;
|
|
53
|
+
target_language_id: string;
|
|
54
|
+
message: string;
|
|
55
|
+
}
|
|
66
56
|
export interface IRepository {
|
|
67
|
-
|
|
68
|
-
clientWebAppFindActiveByOwnerId(params: IShared.IFindByIdRequest): Promise<IPublicClientWebAppFindActiveByOwnerIdResponse>;
|
|
69
|
-
findActiveBySubscriberId(params: IShared.IFindByIdRequest): Promise<IPublicFindBySubscriberId>;
|
|
70
|
-
resendLast(params: IShared.IFindByIdRequest): Promise<void>;
|
|
57
|
+
findByOwnerId(params: IShared.IFindByIdRequest): Promise<IFindActiveByOwnerIdResponse>;
|
|
71
58
|
create(data: ICreateRequest): Promise<Chat>;
|
|
72
59
|
update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<void>;
|
|
73
60
|
deleteOne(selector: IShared.IFindByIdRequest): Promise<void>;
|
|
74
61
|
markAllAsRead(params: IShared.IFindByIdRequest): Promise<void>;
|
|
75
62
|
markAllAsUnread(params: IShared.IFindByIdRequest): Promise<void>;
|
|
76
63
|
publicMarkAllClientReadUnread(params: IMarkAllClientReadUnreadRequest): Promise<void>;
|
|
64
|
+
resendLast(params: IShared.IFindByIdRequest): Promise<void>;
|
|
65
|
+
translate(data: ITranslateRequest): Promise<string>;
|
|
77
66
|
}
|
|
78
67
|
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import joi from 'joi';
|
|
2
|
+
import { ITranslateRequest } from './interfaces';
|
|
2
3
|
export declare const createBody: joi.ObjectSchema<any>;
|
|
3
4
|
export declare const updateBody: joi.ObjectSchema<any>;
|
|
4
5
|
export declare const markAllClientReadUnreadParams: joi.ObjectSchema<any>;
|
|
6
|
+
export declare const translateBody: joi.ObjectSchema<ITranslateRequest>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { GoogleCalendar } from '../../../shared/entities/stock';
|
|
2
|
+
export type Entity = GoogleCalendar;
|
|
3
|
+
export declare const Route = "google_calendar";
|
|
4
|
+
export declare const UpperName = "GoogleCalendar";
|
|
5
|
+
export declare const LowerName: string;
|
|
6
|
+
export interface IRepository {
|
|
7
|
+
find(): Promise<Entity[]>;
|
|
8
|
+
}
|
|
@@ -131,6 +131,7 @@ export interface ICreateFromHeaderRequest {
|
|
|
131
131
|
current_account?: boolean;
|
|
132
132
|
store_operator_id?: string | null;
|
|
133
133
|
copy_from_document?: string | null;
|
|
134
|
+
owner_ref_document?: string | null;
|
|
134
135
|
}
|
|
135
136
|
export interface IUpdateRequest {
|
|
136
137
|
google_sheet_id?: string | null;
|
|
@@ -214,6 +215,8 @@ export interface IFindResponse {
|
|
|
214
215
|
}
|
|
215
216
|
export type IUpdateManyWithPersona = {
|
|
216
217
|
id: string;
|
|
218
|
+
owner_id?: string;
|
|
219
|
+
owner_name?: string | null;
|
|
217
220
|
name: string | null;
|
|
218
221
|
telephone: string | null;
|
|
219
222
|
email: string | null;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as IShared from '../../../shared/interface';
|
|
2
|
+
import { DocumentHeaderSubscriber } from '../../../shared/entities/stock';
|
|
3
|
+
export type Entity = DocumentHeaderSubscriber;
|
|
4
|
+
export declare const Route = "file";
|
|
5
|
+
export declare const UpperName = "DocumentHeaderSubscriber";
|
|
6
|
+
export declare const LowerName: string;
|
|
7
|
+
export interface IFindByOwnerRequest {
|
|
8
|
+
owner_id: string;
|
|
9
|
+
}
|
|
10
|
+
export interface ICreateRequest {
|
|
11
|
+
document_header_id: string;
|
|
12
|
+
store_operator_id: string;
|
|
13
|
+
}
|
|
14
|
+
export interface IRepository {
|
|
15
|
+
findByOwnerId(params: IFindByOwnerRequest): Promise<Entity[]>;
|
|
16
|
+
create(data: ICreateRequest): Promise<void>;
|
|
17
|
+
deleteOne(selector: IShared.IFindByIdRequest): Promise<void>;
|
|
18
|
+
}
|
|
19
|
+
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import Nomalism from '../../..';
|
|
2
|
+
import { DocumentHeaderSurvey } from '../../../shared/entities/stock';
|
|
3
|
+
export type IEntity = DocumentHeaderSurvey;
|
|
4
|
+
export declare const Route = "documentHeaderSurvey";
|
|
5
|
+
export declare const UpperName = "DocumentHeaderSurvey";
|
|
6
|
+
export declare const LowerName: string;
|
|
7
|
+
export type ICreateRequest = Pick<IEntity, 'owner_id' | 'document_header_id' | 'persona_id'>;
|
|
8
|
+
export type IResponse = IEntity;
|
|
9
|
+
export type IUpdateSentRequest = Pick<IEntity, 'document_header_id' | 'persona_id'>;
|
|
10
|
+
export type IUpdateSurveyRequest = Pick<IEntity, 'document_header_id' | 'persona_id' | 'data'>;
|
|
11
|
+
export interface IRepository {
|
|
12
|
+
find(): Promise<IResponse[]>;
|
|
13
|
+
updateSent(data: IUpdateSentRequest): Promise<void>;
|
|
14
|
+
updateSurvey(data: IUpdateSurveyRequest): Promise<void>;
|
|
15
|
+
}
|
|
16
|
+
export type IController = Nomalism.shared.IEntityWithUserToken<IRepository>;
|
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-
import * as IShared from '../../../shared/interface';
|
|
2
|
-
import { DocumentLine, DocumentLineVirtuals, DocumentLinePendingConflict, DocumentLineBaseVirtuals, ProductPromotionVirtuals, DocumentLineNote, DocumentLineRM } from '../../../shared/entities/stock';
|
|
3
|
-
import * as IDocumentLineAssoc from '../documentLineAssoc/interfaces';
|
|
4
|
-
import { IDocumentTypeCodeType, IDocumentTypeUserType } from '../documentType/interfaces';
|
|
5
|
-
import { IProductType, IProductState } from '../../stock/productGoogleSheets/interface';
|
|
1
|
+
import type * as IShared from '../../../shared/interface';
|
|
2
|
+
import type { DocumentLine, DocumentLineVirtuals, DocumentLinePendingConflict, DocumentLineBaseVirtuals, ProductPromotionVirtuals, DocumentLineNote, DocumentLineRM, DocumentLineMT } from '../../../shared/entities/stock';
|
|
3
|
+
import type * as IDocumentLineAssoc from '../documentLineAssoc/interfaces';
|
|
4
|
+
import type { IDocumentTypeCodeType, IDocumentTypeUserType } from '../documentType/interfaces';
|
|
5
|
+
import type { IProductType, IProductState } from '../../stock/productGoogleSheets/interface';
|
|
6
6
|
import type { IGetProductType, IGetProductGroup } from '../../integration/googleSheets/interfaces';
|
|
7
|
-
import { IMotivosDeEsperaData } from '../../document/order/interfaces';
|
|
7
|
+
import type { IMotivosDeEsperaData } from '../../document/order/interfaces';
|
|
8
8
|
export type Entity = DocumentLine;
|
|
9
9
|
export declare const Route = "documentLine";
|
|
10
10
|
export declare const UpperName = "DocumentLine";
|
|
11
11
|
export declare const LowerName: string;
|
|
12
12
|
export type IDocumentLineVirtuals = DocumentLineVirtuals;
|
|
13
13
|
export type IDocumentLineBaseVirtuals = DocumentLineBaseVirtuals;
|
|
14
|
-
export type IDocumentLineRM = DocumentLineRM;
|
|
15
14
|
export type IPromotions = Pick<ProductPromotionVirtuals, 'exclusive_to_location_id' | 'exclusive_to_client_id' | 'discount'>;
|
|
16
|
-
export type IDataKeys = 'AvisoCliente' | 'Quantidade Encomendada Originalmente' | 'Linha criada na EM' | 'Opcao EM' | 'Levantar DF' | 'Enviar Email NCF' | 'Fechar DF' | 'Documento pago' | 'Pagamento' | 'Recibo do documento'
|
|
15
|
+
export type IDataKeys = 'AvisoCliente' | 'Quantidade Encomendada Originalmente' | 'Linha criada na EM' | 'Opcao EM' | 'Levantar DF' | 'Enviar Email NCF' | 'Fechar DF' | 'Documento pago' | 'Pagamento' | 'Recibo do documento';
|
|
17
16
|
export interface IDataPayload {
|
|
18
17
|
value: unknown;
|
|
19
18
|
updated_at: Date;
|
|
@@ -64,7 +63,8 @@ export type IEsperaInfoClienteData = {
|
|
|
64
63
|
export interface IEntityExtended extends Omit<DocumentLine, 'data'> {
|
|
65
64
|
group: string;
|
|
66
65
|
document_headers: IDocumentLineDocuments[];
|
|
67
|
-
document_line_rm:
|
|
66
|
+
document_line_rm: DocumentLineRM | null;
|
|
67
|
+
document_line_mt: DocumentLineMT | null;
|
|
68
68
|
pending_conflict: DocumentLinePendingConflict | null;
|
|
69
69
|
document_line_notes: DocumentLineNote[];
|
|
70
70
|
product_type: IProductType | null;
|
|
@@ -76,7 +76,8 @@ export interface IEntityExtended extends Omit<DocumentLine, 'data'> {
|
|
|
76
76
|
product_integer_only: boolean;
|
|
77
77
|
espera_info_cliente_data: IEsperaInfoClienteData;
|
|
78
78
|
}
|
|
79
|
-
export interface ICreateRequest
|
|
79
|
+
export interface ICreateRequest {
|
|
80
|
+
document_header_id: string;
|
|
80
81
|
document_line_id?: string;
|
|
81
82
|
product_id?: string;
|
|
82
83
|
quantity: number;
|
|
@@ -105,13 +106,6 @@ export interface IUpdateRequest {
|
|
|
105
106
|
sent_to_client?: boolean;
|
|
106
107
|
sent_to_provider?: boolean;
|
|
107
108
|
}
|
|
108
|
-
export interface IUpdateDataRequest {
|
|
109
|
-
trigger_states?: boolean;
|
|
110
|
-
document_header_id: string;
|
|
111
|
-
document_line_ids: string[];
|
|
112
|
-
datafield: IDataKeys;
|
|
113
|
-
payload: IDataPayload;
|
|
114
|
-
}
|
|
115
109
|
export interface IUpdateManyRequest {
|
|
116
110
|
ids: string[];
|
|
117
111
|
client_discount?: number;
|
|
@@ -126,11 +120,6 @@ export interface IUpdateManyRequest {
|
|
|
126
120
|
export interface IUpdateManyByDocumentHeaderRequest {
|
|
127
121
|
sent_to_provider?: boolean;
|
|
128
122
|
}
|
|
129
|
-
export interface IUpdateDataRequestWithoutStamps extends Omit<IUpdateDataRequest, 'payload'> {
|
|
130
|
-
payload: Pick<IDataPayload, 'value'> & {
|
|
131
|
-
updated_by?: string;
|
|
132
|
-
};
|
|
133
|
-
}
|
|
134
123
|
export interface IUpdateLineStatesTriggerResponse {
|
|
135
124
|
document_header_id: string;
|
|
136
125
|
trigger_event: boolean;
|
|
@@ -145,10 +134,8 @@ export interface IPrintLabelQueryRequest {
|
|
|
145
134
|
export interface IRepository {
|
|
146
135
|
create(data: ICreateRequest[]): Promise<IDocumentLineAssoc.IEntityExtended[]>;
|
|
147
136
|
update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<void>;
|
|
148
|
-
updateData(data: IUpdateDataRequest): Promise<IDocumentLineAssoc.IEntityWithDocumentLine[]>;
|
|
149
137
|
updateMany(data: IUpdateManyRequest): Promise<void>;
|
|
150
138
|
updateManyByDocumentHeader(selector: IShared.IFindByIdRequest, data: IUpdateManyByDocumentHeaderRequest): Promise<void>;
|
|
151
|
-
updateIndexes(document_line_ids: string[]): Promise<void>;
|
|
152
139
|
deleteMany(document_line_ids: string[]): Promise<void>;
|
|
153
140
|
}
|
|
154
141
|
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import joi from 'joi';
|
|
2
2
|
export declare const createBody: joi.ArraySchema<any[]>;
|
|
3
3
|
export declare const updateBody: joi.ObjectSchema<any>;
|
|
4
|
-
export declare const updateDataBody: joi.ObjectSchema<any>;
|
|
5
4
|
export declare const updateManyBody: joi.ObjectSchema<any>;
|
|
6
5
|
export declare const updateIndexesBody: joi.ArraySchema<string[]>;
|
|
7
6
|
export declare const deleteBody: joi.ArraySchema<string[]>;
|
|
@@ -1,34 +1,17 @@
|
|
|
1
1
|
import * as IShared from '../../../shared/interface';
|
|
2
|
-
import { DocumentLineAssoc
|
|
2
|
+
import { DocumentLineAssoc } from '../../../shared/entities/stock';
|
|
3
3
|
import * as IDocumentLine from '../documentLine/interfaces';
|
|
4
4
|
import { IDocumentLineVirtuals } from '../documentLine/interfaces';
|
|
5
5
|
export type Entity = DocumentLineAssoc;
|
|
6
6
|
export declare const Route = "documentLineAssoc";
|
|
7
7
|
export declare const UpperName = "DocumentLineAssoc";
|
|
8
8
|
export declare const LowerName: string;
|
|
9
|
-
export interface IEntityWithDocumentLine extends Entity {
|
|
10
|
-
document_line: DocumentLine;
|
|
11
|
-
}
|
|
12
9
|
export interface IEntityExtended extends Entity {
|
|
13
10
|
document_line: IDocumentLine.IEntityExtended;
|
|
14
11
|
}
|
|
15
|
-
export interface ICreateRequest {
|
|
16
|
-
document_header_id: string;
|
|
17
|
-
document_line_id: string;
|
|
18
|
-
}
|
|
19
|
-
export interface IUpdateRequest {
|
|
20
|
-
origin_id?: string | null;
|
|
21
|
-
}
|
|
22
|
-
export interface IUpdateGroupRequest {
|
|
23
|
-
document_line_id: string[];
|
|
24
|
-
}
|
|
25
12
|
export interface IRepository {
|
|
26
|
-
findById(selector: IShared.IFindByIdRequest): Promise<Entity | null>;
|
|
27
13
|
findByOwnerId(data: IShared.IFindByOwnerIdRequest): Promise<IEntityExtended[]>;
|
|
28
14
|
findVirtualsByOwnerId(data: IShared.IFindByOwnerIdRequest): Promise<IDocumentLineVirtuals[]>;
|
|
29
15
|
findHistoryByLineId(data: IShared.IFindByIdRequest): Promise<IDocumentLine.IHistory[]>;
|
|
30
|
-
create(data: ICreateRequest[]): Promise<IEntityWithDocumentLine[]>;
|
|
31
|
-
update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<IEntityWithDocumentLine>;
|
|
32
16
|
}
|
|
33
|
-
export type IApi = Omit<IRepository, 'findById'>;
|
|
34
17
|
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -15,6 +15,5 @@ export interface IUpdateRequest {
|
|
|
15
15
|
}
|
|
16
16
|
export interface IRepository {
|
|
17
17
|
update(data: IUpdateRequest): Promise<void>;
|
|
18
|
-
findByOwnerId(selector: IShared.IFindByOwnerIdRequest): Promise<Entity[]>;
|
|
19
18
|
}
|
|
20
19
|
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -20,6 +20,5 @@ export interface IUpdateRequest {
|
|
|
20
20
|
}
|
|
21
21
|
export interface IRepository {
|
|
22
22
|
update(data: IUpdateRequest): Promise<void>;
|
|
23
|
-
findByOwnerId(selector: IShared.IFindByOwnerIdRequest): Promise<Entity[]>;
|
|
24
23
|
}
|
|
25
24
|
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -1,16 +1,9 @@
|
|
|
1
1
|
import * as IShared from '../../../shared/interface';
|
|
2
2
|
import { ExternalDocumentHeader } from '../../../shared/entities/stock';
|
|
3
|
-
import { IUpdateDataRequest } from '../documentLine/interfaces';
|
|
4
3
|
export type Entity = ExternalDocumentHeader;
|
|
5
4
|
export declare const Route = "external_document_header";
|
|
6
5
|
export declare const UpperName = "ExternalDocumentHeader";
|
|
7
6
|
export declare const LowerName: string;
|
|
8
|
-
export type IFindByIdResponse = Entity;
|
|
9
|
-
export type IFindRequest = Record<string, unknown>;
|
|
10
|
-
export type IFindResponse = Entity;
|
|
11
|
-
export interface IFindPaginatedRequest extends IFindRequest, IShared.IPaginationRequest {
|
|
12
|
-
}
|
|
13
|
-
export type IFindWithPaginationResponse = IShared.IPaginationResponse<Entity>;
|
|
14
7
|
export interface IFindByOwnerIdItem {
|
|
15
8
|
external_document_header_id: string | null;
|
|
16
9
|
document_header_id: string;
|
|
@@ -21,7 +14,7 @@ export interface IFindByOwnerIdItem {
|
|
|
21
14
|
is_void: boolean;
|
|
22
15
|
created_by: string;
|
|
23
16
|
can_have_no_pdf: boolean;
|
|
24
|
-
|
|
17
|
+
can_retry: boolean;
|
|
25
18
|
}
|
|
26
19
|
export interface IFindByOwnerIdItemWithVersions extends IFindByOwnerIdItem {
|
|
27
20
|
older_versions: Pick<IFindByOwnerIdItem, 'label' | 'pdf_link'>[];
|
|
@@ -30,9 +23,6 @@ export interface ICreateRequest {
|
|
|
30
23
|
document_header_id: string;
|
|
31
24
|
pdf_link: string;
|
|
32
25
|
}
|
|
33
|
-
export interface IUpdateRequest {
|
|
34
|
-
pdf_link?: string;
|
|
35
|
-
}
|
|
36
26
|
export interface IAttachment {
|
|
37
27
|
filename: string;
|
|
38
28
|
multimedia_id: string;
|
|
@@ -47,13 +37,10 @@ export interface ISendEmailDocumentRequest {
|
|
|
47
37
|
};
|
|
48
38
|
}
|
|
49
39
|
export interface IRepository {
|
|
50
|
-
findById(selector: IShared.IFindByIdRequest): Promise<
|
|
40
|
+
findById(selector: IShared.IFindByIdRequest): Promise<Entity | null>;
|
|
51
41
|
findByOwnerId(params: IShared.IFindByOwnerIdRequest): Promise<IFindByOwnerIdItemWithVersions[]>;
|
|
52
42
|
sendEmailDocument: (data: ISendEmailDocumentRequest) => Promise<void>;
|
|
53
|
-
|
|
54
|
-
findPaginated(selector: IFindPaginatedRequest): Promise<IFindWithPaginationResponse>;
|
|
43
|
+
retry(selector: IShared.IFindByIdRequest): Promise<void>;
|
|
55
44
|
create(data: ICreateRequest): Promise<Entity>;
|
|
56
|
-
update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<Entity | null>;
|
|
57
|
-
deleteOne(selector: IShared.IFindByIdRequest): Promise<Entity | null>;
|
|
58
45
|
}
|
|
59
46
|
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -1,6 +1,3 @@
|
|
|
1
1
|
import joi from 'joi';
|
|
2
|
-
export declare const findQuery: joi.ObjectSchema<any>;
|
|
3
|
-
export declare const findWithPaginationQuery: joi.ObjectSchema<any>;
|
|
4
2
|
export declare const createBody: joi.ObjectSchema<any>;
|
|
5
|
-
export declare const updateBody: joi.ObjectSchema<any>;
|
|
6
3
|
export declare const sendEmailDocumentBody: joi.ObjectSchema<any>;
|
|
@@ -1,24 +1,36 @@
|
|
|
1
1
|
import * as IShared from '../../../shared/interface';
|
|
2
|
-
|
|
2
|
+
import type { IChatBalloon } from '../../stock/chat/interfaces';
|
|
3
|
+
import type { IDocumentTypeUserType } from '../../supply/documentType/interfaces';
|
|
4
|
+
import type * as ChatSubscriber from '../../user/chatSubscribers/interfaces';
|
|
5
|
+
export interface ITags {
|
|
3
6
|
id: string;
|
|
4
7
|
text: string;
|
|
5
8
|
}
|
|
6
|
-
export interface
|
|
7
|
-
|
|
8
|
-
|
|
9
|
+
export interface IPublicDocument {
|
|
10
|
+
chat_document_header_id: string;
|
|
11
|
+
document_name: string;
|
|
12
|
+
store_operator_name: string;
|
|
13
|
+
user_type: IDocumentTypeUserType;
|
|
14
|
+
document_total: number;
|
|
15
|
+
other_personas: ChatSubscriber.IPersona[];
|
|
9
16
|
}
|
|
10
|
-
export interface
|
|
17
|
+
export interface IPublicOtherDocument {
|
|
18
|
+
chat_subscriber_id: string;
|
|
11
19
|
chat_document_header_id: string;
|
|
12
20
|
label: string;
|
|
13
21
|
emission_date: Date;
|
|
14
22
|
pdf_link: string;
|
|
15
23
|
client_unread: number;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
closed
|
|
24
|
+
tags: ITags[];
|
|
25
|
+
created_by: string;
|
|
26
|
+
closed: boolean;
|
|
19
27
|
}
|
|
20
|
-
export interface
|
|
21
|
-
|
|
28
|
+
export interface IPublicFindBySubscriberId {
|
|
29
|
+
owner_id: string;
|
|
30
|
+
document?: IPublicDocument;
|
|
31
|
+
persona?: ChatSubscriber.IPersona;
|
|
32
|
+
chat: IChatBalloon[];
|
|
33
|
+
documents: IPublicOtherDocument[];
|
|
22
34
|
}
|
|
23
35
|
export declare enum IPublicDocumentHeaderNoteType {
|
|
24
36
|
Provider = "Provider",
|
|
@@ -42,9 +54,8 @@ export interface PublicDocumentHeaderNoteUpdateRequest {
|
|
|
42
54
|
note: string;
|
|
43
55
|
}
|
|
44
56
|
export interface IRepository {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
updatePublicDocumentHeaderNote: (selector: IShared.IFindByIdRequest, data: PublicDocumentHeaderNoteUpdateRequest[]) => Promise<PublicDocumentHeaderNote[]>;
|
|
57
|
+
publicFindBySubscriberId(params: IShared.IFindByIdRequest): Promise<IPublicFindBySubscriberId>;
|
|
58
|
+
publicCreateDocumentHeaderNote: (data: PublicDocumentHeaderNoteCreateRequest[]) => Promise<PublicDocumentHeaderNote[]>;
|
|
59
|
+
publicUpdateDocumentHeaderNote: (selector: IShared.IFindByIdRequest, data: PublicDocumentHeaderNoteUpdateRequest[]) => Promise<PublicDocumentHeaderNote[]>;
|
|
49
60
|
}
|
|
50
61
|
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -8,28 +8,26 @@ export interface ICreateOrUpdateRequest {
|
|
|
8
8
|
chat_document_header_id: string;
|
|
9
9
|
personas_ids: string[];
|
|
10
10
|
}
|
|
11
|
-
export interface
|
|
12
|
-
owner_id
|
|
11
|
+
export interface IFindDocumentHeaderSubscribersRequest {
|
|
12
|
+
owner_id?: string;
|
|
13
13
|
chat_document_header_id: string;
|
|
14
14
|
}
|
|
15
|
-
export
|
|
16
|
-
|
|
17
|
-
subscriptions: {
|
|
18
|
-
id: string;
|
|
19
|
-
chat_document_header_id: string;
|
|
20
|
-
}[];
|
|
15
|
+
export interface IFindSubscribedDocumentHeadersRequest {
|
|
16
|
+
owner_id: string;
|
|
21
17
|
}
|
|
22
|
-
export
|
|
23
|
-
|
|
18
|
+
export type IPersona = Pick<Persona, 'id' | 'external' | 'name' | 'email' | 'telephone' | 'language_id'>;
|
|
19
|
+
export interface IEntityWithPersona extends Pick<ChatSubscriber, 'id' | 'chat_document_header_id'> {
|
|
20
|
+
persona: IPersona;
|
|
24
21
|
}
|
|
25
|
-
export interface
|
|
26
|
-
|
|
22
|
+
export interface IEntityWithPersonaAndSubscriptions extends IPersona {
|
|
23
|
+
subscriptions: Pick<Entity, 'id' | 'chat_document_header_id'>[];
|
|
27
24
|
}
|
|
28
25
|
export interface IRepository {
|
|
26
|
+
findDocumentHeaderSubscribers(selector: IFindDocumentHeaderSubscribersRequest): Promise<IEntityWithPersona[]>;
|
|
27
|
+
findSubscribedDocumentHeaders(selector: IFindSubscribedDocumentHeadersRequest): Promise<IEntityWithPersonaAndSubscriptions>;
|
|
28
|
+
findById(selector: IShared.IFindByIdRequest): Promise<IEntityWithPersonaAndSubscriptions>;
|
|
29
29
|
createOrUpdate(data: ICreateOrUpdateRequest): Promise<string>;
|
|
30
|
-
findById(selector: IShared.IFindByIdRequest): Promise<IFindByIdResponse>;
|
|
31
|
-
findByOwner(selector: IFindRequest): Promise<IFindByOwnerResponse[]>;
|
|
32
|
-
clientWebAppFindByOwner(selector: IFindRequest): Promise<IFindChatSubscriberResponse>;
|
|
33
30
|
deleteOne(selector: IShared.IFindByIdRequest): Promise<void>;
|
|
31
|
+
deleteByDocumentHeader(selector: IShared.IFindByIdRequest): Promise<void>;
|
|
34
32
|
}
|
|
35
33
|
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import joi from 'joi';
|
|
2
2
|
export declare const createOrUpdateBody: joi.ObjectSchema<any>;
|
|
3
|
-
export declare const
|
|
3
|
+
export declare const findDocumentHeaderSubscribersQuery: joi.ObjectSchema<any>;
|
|
4
|
+
export declare const findSubscribedDocumentHeadersQuery: joi.ObjectSchema<any>;
|
|
@@ -13,6 +13,9 @@ export interface IFindPaginatedRequest extends IFindRequest, IShared.IPagination
|
|
|
13
13
|
export type IFindWithPaginationResponse = IShared.IPaginationResponse<Omit<IFindDetailedResponse, ''>>;
|
|
14
14
|
export interface ICreateRequest {
|
|
15
15
|
name: string;
|
|
16
|
+
native_name: string;
|
|
17
|
+
iso_code: string;
|
|
18
|
+
short_list: boolean;
|
|
16
19
|
}
|
|
17
20
|
export interface IUpdateRequest {
|
|
18
21
|
name?: string;
|
|
@@ -29,6 +29,7 @@ export interface ICreateRequest {
|
|
|
29
29
|
commissioner_id: string | null;
|
|
30
30
|
store_operator_id: string | null;
|
|
31
31
|
reason_for_exemption_id: string | null;
|
|
32
|
+
language_id: string | null;
|
|
32
33
|
main?: boolean;
|
|
33
34
|
contact?: boolean;
|
|
34
35
|
}
|
|
@@ -44,6 +45,7 @@ export interface IUpdateRequest {
|
|
|
44
45
|
email?: string | null;
|
|
45
46
|
observations?: string | null;
|
|
46
47
|
reason_for_exemption_id?: string | null;
|
|
48
|
+
language_id?: string | null;
|
|
47
49
|
main?: boolean;
|
|
48
50
|
contact?: boolean;
|
|
49
51
|
}
|
|
@@ -115,6 +117,9 @@ export interface IFindForGmailRequest {
|
|
|
115
117
|
export interface IFindForGmailResponse {
|
|
116
118
|
chat_persona_name: string;
|
|
117
119
|
}
|
|
120
|
+
export interface IPublicUpdateRequest {
|
|
121
|
+
language_id: string | null;
|
|
122
|
+
}
|
|
118
123
|
export interface IRepository {
|
|
119
124
|
findById(selector: IShared.IFindByIdRequest): Promise<IEntityExtended | null>;
|
|
120
125
|
findByOwnerId(params: IShared.IFindByOwnerIdRequest): Promise<IFindByOwnerIdResponse[]>;
|
|
@@ -126,5 +131,6 @@ export interface IRepository {
|
|
|
126
131
|
findByEmail(data: IFindByEmailRequest): Promise<IFindByEmailResponse[]>;
|
|
127
132
|
findClientOrProvider(data: IFindClientOrProviderRequest): Promise<IFindClientOrProviderResponse[]>;
|
|
128
133
|
findForGmail(data: IFindForGmailRequest): Promise<IFindForGmailResponse | null>;
|
|
134
|
+
publicUpdate(selector: IShared.IFindByIdRequest, data: IPublicUpdateRequest): Promise<void>;
|
|
129
135
|
}
|
|
130
136
|
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -7,3 +7,4 @@ export declare const deleteQueryValidate: joi.ObjectSchema<any>;
|
|
|
7
7
|
export declare const FindByEmailQueryValidate: joi.ObjectSchema<any>;
|
|
8
8
|
export declare const FindClientOrProviderQueryValidate: joi.ObjectSchema<any>;
|
|
9
9
|
export declare const findForGmailParamsValidate: joi.ObjectSchema<any>;
|
|
10
|
+
export declare const publicUpdateBody: joi.ObjectSchema<any>;
|