@nomalism-com/types 0.49.10 → 0.49.12
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 +257 -247
- package/dist/index.js +256 -247
- package/dist/main.d.ts +2 -1
- package/dist/modules/integration/emailLog/interfaces.d.ts +3 -3
- package/dist/modules/integration/eupago/interfaces.d.ts +15 -13
- package/dist/modules/integration/googleSheets/interfaces.d.ts +2 -2
- package/dist/modules/integration/projectInfo/interfaces.d.ts +1 -2
- package/dist/modules/stock/emailAccount/interface.d.ts +4 -0
- package/dist/modules/stock/gmails/interface.d.ts +4 -0
- package/dist/modules/stock/mobilePrint/interface.d.ts +3 -0
- package/dist/modules/stock/saft/interfaces.d.ts +19 -0
- package/dist/modules/stock/vatValidation/interfaces.d.ts +3 -0
- package/dist/modules/supply/payment/interface.d.ts +3 -0
- package/dist/modules/supply/paymentBatch/interface.d.ts +5 -0
- package/dist/modules/user/clients/interface.d.ts +1 -1
- package/dist/modules/user/commissioner/interface.d.ts +1 -1
- package/dist/modules/user/providers/interface.d.ts +2 -2
- package/dist/modules/user/swift/interface.d.ts +1 -1
- package/package.json +1 -1
package/dist/main.d.ts
CHANGED
|
@@ -67,6 +67,7 @@ import * as QueryList from "./modules/stock/queryList/interfaces";
|
|
|
67
67
|
import * as QueryParameter from "./modules/stock/queryParameter/interfaces";
|
|
68
68
|
import * as RecurrentTasks from "./modules/stock/recurrentTasks/interface";
|
|
69
69
|
import * as ReturnReason from "./modules/stock/returnReason/interfaces";
|
|
70
|
+
import * as Saft from "./modules/stock/saft/interfaces";
|
|
70
71
|
import * as SavedEmPicking from "./modules/stock/savedEmPicking/interfaces";
|
|
71
72
|
import * as SavedProviderProposal from "./modules/stock/savedProviderProposal/interfaces";
|
|
72
73
|
import * as StockMovement from "./modules/stock/stockMovement/interface";
|
|
@@ -148,4 +149,4 @@ import * as stockErrors from "./shared/errors/stockErrors";
|
|
|
148
149
|
import * as userErrors from "./shared/errors/userErrors";
|
|
149
150
|
import * as viewErrors from "./shared/errors/viewErrors";
|
|
150
151
|
import * as shared from "./shared/interface";
|
|
151
|
-
export { AccountCode, Adiantamento, AdminPanel, AllowedDevice, BankData, BillOfLading, Catalogo, Channel, Chat, ChatRapidMessage, ChatSubscriber, Client, ClientType, CLT, Commissioner, ConferirEncomenda, Country, CurrentAccount, Dashboard, DeliveryMethods, DocumentHeader, DocumentHeaderHistory, DocumentHeaderSubscriber, DocumentHeaderSurvey, DocumentLine, DocumentLineAssoc, DocumentLineMt, DocumentLineNote, DocumentLineRm, documentManagementErrors, DocumentSet, DocumentType, EmailAccount, EmailLog, EmailTemplate, EmailTemplateAttachment, EmailVerification, ErrorLog, EuPago, ExternalDocumentHeader, ExternalDocumentType, FaturaCredito, FaturaRecibo, FaturaSimplificada, Favorites, File, Gmails, GoogleCalendar, GoogleFilePermission, GoogleSheetPool, GoogleSheets, integrationErrors, Inventario, Language, LLM, Location, MaterialEntrance, MaturityDates, MobilePrint, Multimedia, NotaCredito, NotaCreditoAdiantamento, Npc, NPF, NRCL, Observation, ObservationType, Order, OrderManagement, Password, PatchNotes, Payment, PaymentBatch, PaymentMethods, Persona, PersonaMerge, Portal, PreSale, PreSaleProduct, Printer, Prison, ProductGoogleSheets, ProductImage, ProductionOrder, ProductLocation, Proforma, ProjectInfo, Promotion, PromotionAssoc, PropostaFornecedor, PropostaSheets, ProviderCreditNoteFromReturn, ProviderFinancialCreditNote, Providers, ProviderServiceInvoice, ProviderType, Purchase, PurchaseConditions, Quebra, QueryList, QueryParameter, ReasonForExemption, Recibo, RecurrentTasks, RefreshToken, ReturnReason, ReturnToProvider, SavedEmPicking, SavedProviderProposal, Schedule, SchedulePrintJob, SegmentsArea, Sessions, Settings, shared, Shippings, SideMenu, SidemenuHighlight, SmsSender, SmsTemplate, StartDocumentHeaderLastUpdate, stockErrors, StockMovement, StoreOperator, Swift, SystemModule, Tag, Task, TaskMessage, TaskRead, Tenant, Theme, Tickets, TicketsLanguage, TimeSheet, Transformado, TypeOfLocation, UnitOfMeasure, UpfrontReturn, userErrors, UserPositions, Users, UserTokens, VatTax, VatTaxZone, VatValidation, Vehicles, viewErrors, WebSocket, Workflow, };
|
|
152
|
+
export { AccountCode, Adiantamento, AdminPanel, AllowedDevice, BankData, BillOfLading, Catalogo, Channel, Chat, ChatRapidMessage, ChatSubscriber, Client, ClientType, CLT, Commissioner, ConferirEncomenda, Country, CurrentAccount, Dashboard, DeliveryMethods, DocumentHeader, DocumentHeaderHistory, DocumentHeaderSubscriber, DocumentHeaderSurvey, DocumentLine, DocumentLineAssoc, DocumentLineMt, DocumentLineNote, DocumentLineRm, documentManagementErrors, DocumentSet, DocumentType, EmailAccount, EmailLog, EmailTemplate, EmailTemplateAttachment, EmailVerification, ErrorLog, EuPago, ExternalDocumentHeader, ExternalDocumentType, FaturaCredito, FaturaRecibo, FaturaSimplificada, Favorites, File, Gmails, GoogleCalendar, GoogleFilePermission, GoogleSheetPool, GoogleSheets, integrationErrors, Inventario, Language, LLM, Location, MaterialEntrance, MaturityDates, MobilePrint, Multimedia, NotaCredito, NotaCreditoAdiantamento, Npc, NPF, NRCL, Observation, ObservationType, Order, OrderManagement, Password, PatchNotes, Payment, PaymentBatch, PaymentMethods, Persona, PersonaMerge, Portal, PreSale, PreSaleProduct, Printer, Prison, ProductGoogleSheets, ProductImage, ProductionOrder, ProductLocation, Proforma, ProjectInfo, Promotion, PromotionAssoc, PropostaFornecedor, PropostaSheets, ProviderCreditNoteFromReturn, ProviderFinancialCreditNote, Providers, ProviderServiceInvoice, ProviderType, Purchase, PurchaseConditions, Quebra, QueryList, QueryParameter, ReasonForExemption, Recibo, RecurrentTasks, RefreshToken, ReturnReason, ReturnToProvider, Saft, SavedEmPicking, SavedProviderProposal, Schedule, SchedulePrintJob, SegmentsArea, Sessions, Settings, shared, Shippings, SideMenu, SidemenuHighlight, SmsSender, SmsTemplate, StartDocumentHeaderLastUpdate, stockErrors, StockMovement, StoreOperator, Swift, SystemModule, Tag, Task, TaskMessage, TaskRead, Tenant, Theme, Tickets, TicketsLanguage, TimeSheet, Transformado, TypeOfLocation, UnitOfMeasure, UpfrontReturn, userErrors, UserPositions, Users, UserTokens, VatTax, VatTaxZone, VatValidation, Vehicles, viewErrors, WebSocket, Workflow, };
|
|
@@ -50,9 +50,9 @@ export interface ISendGridCallbacks {
|
|
|
50
50
|
attempt: number | null;
|
|
51
51
|
}
|
|
52
52
|
export interface ISendGridWebhookEvent {
|
|
53
|
-
event
|
|
54
|
-
sg_message_id
|
|
55
|
-
email
|
|
53
|
+
event?: ISendGridCallbackEvent;
|
|
54
|
+
sg_message_id?: string;
|
|
55
|
+
email?: string;
|
|
56
56
|
}
|
|
57
57
|
export interface IFindByIdResponse {
|
|
58
58
|
id: string;
|
|
@@ -21,24 +21,26 @@ export interface ICreatePendingPaymentRequest {
|
|
|
21
21
|
from_document_header_id: string;
|
|
22
22
|
amount: number;
|
|
23
23
|
}
|
|
24
|
+
export interface IWebhookAmount {
|
|
25
|
+
value?: number;
|
|
26
|
+
currency?: string;
|
|
27
|
+
}
|
|
24
28
|
export interface IWebhookTransaction {
|
|
25
29
|
entity?: string;
|
|
26
30
|
reference?: string;
|
|
27
|
-
identifier
|
|
28
|
-
method
|
|
29
|
-
amount
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
identifier?: string;
|
|
32
|
+
method?: string;
|
|
33
|
+
amount?: IWebhookAmount;
|
|
34
|
+
trid?: string;
|
|
35
|
+
status?: string;
|
|
36
|
+
}
|
|
37
|
+
export interface IWebhookChannel {
|
|
38
|
+
account?: string;
|
|
39
|
+
name?: string;
|
|
35
40
|
}
|
|
36
41
|
export interface IWebhookBody {
|
|
37
|
-
transaction
|
|
38
|
-
channel?:
|
|
39
|
-
account?: string;
|
|
40
|
-
name?: string;
|
|
41
|
-
};
|
|
42
|
+
transaction?: IWebhookTransaction;
|
|
43
|
+
channel?: IWebhookChannel;
|
|
42
44
|
}
|
|
43
45
|
export interface IMultibancoReferenceResponse {
|
|
44
46
|
referencia?: string;
|
|
@@ -14,10 +14,10 @@ export interface IGetUserData extends Pick<DocumentHeader, "document_number" | "
|
|
|
14
14
|
}
|
|
15
15
|
export interface IUpdateRequest {
|
|
16
16
|
document_name: string;
|
|
17
|
-
client_data?:
|
|
17
|
+
client_data?: IGetUserData;
|
|
18
18
|
}
|
|
19
19
|
export interface ICloneRequest {
|
|
20
|
-
document_name
|
|
20
|
+
document_name: string;
|
|
21
21
|
}
|
|
22
22
|
export interface ICloneResponse {
|
|
23
23
|
spreadsheetId: string;
|
|
@@ -18,10 +18,9 @@ export type IBudgetOptionsType = {
|
|
|
18
18
|
};
|
|
19
19
|
export type IProjectInfoType = (typeof IProjectInfoTypeEnum)[keyof typeof IProjectInfoTypeEnum];
|
|
20
20
|
export declare const projectInfoTypes: string[];
|
|
21
|
-
export interface ICreateRequest extends Omit<Entity, "created_at" | "updated_at" | "document_header_id" | "id" | "email_log" | "persona_id" | "client_id"
|
|
21
|
+
export interface ICreateRequest extends Omit<Entity, "created_at" | "updated_at" | "document_header_id" | "id" | "email_log" | "persona_id" | "client_id"> {
|
|
22
22
|
persona_id?: string;
|
|
23
23
|
client_id?: string;
|
|
24
|
-
address?: string | null;
|
|
25
24
|
}
|
|
26
25
|
export interface ICreateResponse {
|
|
27
26
|
document_header_id: string;
|
|
@@ -19,6 +19,10 @@ export interface IGmailsResponse {
|
|
|
19
19
|
proposal_url: string | null;
|
|
20
20
|
gmail_attachments: unknown[] | null;
|
|
21
21
|
}
|
|
22
|
+
export interface IAuthCallbackRequest {
|
|
23
|
+
code: string;
|
|
24
|
+
state: string;
|
|
25
|
+
}
|
|
22
26
|
export interface IRepository {
|
|
23
27
|
auth(): Promise<string>;
|
|
24
28
|
emails(): Promise<IGmailsResponse[]>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare const Route = "saft";
|
|
2
|
+
export interface ISaftInvoiceRequest {
|
|
3
|
+
date_start: string;
|
|
4
|
+
date_end: string;
|
|
5
|
+
token: string;
|
|
6
|
+
}
|
|
7
|
+
export type IDataInicioPrevUtiliz = `${number}-${number}-${number}`;
|
|
8
|
+
export interface IRegisterSeriesRequest {
|
|
9
|
+
document_set_id: string;
|
|
10
|
+
external_document_type_id: string;
|
|
11
|
+
numInicialSeq?: number;
|
|
12
|
+
dataInicioPrevUtiliz?: IDataInicioPrevUtiliz;
|
|
13
|
+
tipoSerie?: string;
|
|
14
|
+
meioProcessamento?: string;
|
|
15
|
+
}
|
|
16
|
+
export interface ICloseSeriesRequest {
|
|
17
|
+
document_saft_counter_id: string;
|
|
18
|
+
justificacao?: string;
|
|
19
|
+
}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { VatValidation } from "../../../shared/entities/stock";
|
|
2
2
|
export type Entity = VatValidation;
|
|
3
3
|
export declare const Route = "vat_validation";
|
|
4
|
+
export interface IFindByLatestRequest {
|
|
5
|
+
nif: string;
|
|
6
|
+
}
|
|
4
7
|
export interface IRepository {
|
|
5
8
|
findByLatest(nif: string): Promise<Entity | null>;
|
|
6
9
|
}
|
|
@@ -30,6 +30,9 @@ export interface IUnpaidPurchasesRequest {
|
|
|
30
30
|
export interface IUnpaidByDatePurchasesRequest {
|
|
31
31
|
due_date: Date;
|
|
32
32
|
}
|
|
33
|
+
export interface IUnpaidByDateParamsRequest {
|
|
34
|
+
due_date?: string;
|
|
35
|
+
}
|
|
33
36
|
export type IPaymentOrigin = "CC Fornecedor" | "CC Cliente" | "CC Fornecedor (Descontinuado)" | "CC Cliente (Descontinuado)";
|
|
34
37
|
export interface IUnpaidPurchasesResponse extends Pick<Entity, "date" | "debit" | "credit"> {
|
|
35
38
|
document_header: Pick<DocumentHeader, "emission_date" | "pdf_link" | "id">;
|
|
@@ -22,6 +22,11 @@ export interface IExportPaymentsRequest {
|
|
|
22
22
|
value: number;
|
|
23
23
|
npf_ids?: string[];
|
|
24
24
|
}
|
|
25
|
+
export interface ICreateBulkPdfRequest {
|
|
26
|
+
month?: number;
|
|
27
|
+
year?: number;
|
|
28
|
+
ids?: string;
|
|
29
|
+
}
|
|
25
30
|
export type IBatchType = "national" | "international" | "null";
|
|
26
31
|
export interface IPaymentsBatchNpfDh {
|
|
27
32
|
id: string;
|
|
@@ -30,7 +30,7 @@ export type IFindWithPaginationResponse = IShared.IPaginationResponse<Omit<IFind
|
|
|
30
30
|
export type ICreateMainPersona = Pick<Persona, "nif" | "name" | "email" | "telephone">;
|
|
31
31
|
export interface ICreateRequest {
|
|
32
32
|
user_id?: string;
|
|
33
|
-
main_persona:
|
|
33
|
+
main_persona: ICreateMainPersona;
|
|
34
34
|
deferred_payment?: boolean;
|
|
35
35
|
is_donation_eligible?: boolean;
|
|
36
36
|
default_discount?: number;
|
|
@@ -27,7 +27,7 @@ export type ICreateMainPersona = Pick<Persona, "nif" | "name" | "email" | "telep
|
|
|
27
27
|
export interface ICreateRequest {
|
|
28
28
|
user_id: string;
|
|
29
29
|
default_percentage?: number;
|
|
30
|
-
main_persona:
|
|
30
|
+
main_persona: ICreateMainPersona;
|
|
31
31
|
country_id?: string | null;
|
|
32
32
|
language_id?: string | null;
|
|
33
33
|
default_payment_method_id?: string | null;
|
|
@@ -36,7 +36,7 @@ export interface ICreateRequest {
|
|
|
36
36
|
default_discount?: number;
|
|
37
37
|
exemption_reason_id?: string | null;
|
|
38
38
|
default_account_code?: string | null;
|
|
39
|
-
main_persona:
|
|
39
|
+
main_persona: ICreateMainPersona;
|
|
40
40
|
provider_type_id?: string | null;
|
|
41
41
|
country_id?: string | null;
|
|
42
42
|
language_id?: string | null;
|
|
@@ -45,7 +45,7 @@ export interface ICreateRequest {
|
|
|
45
45
|
default_maturity_date_id?: string | null;
|
|
46
46
|
default_delivery_method_id?: string | null;
|
|
47
47
|
default_vehicle_id?: string | null;
|
|
48
|
-
personas?:
|
|
48
|
+
personas?: ICreateMainPersona[];
|
|
49
49
|
}
|
|
50
50
|
export interface IUpdateRequest {
|
|
51
51
|
manufacturer?: boolean;
|
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.49.
|
|
4
|
+
"version": "0.49.12",
|
|
5
5
|
"author": "Nomalism <it.nomalism@gmail.com> (https://nomalism.com/)",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"type": "module",
|