@nomalism-com/types 1.3.22 → 1.3.24
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 +1275 -1174
- package/dist/main.d.ts +7 -7
- package/dist/modules/document/providerFinancialCreditNote/interfaces.d.ts +5 -2
- package/dist/modules/document/providerServiceInvoice/interfaces.d.ts +4 -1
- package/dist/modules/document/purchase/interfaces.d.ts +7 -0
- package/dist/modules/integration/patchNotes/interfaces.d.ts +47 -0
- package/dist/modules/integration/projectInfo/interfaces.d.ts +25 -2
- package/dist/modules/llm/llm/interfaces.d.ts +19 -0
- package/dist/modules/llm/llm/route.schema.d.ts +2 -0
- package/dist/modules/stock/accountCode/interface.d.ts +11 -0
- package/dist/modules/stock/accountCode/route.schema.d.ts +2 -0
- package/dist/modules/stock/chat/interfaces.d.ts +21 -3
- package/dist/modules/stock/conferirEncomenda/interface.d.ts +56 -0
- package/dist/modules/stock/dashboard/interface.d.ts +18 -11
- package/dist/modules/stock/gmails/interface.d.ts +0 -6
- package/dist/modules/supply/documentHeader/interfaces.d.ts +4 -2
- package/dist/modules/supply/documentType/interfaces.d.ts +3 -0
- package/dist/modules/ui/portal/interface.d.ts +16 -2
- package/dist/modules/ui/portal/route.schema.d.ts +1 -0
- package/dist/modules/user/chatSubscribers/interfaces.d.ts +20 -9
- package/dist/modules/user/clients/interface.d.ts +2 -1
- package/dist/modules/user/persona/interface.d.ts +8 -10
- package/dist/modules/user/providers/interface.d.ts +3 -0
- package/dist/modules/user/sessions/interface.d.ts +1 -2
- package/dist/shared/entities/integration.d.ts +41 -1
- package/dist/shared/entities/stock.d.ts +25 -0
- package/dist/shared/entities/user.d.ts +3 -0
- package/dist/shared/interface.d.ts +2 -7
- package/package.json +8 -8
- package/dist/modules/user/groupPermissions/interface.d.ts +0 -25
- package/dist/modules/user/groupPermissions/route.schema.d.ts +0 -2
- package/dist/modules/user/permissions/interface.d.ts +0 -25
- package/dist/modules/user/permissions/route.schema.d.ts +0 -2
- package/dist/modules/user/userPermissions/interface.d.ts +0 -23
- package/dist/modules/user/userPermissions/route.schema.d.ts +0 -2
package/dist/main.d.ts
CHANGED
|
@@ -52,8 +52,6 @@ import * as Favorites from './modules/user/favorites/interfaces';
|
|
|
52
52
|
import * as FavoritesRoutes from './modules/user/favorites/route.schema';
|
|
53
53
|
import * as File from './modules/stock/file/interface';
|
|
54
54
|
import * as FileRoutes from './modules/stock/file/route.schema';
|
|
55
|
-
import * as GroupPermissions from './modules/user/groupPermissions/interface';
|
|
56
|
-
import * as GroupPermissionsRoutes from './modules/user/groupPermissions/route.schema';
|
|
57
55
|
import * as GoogleSheets from './modules/integration/googleSheets/interfaces';
|
|
58
56
|
import * as GoogleSheetsRoutes from './modules/integration/googleSheets/route.schema';
|
|
59
57
|
import * as Language from './modules/user/language/interface';
|
|
@@ -75,8 +73,6 @@ import * as Payment from './modules/supply/payment/interface';
|
|
|
75
73
|
import * as PaymentRoutes from './modules/supply/payment/route.schema';
|
|
76
74
|
import * as PaymentMethods from './modules/user/paymentMethods/interfaces';
|
|
77
75
|
import * as PaymentMethodsRoutes from './modules/user/paymentMethods/route.schema';
|
|
78
|
-
import * as Permissions from './modules/user/permissions/interface';
|
|
79
|
-
import * as PermissionsRoutes from './modules/user/permissions/route.schema';
|
|
80
76
|
import * as ProductImage from './modules/stock/productImage/interface';
|
|
81
77
|
import * as ProductImageRoutes from './modules/stock/productImage/route.schema';
|
|
82
78
|
import * as Promotion from './modules/stock/promotion/interface';
|
|
@@ -107,8 +103,6 @@ import * as TypeOfLocation from './modules/stock/typeOfLocation/interface';
|
|
|
107
103
|
import * as TypeOfLocationRoutes from './modules/stock/typeOfLocation/route.schema';
|
|
108
104
|
import * as UnitOfMeasure from './modules/stock/unitOfMeasure/interface';
|
|
109
105
|
import * as UnitOfMeasureRoutes from './modules/stock/unitOfMeasure/route.schema';
|
|
110
|
-
import * as UserPermissions from './modules/user/userPermissions/interface';
|
|
111
|
-
import * as UserPermissionsRoutes from './modules/user/userPermissions/route.schema';
|
|
112
106
|
import * as UserPositions from './modules/user/userPositions/interface';
|
|
113
107
|
import * as UserPositionsRoutes from './modules/user/userPositions/route.schema';
|
|
114
108
|
import * as Users from './modules/user/users/interface';
|
|
@@ -239,4 +233,10 @@ import * as PaymentBatchRoutes from './modules/supply/paymentBatch/route.schema'
|
|
|
239
233
|
import * as Portal from './modules/ui/portal/interface';
|
|
240
234
|
import * as PortalRoutes from './modules/ui/portal/route.schema';
|
|
241
235
|
import * as GoogleSheetPool from './modules/stock/googleSheetPool/interface';
|
|
242
|
-
|
|
236
|
+
import * as AccountCode from './modules/stock/accountCode/interface';
|
|
237
|
+
import * as AccountCodeRoutes from './modules/stock/accountCode/route.schema';
|
|
238
|
+
import * as LLM from './modules/llm/llm/interfaces';
|
|
239
|
+
import * as LLMRoutes from './modules/llm/llm/route.schema';
|
|
240
|
+
import * as PatchNotes from './modules/integration/patchNotes/interfaces';
|
|
241
|
+
import * as ConferirEncomenda from './modules/stock/conferirEncomenda/interface';
|
|
242
|
+
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, 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, GmailsRoutes, NPF, NPFRoutes, NRCL, NRCLRoutes, CurrentAccount, CurrentAccountRoutes, PaymentBatch, PaymentBatchRoutes, Portal, PortalRoutes, GoogleSheetPool, AccountCode, AccountCodeRoutes, LLM, LLMRoutes, PatchNotes, ConferirEncomenda, };
|
|
@@ -13,10 +13,13 @@ export interface IValueByVatTax {
|
|
|
13
13
|
total: number;
|
|
14
14
|
}
|
|
15
15
|
export interface ICreateProviderFinancialCreditNoteRequest {
|
|
16
|
+
provider_id?: string;
|
|
17
|
+
nif?: string;
|
|
16
18
|
external_document_name: string;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
+
account_code?: string | null;
|
|
20
|
+
auto_pay?: boolean;
|
|
19
21
|
emission_date: Date;
|
|
22
|
+
parent_document_header_id: string | null;
|
|
20
23
|
observations: string;
|
|
21
24
|
values: IValueByVatTax[];
|
|
22
25
|
}
|
|
@@ -4,8 +4,11 @@ export interface IValueByVatTax {
|
|
|
4
4
|
total: number;
|
|
5
5
|
}
|
|
6
6
|
export interface ICreateProviderServiceInvoiceRequest {
|
|
7
|
-
provider_id
|
|
7
|
+
provider_id?: string;
|
|
8
|
+
nif?: string;
|
|
8
9
|
external_document_name: string;
|
|
10
|
+
account_code?: string | null;
|
|
11
|
+
auto_pay?: boolean;
|
|
9
12
|
emission_date: Date;
|
|
10
13
|
observations: string;
|
|
11
14
|
values: IValueByVatTax[];
|
|
@@ -67,6 +67,7 @@ export interface IPurchaseFromProviderRequest {
|
|
|
67
67
|
note?: string;
|
|
68
68
|
vat_self_accounting?: boolean;
|
|
69
69
|
purchase_without_invoice: boolean;
|
|
70
|
+
account_code: string | null;
|
|
70
71
|
}
|
|
71
72
|
export interface ISyncRequest {
|
|
72
73
|
provider_id: string;
|
|
@@ -81,11 +82,17 @@ export interface ISyncResponse {
|
|
|
81
82
|
provider_tax: number;
|
|
82
83
|
lines: ISyncLines[];
|
|
83
84
|
}
|
|
85
|
+
export interface IFindPurchasedOrdersSummaryResponse {
|
|
86
|
+
y: number;
|
|
87
|
+
m: number;
|
|
88
|
+
v: number;
|
|
89
|
+
}
|
|
84
90
|
export interface IRepository {
|
|
85
91
|
findUnpaidMaterialEntrance(selector: IShared.IFindByIdRequest): Promise<IUnpaidMaterialEntranceResponse>;
|
|
86
92
|
findUnpaidMaterialEntranceProviders(): Promise<IShared.IFindMinifiedResponse[]>;
|
|
87
93
|
purchaseFromProvider(data: IPurchaseFromProviderRequest): Promise<void>;
|
|
88
94
|
sync(data: ISyncRequest): Promise<ISyncResponse>;
|
|
95
|
+
findPurchasedOrdersSummary(params: IShared.IFindOptionalByOwnerIdRequest): Promise<IFindPurchasedOrdersSummaryResponse[]>;
|
|
89
96
|
}
|
|
90
97
|
export type IApi = IRepository;
|
|
91
98
|
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import * as IShared from '../../../shared/interface';
|
|
2
|
+
import { PatchNotes } from '../../../shared/entities/integration';
|
|
3
|
+
export type Entity = PatchNotes;
|
|
4
|
+
export declare const Route = "patch_notes";
|
|
5
|
+
export declare const UpperName = "PatchNotes";
|
|
6
|
+
export declare const LowerName: string;
|
|
7
|
+
export interface IFindResponse {
|
|
8
|
+
date: string;
|
|
9
|
+
version: string;
|
|
10
|
+
description: string;
|
|
11
|
+
}
|
|
12
|
+
export interface ICreateRequest {
|
|
13
|
+
id?: number;
|
|
14
|
+
service: string;
|
|
15
|
+
container?: string | null;
|
|
16
|
+
version: string;
|
|
17
|
+
deploy_ref: string;
|
|
18
|
+
environment?: string | null;
|
|
19
|
+
commit_sha: string;
|
|
20
|
+
commit_short_sha?: string | null;
|
|
21
|
+
commit_title: string;
|
|
22
|
+
commit_message: string;
|
|
23
|
+
commit_timestamp: string;
|
|
24
|
+
project_id: number;
|
|
25
|
+
project_path: string;
|
|
26
|
+
project_url: string;
|
|
27
|
+
pipeline_id: number;
|
|
28
|
+
pipeline_iid?: number | null;
|
|
29
|
+
pipeline_source: string;
|
|
30
|
+
pipeline_url: string;
|
|
31
|
+
job_id?: number | null;
|
|
32
|
+
job_name?: string | null;
|
|
33
|
+
job_url?: string | null;
|
|
34
|
+
merge_request_iid?: number | null;
|
|
35
|
+
mergeRequest_id?: number | null;
|
|
36
|
+
mr_source_branch?: string | null;
|
|
37
|
+
mr_target_branch?: string | null;
|
|
38
|
+
changes?: unknown;
|
|
39
|
+
raw?: unknown;
|
|
40
|
+
created_at?: string;
|
|
41
|
+
updated_at?: string;
|
|
42
|
+
}
|
|
43
|
+
export interface IRepository {
|
|
44
|
+
find(): Promise<IFindResponse[]>;
|
|
45
|
+
createOrUpdate(data: ICreateRequest): Promise<void>;
|
|
46
|
+
}
|
|
47
|
+
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -8,9 +8,32 @@ export declare const IProjectInfoTypeEnum: {
|
|
|
8
8
|
professional: 'professional';
|
|
9
9
|
company: 'company';
|
|
10
10
|
};
|
|
11
|
+
export type IMultimedia = {
|
|
12
|
+
id: string;
|
|
13
|
+
filename: string;
|
|
14
|
+
};
|
|
15
|
+
export type IBudgetOptionsType = {
|
|
16
|
+
retificacao: boolean;
|
|
17
|
+
retificacao_aconselhamento: boolean;
|
|
18
|
+
montagem: boolean;
|
|
19
|
+
multimedias: IMultimedia[];
|
|
20
|
+
};
|
|
11
21
|
export type IProjectInfoType = (typeof IProjectInfoTypeEnum)[keyof typeof IProjectInfoTypeEnum];
|
|
12
22
|
export declare const projectInfoTypes: string[];
|
|
13
|
-
export
|
|
23
|
+
export interface ICreateRequest extends Omit<Entity, 'created_at' | 'updated_at' | 'document_header_id' | 'id' | 'email_log' | 'persona_id' | 'client_id'> {
|
|
24
|
+
persona_id?: string;
|
|
25
|
+
client_id?: string;
|
|
26
|
+
}
|
|
27
|
+
export interface ICreateResponse {
|
|
28
|
+
document_header_id: string;
|
|
29
|
+
chat_subscriber_id?: string;
|
|
30
|
+
}
|
|
31
|
+
export declare const IProjectInfoOriginTypeEnum: {
|
|
32
|
+
website: 'website';
|
|
33
|
+
portal: 'portal';
|
|
34
|
+
};
|
|
35
|
+
export type IProjectInfoOriginType = (typeof IProjectInfoOriginTypeEnum)[keyof typeof IProjectInfoOriginTypeEnum];
|
|
36
|
+
export declare const ProjectInfoOriginTypes: string[];
|
|
14
37
|
export interface IController {
|
|
15
|
-
sendEmail(data:
|
|
38
|
+
sendEmail(data: ICreateRequest): Promise<ICreateResponse>;
|
|
16
39
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as IShared from '../../../shared/interface';
|
|
2
|
+
export declare const Route = "llm";
|
|
3
|
+
export interface IPromptRequest {
|
|
4
|
+
prompt: string;
|
|
5
|
+
owner_id: string;
|
|
6
|
+
document_header_id: string;
|
|
7
|
+
}
|
|
8
|
+
export interface IPromptResponse {
|
|
9
|
+
onChunk: (text: string) => void;
|
|
10
|
+
onDone?: () => void;
|
|
11
|
+
onError?: (err: unknown) => void;
|
|
12
|
+
}
|
|
13
|
+
export interface IPromptAbortController {
|
|
14
|
+
abort(): void;
|
|
15
|
+
}
|
|
16
|
+
export interface IRepository {
|
|
17
|
+
prompt: (data: IPromptRequest, response: IPromptResponse) => IPromptAbortController;
|
|
18
|
+
}
|
|
19
|
+
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { AccountCode } from '../../../shared/entities/stock';
|
|
2
|
+
export type Entity = AccountCode;
|
|
3
|
+
export declare const Route = "account_code";
|
|
4
|
+
export declare const UpperName = "AccountCode";
|
|
5
|
+
export declare const LowerName: string;
|
|
6
|
+
export interface IFindByCode {
|
|
7
|
+
code: string;
|
|
8
|
+
}
|
|
9
|
+
export interface IRepository {
|
|
10
|
+
findByCode(params: IFindByCode): Promise<AccountCode | null>;
|
|
11
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type * as IShared from '../../../shared/interface';
|
|
2
|
-
import type * as
|
|
2
|
+
import type * as ChatSubscriber from '../../user/chatSubscribers/interfaces';
|
|
3
3
|
import { Chat, File } from '../../../shared/entities/stock';
|
|
4
4
|
export type Entity = Chat;
|
|
5
5
|
export declare const Route = "chat";
|
|
@@ -28,10 +28,26 @@ export interface IChatBalloon {
|
|
|
28
28
|
}
|
|
29
29
|
export type IReport = Pick<Entity, 'email_processed' | 'email_delivered' | 'email_opened' | 'email_clicked'>;
|
|
30
30
|
export interface IPublicFindActiveByOwnerIdResponse {
|
|
31
|
-
persona?: Persona.IFindContactPersonaByOwnerId;
|
|
32
31
|
last_group_report?: IReport;
|
|
33
|
-
owner_id
|
|
32
|
+
owner_id: string;
|
|
33
|
+
chat: IChatBalloon[];
|
|
34
|
+
}
|
|
35
|
+
export interface IPublicFindBySubscriberId {
|
|
36
|
+
owner_id: string;
|
|
37
|
+
document_header_id: string;
|
|
38
|
+
chat: IChatBalloon[];
|
|
39
|
+
persona: ChatSubscriber.IFindChatSubscriberPersona;
|
|
40
|
+
store_operator_name: string;
|
|
41
|
+
document_total: number;
|
|
42
|
+
}
|
|
43
|
+
export interface IPublicClientWebAppFindActiveByOwnerIdResponse {
|
|
44
|
+
owner_id: string;
|
|
45
|
+
chat_type: IChatType;
|
|
46
|
+
user_type: 'client' | 'provider';
|
|
34
47
|
chat: IChatBalloon[];
|
|
48
|
+
personas: ChatSubscriber.IFindChatSubscriberPersona[];
|
|
49
|
+
store_operator_name?: string;
|
|
50
|
+
document_total?: number;
|
|
35
51
|
}
|
|
36
52
|
export interface ICreateRequest {
|
|
37
53
|
owner_id: string;
|
|
@@ -57,6 +73,8 @@ export interface IMarkAllClientReadUnreadRequest {
|
|
|
57
73
|
}
|
|
58
74
|
export interface IRepository {
|
|
59
75
|
findActiveByOwnerId(params: IShared.IFindByOwnerIdRequest): Promise<IPublicFindActiveByOwnerIdResponse>;
|
|
76
|
+
clientWebAppFindActiveByOwnerId(params: IShared.IFindByOwnerIdRequest): Promise<IPublicClientWebAppFindActiveByOwnerIdResponse>;
|
|
77
|
+
findActiveBySubscriberId(params: IShared.IFindByOwnerIdRequest): Promise<IPublicFindBySubscriberId>;
|
|
60
78
|
resendLast(params: IShared.IFindByOwnerIdRequest): Promise<void>;
|
|
61
79
|
create(data: ICreateRequest): Promise<Chat>;
|
|
62
80
|
update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<void>;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { ConferirEncomenda } from '../../../shared/entities/stock';
|
|
2
|
+
export declare const Route = "conferir_encomenda";
|
|
3
|
+
export declare const UpperName = "ConferirEncomenda";
|
|
4
|
+
export declare const LowerName: string;
|
|
5
|
+
export type Entity = ConferirEncomenda;
|
|
6
|
+
export declare const EstadoEncomendaEnum: {
|
|
7
|
+
readonly PorConfirmar: "PorConfirmar";
|
|
8
|
+
readonly EsperaDefDetVendedor: "EsperaDefDetVendedor";
|
|
9
|
+
readonly EsperaInfoCliente: "EsperaInfoCliente";
|
|
10
|
+
readonly EsperaDevCatalogo: "EsperaDevCatalogo";
|
|
11
|
+
readonly EsperaEnvioRMCA: "EsperaEnvioRMCA";
|
|
12
|
+
readonly EsperaEnvioRM: "EsperaEnvioRM";
|
|
13
|
+
readonly EsperaMarcacaoRM: "EsperaMarcacaoRM";
|
|
14
|
+
readonly EsperaFolhaRM: "EsperaFolhaRM";
|
|
15
|
+
readonly EsperaVendedorRetificarRM: "EsperaVendedorRetificarRM";
|
|
16
|
+
readonly EsperaConferenciaRM: "EsperaConferenciaRM";
|
|
17
|
+
readonly EsperaOkClienteRM: "EsperaOkClienteRM";
|
|
18
|
+
readonly EsperaConsultaStockCotacao: "EsperaConsultaStockCotacao";
|
|
19
|
+
readonly EsperaRececaoConsulta: "EsperaRececaoConsulta";
|
|
20
|
+
readonly EsperaVendedorRetificarConsulta: "EsperaVendedorRetificarConsulta";
|
|
21
|
+
readonly ClienteFoiPensar: "ClienteFoiPensar";
|
|
22
|
+
readonly EsperaAtelier: "EsperaAtelier";
|
|
23
|
+
readonly EsperaProducaoInterna: "EsperaProducaoInterna";
|
|
24
|
+
readonly EsperaEstofador: "EsperaEstofador";
|
|
25
|
+
readonly EsperaProdMont: "EsperaProdMont";
|
|
26
|
+
readonly EsperaMontagem: "EsperaMontagem";
|
|
27
|
+
readonly EsperaCorteTecidos: "EsperaCorteTecidos";
|
|
28
|
+
readonly EsperaConfeccaoTecidosCortados: "EsperaConfeccaoTecidosCortados";
|
|
29
|
+
readonly EncomendarServico: "EncomendarServico";
|
|
30
|
+
readonly EncomendarServicoCAnexos: "EncomendarServicoCAnexos";
|
|
31
|
+
readonly EncomendarServicoSemNotificacao: "EncomendarServicoSemNotificacao";
|
|
32
|
+
readonly EncomendarVA: "EncomendarVA";
|
|
33
|
+
readonly EncomendarVACAnexos: "EncomendarVACAnexos";
|
|
34
|
+
readonly EncomendarVASemNotificacao: "EncomendarVASemNotificacao";
|
|
35
|
+
readonly EncomendarStock: "EncomendarStock";
|
|
36
|
+
readonly CancelarEncomendar: "CancelarEncomendar";
|
|
37
|
+
readonly StockEmLoja: "StockEmLoja";
|
|
38
|
+
readonly Refaturar: "Refaturar";
|
|
39
|
+
readonly DesligarDoSheets: "DesligarDoSheets";
|
|
40
|
+
readonly FecharLinha: "FecharLinha";
|
|
41
|
+
readonly CancelarEncomenda: "CancelarEncomenda";
|
|
42
|
+
readonly CancelarEncomendaMT: "CancelarEncomendaMT";
|
|
43
|
+
readonly CancelarEncomendaRM: "CancelarEncomendaRM";
|
|
44
|
+
readonly CancelarEncomendaVA: "CancelarEncomendaVA";
|
|
45
|
+
readonly DesligarEncomenda: "DesligarEncomenda";
|
|
46
|
+
readonly EncomendarMT: "EncomendarMT";
|
|
47
|
+
readonly EncomendarRM: "EncomendarRM";
|
|
48
|
+
readonly EsperaNomalism: "EsperaNomalism";
|
|
49
|
+
readonly EsperaOkClienteConsulta: "EsperaOkClienteConsulta";
|
|
50
|
+
readonly EsperaResolucaoProblemas: "EsperaResolucaoProblemas";
|
|
51
|
+
readonly Refaturado: "Refaturado";
|
|
52
|
+
readonly False: "False";
|
|
53
|
+
};
|
|
54
|
+
export type IEstadoEncomenda = (typeof EstadoEncomendaEnum)[keyof typeof EstadoEncomendaEnum];
|
|
55
|
+
export declare const estadoEncomendaKeys: string[];
|
|
56
|
+
export declare const estadoEncomendaValues: ("PorConfirmar" | "EsperaDefDetVendedor" | "EsperaInfoCliente" | "EsperaDevCatalogo" | "EsperaEnvioRMCA" | "EsperaEnvioRM" | "EsperaMarcacaoRM" | "EsperaFolhaRM" | "EsperaVendedorRetificarRM" | "EsperaConferenciaRM" | "EsperaOkClienteRM" | "EsperaConsultaStockCotacao" | "EsperaRececaoConsulta" | "EsperaVendedorRetificarConsulta" | "ClienteFoiPensar" | "EsperaAtelier" | "EsperaProducaoInterna" | "EsperaEstofador" | "EsperaProdMont" | "EsperaMontagem" | "EsperaCorteTecidos" | "EsperaConfeccaoTecidosCortados" | "EncomendarServico" | "EncomendarServicoCAnexos" | "EncomendarServicoSemNotificacao" | "EncomendarVA" | "EncomendarVACAnexos" | "EncomendarVASemNotificacao" | "EncomendarStock" | "CancelarEncomendar" | "StockEmLoja" | "Refaturar" | "DesligarDoSheets" | "FecharLinha" | "CancelarEncomenda" | "CancelarEncomendaMT" | "CancelarEncomendaRM" | "CancelarEncomendaVA" | "DesligarEncomenda" | "EncomendarMT" | "EncomendarRM" | "EsperaNomalism" | "EsperaOkClienteConsulta" | "EsperaResolucaoProblemas" | "Refaturado" | "False")[];
|
|
@@ -1,26 +1,33 @@
|
|
|
1
1
|
export declare const Route = "dashboard";
|
|
2
2
|
export declare const UpperName = "Dashboard";
|
|
3
3
|
export declare const LowerName: string;
|
|
4
|
-
export type
|
|
5
|
-
export interface
|
|
4
|
+
export type IDashboardSalesNames = 'dia' | 'mes' | 'ano';
|
|
5
|
+
export interface IDashboardSalesRowValue {
|
|
6
6
|
sheets: number;
|
|
7
7
|
outros: number;
|
|
8
8
|
}
|
|
9
|
-
export interface
|
|
9
|
+
export interface IDashboardSalesRow {
|
|
10
10
|
chave: number;
|
|
11
|
-
faturaRecibo:
|
|
12
|
-
fatura:
|
|
13
|
-
adiantamento:
|
|
11
|
+
faturaRecibo: IDashboardSalesRowValue;
|
|
12
|
+
fatura: IDashboardSalesRowValue;
|
|
13
|
+
adiantamento: IDashboardSalesRowValue;
|
|
14
14
|
}
|
|
15
|
-
export interface
|
|
15
|
+
export interface IDashboardSalesResponse {
|
|
16
16
|
id: number;
|
|
17
17
|
name: string;
|
|
18
|
-
data:
|
|
18
|
+
data: IDashboardSalesRow[];
|
|
19
19
|
}
|
|
20
|
-
export interface
|
|
20
|
+
export interface IFindDashboardSalesByDate {
|
|
21
21
|
date: Date;
|
|
22
|
-
name:
|
|
22
|
+
name: IDashboardSalesNames;
|
|
23
|
+
}
|
|
24
|
+
export interface IDashboardProjectInfoResponse {
|
|
25
|
+
y: number;
|
|
26
|
+
m: number;
|
|
27
|
+
d: number;
|
|
28
|
+
c: number;
|
|
23
29
|
}
|
|
24
30
|
export interface IRepository {
|
|
25
|
-
|
|
31
|
+
salesByDate(selector: IFindDashboardSalesByDate): Promise<IDashboardSalesResponse>;
|
|
32
|
+
projectInfo(): Promise<IDashboardProjectInfoResponse[]>;
|
|
26
33
|
}
|
|
@@ -52,15 +52,9 @@ type IChatType = ChatTypeEnum[number];
|
|
|
52
52
|
export interface IEditPreviewChatMessageRequest {
|
|
53
53
|
text_to_chat: string;
|
|
54
54
|
}
|
|
55
|
-
export interface IEditPreviewChatMessageResponse {
|
|
56
|
-
id: string;
|
|
57
|
-
text_to_chat: string;
|
|
58
|
-
}
|
|
59
55
|
export interface IRepository {
|
|
60
56
|
auth(): Promise<string>;
|
|
61
57
|
emails(): Promise<IGmailsResponse[]>;
|
|
62
|
-
executeGmailCommand(selector: IShared.IFindByIdRequest): Promise<IGmailsResponse | null>;
|
|
63
|
-
editPreviewChatMessage(selector: IShared.IFindByIdRequest, data: IEditPreviewChatMessageRequest): Promise<IEditPreviewChatMessageResponse | null>;
|
|
64
58
|
}
|
|
65
59
|
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
66
60
|
export {};
|
|
@@ -2,6 +2,7 @@ import * as IShared from '../../../shared/interface';
|
|
|
2
2
|
import { DocumentHeader, DocumentHeaderVirtuals, DocumentType, StartDocumentHeaderVirtuals, DocumentLineNote, VatTax } from '../../../shared/entities/stock';
|
|
3
3
|
import * as IDocumentType from '../documentType/interfaces';
|
|
4
4
|
import * as IPayment from '../payment/interface';
|
|
5
|
+
import * as IProjectInfo from '../../integration/projectInfo/interfaces';
|
|
5
6
|
export type Entity = DocumentHeader;
|
|
6
7
|
export declare const Route = "documentHeader";
|
|
7
8
|
export declare const UpperName = "DocumentHeader";
|
|
@@ -117,6 +118,7 @@ export interface ICreateFromHeaderRequest {
|
|
|
117
118
|
external_document_name?: string;
|
|
118
119
|
atcud?: string;
|
|
119
120
|
emission_date?: Date;
|
|
121
|
+
account_code?: string | null;
|
|
120
122
|
from_header: string[];
|
|
121
123
|
from_lines: string[];
|
|
122
124
|
payments: (IPayment.ICreateRequest | IPayment.ICreateForThisDocumentHeaderRequest)[];
|
|
@@ -198,8 +200,7 @@ export interface ITransferOwnershipRequest {
|
|
|
198
200
|
}
|
|
199
201
|
export interface IFindResponse {
|
|
200
202
|
document_header_id: string;
|
|
201
|
-
|
|
202
|
-
legacy_id: string | null;
|
|
203
|
+
document_label: string;
|
|
203
204
|
total: number;
|
|
204
205
|
emission_date: string;
|
|
205
206
|
line_count: number;
|
|
@@ -300,5 +301,6 @@ export interface IRepository {
|
|
|
300
301
|
documentThermalPrint(selector: IShared.IFindByIdRequest): Promise<string>;
|
|
301
302
|
documentList(selector: IShared.IFindByIdRequest, params: IDocumentListRequest): Promise<IDocumentListResponse[]>;
|
|
302
303
|
findStartDocumentHeaderSiblings(params: IShared.IFindByIdRequest): Promise<IFindStartDocumentHeaderSiblingsResponse>;
|
|
304
|
+
createSiteProposal(data: IShared.IBrokerTopicPayload[typeof IShared.IBrokerTopic.create_site_proposal]): Promise<IProjectInfo.ICreateResponse>;
|
|
303
305
|
}
|
|
304
306
|
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -61,6 +61,9 @@ export declare const DocumentTypeCodeTypeEnum: {
|
|
|
61
61
|
NCM: 'NCM';
|
|
62
62
|
ADM: 'ADM';
|
|
63
63
|
NCADM: 'NCADM';
|
|
64
|
+
FTO: 'FTO';
|
|
65
|
+
FRO: 'FRO';
|
|
66
|
+
REO: 'REO';
|
|
64
67
|
};
|
|
65
68
|
export type IDocumentTypeCodeType = (typeof DocumentTypeCodeTypeEnum)[keyof typeof DocumentTypeCodeTypeEnum];
|
|
66
69
|
export declare const documentTypeCodeTypes: string[];
|
|
@@ -1,11 +1,24 @@
|
|
|
1
1
|
import * as IShared from '../../../shared/interface';
|
|
2
|
+
export interface IPcTags {
|
|
3
|
+
id: string;
|
|
4
|
+
text: string;
|
|
5
|
+
}
|
|
6
|
+
export interface IPublicFindByOwnerIdRequest {
|
|
7
|
+
owner_id: string;
|
|
8
|
+
include_closed?: boolean;
|
|
9
|
+
}
|
|
2
10
|
export interface IPublicFindByOwnerIdResponse {
|
|
3
11
|
start_document_header_id: string;
|
|
4
12
|
label: string;
|
|
5
13
|
emission_date: Date;
|
|
6
14
|
pdf_link: string;
|
|
7
15
|
client_unread: number;
|
|
8
|
-
pc_tags:
|
|
16
|
+
pc_tags: IPcTags[];
|
|
17
|
+
pc_created_by: string;
|
|
18
|
+
closed?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export interface IPublicFindBySubscriberIdResponse extends IPublicFindByOwnerIdResponse {
|
|
21
|
+
chat_subscriber_id: string;
|
|
9
22
|
}
|
|
10
23
|
export declare enum IPublicDocumentHeaderNoteType {
|
|
11
24
|
Provider = "Provider",
|
|
@@ -29,7 +42,8 @@ export interface PublicDocumentHeaderNoteUpdateRequest {
|
|
|
29
42
|
note: string;
|
|
30
43
|
}
|
|
31
44
|
export interface IRepository {
|
|
32
|
-
publicFindByOwnerId(params:
|
|
45
|
+
publicFindByOwnerId(params: IPublicFindByOwnerIdRequest): Promise<IPublicFindByOwnerIdResponse[]>;
|
|
46
|
+
publicFindBySubscriberId(params: IPublicFindByOwnerIdRequest): Promise<IPublicFindBySubscriberIdResponse[]>;
|
|
33
47
|
createPublicDocumentHeaderNote: (data: PublicDocumentHeaderNoteCreateRequest[]) => Promise<PublicDocumentHeaderNote[]>;
|
|
34
48
|
updatePublicDocumentHeaderNote: (selector: IShared.IFindByIdRequest, data: PublicDocumentHeaderNoteUpdateRequest[]) => Promise<PublicDocumentHeaderNote[]>;
|
|
35
49
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { ChatSubscriber } from './../../../shared/entities/user';
|
|
1
|
+
import { ChatSubscriber, Persona } from './../../../shared/entities/user';
|
|
2
2
|
import * as IShared from '../../../shared/interface';
|
|
3
|
+
import { IChatType } from '../../stock/chat/interfaces';
|
|
3
4
|
export type Entity = ChatSubscriber;
|
|
4
5
|
export declare const Route = "chat_subscriber";
|
|
5
6
|
export declare const UpperName = "ChatSubscriber";
|
|
@@ -13,15 +14,25 @@ export interface IFindRequest {
|
|
|
13
14
|
owner_id: string;
|
|
14
15
|
document_header_id: string;
|
|
15
16
|
}
|
|
16
|
-
export type
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
};
|
|
17
|
+
export type IFindByOwnerResponse = Pick<Persona, 'external' | 'name' | 'email' | 'telephone'> & Pick<ChatSubscriber, 'id' | 'persona_id' | 'owner_id' | 'document_header_id'>;
|
|
18
|
+
export interface IFindByIdResponse extends IFindByOwnerResponse {
|
|
19
|
+
subscriptions: {
|
|
20
|
+
id: string;
|
|
21
|
+
document_header_id: string;
|
|
22
|
+
}[];
|
|
23
|
+
}
|
|
24
|
+
export interface IFindChatSubscriberPersona extends Pick<Persona, 'id' | 'external' | 'name' | 'email' | 'telephone'> {
|
|
25
|
+
contact: boolean;
|
|
26
|
+
}
|
|
27
|
+
export interface IFindChatSubscriberResponse {
|
|
28
|
+
personas: IFindChatSubscriberPersona[];
|
|
29
|
+
chat_type: IChatType;
|
|
30
|
+
}
|
|
22
31
|
export interface IRepository {
|
|
23
|
-
createOrUpdate(data: ICreateOrUpdateRequest): Promise<
|
|
24
|
-
|
|
32
|
+
createOrUpdate(data: ICreateOrUpdateRequest): Promise<string>;
|
|
33
|
+
findById(selector: IShared.IFindByIdRequest): Promise<IFindByIdResponse>;
|
|
34
|
+
findByOwner(selector: IFindRequest): Promise<IFindByOwnerResponse[]>;
|
|
35
|
+
clientWebAppFindByOwner(selector: IFindRequest): Promise<IFindChatSubscriberResponse>;
|
|
25
36
|
deleteOne(selector: IShared.IFindByIdRequest): Promise<void>;
|
|
26
37
|
}
|
|
27
38
|
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -39,6 +39,7 @@ export interface ICreateRequest {
|
|
|
39
39
|
user_id?: string;
|
|
40
40
|
main_persona: ICreateMainPersona;
|
|
41
41
|
deferred_payment?: boolean;
|
|
42
|
+
is_donation_eligible?: boolean;
|
|
42
43
|
default_discount?: number;
|
|
43
44
|
exemption_reason_id?: string | null;
|
|
44
45
|
newsletter?: boolean;
|
|
@@ -69,6 +70,7 @@ export interface IUpdateRequest {
|
|
|
69
70
|
default_delivery_method_id?: string | null;
|
|
70
71
|
default_vehicle_id?: string | null;
|
|
71
72
|
deferred_payment?: boolean;
|
|
73
|
+
is_donation_eligible?: boolean;
|
|
72
74
|
}
|
|
73
75
|
export interface IRepository {
|
|
74
76
|
findById(selector: IShared.IFindByIdRequest): Promise<IFindByIdResponse | null>;
|
|
@@ -78,7 +80,6 @@ export interface IRepository {
|
|
|
78
80
|
find(selector: IFindRequest): Promise<IFindResponse[]>;
|
|
79
81
|
findPaginated(selector: IFindPaginatedRequest): Promise<IFindWithPaginationResponse>;
|
|
80
82
|
create(data: ICreateRequest): Promise<IFindResponse>;
|
|
81
|
-
createOrUpdate(data: ICreateRequest): Promise<IFindResponse>;
|
|
82
83
|
update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<IFindResponse | null>;
|
|
83
84
|
deleteOne(selector: IShared.IFindByIdRequest): Promise<IFindResponse | null>;
|
|
84
85
|
}
|
|
@@ -15,6 +15,7 @@ export interface IFindByOwnerIdResponse extends IEntityExtended {
|
|
|
15
15
|
contact: boolean;
|
|
16
16
|
}
|
|
17
17
|
export interface ICreateRequest {
|
|
18
|
+
external: boolean;
|
|
18
19
|
name: string | null;
|
|
19
20
|
nif: string | null;
|
|
20
21
|
street: string | null;
|
|
@@ -33,6 +34,7 @@ export interface ICreateRequest {
|
|
|
33
34
|
contact?: boolean;
|
|
34
35
|
}
|
|
35
36
|
export interface IUpdateRequest {
|
|
37
|
+
external?: boolean;
|
|
36
38
|
name?: string | null;
|
|
37
39
|
nif?: string | null;
|
|
38
40
|
street?: string | null;
|
|
@@ -62,20 +64,17 @@ export interface IFindRequest {
|
|
|
62
64
|
}
|
|
63
65
|
export interface IFindResponse {
|
|
64
66
|
persona_id: string;
|
|
65
|
-
persona_name: string;
|
|
67
|
+
persona_name: string | null;
|
|
66
68
|
persona_nif: string | null;
|
|
67
|
-
persona_street: string;
|
|
68
|
-
persona_postal_code: string;
|
|
69
|
-
persona_locality: string;
|
|
70
|
-
persona_country_id: string;
|
|
69
|
+
persona_street: string | null;
|
|
70
|
+
persona_postal_code: string | null;
|
|
71
|
+
persona_locality: string | null;
|
|
72
|
+
persona_country_id: string | null;
|
|
71
73
|
}
|
|
72
74
|
export interface IDeletePersonaRequest {
|
|
73
75
|
id: string;
|
|
74
76
|
new_main_persona_id?: string;
|
|
75
77
|
}
|
|
76
|
-
export interface IFindContactPersonaByOwnerId extends Pick<Persona, 'id' | 'name' | 'email' | 'telephone'> {
|
|
77
|
-
chat_type: IChatType;
|
|
78
|
-
}
|
|
79
78
|
export interface IFindByEmailRequest {
|
|
80
79
|
email: string;
|
|
81
80
|
}
|
|
@@ -124,12 +123,11 @@ export interface IFindForGmailResponse {
|
|
|
124
123
|
export interface IRepository {
|
|
125
124
|
findById(selector: IShared.IFindByIdRequest): Promise<IEntityExtended | null>;
|
|
126
125
|
findByOwnerId(params: IShared.IFindByOwnerIdRequest): Promise<IFindByOwnerIdResponse[]>;
|
|
127
|
-
findContactPersonaByOwnerId(params: IShared.IFindByOwnerIdRequest): Promise<IFindContactPersonaByOwnerId>;
|
|
128
126
|
create(data: ICreateRequest): Promise<IEntityExtended>;
|
|
129
127
|
update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<IEntityExtended | null>;
|
|
130
128
|
deleteOne(params: IDeletePersonaRequest): Promise<IEntityExtended | null>;
|
|
131
129
|
findByBasic(data: IBasicSearchRequest): Promise<IShared.IPaginationResponse<IBasicSearchResponse>>;
|
|
132
|
-
|
|
130
|
+
findForBillOfLading(data: IFindRequest): Promise<IFindResponse[]>;
|
|
133
131
|
findByEmail(data: IFindByEmailRequest): Promise<IFindByEmailResponse[]>;
|
|
134
132
|
findClientOrProvider(data: IFindClientOrProviderRequest): Promise<IFindClientOrProviderResponse[]>;
|
|
135
133
|
findForGmail(data: IFindForGmailRequest): Promise<IFindForGmailResponse | null>;
|
|
@@ -40,6 +40,7 @@ export interface ICreateRequest {
|
|
|
40
40
|
inactive?: boolean;
|
|
41
41
|
default_discount?: number;
|
|
42
42
|
exemption_reason_id?: string | null;
|
|
43
|
+
default_account_code?: string | null;
|
|
43
44
|
main_persona: ICreateMainPersona;
|
|
44
45
|
provider_type_id?: string | null;
|
|
45
46
|
country_id?: string | null;
|
|
@@ -66,6 +67,8 @@ export interface IUpdateRequest {
|
|
|
66
67
|
default_maturity_date_id?: string;
|
|
67
68
|
default_delivery_method_id?: string;
|
|
68
69
|
default_vehicle_id?: string | null;
|
|
70
|
+
exemption_reason_id?: string | null;
|
|
71
|
+
default_account_code?: string | null;
|
|
69
72
|
}
|
|
70
73
|
export interface IFindByNumberRequest {
|
|
71
74
|
number: number;
|
|
@@ -4,10 +4,9 @@ export interface ICreateRequest {
|
|
|
4
4
|
password: string;
|
|
5
5
|
}
|
|
6
6
|
export interface ICreateResponse {
|
|
7
|
-
access_token: string;
|
|
8
7
|
user: Users.IFindByAccountResponse;
|
|
8
|
+
access_token: string;
|
|
9
9
|
refresh_token: string;
|
|
10
|
-
roles: string[];
|
|
11
10
|
expiresInToken: number;
|
|
12
11
|
expiresInRefreshToken: number;
|
|
13
12
|
}
|