@nomalism-com/types 0.37.4 → 0.37.6
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 +1243 -1354
- package/dist/index.js +1243 -1354
- package/dist/main.d.ts +1 -5
- package/dist/shared/entities/stock.d.ts +0 -89
- package/package.json +1 -1
- package/dist/modules/supply/clientCurrentAccount/interfaces.d.ts +0 -105
- package/dist/modules/supply/clientCurrentAccount/route.schema.d.ts +0 -6
- package/dist/modules/supply/providerCurrentAccount/interfaces.d.ts +0 -13
- package/dist/modules/supply/providerCurrentAccount/route.schema.d.ts +0 -2
package/dist/main.d.ts
CHANGED
|
@@ -125,10 +125,6 @@ import * as Vehicles from './modules/user/vehicles/interfaces';
|
|
|
125
125
|
import * as VehiclesRoutes from './modules/user/vehicles/route.schema';
|
|
126
126
|
import * as Workflow from './modules/stock/workflow/interfaces';
|
|
127
127
|
import * as WorkflowRoutes from './modules/stock/workflow/route.schema';
|
|
128
|
-
import * as ClientCurrentAccount from './modules/supply/clientCurrentAccount/interfaces';
|
|
129
|
-
import * as ClientCurrentAccountRoutes from './modules/supply/clientCurrentAccount/route.schema';
|
|
130
|
-
import * as ProviderCurrentAccount from './modules/supply/providerCurrentAccount/interfaces';
|
|
131
|
-
import * as ProviderCurrentAccountRoutes from './modules/supply/providerCurrentAccount/route.schema';
|
|
132
128
|
import * as StockMovement from './modules/stock/stockMovement/interface';
|
|
133
129
|
import * as StockMovementRoutes from './modules/stock/stockMovement/route.schema';
|
|
134
130
|
import * as Tenant from './modules/user/tenant/interface';
|
|
@@ -230,4 +226,4 @@ import * as ChatSubscriber from './modules/user/chatSubscribers/interfaces';
|
|
|
230
226
|
import * as ChatSubscriberRoutes from './modules/user/chatSubscribers/route.schema';
|
|
231
227
|
import * as Tag from './modules/stock/tag/interface';
|
|
232
228
|
import * as TagRoutes from './modules/stock/tag/route.schema';
|
|
233
|
-
export { shared, viewErrors, stockErrors, userErrors, documentManagementErrors, integrationErrors, ZipCode, ZipCodeRoutes, BankData, BankDataRoutes, Client, ClientRoutes, ClientType, ClientTypeRoutes,
|
|
229
|
+
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, };
|
|
@@ -6,7 +6,6 @@ import { IImageType } from '../../modules/stock/productImage/interface';
|
|
|
6
6
|
import { ITagType } from '../../modules/stock/tag/interface';
|
|
7
7
|
import { IQueryParameterDatatype } from '../../modules/stock/queryParameter/interfaces';
|
|
8
8
|
import { IData, IDataDocumentoPago, IDataPagamento, IPromotions, type IImportedFromSheets } from '../../modules/supply/documentLine/interfaces';
|
|
9
|
-
import { IPhcDocumentType } from '../../modules/supply/clientCurrentAccount/interfaces';
|
|
10
9
|
import { ISavedEmPickingData } from '../../modules/stock/savedEmPicking/interfaces';
|
|
11
10
|
import { IDocumentLineNoteType } from '../../modules/supply/documentLineNote/interfaces';
|
|
12
11
|
import { IProductSheetState } from '../../modules/stock/productGoogleSheets/interface';
|
|
@@ -624,94 +623,6 @@ export type DocumentLinePendingConflict = {
|
|
|
624
623
|
created_by: string;
|
|
625
624
|
updated_by: string;
|
|
626
625
|
};
|
|
627
|
-
/**
|
|
628
|
-
* Model PhcHeaders
|
|
629
|
-
*
|
|
630
|
-
*/
|
|
631
|
-
export type PhcHeaders = {
|
|
632
|
-
id: string;
|
|
633
|
-
origin_id: string;
|
|
634
|
-
owner_id: string;
|
|
635
|
-
document_number: number;
|
|
636
|
-
client_nif: string;
|
|
637
|
-
client_number: number;
|
|
638
|
-
client_name: string;
|
|
639
|
-
persona_id: string;
|
|
640
|
-
email: string | null;
|
|
641
|
-
telephone: string | null;
|
|
642
|
-
already_imported: boolean;
|
|
643
|
-
sm_external_id: string | null;
|
|
644
|
-
phc_document_type: IPhcDocumentType;
|
|
645
|
-
created_at: Date;
|
|
646
|
-
updated_at: Date;
|
|
647
|
-
created_by: string;
|
|
648
|
-
updated_by: string;
|
|
649
|
-
};
|
|
650
|
-
/**
|
|
651
|
-
* Model PhcClientOrderLines
|
|
652
|
-
*
|
|
653
|
-
*/
|
|
654
|
-
export type PhcClientOrderLines = {
|
|
655
|
-
id: string;
|
|
656
|
-
header_id: string;
|
|
657
|
-
origin_id: string;
|
|
658
|
-
ref: string;
|
|
659
|
-
design: string;
|
|
660
|
-
qtt: number;
|
|
661
|
-
pcusto: number;
|
|
662
|
-
pvp: number;
|
|
663
|
-
taxa_iva: number;
|
|
664
|
-
desconto: number;
|
|
665
|
-
unidade: string;
|
|
666
|
-
cativo: boolean;
|
|
667
|
-
levantado: boolean;
|
|
668
|
-
fechada: boolean;
|
|
669
|
-
estado: string;
|
|
670
|
-
created_at: Date;
|
|
671
|
-
updated_at: Date;
|
|
672
|
-
created_by: string;
|
|
673
|
-
updated_by: string;
|
|
674
|
-
};
|
|
675
|
-
/**
|
|
676
|
-
* Model PhcClientAdvanceLines
|
|
677
|
-
*
|
|
678
|
-
*/
|
|
679
|
-
export type PhcClientAdvanceLines = {
|
|
680
|
-
id: string;
|
|
681
|
-
header_id: string;
|
|
682
|
-
origin_id: string;
|
|
683
|
-
enc_cli_bostamp: string;
|
|
684
|
-
total: number;
|
|
685
|
-
iva: number;
|
|
686
|
-
base: number;
|
|
687
|
-
por_reg: number;
|
|
688
|
-
created_at: Date;
|
|
689
|
-
updated_at: Date;
|
|
690
|
-
created_by: string;
|
|
691
|
-
updated_by: string;
|
|
692
|
-
};
|
|
693
|
-
/**
|
|
694
|
-
* Model PhcInvoiceLines
|
|
695
|
-
*
|
|
696
|
-
*/
|
|
697
|
-
export type PhcInvoiceLines = {
|
|
698
|
-
id: string;
|
|
699
|
-
header_id: string;
|
|
700
|
-
origin_id: string;
|
|
701
|
-
ref: string;
|
|
702
|
-
design: string;
|
|
703
|
-
qtt: number;
|
|
704
|
-
pcusto: number;
|
|
705
|
-
pvp: number;
|
|
706
|
-
taxa_iva: number;
|
|
707
|
-
desconto: number;
|
|
708
|
-
unidade: string;
|
|
709
|
-
already_returned: boolean;
|
|
710
|
-
created_at: Date;
|
|
711
|
-
updated_at: Date;
|
|
712
|
-
created_by: string;
|
|
713
|
-
updated_by: string;
|
|
714
|
-
};
|
|
715
626
|
/**
|
|
716
627
|
* Model ProductPromotionVirtuals
|
|
717
628
|
*
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nomalism-com/types",
|
|
3
3
|
"description": "A nomalism package with all necessary types and validations for developing APIs",
|
|
4
|
-
"version": "0.37.
|
|
4
|
+
"version": "0.37.6",
|
|
5
5
|
"author": "Nomalism <it.nomalism@gmail.com> (https://nomalism.com/)",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"type": "module",
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
import * as IShared from '../../../shared/interface';
|
|
2
|
-
import { ClientCurrentAccount } from '../../../shared/entities/stock';
|
|
3
|
-
export type Entity = ClientCurrentAccount;
|
|
4
|
-
export declare const Route = "client_current_account";
|
|
5
|
-
export declare const UpperName = "ClientCurrentAccount";
|
|
6
|
-
export declare const LowerName: string;
|
|
7
|
-
export declare const IPhcDocumentTypeEnum: {
|
|
8
|
-
encomenda_de_cliente: '1|Encomenda de Cliente';
|
|
9
|
-
fatura_ad: '1|Fatura AD';
|
|
10
|
-
factura: '1|Factura';
|
|
11
|
-
factura_re: '9|Fatura RE';
|
|
12
|
-
factura_re_app: '12|Fatura RE APP';
|
|
13
|
-
};
|
|
14
|
-
export type IPhcDocumentType = (typeof IPhcDocumentTypeEnum)[keyof typeof IPhcDocumentTypeEnum];
|
|
15
|
-
export declare const IPhcDocumentType: string[];
|
|
16
|
-
export declare const IBasicSearchDocumentTypeEnum: {
|
|
17
|
-
faturaPorDevolver: 'faturaPorDevolver';
|
|
18
|
-
faturaDevolvida: 'faturaDevolvida';
|
|
19
|
-
faturaPorPagar: 'faturaPorPagar';
|
|
20
|
-
faturaPaga: 'faturaPaga';
|
|
21
|
-
adiantamento: 'adiantamento';
|
|
22
|
-
adiantamentoUsado: 'adiantamentoUsado';
|
|
23
|
-
encomendaAberta: 'encomendaAberta';
|
|
24
|
-
encomendaFechada: 'encomendaFechada';
|
|
25
|
-
};
|
|
26
|
-
export type IBasicSearchDocumentType = (typeof IBasicSearchDocumentTypeEnum)[keyof typeof IBasicSearchDocumentTypeEnum];
|
|
27
|
-
export declare const IBasicSearchDocumentType: string[];
|
|
28
|
-
export type IFindRequest = IShared.IPaginationRequest & IShared.IFindByOwnerIdRequest;
|
|
29
|
-
export interface IFindFaturasPorPagarResponse {
|
|
30
|
-
id: string;
|
|
31
|
-
owner_id: string;
|
|
32
|
-
label: string;
|
|
33
|
-
valor_max_regularizavel: number;
|
|
34
|
-
}
|
|
35
|
-
export interface IPagarFaturaRequest {
|
|
36
|
-
id: string;
|
|
37
|
-
valor: number;
|
|
38
|
-
}
|
|
39
|
-
export interface ILinhasFaturasParaDevolucao {
|
|
40
|
-
id: string;
|
|
41
|
-
reference: string;
|
|
42
|
-
designation: string;
|
|
43
|
-
quantity: number;
|
|
44
|
-
preco_venda: number;
|
|
45
|
-
total: number;
|
|
46
|
-
devolvido: boolean;
|
|
47
|
-
desconto: number;
|
|
48
|
-
taxa_iva: number;
|
|
49
|
-
unidade: string;
|
|
50
|
-
}
|
|
51
|
-
export interface IFindFaturasParaDevolucaoResponse {
|
|
52
|
-
id: string;
|
|
53
|
-
owner_id: string;
|
|
54
|
-
owner_number: number;
|
|
55
|
-
label: string;
|
|
56
|
-
linhas: ILinhasFaturasParaDevolucao[];
|
|
57
|
-
}
|
|
58
|
-
export interface IDevolverRequest {
|
|
59
|
-
ids: string[];
|
|
60
|
-
}
|
|
61
|
-
export interface IBasicSearchRequest extends IShared.IPaginationRequest {
|
|
62
|
-
search_value: string | null;
|
|
63
|
-
inactive?: boolean;
|
|
64
|
-
}
|
|
65
|
-
export interface IBasicSearchResponse {
|
|
66
|
-
id: string;
|
|
67
|
-
owner_id: string;
|
|
68
|
-
document_header_id?: string;
|
|
69
|
-
type: IBasicSearchDocumentType;
|
|
70
|
-
nome: string;
|
|
71
|
-
nif: string;
|
|
72
|
-
email: string;
|
|
73
|
-
telephone: string;
|
|
74
|
-
numero_cliente: string;
|
|
75
|
-
numero_documento: string;
|
|
76
|
-
valor: number;
|
|
77
|
-
}
|
|
78
|
-
export interface IMultipleRegularizationPayments {
|
|
79
|
-
value: number;
|
|
80
|
-
payment_method_id: string;
|
|
81
|
-
payment_method: string;
|
|
82
|
-
}
|
|
83
|
-
export type IMultipleRegularizationPaymentsType = 'credit' | 'debit';
|
|
84
|
-
export interface IMultipleRegularizationDocuments {
|
|
85
|
-
owner_id: string;
|
|
86
|
-
document_header_id: string;
|
|
87
|
-
type: IMultipleRegularizationPaymentsType;
|
|
88
|
-
value: number;
|
|
89
|
-
}
|
|
90
|
-
export interface IMultipleRegularizations {
|
|
91
|
-
documents: IMultipleRegularizationDocuments[];
|
|
92
|
-
payments?: IMultipleRegularizationPayments[];
|
|
93
|
-
}
|
|
94
|
-
export interface IRepository {
|
|
95
|
-
find(params: IShared.IFindByOwnerIdRequest): Promise<Entity[]>;
|
|
96
|
-
findByOwnerId(params: IFindRequest): Promise<IShared.IPaginationResponse<Entity>>;
|
|
97
|
-
findFaturaPorPagar(params: IShared.IFindByIdRequest): Promise<IFindFaturasPorPagarResponse>;
|
|
98
|
-
pagarFatura(params: IPagarFaturaRequest): Promise<void>;
|
|
99
|
-
findFaturaParaDevolver(params: IShared.IFindByIdRequest): Promise<IFindFaturasParaDevolucaoResponse>;
|
|
100
|
-
devolver(params: IDevolverRequest): Promise<void>;
|
|
101
|
-
findByBasicSearch(data: IBasicSearchRequest): Promise<IShared.IPaginationResponse<IBasicSearchResponse>>;
|
|
102
|
-
regularizarMultiplosDocumentos(data: IMultipleRegularizations): Promise<void>;
|
|
103
|
-
}
|
|
104
|
-
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
105
|
-
export type IApi = Omit<IRepository, 'find'>;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import joi from 'joi';
|
|
2
|
-
export declare const findByOwnerIdBodyKeysBody: joi.ObjectSchema<any>;
|
|
3
|
-
export declare const pagarFaturaBody: joi.ObjectSchema<any>;
|
|
4
|
-
export declare const devolverBody: joi.ObjectSchema<any>;
|
|
5
|
-
export declare const basicSearchQuery: joi.ObjectSchema<any>;
|
|
6
|
-
export declare const regularizarMultiplosBody: joi.ObjectSchema<any>;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as IShared from '../../../shared/interface';
|
|
2
|
-
import { ProviderCurrentAccount } from '../../../shared/entities/stock';
|
|
3
|
-
export type Entity = ProviderCurrentAccount;
|
|
4
|
-
export declare const Route = "provider_current_account";
|
|
5
|
-
export declare const UpperName = "ProviderCurrentAccount";
|
|
6
|
-
export declare const LowerName: string;
|
|
7
|
-
export type IFindRequest = IShared.IPaginationRequest & IShared.IFindByOwnerIdRequest;
|
|
8
|
-
export interface IRepository {
|
|
9
|
-
findByOwnerId(params: IFindRequest): Promise<IShared.IPaginationResponse<Entity>>;
|
|
10
|
-
find(params: IShared.IFindByOwnerIdRequest): Promise<Entity[]>;
|
|
11
|
-
}
|
|
12
|
-
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
13
|
-
export type IApi = Omit<IRepository, 'find'>;
|