@nomalism-com/types 1.2.4 → 1.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +338 -164
- package/dist/main.d.ts +16 -3
- package/dist/modules/document/NPF/interface.d.ts +17 -0
- package/dist/modules/document/NPF/route.schema.d.ts +2 -0
- package/dist/modules/document/NRCL/interface.d.ts +26 -0
- package/dist/modules/document/NRCL/route.schema.d.ts +2 -0
- package/dist/modules/document/inventario/interface.d.ts +2 -0
- package/dist/modules/document/inventario/route.schema.d.ts +1 -0
- package/dist/modules/document/materialEntrance/interfaces.d.ts +1 -0
- package/dist/modules/document/order/interfaces.d.ts +1 -0
- package/dist/modules/document/proforma/interfaces.d.ts +7 -0
- package/dist/modules/document/proforma/route.schema.d.ts +2 -1
- package/dist/modules/document/propostaSheets/interface.d.ts +18 -4
- package/dist/modules/integration/projectInfo/interfaces.d.ts +1 -1
- package/dist/modules/stock/dashboard/interface.d.ts +7 -3
- package/dist/modules/stock/gmails/interface.d.ts +66 -0
- package/dist/modules/stock/gmails/route.schema.d.ts +2 -0
- package/dist/modules/stock/googleSheetPool/interface.d.ts +10 -0
- package/dist/modules/stock/prison/interface.d.ts +4 -1
- package/dist/modules/stock/productGoogleSheets/interface.d.ts +5 -0
- package/dist/modules/stock/savedProviderProposal/interfaces.d.ts +2 -5
- package/dist/modules/stock/savedProviderProposal/route.schema.d.ts +1 -2
- package/dist/modules/supply/currentAccount/interface.d.ts +146 -0
- package/dist/modules/supply/currentAccount/route.schema.d.ts +9 -0
- package/dist/modules/supply/documentHeader/interfaces.d.ts +3 -55
- package/dist/modules/supply/documentHeader/route.schema.d.ts +0 -1
- package/dist/modules/supply/documentLine/interfaces.d.ts +1 -0
- package/dist/modules/supply/documentLine/route.schema.d.ts +2 -2
- package/dist/modules/supply/documentLineNote/interfaces.d.ts +2 -8
- package/dist/modules/supply/documentLineNote/route.schema.d.ts +1 -5
- package/dist/modules/supply/documentType/interfaces.d.ts +1 -0
- package/dist/modules/supply/externalDocumentHeader/interface.d.ts +20 -50
- package/dist/modules/supply/externalDocumentHeader/route.schema.d.ts +0 -2
- package/dist/modules/supply/orderManagement/interface.d.ts +2 -2
- package/dist/modules/supply/payment/interface.d.ts +2 -108
- package/dist/modules/supply/payment/route.schema.d.ts +0 -6
- package/dist/modules/supply/paymentBatch/interface.d.ts +57 -0
- package/dist/modules/supply/paymentBatch/route.schema.d.ts +4 -0
- package/dist/modules/ui/portal/interface.d.ts +36 -0
- package/dist/modules/ui/portal/route.schema.d.ts +3 -0
- package/dist/modules/{stock → ui}/sideMenu/interface.d.ts +18 -15
- package/dist/modules/user/chatSubscribers/interfaces.d.ts +7 -5
- package/dist/modules/user/chatSubscribers/route.schema.d.ts +1 -0
- package/dist/modules/user/persona/interface.d.ts +9 -0
- package/dist/modules/user/persona/route.schema.d.ts +1 -0
- package/dist/modules/user/providers/interface.d.ts +8 -0
- package/dist/modules/user/providers/route.schema.d.ts +1 -0
- package/dist/modules/user/storeOperator/interface.d.ts +16 -6
- package/dist/modules/user/storeOperator/route.schema.d.ts +1 -0
- package/dist/modules/user/users/interface.d.ts +3 -3
- package/dist/shared/entities/integration.d.ts +2 -1
- package/dist/shared/entities/stock.d.ts +44 -3
- package/dist/shared/entities/user.d.ts +2 -0
- package/dist/shared/interface.d.ts +20 -10
- package/package.json +3 -3
- package/dist/modules/{stock → ui}/sideMenu/route.schema.d.ts +1 -1
package/dist/main.d.ts
CHANGED
|
@@ -213,8 +213,8 @@ import * as Dashboard from './modules/stock/dashboard/interface';
|
|
|
213
213
|
import * as DashboardRoutes from './modules/stock/dashboard/route.schema';
|
|
214
214
|
import * as ChatRapidMessage from './modules/stock/chatRapidMessage/interface';
|
|
215
215
|
import * as ChatRapidMessageRoutes from './modules/stock/chatRapidMessage/route.schema';
|
|
216
|
-
import * as SideMenu from './modules/
|
|
217
|
-
import * as SideMenuRoutes from './modules/
|
|
216
|
+
import * as SideMenu from './modules/ui/sideMenu/interface';
|
|
217
|
+
import * as SideMenuRoutes from './modules/ui/sideMenu/route.schema';
|
|
218
218
|
import * as AdminPanel from './modules/view/adminPanel/interfaces';
|
|
219
219
|
import * as ErrorLog from './modules/view/errorLog/interfaces';
|
|
220
220
|
import * as ErrorLogRoutes from './modules/view/errorLog/route.schema';
|
|
@@ -226,4 +226,17 @@ import * as ChatSubscriber from './modules/user/chatSubscribers/interfaces';
|
|
|
226
226
|
import * as ChatSubscriberRoutes from './modules/user/chatSubscribers/route.schema';
|
|
227
227
|
import * as Tag from './modules/stock/tag/interface';
|
|
228
228
|
import * as TagRoutes from './modules/stock/tag/route.schema';
|
|
229
|
-
|
|
229
|
+
import * as Gmails from './modules/stock/gmails/interface';
|
|
230
|
+
import * as GmailsRoutes from './modules/stock/gmails/route.schema';
|
|
231
|
+
import * as NPF from './modules/document/NPF/interface';
|
|
232
|
+
import * as NPFRoutes from './modules/document/NPF/route.schema';
|
|
233
|
+
import * as NRCL from './modules/document/NRCL/interface';
|
|
234
|
+
import * as NRCLRoutes from './modules/document/NRCL/route.schema';
|
|
235
|
+
import * as CurrentAccount from './modules/supply/currentAccount/interface';
|
|
236
|
+
import * as CurrentAccountRoutes from './modules/supply/currentAccount/route.schema';
|
|
237
|
+
import * as PaymentBatch from './modules/supply/paymentBatch/interface';
|
|
238
|
+
import * as PaymentBatchRoutes from './modules/supply/paymentBatch/route.schema';
|
|
239
|
+
import * as Portal from './modules/ui/portal/interface';
|
|
240
|
+
import * as PortalRoutes from './modules/ui/portal/route.schema';
|
|
241
|
+
import * as GoogleSheetPool from './modules/stock/googleSheetPool/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, GroupPermissions, GroupPermissionsRoutes, GoogleSheets, GoogleSheetsRoutes, Language, LanguageRoutes, Location, LocationRoutes, MaturityDates, MaturityDatesRoutes, Multimedia, MultimediaRoutes, OrderManagement, Observation, ObservationRoutes, ObservationType, ObservationTypeRoutes, Password, PasswordRoutes, Payment, PaymentRoutes, PaymentMethods, PaymentMethodsRoutes, Permissions, PermissionsRoutes, ProductImage, ProductImageRoutes, Promotion, PromotionRoutes, PromotionAssoc, PromotionAssocRoutes, Providers, ProvidersRoutes, ProviderType, ProviderTypeRoutes, PurchaseConditions, PurchaseConditionsRoutes, ReasonForExemption, ReasonForExemptionRoutes, RefreshToken, RefreshTokenRoutes, SegmentsArea, SegmentsAreaRoutes, Sessions, SessionsRoutes, Shippings, ShippingsRoutes, StoreOperator, StoreOperatorRoutes, Swift, SwiftRoutes, TypeOfLocation, TypeOfLocationRoutes, UnitOfMeasure, UnitOfMeasureRoutes, UserPermissions, UserPermissionsRoutes, UserPositions, UserPositionsRoutes, Users, UsersRoutes, UserTokens, UserTokensRoutes, VatValidation, VatValidationRoutes, VatTax, VatTaxRoutes, VatTaxZone, VatTaxZoneRoutes, Vehicles, VehiclesRoutes, Workflow, WorkflowRoutes, StockMovement, StockMovementRoutes, Tenant, TenantRoutes, PreSale, PreSaleRoutes, PreSaleProduct, PreSaleProductRoutes, Npc, NpcRoutes, Printer, PrinterRoutes, SchedulePrintJob, SchedulePrintJobRoutes, QueryList, QueryListRoutes, QueryParameter, QueryParameterRoutes, ReturnReason, ReturnReasonRoutes, PropostaSheets, PropostaSheetsRoutes, Schedule, ScheduleRoutes, GoogleFilePermission, GoogleFilePermissionRoutes, Settings, SettingsRoutes, Tickets, TicketsRoutes, Channel, ChannelRoutes, TicketsLanguage, TicketsLanguageRoutes, CLT, CLTRoutes, StartDocumentHeaderLastUpdate, Persona, PersonaRoutes, ProjectInfo, ProjectInfoRoutes, EmailVerification, EmailVerificationRoutes, EmailLog, EmailLogRoutes, Purchase, PurchaseRoutes, Order, OrderRoutes, MaterialEntrance, MaterialEntranceRoutes, Transformado, TransformadoRoutes, Quebra, QuebraRoutes, UpfrontReturn, UpfrontReturnRoutes, SavedEmPicking, SavedEmPickingRoutes, EmailTemplate, EmailTemplateRoutes, EmailTemplateAttachment, EmailTemplateAttachmentRoutes, Inventario, InventarioRoutes, ReturnToProvider, ReturnToProviderRoutes, Prison, PrisonRoutes, DocumentLineNote, DocumentLineNoteRoutes, SavedProviderProposal, SavedProviderProposalRoutes, ProductGoogleSheets, ProductGoogleSheetsRoutes, Task, TaskRoutes, TaskMessage, TaskMessageRoutes, RecurrentTasks, TaskRead, TaskReadRoutes, Theme, ThemeRoutes, Dashboard, DashboardRoutes, ChatRapidMessage, ChatRapidMessageRoutes, SideMenu, SideMenuRoutes, AdminPanel, ErrorLog, ErrorLogRoutes, DocumentLineRm, DocumentLineRmRoutes, DocumentLineMt, DocumentLineMtRoutes, ChatSubscriber, ChatSubscriberRoutes, Tag, TagRoutes, Gmails, GmailsRoutes, NPF, NPFRoutes, NRCL, NRCLRoutes, CurrentAccount, CurrentAccountRoutes, PaymentBatch, PaymentBatchRoutes, Portal, PortalRoutes, GoogleSheetPool, };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as IShared from '../../../shared/interface';
|
|
2
|
+
export declare const Route = "npf";
|
|
3
|
+
export interface IProviderPaymentDocument {
|
|
4
|
+
document_header_id: string;
|
|
5
|
+
value: number;
|
|
6
|
+
discount_value?: number | null;
|
|
7
|
+
}
|
|
8
|
+
export interface IProviderPaymentRequest {
|
|
9
|
+
provider_id: string;
|
|
10
|
+
client_id: string | null;
|
|
11
|
+
documents: IProviderPaymentDocument[];
|
|
12
|
+
total: number;
|
|
13
|
+
}
|
|
14
|
+
export interface IRepository {
|
|
15
|
+
create(params: IProviderPaymentRequest[]): Promise<string[]>;
|
|
16
|
+
}
|
|
17
|
+
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as IShared from '../../../shared/interface';
|
|
2
|
+
import { DocumentHeader } from '../../../shared/entities/stock';
|
|
3
|
+
export type Entity = Omit<DocumentHeader, 'external_data'>;
|
|
4
|
+
export declare const Route = "documentHeader";
|
|
5
|
+
export declare const UpperName = "DocumentHeader";
|
|
6
|
+
export declare const LowerName: string;
|
|
7
|
+
export interface IMultipleRegularizationPayments {
|
|
8
|
+
value: number;
|
|
9
|
+
payment_method_id: string;
|
|
10
|
+
payment_method: string;
|
|
11
|
+
}
|
|
12
|
+
export type IMultipleRegularizationPaymentsType = 'credit' | 'debit';
|
|
13
|
+
export interface IMultipleRegularizationDocuments {
|
|
14
|
+
owner_id: string;
|
|
15
|
+
document_header_id: string;
|
|
16
|
+
type: IMultipleRegularizationPaymentsType;
|
|
17
|
+
value: number;
|
|
18
|
+
}
|
|
19
|
+
export interface IMultipleRegularizations {
|
|
20
|
+
documents: IMultipleRegularizationDocuments[];
|
|
21
|
+
payments?: IMultipleRegularizationPayments[];
|
|
22
|
+
}
|
|
23
|
+
export interface IRepository {
|
|
24
|
+
create(data: IMultipleRegularizations): Promise<void>;
|
|
25
|
+
}
|
|
26
|
+
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -6,10 +6,12 @@ export interface ICreateInventoryRequest {
|
|
|
6
6
|
product_id: string;
|
|
7
7
|
registered_quantity: number;
|
|
8
8
|
inventory_quantity: number;
|
|
9
|
+
note?: string;
|
|
9
10
|
created_by?: string;
|
|
10
11
|
updated_by?: string;
|
|
11
12
|
}
|
|
12
13
|
export interface IRepository {
|
|
13
14
|
createInventory(data: ICreateInventoryRequest): Promise<void>;
|
|
15
|
+
createManyInventory(data: ICreateInventoryRequest[]): Promise<void>;
|
|
14
16
|
}
|
|
15
17
|
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -4,6 +4,7 @@ export declare const UpperName = "Order";
|
|
|
4
4
|
export declare const LowerName: string;
|
|
5
5
|
export interface IUndoProviderOrderRequest {
|
|
6
6
|
document_line_ids: string[];
|
|
7
|
+
send_notification: boolean;
|
|
7
8
|
}
|
|
8
9
|
export declare const ConferirEncomendaClienteOptionsEnum: {
|
|
9
10
|
'Por Confirmar': 'Por Confirmar';
|
|
@@ -6,7 +6,14 @@ export interface ICreateRequest {
|
|
|
6
6
|
product_designation: string;
|
|
7
7
|
price_sale: number;
|
|
8
8
|
}
|
|
9
|
+
export interface ICreateFromLinesRequest {
|
|
10
|
+
document_header_id?: string;
|
|
11
|
+
from_document_header_id: string;
|
|
12
|
+
document_type_id: number;
|
|
13
|
+
document_line_ids: string[];
|
|
14
|
+
}
|
|
9
15
|
export interface IRepository {
|
|
10
16
|
create(params: ICreateRequest): Promise<void>;
|
|
17
|
+
createFromLines(params: ICreateFromLinesRequest): Promise<void>;
|
|
11
18
|
}
|
|
12
19
|
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import joi from 'joi';
|
|
2
|
-
import { type ICreateRequest } from './interfaces';
|
|
2
|
+
import { type ICreateFromLinesRequest, type ICreateRequest } from './interfaces';
|
|
3
3
|
export declare const createBody: joi.ObjectSchema<ICreateRequest>;
|
|
4
|
+
export declare const createFromLinesBody: joi.ObjectSchema<ICreateFromLinesRequest>;
|
|
@@ -58,17 +58,31 @@ export interface IRmGetDataBySheetIdResponse {
|
|
|
58
58
|
export interface IRmUpdateDataBySheetIdRequest {
|
|
59
59
|
data: IData[];
|
|
60
60
|
}
|
|
61
|
+
export interface IFindRmOpenDocuments {
|
|
62
|
+
created_at: string;
|
|
63
|
+
created_by: string;
|
|
64
|
+
document_header_id: string;
|
|
65
|
+
document_number: string;
|
|
66
|
+
identifier: string;
|
|
67
|
+
adjudicated: boolean;
|
|
68
|
+
who_handles: string | null;
|
|
69
|
+
document_lines: {
|
|
70
|
+
document_line_id: string;
|
|
71
|
+
product_id: string;
|
|
72
|
+
product_reference: string;
|
|
73
|
+
designation: string;
|
|
74
|
+
}[];
|
|
75
|
+
}
|
|
61
76
|
export interface IRepository {
|
|
62
77
|
importFromSheet(params: IImportFromSheetRequest): Promise<IFindByGooglesheetIdResponse>;
|
|
63
78
|
isProcessing(params: IShared.IFindByIdRequest): Promise<IIsProcessingResponse>;
|
|
64
79
|
conflictAccept(params: IShared.IFindByIdRequest): Promise<void>;
|
|
65
80
|
conflictDelete(params: IShared.IFindByIdRequest): Promise<void>;
|
|
66
81
|
conflictFindByOwnerId(params: IShared.IFindByOwnerIdRequest): Promise<IConflictFindByOwnerIdResponse[]>;
|
|
67
|
-
rmGetDataBySheetId(params: IShared.IFindByIdRequest): Promise<IRmGetDataBySheetIdResponse>;
|
|
68
|
-
rmUpdateDataBySheetId(params: IShared.IFindByIdRequest, body: IRmUpdateDataBySheetIdRequest): Promise<void>;
|
|
69
|
-
}
|
|
70
|
-
export interface IApi extends IRepository {
|
|
71
82
|
createSheetFromDocument(params: IShared.IFindByIdRequest): Promise<ICreateSheetFromDocumentResponse>;
|
|
72
83
|
cloneSheetToNewDocument(params: ICloneSheetToNewDocumentRequest): Promise<ICloneSheetToNewDocumentResponse>;
|
|
84
|
+
rmGetDataBySheetId(params: IShared.IFindByIdRequest): Promise<IRmGetDataBySheetIdResponse>;
|
|
85
|
+
rmUpdateDataBySheetId(params: IShared.IFindByIdRequest, body: IRmUpdateDataBySheetIdRequest): Promise<void>;
|
|
86
|
+
findRmOpenDocuments(): Promise<IFindRmOpenDocuments[]>;
|
|
73
87
|
}
|
|
74
88
|
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -10,7 +10,7 @@ export declare const IProjectInfoTypeEnum: {
|
|
|
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, 'created_at' | 'updated_at' | 'document_header_id' | 'id'>;
|
|
13
|
+
export type ISendEmail = Omit<Entity, 'created_at' | 'updated_at' | 'document_header_id' | 'id' | 'email_log'>;
|
|
14
14
|
export interface IController {
|
|
15
15
|
sendEmail(data: ISendEmail): Promise<void>;
|
|
16
16
|
}
|
|
@@ -2,11 +2,15 @@ export declare const Route = "dashboard";
|
|
|
2
2
|
export declare const UpperName = "Dashboard";
|
|
3
3
|
export declare const LowerName: string;
|
|
4
4
|
export type IDashboardNames = 'dia' | 'mes' | 'ano';
|
|
5
|
+
export interface IGroupedValue {
|
|
6
|
+
sheets: number;
|
|
7
|
+
outros: number;
|
|
8
|
+
}
|
|
5
9
|
export interface IData {
|
|
6
10
|
chave: number;
|
|
7
|
-
faturaRecibo:
|
|
8
|
-
fatura:
|
|
9
|
-
adiantamento:
|
|
11
|
+
faturaRecibo: IGroupedValue;
|
|
12
|
+
fatura: IGroupedValue;
|
|
13
|
+
adiantamento: IGroupedValue;
|
|
10
14
|
}
|
|
11
15
|
export interface IDashboardResponse {
|
|
12
16
|
id: number;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import * as IShared from '../../../shared/interface';
|
|
2
|
+
import { Gmails } from '../../../shared/entities/stock';
|
|
3
|
+
export type Entity = Gmails;
|
|
4
|
+
export declare const Route = "gmail";
|
|
5
|
+
export declare const UpperName = "Gmail";
|
|
6
|
+
export declare const LowerName: string;
|
|
7
|
+
export interface IGmailEmailWithAction {
|
|
8
|
+
id: string;
|
|
9
|
+
from: string;
|
|
10
|
+
subject: string;
|
|
11
|
+
gmail_id: string;
|
|
12
|
+
gmail_internal_date: number;
|
|
13
|
+
gmail_payload: unknown;
|
|
14
|
+
gmail_snippet: string;
|
|
15
|
+
action: string;
|
|
16
|
+
}
|
|
17
|
+
export interface IGmailEmailWithActionAndDocumentNumber {
|
|
18
|
+
id: string;
|
|
19
|
+
from: string;
|
|
20
|
+
subject: string;
|
|
21
|
+
gmail_id: string;
|
|
22
|
+
gmail_internal_date: number;
|
|
23
|
+
gmail_snippet: string;
|
|
24
|
+
action: string;
|
|
25
|
+
document_number?: number;
|
|
26
|
+
}
|
|
27
|
+
export interface IWebsiteProposalGmailSearchResponse {
|
|
28
|
+
id: string;
|
|
29
|
+
document_number: number;
|
|
30
|
+
owner_id: string;
|
|
31
|
+
}
|
|
32
|
+
export interface IGmailsResponse {
|
|
33
|
+
id: string;
|
|
34
|
+
gmail_id: string;
|
|
35
|
+
gmail_from: string;
|
|
36
|
+
gmail_to: string;
|
|
37
|
+
gmail_subject: string;
|
|
38
|
+
gmail_internal_date: number;
|
|
39
|
+
gmail_snippet: string;
|
|
40
|
+
gmail_labels: string[];
|
|
41
|
+
action: string;
|
|
42
|
+
proposals: number[];
|
|
43
|
+
done: Date | null;
|
|
44
|
+
chat_persona_name: string | null;
|
|
45
|
+
chat_type: IChatType | null;
|
|
46
|
+
text_to_chat: string | null;
|
|
47
|
+
proposal_url: string | null;
|
|
48
|
+
gmail_attachments: unknown[] | null;
|
|
49
|
+
}
|
|
50
|
+
type ChatTypeEnum = readonly ['por_proposta', 'global'];
|
|
51
|
+
type IChatType = ChatTypeEnum[number];
|
|
52
|
+
export interface IEditPreviewChatMessageRequest {
|
|
53
|
+
text_to_chat: string;
|
|
54
|
+
}
|
|
55
|
+
export interface IEditPreviewChatMessageResponse {
|
|
56
|
+
id: string;
|
|
57
|
+
text_to_chat: string;
|
|
58
|
+
}
|
|
59
|
+
export interface IRepository {
|
|
60
|
+
auth(): Promise<string>;
|
|
61
|
+
emails(): Promise<IGmailsResponse[]>;
|
|
62
|
+
executeGmailCommand(selector: IShared.IFindByIdRequest): Promise<IGmailsResponse | null>;
|
|
63
|
+
editPreviewChatMessage(selector: IShared.IFindByIdRequest, data: IEditPreviewChatMessageRequest): Promise<IEditPreviewChatMessageResponse | null>;
|
|
64
|
+
}
|
|
65
|
+
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
66
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as IShared from '../../../shared/interface';
|
|
2
|
+
import { GoogleSheetPool } from '../../../shared/entities/stock';
|
|
3
|
+
export type Entity = GoogleSheetPool;
|
|
4
|
+
export declare const Route = "google_sheet_pool";
|
|
5
|
+
export declare const UpperName = "GoogleSheetPool";
|
|
6
|
+
export declare const LowerName: string;
|
|
7
|
+
export interface IRepository {
|
|
8
|
+
clearAndFill(): Promise<void>;
|
|
9
|
+
}
|
|
10
|
+
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -29,6 +29,9 @@ export interface ICheckLinesInPrisonRequest {
|
|
|
29
29
|
option: ICheckLineInPrisonOptions;
|
|
30
30
|
lines: ICheckLinesInPrisonLinesRequest[];
|
|
31
31
|
}
|
|
32
|
+
export interface ICheckLinesInPrisonResponse {
|
|
33
|
+
df_dh_id?: string;
|
|
34
|
+
}
|
|
32
35
|
export interface ICreateLinesInPrisonProduct {
|
|
33
36
|
id: string;
|
|
34
37
|
quantity: number;
|
|
@@ -43,7 +46,7 @@ export interface IRepository {
|
|
|
43
46
|
findLinesInPrisonProviders(): Promise<IShared.IFindMinifiedResponse[]>;
|
|
44
47
|
putLineInPrison(params: IShared.IFindByIdRequest): Promise<void>;
|
|
45
48
|
removeLineFromPrison(params: IShared.IFindByIdRequest): Promise<void>;
|
|
46
|
-
checkLinesInPrison(params: ICheckLinesInPrisonRequest): Promise<
|
|
49
|
+
checkLinesInPrison(params: ICheckLinesInPrisonRequest): Promise<ICheckLinesInPrisonResponse>;
|
|
47
50
|
createLinesInPrison(params: ICreateLinesInPrisonRequest): Promise<string[]>;
|
|
48
51
|
}
|
|
49
52
|
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -141,6 +141,7 @@ export interface IEntityMinified {
|
|
|
141
141
|
tax: number;
|
|
142
142
|
multimedia_id: string | null;
|
|
143
143
|
integer_only: boolean;
|
|
144
|
+
total: number;
|
|
144
145
|
}
|
|
145
146
|
export interface IPrintLabelQueryRequest {
|
|
146
147
|
token: string;
|
|
@@ -210,6 +211,10 @@ export interface IProductLocation {
|
|
|
210
211
|
location_number: number;
|
|
211
212
|
product_id: string[];
|
|
212
213
|
}
|
|
214
|
+
export interface IProductByOwner {
|
|
215
|
+
id: string;
|
|
216
|
+
reference: string;
|
|
217
|
+
}
|
|
213
218
|
export interface IRepository {
|
|
214
219
|
basicSearch(params: IBasicSearchRequest): Promise<IShared.IPaginationResponse<IBasicSearchResponse>>;
|
|
215
220
|
findReferenceAndIdForMobile(params: IFindForMobileRequest): Promise<IFindReferenceAndIdForMobileResponse | null>;
|
|
@@ -4,7 +4,7 @@ export type Entity = SavedProviderProposal;
|
|
|
4
4
|
export declare const Route = "saved_provider_proposal";
|
|
5
5
|
export declare const UpperName = "SavedProviderProposal";
|
|
6
6
|
export declare const LowerName: string;
|
|
7
|
-
export interface
|
|
7
|
+
export interface ISetRequest {
|
|
8
8
|
provider_id: string;
|
|
9
9
|
product_id: string;
|
|
10
10
|
quantity: number;
|
|
@@ -13,11 +13,8 @@ export interface IFindManyResponse {
|
|
|
13
13
|
product_id: string;
|
|
14
14
|
quantity: number;
|
|
15
15
|
}
|
|
16
|
-
export type IUpdateRequest = Omit<ICreateRequest, 'provider_id' | 'product_id'>;
|
|
17
16
|
export interface IRepository {
|
|
18
17
|
findByProviderId(selector: IShared.IFindByIdRequest): Promise<IFindManyResponse[]>;
|
|
19
|
-
|
|
20
|
-
update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<void>;
|
|
21
|
-
deleteOne(selector: IShared.IFindByIdRequest): Promise<void>;
|
|
18
|
+
set(data: ISetRequest): Promise<void>;
|
|
22
19
|
}
|
|
23
20
|
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import * as IShared from '../../../shared/interface';
|
|
2
|
+
import { Payment, DocumentHeader } from '../../../shared/entities/stock';
|
|
3
|
+
import * as IObservation from '../../integration/observation/interfaces';
|
|
4
|
+
import { type ICreateFromHeaderRequest } from '../documentHeader/interfaces';
|
|
5
|
+
export type Entity = Payment;
|
|
6
|
+
export declare const Route = "payment";
|
|
7
|
+
export declare const UpperName = "Payment";
|
|
8
|
+
export declare const LowerName: string;
|
|
9
|
+
type IEntityExtended = Entity;
|
|
10
|
+
export type IFindByIdResponse = Omit<IEntityExtended, ''>;
|
|
11
|
+
export type IFindByOwnerIdResponse = Omit<IEntityExtended, ''>;
|
|
12
|
+
export type IFindRequest = Record<string, unknown>;
|
|
13
|
+
export type IFindResponse = Omit<IEntityExtended, ''>;
|
|
14
|
+
export interface IFindPaginatedRequest extends IFindRequest, IShared.IPaginationRequest {
|
|
15
|
+
}
|
|
16
|
+
export type IFindWithPaginationResponse = IShared.IPaginationResponse<Omit<IEntityExtended, ''>>;
|
|
17
|
+
export interface ICreateForThisDocumentHeaderRequest {
|
|
18
|
+
date: Date;
|
|
19
|
+
debit: number;
|
|
20
|
+
credit: number;
|
|
21
|
+
payment_method_id?: string | null;
|
|
22
|
+
payment_method?: string | null;
|
|
23
|
+
notes: string | null;
|
|
24
|
+
}
|
|
25
|
+
export interface ICreateRequest extends ICreateForThisDocumentHeaderRequest {
|
|
26
|
+
document_header_id: string;
|
|
27
|
+
}
|
|
28
|
+
export interface ICurrentAccountNotes {
|
|
29
|
+
date: string;
|
|
30
|
+
credit: number | null;
|
|
31
|
+
debit: number | null;
|
|
32
|
+
iban: string | null;
|
|
33
|
+
payment_batch_id: string | null;
|
|
34
|
+
payment_method: string | null;
|
|
35
|
+
notes: string | null;
|
|
36
|
+
owner_name: string;
|
|
37
|
+
created_at: string;
|
|
38
|
+
created_by: string;
|
|
39
|
+
updated_at: string;
|
|
40
|
+
updated_by: string;
|
|
41
|
+
}
|
|
42
|
+
export interface IFindCurrentAccountByOwnerIdResponse {
|
|
43
|
+
payment_date: string;
|
|
44
|
+
emission_date: string;
|
|
45
|
+
document_description: string;
|
|
46
|
+
document_name: string;
|
|
47
|
+
debit: number;
|
|
48
|
+
credit: number;
|
|
49
|
+
notes: ICurrentAccountNotes[];
|
|
50
|
+
por_regularizar: number;
|
|
51
|
+
balance: number;
|
|
52
|
+
href?: string | null;
|
|
53
|
+
}
|
|
54
|
+
export interface IUnpaidPurchasesRequest {
|
|
55
|
+
provider_id: string;
|
|
56
|
+
client_id: string | null;
|
|
57
|
+
}
|
|
58
|
+
export interface IUnpaidByDatePurchasesRequest {
|
|
59
|
+
due_date: Date;
|
|
60
|
+
}
|
|
61
|
+
export type IPaymentOrigin = 'CC Fornecedor' | 'CC Cliente' | 'CC Fornecedor (Descontinuado)' | 'CC Cliente (Descontinuado)';
|
|
62
|
+
export interface IUnpaidPurchasesResponse extends Pick<Entity, 'date' | 'debit' | 'credit'> {
|
|
63
|
+
document_header: Pick<DocumentHeader, 'emission_date' | 'pdf_link' | 'id'>;
|
|
64
|
+
origin: IPaymentOrigin;
|
|
65
|
+
document_type_code: string | null;
|
|
66
|
+
document_name: string;
|
|
67
|
+
user?: {
|
|
68
|
+
user_name: string;
|
|
69
|
+
provider_id: string;
|
|
70
|
+
client_id?: string | null;
|
|
71
|
+
};
|
|
72
|
+
maturity_days: number;
|
|
73
|
+
observations: IObservation.IFindByOwnerResponse[];
|
|
74
|
+
}
|
|
75
|
+
export interface IPaymentsNotExportedRequest {
|
|
76
|
+
whiteList?: string[];
|
|
77
|
+
}
|
|
78
|
+
export interface IPaymentsNotExportedResponse {
|
|
79
|
+
iban: string;
|
|
80
|
+
payment_ids: string[];
|
|
81
|
+
npf_dh: {
|
|
82
|
+
id: string;
|
|
83
|
+
name: string;
|
|
84
|
+
pdf_link: string | null;
|
|
85
|
+
total: number;
|
|
86
|
+
}[];
|
|
87
|
+
provider: string;
|
|
88
|
+
value: number;
|
|
89
|
+
}
|
|
90
|
+
export interface IExportPaymentsRequest {
|
|
91
|
+
provider: string;
|
|
92
|
+
value: number;
|
|
93
|
+
npf_ids?: string[];
|
|
94
|
+
}
|
|
95
|
+
export type IBatchType = 'national' | 'international' | 'null';
|
|
96
|
+
export interface IPaymentsBatchNpfDh {
|
|
97
|
+
id: string;
|
|
98
|
+
name: string;
|
|
99
|
+
sent: string | null;
|
|
100
|
+
owner_id: string;
|
|
101
|
+
owner_number: number;
|
|
102
|
+
owner_name: string;
|
|
103
|
+
external_document_header_id: string | null;
|
|
104
|
+
pdf_link: string | null;
|
|
105
|
+
total: number;
|
|
106
|
+
}
|
|
107
|
+
export interface IPaymentsBatchResponse {
|
|
108
|
+
batch_id: string;
|
|
109
|
+
batch_value: number;
|
|
110
|
+
batch_type: IBatchType | null;
|
|
111
|
+
multimedia_id: string | null;
|
|
112
|
+
times_downloaded: number;
|
|
113
|
+
npf_dh: IPaymentsBatchNpfDh[];
|
|
114
|
+
updated_at: Date;
|
|
115
|
+
updated_by: string;
|
|
116
|
+
created_at: Date;
|
|
117
|
+
}
|
|
118
|
+
export declare const IExportCurrentAccountOutputEnum: {
|
|
119
|
+
csv: 'csv';
|
|
120
|
+
pdf: 'pdf';
|
|
121
|
+
};
|
|
122
|
+
export type IExportCurrentAccountOutput = (typeof IExportCurrentAccountOutputEnum)[keyof typeof IExportCurrentAccountOutputEnum];
|
|
123
|
+
export declare const IExportCurrentAccountOutputOptions: string[];
|
|
124
|
+
export interface IExportCurrentAccountRequest {
|
|
125
|
+
token: string;
|
|
126
|
+
owner_id: string;
|
|
127
|
+
output: IExportCurrentAccountOutput;
|
|
128
|
+
start_date: Date | null;
|
|
129
|
+
end_date: Date | null;
|
|
130
|
+
}
|
|
131
|
+
export interface IUnpaidDocumentResponse {
|
|
132
|
+
id: string;
|
|
133
|
+
name: string;
|
|
134
|
+
group: string;
|
|
135
|
+
total: number;
|
|
136
|
+
params: ICreateFromHeaderRequest;
|
|
137
|
+
}
|
|
138
|
+
export interface IRepository {
|
|
139
|
+
findCurrentAccountByOwnerId(params: IShared.IFindByOwnerIdRequest): Promise<IFindCurrentAccountByOwnerIdResponse[]>;
|
|
140
|
+
findBalanceByOwnerId(params: IShared.IFindByOwnerIdRequest): Promise<number>;
|
|
141
|
+
exportCurrentAccount(params: IExportCurrentAccountRequest): Promise<IFindCurrentAccountByOwnerIdResponse[]>;
|
|
142
|
+
findClientUnpaidCredit(params: IShared.IFindByOwnerIdRequest): Promise<IUnpaidDocumentResponse[]>;
|
|
143
|
+
findClientUnpaidDebit(params: IShared.IFindByOwnerIdRequest): Promise<IUnpaidDocumentResponse[]>;
|
|
144
|
+
}
|
|
145
|
+
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
146
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import joi from 'joi';
|
|
2
|
+
import { IPaymentsNotExportedRequest } from './interface';
|
|
3
|
+
export declare const findQuery: joi.ObjectSchema<any>;
|
|
4
|
+
export declare const findWithPaginationQuery: joi.ObjectSchema<any>;
|
|
5
|
+
export declare const findSettledMaterialEntranceQuery: joi.ObjectSchema<any>;
|
|
6
|
+
export declare const exportPaymentsBody: joi.ArraySchema<any[]>;
|
|
7
|
+
export declare const exportCurrentAccountBetweenDatesQuery: joi.ObjectSchema<any>;
|
|
8
|
+
export declare const findSettledMaterialEntranceBuDateParams: joi.ObjectSchema<any>;
|
|
9
|
+
export declare const findPaymentsNotExportedQuery: joi.ObjectSchema<IPaymentsNotExportedRequest>;
|
|
@@ -2,7 +2,6 @@ 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 type { IProjectInfoType } from '../../integration/projectInfo/interfaces';
|
|
6
5
|
export type Entity = DocumentHeader;
|
|
7
6
|
export declare const Route = "documentHeader";
|
|
8
7
|
export declare const UpperName = "DocumentHeader";
|
|
@@ -26,14 +25,6 @@ export interface IRsaHashData {
|
|
|
26
25
|
grossTotal: number;
|
|
27
26
|
previousHash: string;
|
|
28
27
|
}
|
|
29
|
-
export interface IProjectInfo {
|
|
30
|
-
document_header_id: string;
|
|
31
|
-
type: IProjectInfoType;
|
|
32
|
-
name: string;
|
|
33
|
-
email: string;
|
|
34
|
-
telephone: string;
|
|
35
|
-
description: string;
|
|
36
|
-
}
|
|
37
28
|
export interface IFindOneBase extends Entity {
|
|
38
29
|
document_type: IDocumentType.IEntityExtended;
|
|
39
30
|
}
|
|
@@ -48,7 +39,6 @@ export interface IBasicSearchResponse {
|
|
|
48
39
|
user_number: number;
|
|
49
40
|
document_line_count: number;
|
|
50
41
|
document_header_id: string | null;
|
|
51
|
-
start_document_header_id: string | null;
|
|
52
42
|
pdf_link: string | null;
|
|
53
43
|
updated_at: Date;
|
|
54
44
|
}
|
|
@@ -136,6 +126,7 @@ export interface ICreateFromHeaderRequest {
|
|
|
136
126
|
provider_ref?: string;
|
|
137
127
|
global_discount?: number;
|
|
138
128
|
current_account?: boolean;
|
|
129
|
+
store_operator_id?: string | null;
|
|
139
130
|
}
|
|
140
131
|
export interface IUpdateRequest {
|
|
141
132
|
google_sheet_id?: string | null;
|
|
@@ -187,6 +178,8 @@ export interface IUpdateRequest {
|
|
|
187
178
|
who_handles?: string | null;
|
|
188
179
|
warning?: IWarningType;
|
|
189
180
|
created_by?: string;
|
|
181
|
+
confirmed?: boolean;
|
|
182
|
+
confirmed_date?: Date;
|
|
190
183
|
}
|
|
191
184
|
export type IGetActionsDocumentType = Pick<DocumentType, 'user_type' | 'allow_create_from_header_without_lines' | 'pay' | 'credit' | 'debit' | 'invoice' | 'code' | 'return' | 'id' | 'description'>;
|
|
192
185
|
export interface IGetActionsResponse {
|
|
@@ -198,19 +191,11 @@ export interface IGetActionsResponse {
|
|
|
198
191
|
document_number: string;
|
|
199
192
|
}[];
|
|
200
193
|
}
|
|
201
|
-
export interface IUnpaidDocumentResponse {
|
|
202
|
-
id: string;
|
|
203
|
-
name: string;
|
|
204
|
-
group: string;
|
|
205
|
-
total: number;
|
|
206
|
-
params: ICreateFromHeaderRequest;
|
|
207
|
-
}
|
|
208
194
|
export interface ITransferOwnershipRequest {
|
|
209
195
|
document_header_id: string;
|
|
210
196
|
client_id: string;
|
|
211
197
|
}
|
|
212
198
|
export interface IFindResponse {
|
|
213
|
-
p_id: string;
|
|
214
199
|
document_header_id: string;
|
|
215
200
|
document_number: number;
|
|
216
201
|
legacy_id: string | null;
|
|
@@ -295,47 +280,12 @@ export interface IFindStartDocumentHeaderSiblingsResponse {
|
|
|
295
280
|
next: string | null;
|
|
296
281
|
previous: string | null;
|
|
297
282
|
}
|
|
298
|
-
export interface IFindRmOpenDocuments {
|
|
299
|
-
created_at: string;
|
|
300
|
-
created_by: string;
|
|
301
|
-
document_header_id: string;
|
|
302
|
-
document_number: string;
|
|
303
|
-
identifier: string;
|
|
304
|
-
adjudicated: boolean;
|
|
305
|
-
who_handles: string | null;
|
|
306
|
-
document_lines: {
|
|
307
|
-
document_line_id: string;
|
|
308
|
-
product_id: string;
|
|
309
|
-
product_reference: string;
|
|
310
|
-
designation: string;
|
|
311
|
-
}[];
|
|
312
|
-
}
|
|
313
|
-
export interface IMultipleRegularizationPayments {
|
|
314
|
-
value: number;
|
|
315
|
-
payment_method_id: string;
|
|
316
|
-
payment_method: string;
|
|
317
|
-
}
|
|
318
|
-
export type IMultipleRegularizationPaymentsType = 'credit' | 'debit';
|
|
319
|
-
export interface IMultipleRegularizationDocuments {
|
|
320
|
-
owner_id: string;
|
|
321
|
-
document_header_id: string;
|
|
322
|
-
type: IMultipleRegularizationPaymentsType;
|
|
323
|
-
value: number;
|
|
324
|
-
}
|
|
325
|
-
export interface IMultipleRegularizations {
|
|
326
|
-
documents: IMultipleRegularizationDocuments[];
|
|
327
|
-
payments?: IMultipleRegularizationPayments[];
|
|
328
|
-
}
|
|
329
283
|
export interface IRepository {
|
|
330
284
|
findOne(selector: IShared.IFindByIdRequest): Promise<IFindOneBase | null>;
|
|
331
|
-
findStart(selector: IShared.IFindByIdRequest): Promise<IFindOneBase | null>;
|
|
332
285
|
findStartVirtual(selector: IShared.IFindByIdRequest): Promise<IStartDocumentHeaderVirtuals | null>;
|
|
333
286
|
findByType(params: IFindByTypeRequest): Promise<IFindByTypeResponse[]>;
|
|
334
287
|
findByBasicSearch(data: IBasicSearchRequest): Promise<IShared.IPaginationResponse<IBasicSearchResponse>>;
|
|
335
288
|
find(params: IFindRequest): Promise<IFindResponse[]>;
|
|
336
|
-
findUnpaidCommissions(params: IShared.IFindByOwnerIdRequest): Promise<IUnpaidDocumentResponse[]>;
|
|
337
|
-
findClientUnpaidCredit(params: IShared.IFindByOwnerIdRequest): Promise<IUnpaidDocumentResponse[]>;
|
|
338
|
-
findClientUnpaidDebit(params: IShared.IFindByOwnerIdRequest): Promise<IUnpaidDocumentResponse[]>;
|
|
339
289
|
getActions(selector: IShared.IFindByIdRequest): Promise<IGetActionsResponse[]>;
|
|
340
290
|
create(data: ICreateRequest): Promise<ICreateResponse>;
|
|
341
291
|
createFromHeader(data: ICreateFromHeaderRequest): Promise<void>;
|
|
@@ -349,7 +299,5 @@ export interface IRepository {
|
|
|
349
299
|
documentThermalPrint(selector: IShared.IFindByIdRequest): Promise<string>;
|
|
350
300
|
documentList(selector: IShared.IFindByIdRequest, params: IDocumentListRequest): Promise<IDocumentListResponse[]>;
|
|
351
301
|
findStartDocumentHeaderSiblings(params: IShared.IFindByIdRequest): Promise<IFindStartDocumentHeaderSiblingsResponse>;
|
|
352
|
-
findRmOpenDocuments(): Promise<IFindRmOpenDocuments[]>;
|
|
353
|
-
regularizarMultiplosDocumentos(data: IMultipleRegularizations): Promise<void>;
|
|
354
302
|
}
|
|
355
303
|
export type IController = IShared.IEntityWithUserToken<IRepository>;
|