@nomalism-com/types 0.47.22 → 0.47.25
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 +2484 -2388
- package/dist/index.js +2484 -2388
- package/dist/main.d.ts +5 -1
- package/dist/modules/integration/eupago/interfaces.d.ts +67 -0
- package/dist/modules/integration/eupago/route.schema.d.ts +7 -0
- package/dist/modules/integration/personaMerge/interfaces.d.ts +11 -0
- package/dist/modules/integration/personaMerge/route.schema.d.ts +2 -0
- package/dist/modules/sms/allowedDevice/interfaces.d.ts +8 -2
- package/dist/modules/stock/chat/interfaces.d.ts +1 -0
- package/dist/modules/supply/documentHeader/interfaces.d.ts +17 -0
- package/dist/modules/supply/documentHeader/route.schema.d.ts +1 -0
- package/dist/modules/user/persona/interface.d.ts +43 -0
- package/dist/modules/user/persona/route.schema.d.ts +1 -0
- package/dist/modules/user/systemModule/interface.d.ts +2 -1
- 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";
|
|
@@ -55,6 +57,8 @@ import * as ObservationRoutes from "./modules/integration/observation/route.sche
|
|
|
55
57
|
import * as ObservationType from "./modules/integration/observationType/interfaces";
|
|
56
58
|
import * as ObservationTypeRoutes from "./modules/integration/observationType/route.schema";
|
|
57
59
|
import * as PatchNotes from "./modules/integration/patchNotes/interfaces";
|
|
60
|
+
import * as PersonaMerge from "./modules/integration/personaMerge/interfaces";
|
|
61
|
+
import * as PersonaMergeRoutes from "./modules/integration/personaMerge/route.schema";
|
|
58
62
|
import * as ProjectInfo from "./modules/integration/projectInfo/interfaces";
|
|
59
63
|
import * as ProjectInfoRoutes from "./modules/integration/projectInfo/route.schema";
|
|
60
64
|
import * as Settings from "./modules/integration/settings/interfaces";
|
|
@@ -260,4 +264,4 @@ import * as stockErrors from "./shared/errors/stockErrors";
|
|
|
260
264
|
import * as userErrors from "./shared/errors/userErrors";
|
|
261
265
|
import * as viewErrors from "./shared/errors/viewErrors";
|
|
262
266
|
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, };
|
|
267
|
+
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, PersonaMerge, PersonaMergeRoutes, 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,67 @@
|
|
|
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
|
+
cancelled: "cancelled";
|
|
16
|
+
expired: "expired";
|
|
17
|
+
error: "error";
|
|
18
|
+
};
|
|
19
|
+
export type EuPagoStatus = (typeof EuPagoStatusEnum)[keyof typeof EuPagoStatusEnum];
|
|
20
|
+
export interface ICreatePendingPaymentRequest {
|
|
21
|
+
from_document_header_id: string;
|
|
22
|
+
amount: number;
|
|
23
|
+
}
|
|
24
|
+
export interface IChooseMethodRequest {
|
|
25
|
+
id: string;
|
|
26
|
+
method: Extract<EuPagoMethod, "multibanco" | "mbway">;
|
|
27
|
+
client: {
|
|
28
|
+
name: string;
|
|
29
|
+
email?: string;
|
|
30
|
+
phone?: string;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
export interface IWebhookTransaction {
|
|
34
|
+
entity?: number;
|
|
35
|
+
reference?: number;
|
|
36
|
+
identifier: string;
|
|
37
|
+
method: string;
|
|
38
|
+
amount: {
|
|
39
|
+
value: number;
|
|
40
|
+
currency?: string;
|
|
41
|
+
};
|
|
42
|
+
trid: number;
|
|
43
|
+
status: string;
|
|
44
|
+
}
|
|
45
|
+
export interface IWebhookBody {
|
|
46
|
+
transactions: IWebhookTransaction;
|
|
47
|
+
channel?: {
|
|
48
|
+
name: string;
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
export interface IFindResponse extends Entity {
|
|
52
|
+
document_link?: string;
|
|
53
|
+
}
|
|
54
|
+
export interface IPaymentChoiceMessage {
|
|
55
|
+
type: "payment_choice";
|
|
56
|
+
amount: string;
|
|
57
|
+
record_id: string;
|
|
58
|
+
status: EuPagoStatus;
|
|
59
|
+
method?: EuPagoMethod;
|
|
60
|
+
reference?: string;
|
|
61
|
+
options: Extract<EuPagoMethod, "multibanco" | "mbway">[];
|
|
62
|
+
}
|
|
63
|
+
export interface IApi {
|
|
64
|
+
generate(data: ICreatePendingPaymentRequest): Promise<Entity>;
|
|
65
|
+
chooseMethod(data: IChooseMethodRequest): Promise<Entity>;
|
|
66
|
+
find(): Promise<IFindResponse[]>;
|
|
67
|
+
}
|
|
@@ -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>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const Route = "persona_merge";
|
|
2
|
+
export interface IMergeOwnerRequest {
|
|
3
|
+
source_client_id: string;
|
|
4
|
+
target_client_id: string;
|
|
5
|
+
source_persona_id: string;
|
|
6
|
+
target_persona_id: string;
|
|
7
|
+
}
|
|
8
|
+
export interface IRepository {
|
|
9
|
+
execute(data: IMergeOwnerRequest): Promise<void>;
|
|
10
|
+
}
|
|
11
|
+
export type IApi = IRepository;
|
|
@@ -3,11 +3,17 @@ import * as IShared from "../../../shared/interface";
|
|
|
3
3
|
export type Entity = AllowedDevice;
|
|
4
4
|
export declare const Route = "allowed_device";
|
|
5
5
|
export type ICreateRequest = Pick<Entity, "key">;
|
|
6
|
-
export
|
|
6
|
+
export declare const apkTypeEnum: {
|
|
7
|
+
sms: "sms";
|
|
8
|
+
ticket: "ticket";
|
|
9
|
+
app: "app";
|
|
10
|
+
};
|
|
11
|
+
export type IApkType = (typeof apkTypeEnum)[keyof typeof apkTypeEnum];
|
|
12
|
+
export declare const apkTypes: string[];
|
|
7
13
|
export type IUpdateRequest = Pick<Entity, "name" | "allow_app" | "allow_sms" | "allow_ticket">;
|
|
8
14
|
export interface ICreateResponse {
|
|
9
15
|
name: string;
|
|
10
|
-
allowed:
|
|
16
|
+
allowed: IApkType[];
|
|
11
17
|
}
|
|
12
18
|
export interface IRepository {
|
|
13
19
|
find(): Promise<Entity[]>;
|
|
@@ -299,6 +299,21 @@ export interface IFindCountByOwnersIdsResponse {
|
|
|
299
299
|
open: number;
|
|
300
300
|
closed: number;
|
|
301
301
|
}
|
|
302
|
+
export interface IFindByOwnersIdsResponse {
|
|
303
|
+
owner_id: string;
|
|
304
|
+
document_number: number;
|
|
305
|
+
code: string;
|
|
306
|
+
document_type_id: string;
|
|
307
|
+
created_at: string;
|
|
308
|
+
created_by: string;
|
|
309
|
+
seller: string;
|
|
310
|
+
}
|
|
311
|
+
export interface IMergeOwnerRequest {
|
|
312
|
+
source_client_id: string;
|
|
313
|
+
target_client_id: string;
|
|
314
|
+
source_persona_id: string;
|
|
315
|
+
target_persona_id: string;
|
|
316
|
+
}
|
|
302
317
|
export interface IRepository {
|
|
303
318
|
findOne(selector: IShared.IFindByIdRequest): Promise<IFindOneBase | null>;
|
|
304
319
|
findStartVirtual(selector: IShared.IFindByIdRequest): Promise<IStartDocumentHeaderVirtuals | null>;
|
|
@@ -319,5 +334,7 @@ export interface IRepository {
|
|
|
319
334
|
findStartDocumentHeaderSiblings(params: IShared.IFindByIdRequest): Promise<IFindStartDocumentHeaderSiblingsResponse>;
|
|
320
335
|
createSiteProposal(data: IShared.IBrokerTopicPayload[typeof IShared.IBrokerTopic.create_site_proposal]): Promise<IProjectInfo.ICreateResponse>;
|
|
321
336
|
findCountByOwnerIds(data: IFindCountByOwnersIdsRequest): Promise<IFindCountByOwnersIdsResponse[]>;
|
|
337
|
+
findByOwnerIds(data: IFindCountByOwnersIdsRequest): Promise<IFindByOwnersIdsResponse[]>;
|
|
338
|
+
mergeOwner(data: IMergeOwnerRequest): Promise<void>;
|
|
322
339
|
}
|
|
323
340
|
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -13,3 +13,4 @@ export declare const documentPdfQuery: joi.ObjectSchema<any>;
|
|
|
13
13
|
export declare const documentLineQuery: joi.ObjectSchema<IShared.IRouteRequest<IDocumentListRequest>>;
|
|
14
14
|
export declare const createSiteProposalBody: joi.ObjectSchema<import("../../../shared/entities/integration").ProjectInfo>;
|
|
15
15
|
export declare const findCountByOwnersIds: joi.ObjectSchema<any>;
|
|
16
|
+
export declare const mergeOwnerBody: joi.ObjectSchema<any>;
|
|
@@ -120,6 +120,45 @@ export interface IFindForGmailResponse {
|
|
|
120
120
|
export interface IPublicUpdateRequest {
|
|
121
121
|
language_id: string | null;
|
|
122
122
|
}
|
|
123
|
+
export interface IDuplicatedGroupMember {
|
|
124
|
+
client_id: string;
|
|
125
|
+
client_number: number | null;
|
|
126
|
+
nome: string | null;
|
|
127
|
+
nif: string | null;
|
|
128
|
+
email: string | null;
|
|
129
|
+
telefone: string | null;
|
|
130
|
+
}
|
|
131
|
+
export interface IDuplicatedGroupDocument {
|
|
132
|
+
document_number: number;
|
|
133
|
+
code: string;
|
|
134
|
+
created_at: string;
|
|
135
|
+
created_by: string;
|
|
136
|
+
seller: string;
|
|
137
|
+
}
|
|
138
|
+
export interface IDuplicatedGroupResponse {
|
|
139
|
+
id: string;
|
|
140
|
+
status: "pending" | "resolved" | "merged";
|
|
141
|
+
confidence_score: number;
|
|
142
|
+
target_client_id: string | null;
|
|
143
|
+
data?: {
|
|
144
|
+
documents?: Record<string, IDuplicatedGroupDocument[]>;
|
|
145
|
+
merge_error?: {
|
|
146
|
+
client_id: string;
|
|
147
|
+
message: string;
|
|
148
|
+
} | null;
|
|
149
|
+
};
|
|
150
|
+
members: IDuplicatedGroupMember[];
|
|
151
|
+
}
|
|
152
|
+
export interface IResolveDuplicatedGroupRequest {
|
|
153
|
+
target_client_id: string;
|
|
154
|
+
}
|
|
155
|
+
export interface IExecuteMergeDuplicatedGroupResponse {
|
|
156
|
+
group_id: string;
|
|
157
|
+
status: "merged" | "resolved";
|
|
158
|
+
merged_client_ids: string[];
|
|
159
|
+
failed_client_id: string | null;
|
|
160
|
+
error: string | null;
|
|
161
|
+
}
|
|
123
162
|
export interface IRepository {
|
|
124
163
|
findById(selector: IShared.IFindByIdRequest): Promise<IEntityExtended | null>;
|
|
125
164
|
findByOwnerId(params: IShared.IFindByOwnerIdRequest): Promise<IFindByOwnerIdResponse[]>;
|
|
@@ -132,5 +171,9 @@ export interface IRepository {
|
|
|
132
171
|
findClientOrProvider(data: IFindClientOrProviderRequest): Promise<IFindClientOrProviderResponse[]>;
|
|
133
172
|
findForGmail(data: IFindForGmailRequest): Promise<IFindForGmailResponse | null>;
|
|
134
173
|
publicUpdate(selector: IShared.IFindByIdRequest, data: IPublicUpdateRequest): Promise<void>;
|
|
174
|
+
findDuplicateds(): Promise<IDuplicatedGroupResponse[]>;
|
|
175
|
+
refreshDuplicateds(): Promise<void>;
|
|
176
|
+
resolveDuplicateds(selector: IShared.IFindByIdRequest, data: IResolveDuplicatedGroupRequest): Promise<void>;
|
|
177
|
+
executeMergeDuplicateds(selector: IShared.IFindByIdRequest): Promise<IExecuteMergeDuplicatedGroupResponse>;
|
|
135
178
|
}
|
|
136
179
|
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -8,3 +8,4 @@ export declare const FindByEmailQueryValidate: joi.ObjectSchema<any>;
|
|
|
8
8
|
export declare const FindClientOrProviderQueryValidate: joi.ObjectSchema<any>;
|
|
9
9
|
export declare const findForGmailParamsValidate: joi.ObjectSchema<any>;
|
|
10
10
|
export declare const publicUpdateBody: joi.ObjectSchema<any>;
|
|
11
|
+
export declare const resolveDuplicatedGroupBody: joi.ObjectSchema<any>;
|
|
@@ -18,7 +18,8 @@ export declare enum SystemModuleEnum {
|
|
|
18
18
|
calendario = "calendario",
|
|
19
19
|
gestao_utilizadores = "gestao_utilizadores",
|
|
20
20
|
templates_email = "templates_email",
|
|
21
|
-
audit = "audit"
|
|
21
|
+
audit = "audit",
|
|
22
|
+
clientes_duplicados = "clientes_duplicados"
|
|
22
23
|
}
|
|
23
24
|
export interface IFindByStoreOperatorIdRequest {
|
|
24
25
|
store_operator_id: string;
|
|
@@ -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.47.
|
|
4
|
+
"version": "0.47.25",
|
|
5
5
|
"author": "Nomalism <it.nomalism@gmail.com> (https://nomalism.com/)",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"type": "module",
|