@nomalism-com/types 0.45.9 → 0.45.10
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 +8 -0
- package/dist/index.js +8 -0
- package/dist/main.d.ts +2 -1
- package/dist/modules/view/webSocket/interfaces.d.ts +56 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -242,6 +242,7 @@ __export(main_exports, {
|
|
|
242
242
|
VatValidationRoutes: () => route_schema_exports52,
|
|
243
243
|
Vehicles: () => interfaces_exports26,
|
|
244
244
|
VehiclesRoutes: () => route_schema_exports54,
|
|
245
|
+
WebSocket: () => interfaces_exports60,
|
|
245
246
|
Workflow: () => interfaces_exports27,
|
|
246
247
|
WorkflowRoutes: () => route_schema_exports55,
|
|
247
248
|
ZipCode: () => interfaces_exports,
|
|
@@ -5664,6 +5665,13 @@ var listEventsInRangeQuery = joi115.object().keys({
|
|
|
5664
5665
|
to: joi115.string().required()
|
|
5665
5666
|
}).messages(messages);
|
|
5666
5667
|
|
|
5668
|
+
// src/modules/view/webSocket/interfaces.ts
|
|
5669
|
+
var interfaces_exports60 = {};
|
|
5670
|
+
__export(interfaces_exports60, {
|
|
5671
|
+
Route: () => Route125
|
|
5672
|
+
});
|
|
5673
|
+
var Route125 = "ws";
|
|
5674
|
+
|
|
5667
5675
|
// src/index.ts
|
|
5668
5676
|
var index_default = main_exports;
|
|
5669
5677
|
export {
|
package/dist/index.js
CHANGED
|
@@ -242,6 +242,7 @@ __export(main_exports, {
|
|
|
242
242
|
VatValidationRoutes: () => route_schema_exports52,
|
|
243
243
|
Vehicles: () => interfaces_exports26,
|
|
244
244
|
VehiclesRoutes: () => route_schema_exports54,
|
|
245
|
+
WebSocket: () => interfaces_exports60,
|
|
245
246
|
Workflow: () => interfaces_exports27,
|
|
246
247
|
WorkflowRoutes: () => route_schema_exports55,
|
|
247
248
|
ZipCode: () => interfaces_exports,
|
|
@@ -5664,6 +5665,13 @@ var listEventsInRangeQuery = joi115.object().keys({
|
|
|
5664
5665
|
to: joi115.string().required()
|
|
5665
5666
|
}).messages(messages);
|
|
5666
5667
|
|
|
5668
|
+
// src/modules/view/webSocket/interfaces.ts
|
|
5669
|
+
var interfaces_exports60 = {};
|
|
5670
|
+
__export(interfaces_exports60, {
|
|
5671
|
+
Route: () => Route125
|
|
5672
|
+
});
|
|
5673
|
+
var Route125 = "ws";
|
|
5674
|
+
|
|
5667
5675
|
// src/index.ts
|
|
5668
5676
|
var index_default = main_exports;
|
|
5669
5677
|
export {
|
package/dist/main.d.ts
CHANGED
|
@@ -243,4 +243,5 @@ import * as DocumentHeaderSubscriber from './modules/supply/documentHeaderSubscr
|
|
|
243
243
|
import * as DocumentHeaderSubscriberRoutes from './modules/supply/documentHeaderSubscriber/route.schema';
|
|
244
244
|
import * as GoogleCalendar from './modules/stock/googleCalendar/interface';
|
|
245
245
|
import * as GoogleCalendarRoutes from './modules/stock/googleCalendar/route.schema';
|
|
246
|
-
|
|
246
|
+
import * as WebSocket from './modules/view/webSocket/interfaces';
|
|
247
|
+
export { shared, viewErrors, stockErrors, userErrors, documentManagementErrors, integrationErrors, ZipCode, ZipCodeRoutes, BankData, BankDataRoutes, Client, ClientRoutes, ClientType, ClientTypeRoutes, 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, DocumentSet, DocumentSetRoutes, DocumentType, DocumentTypeRoutes, ExternalDocumentType, ExternalDocumentHeader, ExternalDocumentHeaderRoutes, Favorites, FavoritesRoutes, File, FileRoutes, GoogleSheets, GoogleSheetsRoutes, Language, LanguageRoutes, Location, LocationRoutes, MaturityDates, MaturityDatesRoutes, Multimedia, MultimediaRoutes, OrderManagement, Observation, ObservationRoutes, ObservationType, ObservationTypeRoutes, Password, PasswordRoutes, Payment, PaymentRoutes, PaymentMethods, PaymentMethodsRoutes, ProductImage, ProductImageRoutes, Promotion, PromotionRoutes, PromotionAssoc, PromotionAssocRoutes, Providers, ProvidersRoutes, ProviderType, ProviderTypeRoutes, PurchaseConditions, PurchaseConditionsRoutes, ReasonForExemption, ReasonForExemptionRoutes, RefreshToken, RefreshTokenRoutes, SegmentsArea, SegmentsAreaRoutes, Sessions, SessionsRoutes, Shippings, ShippingsRoutes, StoreOperator, StoreOperatorRoutes, Swift, SwiftRoutes, TypeOfLocation, TypeOfLocationRoutes, UnitOfMeasure, UnitOfMeasureRoutes, 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, Gmails, NPF, NPFRoutes, NRCL, NRCLRoutes, CurrentAccount, CurrentAccountRoutes, PaymentBatch, PaymentBatchRoutes, Portal, PortalRoutes, GoogleSheetPool, AccountCode, AccountCodeRoutes, LLM, LLMRoutes, PatchNotes, ConferirEncomenda, DocumentHeaderSurvey, DocumentHeaderSurveyRoutes, DocumentHeaderSubscriber, DocumentHeaderSubscriberRoutes, GoogleCalendar, GoogleCalendarRoutes, WebSocket, };
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { IChatBalloon } from '../../stock/chat/interfaces';
|
|
2
|
+
import type { IPublicDocument, IPublicFindBySubscriberId, ITags } from '../../ui/portal/interface';
|
|
3
|
+
export declare const Route = "ws";
|
|
4
|
+
export type ChatSocketEvent = {
|
|
5
|
+
type: 'chat.translation.updated';
|
|
6
|
+
chat_id: string;
|
|
7
|
+
translation: string;
|
|
8
|
+
target_language_id: string;
|
|
9
|
+
} | {
|
|
10
|
+
type: 'chat.message.created';
|
|
11
|
+
balloon: IChatBalloon;
|
|
12
|
+
} | {
|
|
13
|
+
type: 'chat.message.updated';
|
|
14
|
+
chat_id: string;
|
|
15
|
+
patch: Partial<NonNullable<IChatBalloon['chat']>>;
|
|
16
|
+
} | {
|
|
17
|
+
type: 'chat.message.deleted';
|
|
18
|
+
chat_id: string;
|
|
19
|
+
} | {
|
|
20
|
+
type: 'chat.file.deleted';
|
|
21
|
+
file_id: string;
|
|
22
|
+
} | {
|
|
23
|
+
type: 'chat.read_state.updated';
|
|
24
|
+
chat_document_header_id: string;
|
|
25
|
+
client_read: boolean;
|
|
26
|
+
chat_id?: string;
|
|
27
|
+
file_id?: string;
|
|
28
|
+
} | {
|
|
29
|
+
type: 'chat.tags.updated';
|
|
30
|
+
chat_document_header_id: string;
|
|
31
|
+
tags: ITags[];
|
|
32
|
+
} | {
|
|
33
|
+
type: 'persona.updated';
|
|
34
|
+
persona: NonNullable<IPublicFindBySubscriberId['persona']>;
|
|
35
|
+
} | {
|
|
36
|
+
type: 'document.updated';
|
|
37
|
+
document: IPublicDocument;
|
|
38
|
+
} | {
|
|
39
|
+
type: 'ping';
|
|
40
|
+
} | {
|
|
41
|
+
type: 'pong';
|
|
42
|
+
};
|
|
43
|
+
export interface ChatSocketOptions {
|
|
44
|
+
token: string;
|
|
45
|
+
onEvent: (evt: ChatSocketEvent) => void;
|
|
46
|
+
onOpen?: () => void;
|
|
47
|
+
onReconnect?: () => void;
|
|
48
|
+
onClose?: () => void;
|
|
49
|
+
onAuthUnverified?: () => void;
|
|
50
|
+
}
|
|
51
|
+
export interface ChatSocketHandle {
|
|
52
|
+
close: () => void;
|
|
53
|
+
}
|
|
54
|
+
export interface IClient {
|
|
55
|
+
openChatSocket(data: ChatSocketOptions): ChatSocketHandle;
|
|
56
|
+
}
|
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.45.
|
|
4
|
+
"version": "0.45.10",
|
|
5
5
|
"author": "Nomalism <it.nomalism@gmail.com> (https://nomalism.com/)",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"type": "module",
|