@nomalism-com/types 0.40.1 → 0.40.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.cjs +259 -129
- package/dist/index.js +259 -129
- package/dist/main.d.ts +9 -1
- 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/order/interfaces.d.ts +1 -0
- package/dist/modules/stock/chat/interfaces.d.ts +1 -0
- package/dist/modules/stock/dashboard/interface.d.ts +7 -3
- package/dist/modules/stock/prison/interface.d.ts +1 -1
- package/dist/modules/stock/productGoogleSheets/interface.d.ts +5 -1
- package/dist/modules/stock/sideMenu/interface.d.ts +18 -15
- package/dist/modules/stock/sideMenu/route.schema.d.ts +1 -1
- package/dist/modules/supply/currentAccount/interface.d.ts +157 -0
- package/dist/modules/supply/currentAccount/route.schema.d.ts +10 -0
- package/dist/modules/supply/documentHeader/interfaces.d.ts +3 -30
- package/dist/modules/supply/documentHeader/route.schema.d.ts +0 -1
- 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 +10 -11
- 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/user/chatSubscribers/interfaces.d.ts +7 -5
- package/dist/modules/user/chatSubscribers/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 +7 -1
- package/dist/modules/user/storeOperator/route.schema.d.ts +1 -0
- package/dist/shared/entities/stock.d.ts +5 -1
- package/dist/shared/interface.d.ts +15 -7
- package/package.json +3 -3
package/dist/main.d.ts
CHANGED
|
@@ -228,4 +228,12 @@ 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
230
|
import * as GmailsRoutes from './modules/stock/gmails/route.schema';
|
|
231
|
-
|
|
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
|
+
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, };
|
|
@@ -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
|
+
createProvidersPayments(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
|
+
regularizarMultiplosDocumentos(data: IMultipleRegularizations): Promise<void>;
|
|
25
|
+
}
|
|
26
|
+
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';
|
|
@@ -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;
|
|
@@ -43,7 +43,7 @@ export interface IRepository {
|
|
|
43
43
|
findLinesInPrisonProviders(): Promise<IShared.IFindMinifiedResponse[]>;
|
|
44
44
|
putLineInPrison(params: IShared.IFindByIdRequest): Promise<void>;
|
|
45
45
|
removeLineFromPrison(params: IShared.IFindByIdRequest): Promise<void>;
|
|
46
|
-
checkLinesInPrison(params: ICheckLinesInPrisonRequest): Promise<
|
|
46
|
+
checkLinesInPrison(params: ICheckLinesInPrisonRequest): Promise<string>;
|
|
47
47
|
createLinesInPrison(params: ICreateLinesInPrisonRequest): Promise<string[]>;
|
|
48
48
|
}
|
|
49
49
|
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -142,7 +142,7 @@ export interface IEntityMinified {
|
|
|
142
142
|
tax: number;
|
|
143
143
|
multimedia_id: string | null;
|
|
144
144
|
integer_only: boolean;
|
|
145
|
-
|
|
145
|
+
total: number;
|
|
146
146
|
}
|
|
147
147
|
export interface IPrintLabelQueryRequest {
|
|
148
148
|
token: string;
|
|
@@ -212,6 +212,10 @@ export interface IProductLocation {
|
|
|
212
212
|
location_number: number;
|
|
213
213
|
product_id: string[];
|
|
214
214
|
}
|
|
215
|
+
export interface IProductByOwner {
|
|
216
|
+
id: string;
|
|
217
|
+
reference: string;
|
|
218
|
+
}
|
|
215
219
|
export interface IRepository {
|
|
216
220
|
basicSearch(params: IBasicSearchRequest): Promise<IShared.IPaginationResponse<IBasicSearchResponse>>;
|
|
217
221
|
findReferenceAndIdForMobile(params: IFindForMobileRequest): Promise<IFindReferenceAndIdForMobileResponse | null>;
|
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
import * as IShared from '../../../shared/interface';
|
|
2
|
+
import type { IDocumentTypeUserType } from '../../supply/documentType/interfaces';
|
|
3
|
+
export interface IFindSideMenuCountersResponse {
|
|
4
|
+
counts: Record<string, number>;
|
|
5
|
+
timestamp: string;
|
|
6
|
+
}
|
|
7
|
+
export interface IFindByStateRequest {
|
|
8
|
+
user_type: IDocumentTypeUserType;
|
|
9
|
+
search_value?: string | null;
|
|
10
|
+
}
|
|
11
|
+
export interface IFindByStateResponse {
|
|
12
|
+
name: string;
|
|
13
|
+
count: number;
|
|
14
|
+
unread: boolean;
|
|
15
|
+
}
|
|
2
16
|
export interface IFindByDocumentLineStateRequest {
|
|
3
|
-
|
|
17
|
+
user_type: IDocumentTypeUserType;
|
|
4
18
|
document_line_state: string;
|
|
5
19
|
}
|
|
6
20
|
export interface IFindByDocumentLineStateResponse {
|
|
@@ -12,26 +26,15 @@ export interface IFindByDocumentLineStateResponse {
|
|
|
12
26
|
who_handles: string | null;
|
|
13
27
|
tags: string | null;
|
|
14
28
|
adjudicated: boolean;
|
|
29
|
+
confirmed: boolean;
|
|
15
30
|
unread: boolean;
|
|
16
|
-
|
|
17
|
-
export interface IFindByStateRequest {
|
|
18
|
-
document_type_id: number;
|
|
19
|
-
search_value?: string | null;
|
|
20
|
-
}
|
|
21
|
-
export interface IFindByStateResponse {
|
|
22
|
-
name: string;
|
|
23
|
-
count: number;
|
|
24
|
-
unread: boolean;
|
|
25
|
-
}
|
|
26
|
-
export interface IFindSideMenuCountersResponse {
|
|
27
|
-
counts: Record<string, number>;
|
|
28
|
-
timestamp: string;
|
|
31
|
+
filters: string[];
|
|
29
32
|
}
|
|
30
33
|
interface IRepository {
|
|
34
|
+
findSideMenuCounters(): Promise<IFindSideMenuCountersResponse>;
|
|
31
35
|
findSideMenuStoreOperators(): Promise<string[]>;
|
|
32
36
|
findByState(data: IFindByStateRequest): Promise<IFindByStateResponse[]>;
|
|
33
37
|
findByDocumentLineState(params: IFindByDocumentLineStateRequest): Promise<IFindByDocumentLineStateResponse[]>;
|
|
34
|
-
findSideMenuCounters(): Promise<IFindSideMenuCountersResponse>;
|
|
35
38
|
}
|
|
36
39
|
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
37
40
|
export {};
|
|
@@ -0,0 +1,157 @@
|
|
|
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 IProviderPaymentDocument {
|
|
76
|
+
document_header_id: string;
|
|
77
|
+
value: number;
|
|
78
|
+
discount_value?: number | null;
|
|
79
|
+
}
|
|
80
|
+
export interface IProviderPaymentRequest {
|
|
81
|
+
provider_id: string;
|
|
82
|
+
client_id: string | null;
|
|
83
|
+
documents: IProviderPaymentDocument[];
|
|
84
|
+
total: number;
|
|
85
|
+
}
|
|
86
|
+
export interface IPaymentsNotExportedRequest {
|
|
87
|
+
whiteList?: string[];
|
|
88
|
+
}
|
|
89
|
+
export interface IPaymentsNotExportedResponse {
|
|
90
|
+
iban: string;
|
|
91
|
+
payment_ids: string[];
|
|
92
|
+
npf_dh: {
|
|
93
|
+
id: string;
|
|
94
|
+
name: string;
|
|
95
|
+
pdf_link: string | null;
|
|
96
|
+
total: number;
|
|
97
|
+
}[];
|
|
98
|
+
provider: string;
|
|
99
|
+
value: number;
|
|
100
|
+
}
|
|
101
|
+
export interface IExportPaymentsRequest {
|
|
102
|
+
provider: string;
|
|
103
|
+
value: number;
|
|
104
|
+
npf_ids?: string[];
|
|
105
|
+
}
|
|
106
|
+
export type IBatchType = 'national' | 'international' | 'null';
|
|
107
|
+
export interface IPaymentsBatchNpfDh {
|
|
108
|
+
id: string;
|
|
109
|
+
name: string;
|
|
110
|
+
sent: string | null;
|
|
111
|
+
owner_id: string;
|
|
112
|
+
owner_number: number;
|
|
113
|
+
owner_name: string;
|
|
114
|
+
external_document_header_id: string | null;
|
|
115
|
+
pdf_link: string | null;
|
|
116
|
+
total: number;
|
|
117
|
+
}
|
|
118
|
+
export interface IPaymentsBatchResponse {
|
|
119
|
+
batch_id: string;
|
|
120
|
+
batch_value: number;
|
|
121
|
+
batch_type: IBatchType | null;
|
|
122
|
+
multimedia_id: string | null;
|
|
123
|
+
times_downloaded: number;
|
|
124
|
+
npf_dh: IPaymentsBatchNpfDh[];
|
|
125
|
+
updated_at: Date;
|
|
126
|
+
updated_by: string;
|
|
127
|
+
created_at: Date;
|
|
128
|
+
}
|
|
129
|
+
export declare const IExportCurrentAccountOutputEnum: {
|
|
130
|
+
csv: 'csv';
|
|
131
|
+
pdf: 'pdf';
|
|
132
|
+
};
|
|
133
|
+
export type IExportCurrentAccountOutput = (typeof IExportCurrentAccountOutputEnum)[keyof typeof IExportCurrentAccountOutputEnum];
|
|
134
|
+
export declare const IExportCurrentAccountOutputOptions: string[];
|
|
135
|
+
export interface IExportCurrentAccountRequest {
|
|
136
|
+
token: string;
|
|
137
|
+
owner_id: string;
|
|
138
|
+
output: IExportCurrentAccountOutput;
|
|
139
|
+
start_date: Date | null;
|
|
140
|
+
end_date: Date | null;
|
|
141
|
+
}
|
|
142
|
+
export interface IUnpaidDocumentResponse {
|
|
143
|
+
id: string;
|
|
144
|
+
name: string;
|
|
145
|
+
group: string;
|
|
146
|
+
total: number;
|
|
147
|
+
params: ICreateFromHeaderRequest;
|
|
148
|
+
}
|
|
149
|
+
export interface IRepository {
|
|
150
|
+
findCurrentAccountByOwnerId(params: IShared.IFindByOwnerIdRequest): Promise<IFindCurrentAccountByOwnerIdResponse[]>;
|
|
151
|
+
findBalanceByOwnerId(params: IShared.IFindByOwnerIdRequest): Promise<number>;
|
|
152
|
+
exportCurrentAccount(params: IExportCurrentAccountRequest): Promise<IFindCurrentAccountByOwnerIdResponse[]>;
|
|
153
|
+
findClientUnpaidCredit(params: IShared.IFindByOwnerIdRequest): Promise<IUnpaidDocumentResponse[]>;
|
|
154
|
+
findClientUnpaidDebit(params: IShared.IFindByOwnerIdRequest): Promise<IUnpaidDocumentResponse[]>;
|
|
155
|
+
}
|
|
156
|
+
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
157
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
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 providerPaymentBody: joi.ArraySchema<any[]>;
|
|
7
|
+
export declare const exportPaymentsBody: joi.ArraySchema<any[]>;
|
|
8
|
+
export declare const exportCurrentAccountBetweenDatesQuery: joi.ObjectSchema<any>;
|
|
9
|
+
export declare const findSettledMaterialEntranceBuDateParams: joi.ObjectSchema<any>;
|
|
10
|
+
export declare const findPaymentsNotExportedQuery: joi.ObjectSchema<IPaymentsNotExportedRequest>;
|
|
@@ -39,7 +39,6 @@ export interface IBasicSearchResponse {
|
|
|
39
39
|
user_number: number;
|
|
40
40
|
document_line_count: number;
|
|
41
41
|
document_header_id: string | null;
|
|
42
|
-
start_document_header_id: string | null;
|
|
43
42
|
pdf_link: string | null;
|
|
44
43
|
updated_at: Date;
|
|
45
44
|
}
|
|
@@ -129,6 +128,7 @@ export interface ICreateFromHeaderRequest {
|
|
|
129
128
|
provider_ref?: string;
|
|
130
129
|
global_discount?: number;
|
|
131
130
|
current_account?: boolean;
|
|
131
|
+
store_operator_id?: string | null;
|
|
132
132
|
}
|
|
133
133
|
export interface IUpdateRequest {
|
|
134
134
|
external_id?: string | null;
|
|
@@ -182,6 +182,8 @@ export interface IUpdateRequest {
|
|
|
182
182
|
who_handles?: string | null;
|
|
183
183
|
warning?: IWarningType;
|
|
184
184
|
created_by?: string;
|
|
185
|
+
confirmed?: boolean;
|
|
186
|
+
confirmed_date?: Date;
|
|
185
187
|
}
|
|
186
188
|
export type IGetActionsDocumentType = Pick<DocumentType, 'user_type' | 'allow_create_from_header_without_lines' | 'pay' | 'credit' | 'debit' | 'invoice' | 'code' | 'return' | 'id' | 'description'>;
|
|
187
189
|
export interface IGetActionsResponse {
|
|
@@ -193,19 +195,11 @@ export interface IGetActionsResponse {
|
|
|
193
195
|
document_number: string;
|
|
194
196
|
}[];
|
|
195
197
|
}
|
|
196
|
-
export interface IUnpaidDocumentResponse {
|
|
197
|
-
id: string;
|
|
198
|
-
name: string;
|
|
199
|
-
group: string;
|
|
200
|
-
total: number;
|
|
201
|
-
params: ICreateFromHeaderRequest;
|
|
202
|
-
}
|
|
203
198
|
export interface ITransferOwnershipRequest {
|
|
204
199
|
document_header_id: string;
|
|
205
200
|
client_id: string;
|
|
206
201
|
}
|
|
207
202
|
export interface IFindResponse {
|
|
208
|
-
p_id: string;
|
|
209
203
|
document_header_id: string;
|
|
210
204
|
document_number: number;
|
|
211
205
|
legacy_id: string | null;
|
|
@@ -305,32 +299,12 @@ export interface IFindRmOpenDocuments {
|
|
|
305
299
|
designation: string;
|
|
306
300
|
}[];
|
|
307
301
|
}
|
|
308
|
-
export interface IMultipleRegularizationPayments {
|
|
309
|
-
value: number;
|
|
310
|
-
payment_method_id: string;
|
|
311
|
-
payment_method: string;
|
|
312
|
-
}
|
|
313
|
-
export type IMultipleRegularizationPaymentsType = 'credit' | 'debit';
|
|
314
|
-
export interface IMultipleRegularizationDocuments {
|
|
315
|
-
owner_id: string;
|
|
316
|
-
document_header_id: string;
|
|
317
|
-
type: IMultipleRegularizationPaymentsType;
|
|
318
|
-
value: number;
|
|
319
|
-
}
|
|
320
|
-
export interface IMultipleRegularizations {
|
|
321
|
-
documents: IMultipleRegularizationDocuments[];
|
|
322
|
-
payments?: IMultipleRegularizationPayments[];
|
|
323
|
-
}
|
|
324
302
|
export interface IRepository {
|
|
325
303
|
findOne(selector: IShared.IFindByIdRequest): Promise<IFindOneBase | null>;
|
|
326
|
-
findStart(selector: IShared.IFindByIdRequest): Promise<IFindOneBase | null>;
|
|
327
304
|
findStartVirtual(selector: IShared.IFindByIdRequest): Promise<IStartDocumentHeaderVirtuals | null>;
|
|
328
305
|
findByType(params: IFindByTypeRequest): Promise<IFindByTypeResponse[]>;
|
|
329
306
|
findByBasicSearch(data: IBasicSearchRequest): Promise<IShared.IPaginationResponse<IBasicSearchResponse>>;
|
|
330
307
|
find(params: IFindRequest): Promise<IFindResponse[]>;
|
|
331
|
-
findUnpaidCommissions(params: IShared.IFindByOwnerIdRequest): Promise<IUnpaidDocumentResponse[]>;
|
|
332
|
-
findClientUnpaidCredit(params: IShared.IFindByOwnerIdRequest): Promise<IUnpaidDocumentResponse[]>;
|
|
333
|
-
findClientUnpaidDebit(params: IShared.IFindByOwnerIdRequest): Promise<IUnpaidDocumentResponse[]>;
|
|
334
308
|
getActions(selector: IShared.IFindByIdRequest): Promise<IGetActionsResponse[]>;
|
|
335
309
|
create(data: ICreateRequest): Promise<ICreateResponse>;
|
|
336
310
|
createFromHeader(data: ICreateFromHeaderRequest): Promise<void>;
|
|
@@ -345,6 +319,5 @@ export interface IRepository {
|
|
|
345
319
|
documentList(selector: IShared.IFindByIdRequest, params: IDocumentListRequest): Promise<IDocumentListResponse[]>;
|
|
346
320
|
findStartDocumentHeaderSiblings(params: IShared.IFindByIdRequest): Promise<IFindStartDocumentHeaderSiblingsResponse>;
|
|
347
321
|
findRmOpenDocuments(): Promise<IFindRmOpenDocuments[]>;
|
|
348
|
-
regularizarMultiplosDocumentos(data: IMultipleRegularizations): Promise<void>;
|
|
349
322
|
}
|
|
350
323
|
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -12,4 +12,3 @@ export declare const sendClientNotificationBody: joi.ObjectSchema<any>;
|
|
|
12
12
|
export declare const findByTypeQuery: joi.ObjectSchema<any>;
|
|
13
13
|
export declare const documentPdfQuery: joi.ObjectSchema<any>;
|
|
14
14
|
export declare const documentLineQuery: joi.ObjectSchema<IShared.IRouteRequest<IDocumentListRequest>>;
|
|
15
|
-
export declare const regularizarMultiplosBody: joi.ObjectSchema<any>;
|
|
@@ -3,7 +3,7 @@ export declare const createBody: joi.ArraySchema<any[]>;
|
|
|
3
3
|
export declare const updateBody: joi.ObjectSchema<any>;
|
|
4
4
|
export declare const updateDataBody: joi.ObjectSchema<any>;
|
|
5
5
|
export declare const updateManyBody: joi.ObjectSchema<any>;
|
|
6
|
-
export declare const updateIndexesBody: joi.ArraySchema<
|
|
7
|
-
export declare const deleteBody: joi.ArraySchema<
|
|
6
|
+
export declare const updateIndexesBody: joi.ArraySchema<string[]>;
|
|
7
|
+
export declare const deleteBody: joi.ArraySchema<string[]>;
|
|
8
8
|
export declare const printLabelParams: joi.ObjectSchema<any>;
|
|
9
9
|
export declare const printLabelQuery: joi.ObjectSchema<any>;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as IShared from '../../../shared/interface';
|
|
2
2
|
import { DocumentLineNote } from '../../../shared/entities/stock';
|
|
3
3
|
export declare const IDocumentLineNoteTypeEnum: {
|
|
4
|
-
Prisao: 'Prisao';
|
|
5
4
|
Quebra: 'Quebra';
|
|
6
5
|
Entrada: 'Entrada';
|
|
7
6
|
Compra: 'Compra';
|
|
@@ -17,17 +16,12 @@ export type Entity = DocumentLineNote;
|
|
|
17
16
|
export declare const Route = "documentLineNote";
|
|
18
17
|
export declare const UpperName = "DocumentLineNote";
|
|
19
18
|
export declare const LowerName: string;
|
|
20
|
-
export interface
|
|
19
|
+
export interface IUpsertOrDeleteRequest {
|
|
21
20
|
document_line_id: string;
|
|
22
21
|
type: IDocumentLineNoteType;
|
|
23
22
|
note: string;
|
|
24
23
|
}
|
|
25
|
-
export interface IUpdateRequest {
|
|
26
|
-
note: string;
|
|
27
|
-
}
|
|
28
24
|
export interface IRepository {
|
|
29
|
-
|
|
30
|
-
update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<void>;
|
|
31
|
-
deleteOne(selector: IShared.IFindByIdRequest): Promise<void>;
|
|
25
|
+
upsertOrDelete(data: IUpsertOrDeleteRequest): Promise<void>;
|
|
32
26
|
}
|
|
33
27
|
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -1,6 +1,2 @@
|
|
|
1
1
|
import joi from 'joi';
|
|
2
|
-
|
|
3
|
-
import { ICreateRequest } from './interfaces';
|
|
4
|
-
export declare const createBodyKeys: IShared.IRouteRequest<ICreateRequest>;
|
|
5
|
-
export declare const createBody: joi.ObjectSchema<any>;
|
|
6
|
-
export declare const updateBody: joi.ObjectSchema<any>;
|
|
2
|
+
export declare const upsertOrDeleteBody: joi.ObjectSchema<any>;
|
|
@@ -5,28 +5,27 @@ export type Entity = ExternalDocumentHeader;
|
|
|
5
5
|
export declare const Route = "external_document_header";
|
|
6
6
|
export declare const UpperName = "ExternalDocumentHeader";
|
|
7
7
|
export declare const LowerName: string;
|
|
8
|
-
type
|
|
9
|
-
export type IFindByIdResponse = Omit<IEntityExtended, ''>;
|
|
8
|
+
export type IFindByIdResponse = Entity;
|
|
10
9
|
export interface IFindByOwnerIdItem {
|
|
11
|
-
|
|
10
|
+
external_document_header_id: string | null;
|
|
12
11
|
document_header_id: string;
|
|
13
|
-
is_void: boolean;
|
|
14
|
-
pdf_link: string | null;
|
|
15
|
-
external_id: string | null;
|
|
16
12
|
label: string;
|
|
17
|
-
visible: boolean;
|
|
18
|
-
loading: boolean;
|
|
19
13
|
emission_date: Date;
|
|
14
|
+
external_id: string | null;
|
|
15
|
+
pdf_link: string | null;
|
|
16
|
+
is_void: boolean;
|
|
17
|
+
created_by: string;
|
|
18
|
+
can_have_no_pdf: boolean;
|
|
20
19
|
retryPayload: IUpdateDataRequest | null;
|
|
21
20
|
}
|
|
22
21
|
export interface IFindByOwnerIdItemWithVersions extends IFindByOwnerIdItem {
|
|
23
|
-
older_versions: IFindByOwnerIdItem[];
|
|
22
|
+
older_versions: Pick<IFindByOwnerIdItem, 'label' | 'pdf_link'>[];
|
|
24
23
|
}
|
|
25
24
|
export type IFindRequest = Record<string, unknown>;
|
|
26
|
-
export type IFindResponse =
|
|
25
|
+
export type IFindResponse = Entity;
|
|
27
26
|
export interface IFindPaginatedRequest extends IFindRequest, IShared.IPaginationRequest {
|
|
28
27
|
}
|
|
29
|
-
export type IFindWithPaginationResponse = IShared.IPaginationResponse<
|
|
28
|
+
export type IFindWithPaginationResponse = IShared.IPaginationResponse<Entity>;
|
|
30
29
|
export interface ICreateRequest {
|
|
31
30
|
document_header_id: string;
|
|
32
31
|
external_id: string;
|
|
@@ -22,9 +22,9 @@ export interface IFindProviderProductsResponse {
|
|
|
22
22
|
price_cost: number;
|
|
23
23
|
price_sale: number;
|
|
24
24
|
available: number;
|
|
25
|
-
last_ef_date:
|
|
25
|
+
last_ef_date: string | null;
|
|
26
26
|
ordered_quantity: number;
|
|
27
|
-
last_em_date:
|
|
27
|
+
last_em_date: string | null;
|
|
28
28
|
notation: string;
|
|
29
29
|
pfs: IFindProposals[];
|
|
30
30
|
pcs: IFindProposals[];
|