@nomalism-com/types 0.37.2 → 0.37.4
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 +2811 -2831
- package/dist/index.js +2811 -2831
- package/dist/main.d.ts +1 -3
- package/dist/modules/stock/vatTaxZone/interface.d.ts +2 -0
- package/dist/modules/supply/documentHeader/interfaces.d.ts +19 -2
- package/dist/modules/supply/documentHeader/route.schema.d.ts +1 -0
- package/dist/shared/entities/stock.d.ts +17 -14
- package/dist/shared/entities/user.d.ts +2 -0
- package/package.json +1 -1
- package/dist/modules/supply/counter/interfaces.d.ts +0 -27
- package/dist/modules/supply/counter/route.schema.d.ts +0 -4
package/dist/main.d.ts
CHANGED
|
@@ -16,8 +16,6 @@ import * as Chat from './modules/stock/chat/interfaces';
|
|
|
16
16
|
import * as ChatRoutes from './modules/stock/chat/route.schema';
|
|
17
17
|
import * as Commissioner from './modules/user/commissioner/interface';
|
|
18
18
|
import * as CommissionerRoutes from './modules/user/commissioner/route.schema';
|
|
19
|
-
import * as Counter from './modules/supply/counter/interfaces';
|
|
20
|
-
import * as CounterRoutes from './modules/supply/counter/route.schema';
|
|
21
19
|
import * as Country from './modules/user/country/interface';
|
|
22
20
|
import * as CountryRoutes from './modules/user/country/route.schema';
|
|
23
21
|
import * as DeliveryMethods from './modules/user/deliveryMethods/interfaces';
|
|
@@ -232,4 +230,4 @@ import * as ChatSubscriber from './modules/user/chatSubscribers/interfaces';
|
|
|
232
230
|
import * as ChatSubscriberRoutes from './modules/user/chatSubscribers/route.schema';
|
|
233
231
|
import * as Tag from './modules/stock/tag/interface';
|
|
234
232
|
import * as TagRoutes from './modules/stock/tag/route.schema';
|
|
235
|
-
export { shared, viewErrors, stockErrors, userErrors, documentManagementErrors, integrationErrors, ZipCode, ZipCodeRoutes, BankData, BankDataRoutes, Client, ClientRoutes, ClientType, ClientTypeRoutes, ClientCurrentAccount, ClientCurrentAccountRoutes, Chat, ChatRoutes, Commissioner, CommissionerRoutes,
|
|
233
|
+
export { shared, viewErrors, stockErrors, userErrors, documentManagementErrors, integrationErrors, ZipCode, ZipCodeRoutes, BankData, BankDataRoutes, Client, ClientRoutes, ClientType, ClientTypeRoutes, ClientCurrentAccount, ClientCurrentAccountRoutes, 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, ProviderCurrentAccount, ProviderCurrentAccountRoutes, 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, };
|
|
@@ -19,6 +19,7 @@ export interface ICreateRequest {
|
|
|
19
19
|
value: number;
|
|
20
20
|
vat_tax_id: string;
|
|
21
21
|
country_id: string;
|
|
22
|
+
saft_code: string;
|
|
22
23
|
external_id: string | null;
|
|
23
24
|
}
|
|
24
25
|
export interface IUpdateRequest {
|
|
@@ -26,6 +27,7 @@ export interface IUpdateRequest {
|
|
|
26
27
|
value?: number;
|
|
27
28
|
vat_tax_id?: string;
|
|
28
29
|
country_id?: string;
|
|
30
|
+
saft_code?: string;
|
|
29
31
|
external_id?: string | null;
|
|
30
32
|
}
|
|
31
33
|
export interface IRepository {
|
|
@@ -76,7 +76,6 @@ export interface ICreateRequest {
|
|
|
76
76
|
pdf_link?: string | null;
|
|
77
77
|
external_pdf_link?: string | null;
|
|
78
78
|
google_sheet_id?: string | null;
|
|
79
|
-
external_data?: unknown;
|
|
80
79
|
sent?: boolean;
|
|
81
80
|
owner_id: string;
|
|
82
81
|
owner_number: number;
|
|
@@ -148,7 +147,6 @@ export interface ICreateFromHeaderRequest {
|
|
|
148
147
|
current_account?: boolean;
|
|
149
148
|
}
|
|
150
149
|
export interface IUpdateRequest {
|
|
151
|
-
external_data?: unknown;
|
|
152
150
|
external_id?: string | null;
|
|
153
151
|
external_pdf_link?: string | null;
|
|
154
152
|
google_sheet_id?: string | null;
|
|
@@ -195,6 +193,7 @@ export interface IUpdateRequest {
|
|
|
195
193
|
commission_paid?: boolean;
|
|
196
194
|
is_archived?: boolean;
|
|
197
195
|
is_void?: boolean;
|
|
196
|
+
is_void_reason?: string | null;
|
|
198
197
|
is_force_adjudicated?: boolean;
|
|
199
198
|
who_handles?: string | null;
|
|
200
199
|
warning?: IWarningType;
|
|
@@ -322,6 +321,22 @@ export interface IFindRmOpenDocuments {
|
|
|
322
321
|
designation: string;
|
|
323
322
|
}[];
|
|
324
323
|
}
|
|
324
|
+
export interface IMultipleRegularizationPayments {
|
|
325
|
+
value: number;
|
|
326
|
+
payment_method_id: string;
|
|
327
|
+
payment_method: string;
|
|
328
|
+
}
|
|
329
|
+
export type IMultipleRegularizationPaymentsType = 'credit' | 'debit';
|
|
330
|
+
export interface IMultipleRegularizationDocuments {
|
|
331
|
+
owner_id: string;
|
|
332
|
+
document_header_id: string;
|
|
333
|
+
type: IMultipleRegularizationPaymentsType;
|
|
334
|
+
value: number;
|
|
335
|
+
}
|
|
336
|
+
export interface IMultipleRegularizations {
|
|
337
|
+
documents: IMultipleRegularizationDocuments[];
|
|
338
|
+
payments?: IMultipleRegularizationPayments[];
|
|
339
|
+
}
|
|
325
340
|
export interface IRepository {
|
|
326
341
|
findOne(selector: IShared.IFindByIdRequest): Promise<IFindOneResponse | null>;
|
|
327
342
|
findStart(selector: IShared.IFindByIdRequest): Promise<IFindOneBase | null>;
|
|
@@ -342,9 +357,11 @@ export interface IRepository {
|
|
|
342
357
|
sendClientNotification(selector: IShared.IFindByIdRequest, data: ISendClientNotificationRequest): Promise<void>;
|
|
343
358
|
markUnsentClientNotification(selector: IShared.IFindByIdRequest): Promise<void>;
|
|
344
359
|
documentPdf(selector: IShared.IFindByIdRequest, data: IDocumentPdfRequest): Promise<string>;
|
|
360
|
+
documentThermalPrint(selector: IShared.IFindByIdRequest): Promise<string>;
|
|
345
361
|
documentList(selector: IShared.IFindByIdRequest, params: IDocumentListRequest): Promise<IDocumentListResponse[]>;
|
|
346
362
|
getAllRelatedDocumentHeaderIds(params: IShared.IFindByIdRequest): Promise<string[]>;
|
|
347
363
|
findStartDocumentHeaderSiblings(params: IShared.IFindByIdRequest): Promise<IFindStartDocumentHeaderSiblingsResponse>;
|
|
348
364
|
findRmOpenDocuments(): Promise<IFindRmOpenDocuments[]>;
|
|
365
|
+
regularizarMultiplosDocumentos(data: IMultipleRegularizations): Promise<void>;
|
|
349
366
|
}
|
|
350
367
|
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -12,3 +12,4 @@ 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>;
|
|
@@ -12,6 +12,7 @@ import { IDocumentLineNoteType } from '../../modules/supply/documentLineNote/int
|
|
|
12
12
|
import { IProductSheetState } from '../../modules/stock/productGoogleSheets/interface';
|
|
13
13
|
import type { IFindProposals } from '../../modules/supply/orderManagement/interface';
|
|
14
14
|
import { ITaskStatusDataType } from '../../modules/stock/task/interface';
|
|
15
|
+
import type { IProjectInfo, IRsaHashData, ITaxEntry } from '../../modules/supply/documentHeader/interfaces';
|
|
15
16
|
/**
|
|
16
17
|
* Model Chat
|
|
17
18
|
*
|
|
@@ -214,20 +215,6 @@ export type VatTaxZone = {
|
|
|
214
215
|
country_id: string;
|
|
215
216
|
external_id: string | null;
|
|
216
217
|
};
|
|
217
|
-
/**
|
|
218
|
-
* Model Counter
|
|
219
|
-
*
|
|
220
|
-
*/
|
|
221
|
-
export type Counter = {
|
|
222
|
-
document_type: number;
|
|
223
|
-
year: number;
|
|
224
|
-
name: string | null;
|
|
225
|
-
count: number;
|
|
226
|
-
created_at: Date;
|
|
227
|
-
updated_at: Date;
|
|
228
|
-
created_by: string;
|
|
229
|
-
updated_by: string;
|
|
230
|
-
};
|
|
231
218
|
/**
|
|
232
219
|
* Model DocumentType
|
|
233
220
|
*
|
|
@@ -321,10 +308,26 @@ export type DocumentHeader = {
|
|
|
321
308
|
return_reason: string | null;
|
|
322
309
|
is_archived: boolean;
|
|
323
310
|
is_void: boolean;
|
|
311
|
+
is_void_reason: string | null;
|
|
324
312
|
is_force_adjudicated: boolean;
|
|
325
313
|
origin_id: string | null;
|
|
326
314
|
who_handles: string | null;
|
|
327
315
|
warning: string | null;
|
|
316
|
+
sequence_number: number | null;
|
|
317
|
+
tenant_nif: string;
|
|
318
|
+
atcud: string | null;
|
|
319
|
+
hash: string | null;
|
|
320
|
+
hash_data: IRsaHashData | {};
|
|
321
|
+
project_info: IProjectInfo | {};
|
|
322
|
+
paired_with: string | null;
|
|
323
|
+
comercial_discount_value: number | null;
|
|
324
|
+
gross_value: number | null;
|
|
325
|
+
net_value: number | null;
|
|
326
|
+
taxes_value: number | null;
|
|
327
|
+
taxes: ITaxEntry[];
|
|
328
|
+
document_name: string;
|
|
329
|
+
external_document_name: string | null;
|
|
330
|
+
qrcode: string | null;
|
|
328
331
|
created_at: Date;
|
|
329
332
|
updated_at: Date;
|
|
330
333
|
created_by: string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { IPaymentMethodsSaftCodeEnum } from '../../modules/user/paymentMethods/interfaces';
|
|
1
2
|
import type { IChatType } from '../../modules/stock/chat/interfaces';
|
|
2
3
|
/**
|
|
3
4
|
* Model Users
|
|
@@ -365,6 +366,7 @@ export type PaymentMethods = {
|
|
|
365
366
|
is_numerary: boolean;
|
|
366
367
|
is_mb: boolean;
|
|
367
368
|
is_credit: boolean;
|
|
369
|
+
saft_code: IPaymentMethodsSaftCodeEnum;
|
|
368
370
|
created_at: Date;
|
|
369
371
|
updated_at: Date;
|
|
370
372
|
created_by: string;
|
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.4",
|
|
5
5
|
"author": "Nomalism <it.nomalism@gmail.com> (https://nomalism.com/)",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"type": "module",
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import * as IShared from '../../../shared/interface';
|
|
2
|
-
import { Counter } from '../../../shared/entities/stock';
|
|
3
|
-
export type Entity = Counter;
|
|
4
|
-
export declare const Route = "counter";
|
|
5
|
-
export declare const UpperName = "Counter";
|
|
6
|
-
export declare const LowerName: string;
|
|
7
|
-
export interface IFindByDocTypeRequest {
|
|
8
|
-
document_type: number;
|
|
9
|
-
}
|
|
10
|
-
export interface ICreateRequest {
|
|
11
|
-
name: string;
|
|
12
|
-
document_type: number;
|
|
13
|
-
year: number;
|
|
14
|
-
}
|
|
15
|
-
export interface IUpdateRequest {
|
|
16
|
-
name: string;
|
|
17
|
-
document_type: number;
|
|
18
|
-
year: number;
|
|
19
|
-
}
|
|
20
|
-
export interface IRepository {
|
|
21
|
-
findByDocType(data: IFindByDocTypeRequest): Promise<Entity | null>;
|
|
22
|
-
findAll(): Promise<Entity[]>;
|
|
23
|
-
create(data: ICreateRequest): Promise<Entity>;
|
|
24
|
-
update(data: IUpdateRequest): Promise<Entity | null>;
|
|
25
|
-
}
|
|
26
|
-
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
27
|
-
export type IApi = Omit<IRepository, 'findAll'>;
|