@nomalism-com/types 0.47.17 → 0.48.0
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 +2437 -2389
- package/dist/index.js +2437 -2389
- package/dist/main.d.ts +3 -1
- package/dist/modules/integration/eupago/interfaces.d.ts +47 -0
- package/dist/modules/integration/eupago/route.schema.d.ts +7 -0
- package/dist/modules/stock/chat/interfaces.d.ts +1 -0
- package/dist/shared/entities/integration.d.ts +19 -0
- package/dist/shared/interface.d.ts +9 -0
- package/package.json +1 -1
package/dist/main.d.ts
CHANGED
|
@@ -46,6 +46,8 @@ import * as EmailTemplateAttachment from "./modules/integration/emailTemplateAtt
|
|
|
46
46
|
import * as EmailTemplateAttachmentRoutes from "./modules/integration/emailTemplateAttachment/route.schema";
|
|
47
47
|
import * as EmailVerification from "./modules/integration/emailVerification/interfaces";
|
|
48
48
|
import * as EmailVerificationRoutes from "./modules/integration/emailVerification/route.schema";
|
|
49
|
+
import * as EuPago from "./modules/integration/eupago/interfaces";
|
|
50
|
+
import * as EuPagoRoutes from "./modules/integration/eupago/route.schema";
|
|
49
51
|
import * as GoogleFilePermission from "./modules/integration/googleFilePermission/interfaces";
|
|
50
52
|
import * as GoogleFilePermissionRoutes from "./modules/integration/googleFilePermission/route.schema";
|
|
51
53
|
import * as GoogleSheets from "./modules/integration/googleSheets/interfaces";
|
|
@@ -260,4 +262,4 @@ import * as stockErrors from "./shared/errors/stockErrors";
|
|
|
260
262
|
import * as userErrors from "./shared/errors/userErrors";
|
|
261
263
|
import * as viewErrors from "./shared/errors/viewErrors";
|
|
262
264
|
import * as shared from "./shared/interface";
|
|
263
|
-
export { AccountCode, AccountCodeRoutes, AdminPanel, AllowedDevice, AllowedDeviceRoutes, BankData, BankDataRoutes, BillOfLading, BillOfLadingRoutes, Catalogo, CatalogoRoutes, Channel, ChannelRoutes, Chat, ChatRapidMessage, ChatRapidMessageRoutes, ChatRoutes, ChatSubscriber, ChatSubscriberRoutes, Client, ClientRoutes, ClientType, ClientTypeRoutes, CLT, CLTRoutes, Commissioner, CommissionerRoutes, ConferirEncomenda, Country, CountryRoutes, CurrentAccount, CurrentAccountRoutes, Dashboard, DashboardRoutes, DeliveryMethods, DeliveryMethodsRoutes, DocumentHeader, DocumentHeaderHistory, DocumentHeaderRoutes, DocumentHeaderSubscriber, DocumentHeaderSubscriberRoutes, DocumentHeaderSurvey, DocumentHeaderSurveyRoutes, DocumentLine, DocumentLineAssoc, DocumentLineMt, DocumentLineMtRoutes, DocumentLineNote, DocumentLineNoteRoutes, DocumentLineRm, DocumentLineRmRoutes, DocumentLineRoutes, documentManagementErrors, DocumentSet, DocumentSetRoutes, DocumentType, DocumentTypeRoutes, EmailAccount, EmailAccountRoutes, EmailLog, EmailLogRoutes, EmailTemplate, EmailTemplateAttachment, EmailTemplateAttachmentRoutes, EmailTemplateRoutes, EmailVerification, EmailVerificationRoutes, ErrorLog, ErrorLogRoutes, ExternalDocumentHeader, ExternalDocumentHeaderRoutes, ExternalDocumentType, Favorites, FavoritesRoutes, File, FileRoutes, Gmails, GoogleCalendar, GoogleCalendarRoutes, GoogleFilePermission, GoogleFilePermissionRoutes, GoogleSheetPool, GoogleSheets, GoogleSheetsRoutes, integrationErrors, Inventario, InventarioRoutes, Language, LanguageRoutes, LLM, LLMRoutes, Location, LocationRoutes, MaterialEntrance, MaterialEntranceRoutes, MaturityDates, MaturityDatesRoutes, MobilePrint, MobilePrintRoutes, Multimedia, MultimediaRoutes, Npc, NpcRoutes, NPF, NPFRoutes, NRCL, NRCLRoutes, Observation, ObservationRoutes, ObservationType, ObservationTypeRoutes, Order, OrderManagement, OrderRoutes, Password, PasswordRoutes, PatchNotes, Payment, PaymentBatch, PaymentBatchRoutes, PaymentMethods, PaymentMethodsRoutes, PaymentRoutes, Persona, PersonaRoutes, Portal, PortalRoutes, PreSale, PreSaleProduct, PreSaleProductRoutes, PreSaleRoutes, Printer, PrinterRoutes, Prison, PrisonRoutes, ProductGoogleSheets, ProductGoogleSheetsRoutes, ProductImage, ProductImageRoutes, ProductionOrder, ProductionOrderRoutes, ProductLocation, Proforma, ProformaRoutes, ProjectInfo, ProjectInfoRoutes, Promotion, PromotionAssoc, PromotionAssocRoutes, PromotionRoutes, PropostaFornecedor, PropostaFornecedorRoutes, PropostaSheets, PropostaSheetsRoutes, ProviderCreditNoteFromReturn, ProviderCreditNoteFromReturnRoutes, ProviderFinancialCreditNote, ProviderFinancialCreditNoteRoutes, Providers, ProviderServiceInvoice, ProviderServiceInvoiceRoutes, ProvidersRoutes, ProviderType, ProviderTypeRoutes, Purchase, PurchaseConditions, PurchaseConditionsRoutes, PurchaseRoutes, Quebra, QuebraRoutes, QueryList, QueryListRoutes, QueryParameter, QueryParameterRoutes, ReasonForExemption, ReasonForExemptionRoutes, RecurrentTasks, RefreshToken, RefreshTokenRoutes, ReturnReason, ReturnReasonRoutes, ReturnToProvider, ReturnToProviderRoutes, SavedEmPicking, SavedEmPickingRoutes, SavedProviderProposal, SavedProviderProposalRoutes, Schedule, SchedulePrintJob, SchedulePrintJobRoutes, ScheduleRoutes, SegmentsArea, SegmentsAreaRoutes, Sessions, SessionsRoutes, Settings, SettingsRoutes, shared, Shippings, ShippingsRoutes, SideMenu, SidemenuHighlight, SidemenuHighlightRoutes, SideMenuRoutes, SmsSender, SmsTemplate, SmsTemplateRoutes, StartDocumentHeaderLastUpdate, stockErrors, StockMovement, StockMovementRoutes, StoreOperator, StoreOperatorRoutes, Swift, SwiftRoutes, SystemModule, SystemModuleRoutes, Tag, TagRoutes, Task, TaskMessage, TaskMessageRoutes, TaskRead, TaskReadRoutes, TaskRoutes, Tenant, TenantRoutes, Theme, ThemeRoutes, Tickets, TicketsLanguage, TicketsLanguageRoutes, TicketsRoutes, TimeSheet, TimeSheetRoutes, Transformado, TransformadoRoutes, TypeOfLocation, TypeOfLocationRoutes, UnitOfMeasure, UnitOfMeasureRoutes, UpfrontReturn, UpfrontReturnRoutes, userErrors, UserPositions, UserPositionsRoutes, Users, UsersRoutes, UserTokens, UserTokensRoutes, VatTax, VatTaxRoutes, VatTaxZone, VatTaxZoneRoutes, VatValidation, VatValidationRoutes, Vehicles, VehiclesRoutes, viewErrors, WebSocket, Workflow, WorkflowRoutes, };
|
|
265
|
+
export { AccountCode, AccountCodeRoutes, AdminPanel, AllowedDevice, AllowedDeviceRoutes, BankData, BankDataRoutes, BillOfLading, BillOfLadingRoutes, Catalogo, CatalogoRoutes, Channel, ChannelRoutes, Chat, ChatRapidMessage, ChatRapidMessageRoutes, ChatRoutes, ChatSubscriber, ChatSubscriberRoutes, Client, ClientRoutes, ClientType, ClientTypeRoutes, CLT, CLTRoutes, Commissioner, CommissionerRoutes, ConferirEncomenda, Country, CountryRoutes, CurrentAccount, CurrentAccountRoutes, Dashboard, DashboardRoutes, DeliveryMethods, DeliveryMethodsRoutes, DocumentHeader, DocumentHeaderHistory, DocumentHeaderRoutes, DocumentHeaderSubscriber, DocumentHeaderSubscriberRoutes, DocumentHeaderSurvey, DocumentHeaderSurveyRoutes, DocumentLine, DocumentLineAssoc, DocumentLineMt, DocumentLineMtRoutes, DocumentLineNote, DocumentLineNoteRoutes, DocumentLineRm, DocumentLineRmRoutes, DocumentLineRoutes, documentManagementErrors, DocumentSet, DocumentSetRoutes, DocumentType, DocumentTypeRoutes, EmailAccount, EmailAccountRoutes, EmailLog, EmailLogRoutes, EmailTemplate, EmailTemplateAttachment, EmailTemplateAttachmentRoutes, EmailTemplateRoutes, EmailVerification, EmailVerificationRoutes, ErrorLog, ErrorLogRoutes, EuPago, EuPagoRoutes, ExternalDocumentHeader, ExternalDocumentHeaderRoutes, ExternalDocumentType, Favorites, FavoritesRoutes, File, FileRoutes, Gmails, GoogleCalendar, GoogleCalendarRoutes, GoogleFilePermission, GoogleFilePermissionRoutes, GoogleSheetPool, GoogleSheets, GoogleSheetsRoutes, integrationErrors, Inventario, InventarioRoutes, Language, LanguageRoutes, LLM, LLMRoutes, Location, LocationRoutes, MaterialEntrance, MaterialEntranceRoutes, MaturityDates, MaturityDatesRoutes, MobilePrint, MobilePrintRoutes, Multimedia, MultimediaRoutes, Npc, NpcRoutes, NPF, NPFRoutes, NRCL, NRCLRoutes, Observation, ObservationRoutes, ObservationType, ObservationTypeRoutes, Order, OrderManagement, OrderRoutes, Password, PasswordRoutes, PatchNotes, Payment, PaymentBatch, PaymentBatchRoutes, PaymentMethods, PaymentMethodsRoutes, PaymentRoutes, Persona, PersonaRoutes, Portal, PortalRoutes, PreSale, PreSaleProduct, PreSaleProductRoutes, PreSaleRoutes, Printer, PrinterRoutes, Prison, PrisonRoutes, ProductGoogleSheets, ProductGoogleSheetsRoutes, ProductImage, ProductImageRoutes, ProductionOrder, ProductionOrderRoutes, ProductLocation, Proforma, ProformaRoutes, ProjectInfo, ProjectInfoRoutes, Promotion, PromotionAssoc, PromotionAssocRoutes, PromotionRoutes, PropostaFornecedor, PropostaFornecedorRoutes, PropostaSheets, PropostaSheetsRoutes, ProviderCreditNoteFromReturn, ProviderCreditNoteFromReturnRoutes, ProviderFinancialCreditNote, ProviderFinancialCreditNoteRoutes, Providers, ProviderServiceInvoice, ProviderServiceInvoiceRoutes, ProvidersRoutes, ProviderType, ProviderTypeRoutes, Purchase, PurchaseConditions, PurchaseConditionsRoutes, PurchaseRoutes, Quebra, QuebraRoutes, QueryList, QueryListRoutes, QueryParameter, QueryParameterRoutes, ReasonForExemption, ReasonForExemptionRoutes, RecurrentTasks, RefreshToken, RefreshTokenRoutes, ReturnReason, ReturnReasonRoutes, ReturnToProvider, ReturnToProviderRoutes, SavedEmPicking, SavedEmPickingRoutes, SavedProviderProposal, SavedProviderProposalRoutes, Schedule, SchedulePrintJob, SchedulePrintJobRoutes, ScheduleRoutes, SegmentsArea, SegmentsAreaRoutes, Sessions, SessionsRoutes, Settings, SettingsRoutes, shared, Shippings, ShippingsRoutes, SideMenu, SidemenuHighlight, SidemenuHighlightRoutes, SideMenuRoutes, SmsSender, SmsTemplate, SmsTemplateRoutes, StartDocumentHeaderLastUpdate, stockErrors, StockMovement, StockMovementRoutes, StoreOperator, StoreOperatorRoutes, Swift, SwiftRoutes, SystemModule, SystemModuleRoutes, Tag, TagRoutes, Task, TaskMessage, TaskMessageRoutes, TaskRead, TaskReadRoutes, TaskRoutes, Tenant, TenantRoutes, Theme, ThemeRoutes, Tickets, TicketsLanguage, TicketsLanguageRoutes, TicketsRoutes, TimeSheet, TimeSheetRoutes, Transformado, TransformadoRoutes, TypeOfLocation, TypeOfLocationRoutes, UnitOfMeasure, UnitOfMeasureRoutes, UpfrontReturn, UpfrontReturnRoutes, userErrors, UserPositions, UserPositionsRoutes, Users, UsersRoutes, UserTokens, UserTokensRoutes, VatTax, VatTaxRoutes, VatTaxZone, VatTaxZoneRoutes, VatValidation, VatValidationRoutes, Vehicles, VehiclesRoutes, viewErrors, WebSocket, Workflow, WorkflowRoutes, };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { EuPagoTransaction } from "../../../shared/entities/integration";
|
|
2
|
+
export type Entity = EuPagoTransaction;
|
|
3
|
+
export declare const Route = "eupago";
|
|
4
|
+
export declare const EuPagoMethodEnum: {
|
|
5
|
+
multibanco: "multibanco";
|
|
6
|
+
mbway: "mbway";
|
|
7
|
+
creditcard: "creditcard";
|
|
8
|
+
};
|
|
9
|
+
export type EuPagoMethod = (typeof EuPagoMethodEnum)[keyof typeof EuPagoMethodEnum];
|
|
10
|
+
export declare const EuPagoStatusEnum: {
|
|
11
|
+
awaiting_method: "awaiting_method";
|
|
12
|
+
pending: "pending";
|
|
13
|
+
confirmed: "confirmed";
|
|
14
|
+
rejected: "rejected";
|
|
15
|
+
};
|
|
16
|
+
export type EuPagoStatus = (typeof EuPagoStatusEnum)[keyof typeof EuPagoStatusEnum];
|
|
17
|
+
export interface ICreatePendingPaymentRequest {
|
|
18
|
+
from_document_header_id: string;
|
|
19
|
+
amount: number;
|
|
20
|
+
}
|
|
21
|
+
export interface IChooseMethodRequest {
|
|
22
|
+
id: string;
|
|
23
|
+
method: Extract<EuPagoMethod, "multibanco" | "mbway">;
|
|
24
|
+
client: {
|
|
25
|
+
name: string;
|
|
26
|
+
email?: string;
|
|
27
|
+
phone?: string;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
export interface IWebhookTransaction {
|
|
31
|
+
entity?: number;
|
|
32
|
+
reference?: number;
|
|
33
|
+
identifier: string;
|
|
34
|
+
method: string;
|
|
35
|
+
amount: {
|
|
36
|
+
value: number;
|
|
37
|
+
currency?: string;
|
|
38
|
+
};
|
|
39
|
+
trid: number;
|
|
40
|
+
status: string;
|
|
41
|
+
}
|
|
42
|
+
export interface IWebhookBody {
|
|
43
|
+
transactions: IWebhookTransaction;
|
|
44
|
+
channel?: {
|
|
45
|
+
name: string;
|
|
46
|
+
};
|
|
47
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import joi from "joi";
|
|
2
|
+
import * as IShared from "../../../shared/interface";
|
|
3
|
+
import { IChooseMethodRequest, ICreatePendingPaymentRequest } from "./interfaces";
|
|
4
|
+
export declare const generateBodyKeys: IShared.IRouteRequest<ICreatePendingPaymentRequest>;
|
|
5
|
+
export declare const generateBody: joi.ObjectSchema<any>;
|
|
6
|
+
export declare const chooseMethodBodyKeys: IShared.IRouteRequest<Omit<IChooseMethodRequest, "id">>;
|
|
7
|
+
export declare const chooseMethodBody: joi.ObjectSchema<any>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { EuPagoMethod, EuPagoStatus } from "../../modules/integration/eupago/interfaces";
|
|
1
2
|
import type { IBudgetOptionsType, IProjectInfoOriginType, IProjectInfoType } from "../../modules/integration/projectInfo/interfaces";
|
|
2
3
|
/**
|
|
3
4
|
* Model Observation
|
|
@@ -167,3 +168,21 @@ export type PatchNotes = {
|
|
|
167
168
|
created_at: string;
|
|
168
169
|
updated_at: string;
|
|
169
170
|
};
|
|
171
|
+
/**
|
|
172
|
+
* Model EuPagoTransaction
|
|
173
|
+
*
|
|
174
|
+
*/
|
|
175
|
+
export type EuPagoTransaction = {
|
|
176
|
+
id: string;
|
|
177
|
+
identifier: string | null;
|
|
178
|
+
method: EuPagoMethod | null;
|
|
179
|
+
status: EuPagoStatus;
|
|
180
|
+
reference: string | null;
|
|
181
|
+
transaction_id: string | null;
|
|
182
|
+
amount: number;
|
|
183
|
+
from_document_header_id: string;
|
|
184
|
+
confirmation_dispatched: boolean;
|
|
185
|
+
raw_payload: unknown;
|
|
186
|
+
created_at: Date;
|
|
187
|
+
updated_at: Date;
|
|
188
|
+
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import joi from "joi";
|
|
2
|
+
import type { EuPagoMethod } from "../modules/integration/eupago/interfaces";
|
|
2
3
|
import type { IGetUserData } from "../modules/integration/googleSheets/interfaces";
|
|
3
4
|
import type { ITranslateRequest } from "../modules/stock/chat/interfaces";
|
|
4
5
|
import type { IWarningType } from "../modules/supply/documentHeader/interfaces";
|
|
@@ -163,6 +164,7 @@ export declare enum IBrokerTopic {
|
|
|
163
164
|
send_email_client_survey = "send_email_client_survey",
|
|
164
165
|
perform_task = "perform_task",
|
|
165
166
|
create_site_proposal = "create_site_proposal",
|
|
167
|
+
eupago_payment_confirmed = "eupago_payment_confirmed",
|
|
166
168
|
translate_chat_message = "translate_chat_message",
|
|
167
169
|
persona_updated = "persona_updated",
|
|
168
170
|
persona_lang_change = "persona_lang_change",
|
|
@@ -411,6 +413,13 @@ export type IBrokerTopicPayload = {
|
|
|
411
413
|
owner_id: string;
|
|
412
414
|
event: SupplyDocumentSocketEvent;
|
|
413
415
|
};
|
|
416
|
+
[IBrokerTopic.eupago_payment_confirmed]: {
|
|
417
|
+
from_document_header_id: string;
|
|
418
|
+
amount: number;
|
|
419
|
+
method: EuPagoMethod;
|
|
420
|
+
transaction_id: string;
|
|
421
|
+
reference?: string;
|
|
422
|
+
};
|
|
414
423
|
};
|
|
415
424
|
export interface IBrokerMessage<T extends IBrokerTopic = IBrokerTopic> {
|
|
416
425
|
topic: T;
|
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.
|
|
4
|
+
"version": "0.48.0",
|
|
5
5
|
"author": "Nomalism <it.nomalism@gmail.com> (https://nomalism.com/)",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"type": "module",
|