@nomalism-com/types 0.47.26 → 0.47.28
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 +2409 -2496
- package/dist/index.js +2409 -2496
- package/dist/main.d.ts +1 -5
- package/dist/modules/stock/chat/interfaces.d.ts +0 -1
- package/dist/modules/supply/documentHeader/interfaces.d.ts +0 -17
- package/dist/modules/supply/documentHeader/route.schema.d.ts +0 -1
- package/dist/modules/user/persona/interface.d.ts +0 -43
- package/dist/modules/user/persona/route.schema.d.ts +0 -1
- package/dist/modules/user/systemModule/interface.d.ts +23 -22
- package/dist/modules/user/users/interface.d.ts +2 -2
- package/dist/shared/entities/integration.d.ts +0 -19
- package/dist/shared/entities/user.d.ts +2 -2
- package/dist/shared/interface.d.ts +2 -11
- package/package.json +12 -8
- package/dist/modules/integration/eupago/interfaces.d.ts +0 -68
- package/dist/modules/integration/eupago/route.schema.d.ts +0 -7
- package/dist/modules/integration/personaMerge/interfaces.d.ts +0 -11
- package/dist/modules/integration/personaMerge/route.schema.d.ts +0 -2
package/dist/main.d.ts
CHANGED
|
@@ -46,8 +46,6 @@ 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";
|
|
51
49
|
import * as GoogleFilePermission from "./modules/integration/googleFilePermission/interfaces";
|
|
52
50
|
import * as GoogleFilePermissionRoutes from "./modules/integration/googleFilePermission/route.schema";
|
|
53
51
|
import * as GoogleSheets from "./modules/integration/googleSheets/interfaces";
|
|
@@ -57,8 +55,6 @@ import * as ObservationRoutes from "./modules/integration/observation/route.sche
|
|
|
57
55
|
import * as ObservationType from "./modules/integration/observationType/interfaces";
|
|
58
56
|
import * as ObservationTypeRoutes from "./modules/integration/observationType/route.schema";
|
|
59
57
|
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";
|
|
62
58
|
import * as ProjectInfo from "./modules/integration/projectInfo/interfaces";
|
|
63
59
|
import * as ProjectInfoRoutes from "./modules/integration/projectInfo/route.schema";
|
|
64
60
|
import * as Settings from "./modules/integration/settings/interfaces";
|
|
@@ -264,4 +260,4 @@ import * as stockErrors from "./shared/errors/stockErrors";
|
|
|
264
260
|
import * as userErrors from "./shared/errors/userErrors";
|
|
265
261
|
import * as viewErrors from "./shared/errors/viewErrors";
|
|
266
262
|
import * as shared from "./shared/interface";
|
|
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,
|
|
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, };
|
|
@@ -299,21 +299,6 @@ 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
|
-
}
|
|
317
302
|
export interface IRepository {
|
|
318
303
|
findOne(selector: IShared.IFindByIdRequest): Promise<IFindOneBase | null>;
|
|
319
304
|
findStartVirtual(selector: IShared.IFindByIdRequest): Promise<IStartDocumentHeaderVirtuals | null>;
|
|
@@ -334,7 +319,5 @@ export interface IRepository {
|
|
|
334
319
|
findStartDocumentHeaderSiblings(params: IShared.IFindByIdRequest): Promise<IFindStartDocumentHeaderSiblingsResponse>;
|
|
335
320
|
createSiteProposal(data: IShared.IBrokerTopicPayload[typeof IShared.IBrokerTopic.create_site_proposal]): Promise<IProjectInfo.ICreateResponse>;
|
|
336
321
|
findCountByOwnerIds(data: IFindCountByOwnersIdsRequest): Promise<IFindCountByOwnersIdsResponse[]>;
|
|
337
|
-
findByOwnerIds(data: IFindCountByOwnersIdsRequest): Promise<IFindByOwnersIdsResponse[]>;
|
|
338
|
-
mergeOwner(data: IMergeOwnerRequest): Promise<void>;
|
|
339
322
|
}
|
|
340
323
|
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -13,4 +13,3 @@ 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,45 +120,6 @@ 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
|
-
}
|
|
162
123
|
export interface IRepository {
|
|
163
124
|
findById(selector: IShared.IFindByIdRequest): Promise<IEntityExtended | null>;
|
|
164
125
|
findByOwnerId(params: IShared.IFindByOwnerIdRequest): Promise<IFindByOwnerIdResponse[]>;
|
|
@@ -171,9 +132,5 @@ export interface IRepository {
|
|
|
171
132
|
findClientOrProvider(data: IFindClientOrProviderRequest): Promise<IFindClientOrProviderResponse[]>;
|
|
172
133
|
findForGmail(data: IFindForGmailRequest): Promise<IFindForGmailResponse | null>;
|
|
173
134
|
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>;
|
|
178
135
|
}
|
|
179
136
|
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -8,4 +8,3 @@ 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>;
|
|
@@ -2,39 +2,40 @@ import type { SystemModule } from "../../../shared/entities/user";
|
|
|
2
2
|
import type * as IShared from "../../../shared/interface";
|
|
3
3
|
export type Entity = SystemModule;
|
|
4
4
|
export declare const Route = "system_module";
|
|
5
|
-
export declare
|
|
6
|
-
encomendas_stock
|
|
7
|
-
entradas
|
|
8
|
-
compras
|
|
9
|
-
pagamentos
|
|
10
|
-
lotes
|
|
11
|
-
parcelas
|
|
12
|
-
obrigacoes_legais
|
|
13
|
-
dashboard
|
|
14
|
-
listagens
|
|
15
|
-
tasks
|
|
16
|
-
contas_corrente
|
|
17
|
-
rms
|
|
18
|
-
calendario
|
|
19
|
-
gestao_utilizadores
|
|
20
|
-
templates_email
|
|
21
|
-
audit
|
|
22
|
-
|
|
23
|
-
|
|
5
|
+
export declare const SystemModuleEnum: {
|
|
6
|
+
encomendas_stock: "encomendas_stock";
|
|
7
|
+
entradas: "entradas";
|
|
8
|
+
compras: "compras";
|
|
9
|
+
pagamentos: "pagamentos";
|
|
10
|
+
lotes: "lotes";
|
|
11
|
+
parcelas: "parcelas";
|
|
12
|
+
obrigacoes_legais: "obrigacoes_legais";
|
|
13
|
+
dashboard: "dashboard";
|
|
14
|
+
listagens: "listagens";
|
|
15
|
+
tasks: "tasks";
|
|
16
|
+
contas_corrente: "contas_corrente";
|
|
17
|
+
rms: "rms";
|
|
18
|
+
calendario: "calendario";
|
|
19
|
+
gestao_utilizadores: "gestao_utilizadores";
|
|
20
|
+
templates_email: "templates_email";
|
|
21
|
+
audit: "audit";
|
|
22
|
+
};
|
|
23
|
+
export type ISystemModule = (typeof SystemModuleEnum)[keyof typeof SystemModuleEnum];
|
|
24
|
+
export declare const systemModules: string[];
|
|
24
25
|
export interface IFindByStoreOperatorIdRequest {
|
|
25
26
|
store_operator_id: string;
|
|
26
27
|
}
|
|
27
28
|
export interface IFindByStoreOperatorIdResponse {
|
|
28
29
|
store_operator_id: string;
|
|
29
|
-
values:
|
|
30
|
+
values: ISystemModule[];
|
|
30
31
|
}
|
|
31
32
|
export interface IFindResponseItem {
|
|
32
33
|
store_operator_id: string;
|
|
33
|
-
values:
|
|
34
|
+
values: ISystemModule[];
|
|
34
35
|
}
|
|
35
36
|
export interface ISetStoreOperatorModulesRequest {
|
|
36
37
|
store_operator_id: string;
|
|
37
|
-
values:
|
|
38
|
+
values: ISystemModule[];
|
|
38
39
|
}
|
|
39
40
|
export interface IRepository {
|
|
40
41
|
find(): Promise<IFindResponseItem[]>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Clients, ClientType, Commissioner, Country, DeliveryMethods, Language, MaturityDates, PaymentMethods, Persona, Providers, ProviderType, ReasonForExemption, SegmentsArea, StoreOperator, Theme, UserPositions, Users, Vehicles } from "../../../shared/entities/user";
|
|
2
2
|
import * as IShared from "../../../shared/interface";
|
|
3
|
-
import type {
|
|
3
|
+
import type { ISystemModule } from "../systemModule/interface";
|
|
4
4
|
export type Entity = Users;
|
|
5
5
|
export type EntityWithoutPassword = Omit<Users, "password">;
|
|
6
6
|
export declare const Route = "users";
|
|
@@ -11,7 +11,7 @@ interface IMainPersona extends Persona {
|
|
|
11
11
|
interface IStoreOperator extends Pick<StoreOperator, "id" | "superuser"> {
|
|
12
12
|
main_persona: Pick<Persona, "name" | "email">;
|
|
13
13
|
theme: Pick<Theme, "colors"> | null;
|
|
14
|
-
system_modules:
|
|
14
|
+
system_modules: ISystemModule[];
|
|
15
15
|
}
|
|
16
16
|
export interface IFindByEmailResponse extends Pick<Entity, "id"> {
|
|
17
17
|
store_operator: IStoreOperator;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { EuPagoMethod, EuPagoStatus } from "../../modules/integration/eupago/interfaces";
|
|
2
1
|
import type { IBudgetOptionsType, IProjectInfoOriginType, IProjectInfoType } from "../../modules/integration/projectInfo/interfaces";
|
|
3
2
|
/**
|
|
4
3
|
* Model Observation
|
|
@@ -168,21 +167,3 @@ export type PatchNotes = {
|
|
|
168
167
|
created_at: string;
|
|
169
168
|
updated_at: string;
|
|
170
169
|
};
|
|
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,6 +1,6 @@
|
|
|
1
1
|
import { IPaymentMethodsSaftCodeEnum } from "../../modules/user/paymentMethods/interfaces";
|
|
2
2
|
import type { IReasonForExemptionType } from "../../modules/user/reasonForExemption/interface";
|
|
3
|
-
import type {
|
|
3
|
+
import type { ISystemModule } from "../../modules/user/systemModule/interface";
|
|
4
4
|
import { ITimeSheetRecordType, ITimeSheetRegistryType } from "../../modules/user/timeSheet/interfaces";
|
|
5
5
|
/**
|
|
6
6
|
* Model Users
|
|
@@ -461,7 +461,7 @@ export type ChatSubscriber = {
|
|
|
461
461
|
export type SystemModule = {
|
|
462
462
|
id: string;
|
|
463
463
|
store_operator_id: string;
|
|
464
|
-
value:
|
|
464
|
+
value: ISystemModule;
|
|
465
465
|
created_at: Date;
|
|
466
466
|
updated_at: Date;
|
|
467
467
|
created_by: string;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import joi from "joi";
|
|
2
|
-
import type { EuPagoMethod } from "../modules/integration/eupago/interfaces";
|
|
3
2
|
import type { IGetUserData } from "../modules/integration/googleSheets/interfaces";
|
|
4
3
|
import type { ITranslateRequest } from "../modules/stock/chat/interfaces";
|
|
5
4
|
import type { IWarningType } from "../modules/supply/documentHeader/interfaces";
|
|
6
5
|
import type { IDocumentTypeUserType } from "../modules/supply/documentType/interfaces";
|
|
7
6
|
import type { IAttachment } from "../modules/supply/externalDocumentHeader/interface";
|
|
8
7
|
import type { IScheduleType } from "../modules/supply/schedule/interface";
|
|
9
|
-
import type {
|
|
8
|
+
import type { ISystemModule } from "../modules/user/systemModule/interface";
|
|
10
9
|
import type { IChat, IEmail, IEncomenda, IMultimedia, IMultimediaSummary, IPostgresBackup, IPrint, IProjectInfo, IProposta, IServiceLogs, IServiceStatus, IStock, ITask } from "../modules/view/adminPanel/interfaces";
|
|
11
10
|
import type * as ErrorLog from "../modules/view/errorLog/interfaces";
|
|
12
11
|
import type { ChatSocketEvent, SupplyDocumentSocketEvent, TicketsSocketEvent } from "../modules/view/webSocket/interfaces";
|
|
@@ -42,7 +41,7 @@ export type WithoutUserstamps<T> = Omit<T, CreatedBy | UpdatedBy>;
|
|
|
42
41
|
export interface IUserToken {
|
|
43
42
|
id: string;
|
|
44
43
|
superuser?: boolean;
|
|
45
|
-
system_modules?:
|
|
44
|
+
system_modules?: ISystemModule[];
|
|
46
45
|
}
|
|
47
46
|
export type IEntityWithUserToken<T> = {
|
|
48
47
|
[K in keyof T]: T[K] extends (...params: infer U) => unknown ? (...params: [...U, IUserToken]) => ReturnType<T[K]> : T[K];
|
|
@@ -164,7 +163,6 @@ export declare enum IBrokerTopic {
|
|
|
164
163
|
send_email_client_survey = "send_email_client_survey",
|
|
165
164
|
perform_task = "perform_task",
|
|
166
165
|
create_site_proposal = "create_site_proposal",
|
|
167
|
-
eupago_payment_confirmed = "eupago_payment_confirmed",
|
|
168
166
|
translate_chat_message = "translate_chat_message",
|
|
169
167
|
persona_updated = "persona_updated",
|
|
170
168
|
persona_lang_change = "persona_lang_change",
|
|
@@ -413,13 +411,6 @@ export type IBrokerTopicPayload = {
|
|
|
413
411
|
owner_id: string;
|
|
414
412
|
event: SupplyDocumentSocketEvent;
|
|
415
413
|
};
|
|
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
|
-
};
|
|
423
414
|
};
|
|
424
415
|
export interface IBrokerMessage<T extends IBrokerTopic = IBrokerTopic> {
|
|
425
416
|
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.28",
|
|
5
5
|
"author": "Nomalism <it.nomalism@gmail.com> (https://nomalism.com/)",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"type": "module",
|
|
@@ -27,23 +27,23 @@
|
|
|
27
27
|
"prepare": "husky"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"joi": "^18.2.
|
|
30
|
+
"joi": "^18.2.8"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@eslint/js": "^10.0.1",
|
|
34
|
-
"@swc/core": "^1.16.
|
|
35
|
-
"@types/node": "^26.
|
|
34
|
+
"@swc/core": "^1.16.2",
|
|
35
|
+
"@types/node": "^26.4.1",
|
|
36
36
|
"@typescript-eslint/eslint-plugin": "^8.62.0",
|
|
37
37
|
"@typescript-eslint/parser": "^8.62.0",
|
|
38
|
-
"eslint": "^10.
|
|
38
|
+
"eslint": "^10.10.0",
|
|
39
39
|
"eslint-config-prettier": "^10.1.8",
|
|
40
40
|
"eslint-plugin-simple-import-sort": "^14.0.0",
|
|
41
|
-
"globals": "^17.
|
|
41
|
+
"globals": "^17.12.0",
|
|
42
42
|
"husky": "^9.1.7",
|
|
43
|
-
"lint-staged": "^17.
|
|
43
|
+
"lint-staged": "^17.5.0",
|
|
44
44
|
"prettier": "^3.9.6",
|
|
45
45
|
"tsup": "^8.5.1",
|
|
46
|
-
"typescript-eslint": "^8.
|
|
46
|
+
"typescript-eslint": "^8.69.0"
|
|
47
47
|
},
|
|
48
48
|
"repository": {
|
|
49
49
|
"type": "git",
|
|
@@ -62,5 +62,9 @@
|
|
|
62
62
|
"*.{json,jsonc,css,scss,md,html,yml,yaml}": [
|
|
63
63
|
"prettier --write"
|
|
64
64
|
]
|
|
65
|
+
},
|
|
66
|
+
"allowScripts": {
|
|
67
|
+
"esbuild@0.27.7": true,
|
|
68
|
+
"@swc/core@1.16.2": true
|
|
65
69
|
}
|
|
66
70
|
}
|
|
@@ -1,68 +0,0 @@
|
|
|
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
|
-
entity?: string;
|
|
61
|
-
reference?: string;
|
|
62
|
-
options: Extract<EuPagoMethod, "multibanco" | "mbway">[];
|
|
63
|
-
}
|
|
64
|
-
export interface IApi {
|
|
65
|
-
generate(data: ICreatePendingPaymentRequest): Promise<Entity>;
|
|
66
|
-
chooseMethod(data: IChooseMethodRequest): Promise<Entity>;
|
|
67
|
-
find(): Promise<IFindResponse[]>;
|
|
68
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
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,11 +0,0 @@
|
|
|
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;
|