@webitel/chat-web-sdk 0.0.3 → 0.0.4-1
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/gen/ws/AckPayload.d.ts +18 -0
- package/dist/gen/ws/AckPayload.d.ts.map +1 -0
- package/dist/gen/ws/ConnectedPayload.d.ts +22 -0
- package/dist/gen/ws/ConnectedPayload.d.ts.map +1 -0
- package/dist/gen/ws/DisconnectedPayload.d.ts +22 -0
- package/dist/gen/ws/DisconnectedPayload.d.ts.map +1 -0
- package/dist/gen/ws/ErrorPayload.d.ts +22 -0
- package/dist/gen/ws/ErrorPayload.d.ts.map +1 -0
- package/dist/gen/ws/EventPayload.d.ts +45 -0
- package/dist/gen/ws/EventPayload.d.ts.map +1 -0
- package/dist/gen/ws/EventPriority.d.ts +8 -0
- package/dist/gen/ws/EventPriority.d.ts.map +1 -0
- package/dist/gen/ws/PingPayload.d.ts +14 -0
- package/dist/gen/ws/PingPayload.d.ts.map +1 -0
- package/dist/gen/ws/ServerEventPayload.d.ts +28 -0
- package/dist/gen/ws/ServerEventPayload.d.ts.map +1 -0
- package/dist/gen/ws/WsMessage.d.ts +51 -0
- package/dist/gen/ws/WsMessage.d.ts.map +1 -0
- package/dist/gen/ws/WsPeer.d.ts +30 -0
- package/dist/gen/ws/WsPeer.d.ts.map +1 -0
- package/dist/gen/ws/WsThread.d.ts +35 -0
- package/dist/gen/ws/WsThread.d.ts.map +1 -0
- package/dist/index.d.ts +16 -119
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +5840 -7437
- package/dist/index.js.map +1 -1
- package/dist/modules/account/accountSevice.d.ts +5 -0
- package/dist/modules/account/accountSevice.d.ts.map +1 -0
- package/dist/modules/account/api/Account.api.d.ts +10 -0
- package/dist/modules/account/api/Account.api.d.ts.map +1 -0
- package/dist/modules/account/index.d.ts +3 -0
- package/dist/modules/account/index.d.ts.map +1 -0
- package/dist/modules/account/types/Account.types.d.ts +3 -0
- package/dist/modules/account/types/Account.types.d.ts.map +1 -0
- package/dist/modules/account/utils/fetchAccount.d.ts +7 -0
- package/dist/modules/account/utils/fetchAccount.d.ts.map +1 -0
- package/dist/modules/configs/index.d.ts +4 -0
- package/dist/modules/configs/index.d.ts.map +1 -0
- package/dist/modules/configs/serviceConfig/ServiceConfig.class.d.ts +14 -0
- package/dist/modules/configs/serviceConfig/ServiceConfig.class.d.ts.map +1 -0
- package/dist/modules/configs/socketConfig/SocketConfig.class.d.ts +11 -0
- package/dist/modules/configs/socketConfig/SocketConfig.class.d.ts.map +1 -0
- package/dist/modules/configs/types/ServiceConfigurable.types.d.ts +5 -0
- package/dist/modules/configs/types/ServiceConfigurable.types.d.ts.map +1 -0
- package/dist/modules/contacts/api/Contacts.api.d.ts +6 -0
- package/dist/modules/contacts/api/Contacts.api.d.ts.map +1 -0
- package/dist/modules/contacts/classes/Contact.class.d.ts +6 -0
- package/dist/modules/contacts/classes/Contact.class.d.ts.map +1 -0
- package/dist/modules/contacts/contactsSevice.d.ts +6 -0
- package/dist/modules/contacts/contactsSevice.d.ts.map +1 -0
- package/dist/modules/contacts/index.d.ts +4 -0
- package/dist/modules/contacts/index.d.ts.map +1 -0
- package/dist/modules/contacts/types/Contact.types.d.ts +11 -0
- package/dist/modules/contacts/types/Contact.types.d.ts.map +1 -0
- package/dist/modules/contacts/utils/fetchContacts.d.ts +9 -0
- package/dist/modules/contacts/utils/fetchContacts.d.ts.map +1 -0
- package/dist/modules/messages/api/Messages.api.d.ts +14 -0
- package/dist/modules/messages/api/Messages.api.d.ts.map +1 -0
- package/dist/modules/messages/classes/Message.class.d.ts +6 -0
- package/dist/modules/messages/classes/Message.class.d.ts.map +1 -0
- package/dist/modules/messages/index.d.ts +4 -0
- package/dist/modules/messages/index.d.ts.map +1 -0
- package/dist/modules/messages/messagesSevice.d.ts +11 -0
- package/dist/modules/messages/messagesSevice.d.ts.map +1 -0
- package/dist/modules/messages/types/Message.types.d.ts +22 -0
- package/dist/modules/messages/types/Message.types.d.ts.map +1 -0
- package/dist/modules/messages/utils/fetchMessageHistory.d.ts +9 -0
- package/dist/modules/messages/utils/fetchMessageHistory.d.ts.map +1 -0
- package/dist/modules/messages/utils/sendFileMessage.d.ts +5 -0
- package/dist/modules/messages/utils/sendFileMessage.d.ts.map +1 -0
- package/dist/modules/messages/utils/sendImageMessage.d.ts +5 -0
- package/dist/modules/messages/utils/sendImageMessage.d.ts.map +1 -0
- package/dist/modules/messages/utils/sendTextMessage.d.ts +5 -0
- package/dist/modules/messages/utils/sendTextMessage.d.ts.map +1 -0
- package/dist/modules/socket/classes/ChatsSoketClient.d.ts +25 -0
- package/dist/modules/socket/classes/ChatsSoketClient.d.ts.map +1 -0
- package/dist/modules/socket/enums/ChatsSocketMessage.enum.d.ts +12 -0
- package/dist/modules/socket/enums/ChatsSocketMessage.enum.d.ts.map +1 -0
- package/dist/modules/socket/enums/SocketClientConnectionStatus.enum.d.ts +9 -0
- package/dist/modules/socket/enums/SocketClientConnectionStatus.enum.d.ts.map +1 -0
- package/dist/modules/socket/index.d.ts +4 -0
- package/dist/modules/socket/index.d.ts.map +1 -0
- package/dist/modules/socket/types/ChatsSocketClientEventsPayload.types.d.ts +9 -0
- package/dist/modules/socket/types/ChatsSocketClientEventsPayload.types.d.ts.map +1 -0
- package/dist/modules/socket/utils/getSocketMessageNameFromEvent.d.ts +4 -0
- package/dist/modules/socket/utils/getSocketMessageNameFromEvent.d.ts.map +1 -0
- package/dist/modules/threads/api/Threads.api.d.ts +6 -0
- package/dist/modules/threads/api/Threads.api.d.ts.map +1 -0
- package/dist/modules/threads/classes/Thread.class.d.ts +6 -0
- package/dist/modules/threads/classes/Thread.class.d.ts.map +1 -0
- package/dist/modules/threads/index.d.ts +4 -0
- package/dist/modules/threads/index.d.ts.map +1 -0
- package/dist/modules/threads/threadsSevice.d.ts +6 -0
- package/dist/modules/threads/threadsSevice.d.ts.map +1 -0
- package/dist/modules/threads/types/Thread.types.d.ts +18 -0
- package/dist/modules/threads/types/Thread.types.d.ts.map +1 -0
- package/dist/modules/threads/utils/fetchThreads.d.ts +13 -0
- package/dist/modules/threads/utils/fetchThreads.d.ts.map +1 -0
- package/dist/modules/ui/components/WtChatAvatar.ce.d.ts +7 -0
- package/dist/modules/ui/components/WtChatAvatar.ce.d.ts.map +1 -0
- package/dist/modules/ui/components/WtChatAvatar.vue.d.ts +12 -0
- package/dist/modules/ui/components/WtChatAvatar.vue.d.ts.map +1 -0
- package/dist/modules/ui/components/WtChatMessageBubble.ce.d.ts +8 -0
- package/dist/modules/ui/components/WtChatMessageBubble.ce.d.ts.map +1 -0
- package/dist/modules/ui/components/WtChatMessageBubble.vue.d.ts +29 -0
- package/dist/modules/ui/components/WtChatMessageBubble.vue.d.ts.map +1 -0
- package/dist/modules/ui/index.d.ts +8 -0
- package/dist/modules/ui/index.d.ts.map +1 -0
- package/package.json +10 -7
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ServiceConfig } from '../configs';
|
|
2
|
+
export declare function useAccountService(config: ServiceConfig): {
|
|
3
|
+
getAccount: () => Promise<import('@webitel/api-services/gen/models').WebitelImApiGatewayV1Authorization>;
|
|
4
|
+
};
|
|
5
|
+
//# sourceMappingURL=accountSevice.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accountSevice.d.ts","sourceRoot":"","sources":["../../../src/modules/account/accountSevice.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAGhD,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,aAAa;;EAItD"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ServiceConfig } from '../../configs';
|
|
2
|
+
import { AccountModel } from '../types/Account.types';
|
|
3
|
+
/**
|
|
4
|
+
* Current authorization / user context: `GET /v1/auth/token`
|
|
5
|
+
* Uses credentials on the configured `axiosInstance` (e.g. Bearer token).
|
|
6
|
+
*/
|
|
7
|
+
export declare const getAccountService: ({ axiosInstance }: ServiceConfig) => {
|
|
8
|
+
getAccount: () => Promise<AccountModel>;
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=Account.api.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Account.api.d.ts","sourceRoot":"","sources":["../../../../src/modules/account/api/Account.api.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAE3D;;;GAGG;AACH,eAAO,MAAM,iBAAiB,GAAI,mBAAmB,aAAa;sBAE1C,OAAO,CAAC,YAAY,CAAC;CAO5C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/account/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,YAAY,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Account.types.d.ts","sourceRoot":"","sources":["../../../../src/modules/account/types/Account.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kCAAkC,IAAI,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAE3G,YAAY,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ServiceConfig } from '../../configs';
|
|
2
|
+
import { AccountModel } from '../types/Account.types';
|
|
3
|
+
/**
|
|
4
|
+
* Resolves current user / authorization payload for the token on `config`.
|
|
5
|
+
*/
|
|
6
|
+
export declare const fetchAccount: (config: ServiceConfig) => Promise<AccountModel>;
|
|
7
|
+
//# sourceMappingURL=fetchAccount.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetchAccount.d.ts","sourceRoot":"","sources":["../../../../src/modules/account/utils/fetchAccount.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAE3D;;GAEG;AACH,eAAO,MAAM,YAAY,GACxB,QAAQ,aAAa,KACnB,OAAO,CAAC,YAAY,CAEtB,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { createServiceConfig, type ServiceConfig, type ServiceConfigInputSchema, } from './serviceConfig/ServiceConfig.class';
|
|
2
|
+
export { createSocketConfig, type SocketConfig, type SocketConfigInputSchema, } from './socketConfig/SocketConfig.class';
|
|
3
|
+
export type { ServiceConfigurable } from './types/ServiceConfigurable.types';
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/configs/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,mBAAmB,EACnB,KAAK,aAAa,EAClB,KAAK,wBAAwB,GAC7B,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EACN,kBAAkB,EAClB,KAAK,YAAY,EACjB,KAAK,uBAAuB,GAC5B,MAAM,mCAAmC,CAAC;AAC3C,YAAY,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AxiosInstance } from 'axios';
|
|
2
|
+
export type ServiceConfigInputSchema = {
|
|
3
|
+
baseUrl: string;
|
|
4
|
+
accessToken: string | (() => string) | (() => Promise<string>);
|
|
5
|
+
};
|
|
6
|
+
export declare class ServiceConfig implements ServiceConfigInputSchema {
|
|
7
|
+
baseUrl: string;
|
|
8
|
+
accessToken: string | (() => string) | (() => Promise<string>);
|
|
9
|
+
axiosInstance: AxiosInstance;
|
|
10
|
+
constructor({ baseUrl, accessToken }: ServiceConfigInputSchema);
|
|
11
|
+
setupAxiosTokenHandler(): void;
|
|
12
|
+
}
|
|
13
|
+
export declare function createServiceConfig(rawServiceConfig: ServiceConfigInputSchema): ServiceConfig;
|
|
14
|
+
//# sourceMappingURL=ServiceConfig.class.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ServiceConfig.class.d.ts","sourceRoot":"","sources":["../../../../src/modules/configs/serviceConfig/ServiceConfig.class.ts"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC;AAGlD,MAAM,MAAM,wBAAwB,GAAG;IACtC,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,GAAG,CAAC,MAAM,MAAM,CAAC,GAAG,CAAC,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;CAC/D,CAAC;AAEF,qBAAa,aAAc,YAAW,wBAAwB;IAC7D,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,GAAG,CAAC,MAAM,MAAM,CAAC,GAAG,CAAC,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;IAE/D,aAAa,EAAE,aAAa,CAAC;gBAEjB,EAAE,OAAO,EAAE,WAAW,EAAE,EAAE,wBAAwB;IAe9D,sBAAsB;CAatB;AAED,wBAAgB,mBAAmB,CAClC,gBAAgB,EAAE,wBAAwB,GACxC,aAAa,CAEf"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type SocketConfigInputSchema = {
|
|
2
|
+
baseUrl: string;
|
|
3
|
+
accessToken: string | (() => string) | (() => Promise<string>);
|
|
4
|
+
};
|
|
5
|
+
export declare class SocketConfig implements SocketConfigInputSchema {
|
|
6
|
+
baseUrl: string;
|
|
7
|
+
accessToken: string | (() => string) | (() => Promise<string>);
|
|
8
|
+
constructor({ baseUrl, accessToken }: SocketConfigInputSchema);
|
|
9
|
+
}
|
|
10
|
+
export declare function createSocketConfig(rawSocketConfig: SocketConfigInputSchema): SocketConfig;
|
|
11
|
+
//# sourceMappingURL=SocketConfig.class.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SocketConfig.class.d.ts","sourceRoot":"","sources":["../../../../src/modules/configs/socketConfig/SocketConfig.class.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,uBAAuB,GAAG;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,GAAG,CAAC,MAAM,MAAM,CAAC,GAAG,CAAC,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;CAC/D,CAAC;AAEF,qBAAa,YAAa,YAAW,uBAAuB;IAC3D,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,GAAG,CAAC,MAAM,MAAM,CAAC,GAAG,CAAC,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;gBAEnD,EAAE,OAAO,EAAE,WAAW,EAAE,EAAE,uBAAuB;CAI7D;AAED,wBAAgB,kBAAkB,CACjC,eAAe,EAAE,uBAAuB,GACtC,YAAY,CAEd"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ServiceConfigurable.types.d.ts","sourceRoot":"","sources":["../../../../src/modules/configs/types/ServiceConfigurable.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AAE1E,MAAM,WAAW,mBAAmB;IACnC,IAAI,aAAa,IAAI,aAAa,CAAC;CACnC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ServiceConfig } from '../../configs';
|
|
2
|
+
import { ContactSearchParams, ContactSearchRawResult } from '../types/Contact.types';
|
|
3
|
+
export declare const getContactsService: ({ axiosInstance }: ServiceConfig) => {
|
|
4
|
+
getContactsList: (params?: ContactSearchParams) => Promise<ContactSearchRawResult>;
|
|
5
|
+
};
|
|
6
|
+
//# sourceMappingURL=Contacts.api.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Contacts.api.d.ts","sourceRoot":"","sources":["../../../../src/modules/contacts/api/Contacts.api.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,KAAK,EACX,mBAAmB,EACnB,sBAAsB,EACtB,MAAM,wBAAwB,CAAC;AAEhC,eAAO,MAAM,kBAAkB,GAAI,mBAAmB,aAAa;+BAGxD,mBAAmB,KACzB,OAAO,CAAC,sBAAsB,CAAC;CAanC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ServiceConfig } from '../../configs';
|
|
2
|
+
import { ContactModel, IContact } from '../types/Contact.types';
|
|
3
|
+
export declare function createContact(rawContact: ContactModel, { serviceConfig, }: {
|
|
4
|
+
serviceConfig: ServiceConfig;
|
|
5
|
+
}): IContact;
|
|
6
|
+
//# sourceMappingURL=Contact.class.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Contact.class.d.ts","sourceRoot":"","sources":["../../../../src/modules/contacts/classes/Contact.class.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnD,OAAO,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAwCrE,wBAAgB,aAAa,CAC5B,UAAU,EAAE,YAAY,EACxB,EACC,aAAa,GACb,EAAE;IACF,aAAa,EAAE,aAAa,CAAC;CAC7B,GACC,QAAQ,CAIV"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ServiceConfig } from '../configs';
|
|
2
|
+
import { ContactSearchParams } from './types/Contact.types';
|
|
3
|
+
export declare function useContactsService(config: ServiceConfig): {
|
|
4
|
+
fetchContacts: (params?: ContactSearchParams) => Promise<import('.').ContactSearchResult>;
|
|
5
|
+
};
|
|
6
|
+
//# sourceMappingURL=contactsSevice.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contactsSevice.d.ts","sourceRoot":"","sources":["../../../src/modules/contacts/contactsSevice.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAGjE,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,aAAa;6BAE7B,mBAAmB;EAG7C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/contacts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,YAAY,EACX,YAAY,EACZ,mBAAmB,EACnB,mBAAmB,EACnB,QAAQ,GACR,MAAM,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { WebitelImApiGatewayV1Contact as ContactModel, ContactsSearchParams as ContactSearchParams, WebitelImApiGatewayV1ContactList as ContactSearchRawResult } from '@webitel/api-services/gen/models';
|
|
2
|
+
import { ServiceConfigurable } from '../../configs';
|
|
3
|
+
import { MessageSendTextParams, MessageSendTextRawResponse } from '../../messages/types/Message.types';
|
|
4
|
+
interface IContact extends ContactModel, ServiceConfigurable {
|
|
5
|
+
sendTextMessage: (body: string, params?: Omit<MessageSendTextParams, 'body' | 'to'>) => Promise<MessageSendTextRawResponse>;
|
|
6
|
+
}
|
|
7
|
+
type ContactSearchResult = Omit<ContactSearchRawResult, 'items'> & {
|
|
8
|
+
items: IContact[];
|
|
9
|
+
};
|
|
10
|
+
export type { ContactModel, ContactSearchParams, ContactSearchRawResult, ContactSearchResult, IContact, };
|
|
11
|
+
//# sourceMappingURL=Contact.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Contact.types.d.ts","sourceRoot":"","sources":["../../../../src/modules/contacts/types/Contact.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,4BAA4B,IAAI,YAAY,EAC5C,oBAAoB,IAAI,mBAAmB,EAC3C,gCAAgC,IAAI,sBAAsB,EAC1D,MAAM,kCAAkC,CAAC;AAE1C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,KAAK,EACX,qBAAqB,EACrB,0BAA0B,EAC1B,MAAM,oCAAoC,CAAC;AAE5C,UAAU,QAAS,SAAQ,YAAY,EAAE,mBAAmB;IAC3D,eAAe,EAAE,CAChB,IAAI,EAAE,MAAM,EACZ,MAAM,CAAC,EAAE,IAAI,CAAC,qBAAqB,EAAE,MAAM,GAAG,IAAI,CAAC,KAC/C,OAAO,CAAC,0BAA0B,CAAC,CAAC;CACzC;AAED,KAAK,mBAAmB,GAAG,IAAI,CAAC,sBAAsB,EAAE,OAAO,CAAC,GAAG;IAClE,KAAK,EAAE,QAAQ,EAAE,CAAC;CAClB,CAAC;AAEF,YAAY,EACX,YAAY,EACZ,mBAAmB,EACnB,sBAAsB,EACtB,mBAAmB,EACnB,QAAQ,GACR,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ServiceConfig } from '../../configs';
|
|
2
|
+
import { ContactSearchParams, ContactSearchRawResult, ContactSearchResult } from '../types/Contact.types';
|
|
3
|
+
declare const fetchRawContacts: (config: ServiceConfig) => (params?: ContactSearchParams) => Promise<ContactSearchRawResult>;
|
|
4
|
+
/**
|
|
5
|
+
* Fetches contacts and returns `Contact` class instances in `items`.
|
|
6
|
+
*/
|
|
7
|
+
declare const fetchContacts: (config: ServiceConfig, params?: ContactSearchParams) => Promise<ContactSearchResult>;
|
|
8
|
+
export { fetchContacts, fetchRawContacts };
|
|
9
|
+
//# sourceMappingURL=fetchContacts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetchContacts.d.ts","sourceRoot":"","sources":["../../../../src/modules/contacts/utils/fetchContacts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAGnD,OAAO,KAAK,EAEX,mBAAmB,EACnB,sBAAsB,EACtB,mBAAmB,EAEnB,MAAM,wBAAwB,CAAC;AAEhC,QAAA,MAAM,gBAAgB,GACpB,QAAQ,aAAa,MACf,SAAQ,mBAAwB,KAAG,OAAO,CAAC,sBAAsB,CAGvE,CAAC;AAiBH;;GAEG;AACH,QAAA,MAAM,aAAa,GAClB,QAAQ,aAAa,EACrB,SAAQ,mBAAwB,KAC9B,OAAO,CAAC,mBAAmB,CAQ7B,CAAC;AAEF,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ServiceConfig } from '../../configs';
|
|
2
|
+
import { MessageHistorySearchParams, MessageHistorySearchRawResponse, MessageSendFileParams, MessageSendFileRawResponse, MessageSendImageParams, MessageSendImageRawResponse, MessageSendTextParams, MessageSendTextRawResponse, MessageUploadFileRawResponse } from '../types/Message.types';
|
|
3
|
+
/**
|
|
4
|
+
* Message history for a thread: `GET /v1/{threadId}/messages`
|
|
5
|
+
* @see webitel-im-api-gateway-v1-messagehistory
|
|
6
|
+
*/
|
|
7
|
+
export declare const getMessagesService: ({ axiosInstance }: ServiceConfig) => {
|
|
8
|
+
getMessageHistory: (threadId: string, params?: MessageHistorySearchParams) => Promise<MessageHistorySearchRawResponse>;
|
|
9
|
+
sendTextMessage: (params: MessageSendTextParams) => Promise<MessageSendTextRawResponse>;
|
|
10
|
+
uploadFile: (threadId: string, file: File) => Promise<MessageUploadFileRawResponse>;
|
|
11
|
+
sendFileMessage: (params: Omit<MessageSendFileParams, "file" | "threadId">) => Promise<MessageSendFileRawResponse>;
|
|
12
|
+
sendImageMessage: (params: Omit<MessageSendImageParams, "file" | "threadId">) => Promise<MessageSendImageRawResponse>;
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=Messages.api.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Messages.api.d.ts","sourceRoot":"","sources":["../../../../src/modules/messages/api/Messages.api.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,KAAK,EACX,0BAA0B,EAC1B,+BAA+B,EAC/B,qBAAqB,EACrB,0BAA0B,EAC1B,sBAAsB,EACtB,2BAA2B,EAC3B,qBAAqB,EACrB,0BAA0B,EAC1B,4BAA4B,EAC5B,MAAM,wBAAwB,CAAC;AAEhC;;;GAGG;AACH,eAAO,MAAM,kBAAkB,GAAI,mBAAmB,aAAa;kCAGtD,MAAM,WACR,0BAA0B,KAChC,OAAO,CAAC,+BAA+B,CAAC;8BAclC,qBAAqB,KAC3B,OAAO,CAAC,0BAA0B,CAAC;2BAe3B,MAAM,QACV,IAAI,KACR,OAAO,CAAC,4BAA4B,CAAC;8BAc/B,IAAI,CAAC,qBAAqB,EAAE,MAAM,GAAG,UAAU,CAAC,KACtD,OAAO,CAAC,0BAA0B,CAAC;+BAe7B,IAAI,CAAC,sBAAsB,EAAE,MAAM,GAAG,UAAU,CAAC,KACvD,OAAO,CAAC,2BAA2B,CAAC;CAcxC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ServiceConfig } from '../../configs';
|
|
2
|
+
import { IMessage, MessageModel } from '../types/Message.types';
|
|
3
|
+
export declare function createMessage(rawMessage: MessageModel, { serviceConfig, }: {
|
|
4
|
+
serviceConfig: ServiceConfig;
|
|
5
|
+
}): IMessage;
|
|
6
|
+
//# sourceMappingURL=Message.class.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Message.class.d.ts","sourceRoot":"","sources":["../../../../src/modules/messages/classes/Message.class.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAyBrE,wBAAgB,aAAa,CAC5B,UAAU,EAAE,YAAY,EACxB,EACC,aAAa,GACb,EAAE;IACF,aAAa,EAAE,aAAa,CAAC;CAC7B,GACC,QAAQ,CAIV"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { createMessage } from './classes/Message.class';
|
|
2
|
+
export { useMessagesService } from './messagesSevice';
|
|
3
|
+
export type { IMessage, MessageHistorySearchParams, MessageHistorySearchResult, MessageModel, MessageSendFileParams, MessageSendFileRawResponse, MessageSendImageParams, MessageSendImageRawResponse, MessageSendTextParams, MessageSendTextRawResponse, } from './types/Message.types';
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/messages/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,YAAY,EACX,QAAQ,EACR,0BAA0B,EAC1B,0BAA0B,EAC1B,YAAY,EACZ,qBAAqB,EACrB,0BAA0B,EAC1B,sBAAsB,EACtB,2BAA2B,EAC3B,qBAAqB,EACrB,0BAA0B,GAC1B,MAAM,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ServiceConfig } from '../configs';
|
|
2
|
+
import { MessageHistorySearchParams, MessageHistorySearchResult, MessageSendFileParams, MessageSendFileRawResponse, MessageSendImageParams, MessageSendImageRawResponse, MessageSendTextParams, MessageSendTextRawResponse } from './types/Message.types';
|
|
3
|
+
interface IMessagesService {
|
|
4
|
+
fetchMessageHistory: (threadId: string, params?: MessageHistorySearchParams) => Promise<MessageHistorySearchResult>;
|
|
5
|
+
sendTextMessage: (params: MessageSendTextParams) => Promise<MessageSendTextRawResponse>;
|
|
6
|
+
sendFileMessage: (params: MessageSendFileParams) => Promise<MessageSendFileRawResponse>;
|
|
7
|
+
sendImageMessage: (params: MessageSendImageParams) => Promise<MessageSendImageRawResponse>;
|
|
8
|
+
}
|
|
9
|
+
export declare function useMessagesService(config: ServiceConfig): IMessagesService;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=messagesSevice.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messagesSevice.d.ts","sourceRoot":"","sources":["../../../src/modules/messages/messagesSevice.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,KAAK,EACX,0BAA0B,EAC1B,0BAA0B,EAC1B,qBAAqB,EACrB,0BAA0B,EAC1B,sBAAsB,EACtB,2BAA2B,EAC3B,qBAAqB,EACrB,0BAA0B,EAC1B,MAAM,uBAAuB,CAAC;AAM/B,UAAU,gBAAgB;IACzB,mBAAmB,EAAE,CACpB,QAAQ,EAAE,MAAM,EAChB,MAAM,CAAC,EAAE,0BAA0B,KAC/B,OAAO,CAAC,0BAA0B,CAAC,CAAC;IACzC,eAAe,EAAE,CAChB,MAAM,EAAE,qBAAqB,KACzB,OAAO,CAAC,0BAA0B,CAAC,CAAC;IACzC,eAAe,EAAE,CAChB,MAAM,EAAE,qBAAqB,KACzB,OAAO,CAAC,0BAA0B,CAAC,CAAC;IACzC,gBAAgB,EAAE,CACjB,MAAM,EAAE,sBAAsB,KAC1B,OAAO,CAAC,2BAA2B,CAAC,CAAC;CAC1C;AAED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,aAAa,GAAG,gBAAgB,CAa1E"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { MessageHistorySearchThreadMessagesHistoryWebitelImApiGatewayV1MessageHistoryParams as MessageHistorySearchParams, WebitelImApiGatewayV1SearchMessageHistoryResponse as MessageHistorySearchRawResponse, WebitelImApiGatewayV1HistoryMessage as MessageModel, WebitelImApiGatewayV1SendDocumentResponse as MessageSendFileRawResponse, WebitelImApiGatewayV1SendImageResponse as MessageSendImageRawResponse, WebitelImApiGatewayV1SendTextRequest as MessageSendTextParams, WebitelImApiGatewayV1SendTextResponse as MessageSendTextRawResponse, StorageUploadFileResponse as MessageUploadFileRawResponse, WebitelImApiGatewayV1SendDocumentRequest, WebitelImApiGatewayV1SendImageRequest } from '@webitel/api-services/gen/models';
|
|
2
|
+
interface IMessage extends MessageModel {
|
|
3
|
+
markRead: () => Promise<void>;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* API response with `messages` replaced by instantiated SDK `Message` classes.
|
|
7
|
+
*/
|
|
8
|
+
type MessageHistorySearchResult = Omit<MessageHistorySearchRawResponse, 'items'> & {
|
|
9
|
+
items: IMessage[];
|
|
10
|
+
};
|
|
11
|
+
type MessageSendFileParams = Omit<WebitelImApiGatewayV1SendDocumentRequest, 'document'> & {
|
|
12
|
+
document?: NonNullable<WebitelImApiGatewayV1SendDocumentRequest['document']>;
|
|
13
|
+
file: File;
|
|
14
|
+
threadId: string;
|
|
15
|
+
};
|
|
16
|
+
type MessageSendImageParams = Omit<WebitelImApiGatewayV1SendImageRequest, 'image'> & {
|
|
17
|
+
image?: NonNullable<WebitelImApiGatewayV1SendImageRequest['image']>;
|
|
18
|
+
file: File;
|
|
19
|
+
threadId: string;
|
|
20
|
+
};
|
|
21
|
+
export type { IMessage, MessageHistorySearchParams, MessageHistorySearchRawResponse, MessageHistorySearchResult, MessageModel, MessageSendFileParams, MessageSendFileRawResponse, MessageSendImageParams, MessageSendImageRawResponse, MessageSendTextParams, MessageSendTextRawResponse, MessageUploadFileRawResponse, };
|
|
22
|
+
//# sourceMappingURL=Message.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Message.types.d.ts","sourceRoot":"","sources":["../../../../src/modules/messages/types/Message.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,kFAAkF,IAAI,0BAA0B,EAChH,iDAAiD,IAAI,+BAA+B,EACpF,mCAAmC,IAAI,YAAY,EACnD,yCAAyC,IAAI,0BAA0B,EACvE,sCAAsC,IAAI,2BAA2B,EACrE,oCAAoC,IAAI,qBAAqB,EAC7D,qCAAqC,IAAI,0BAA0B,EACnE,yBAAyB,IAAI,4BAA4B,EACzD,wCAAwC,EACxC,qCAAqC,EACrC,MAAM,kCAAkC,CAAC;AAE1C,UAAU,QAAS,SAAQ,YAAY;IACtC,QAAQ,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9B;AAED;;GAEG;AACH,KAAK,0BAA0B,GAAG,IAAI,CACrC,+BAA+B,EAC/B,OAAO,CACP,GAAG;IACH,KAAK,EAAE,QAAQ,EAAE,CAAC;CAClB,CAAC;AAEF,KAAK,qBAAqB,GAAG,IAAI,CAChC,wCAAwC,EACxC,UAAU,CACV,GAAG;IACH,QAAQ,CAAC,EAAE,WAAW,CAAC,wCAAwC,CAAC,UAAU,CAAC,CAAC,CAAC;IAC7E,IAAI,EAAE,IAAI,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,KAAK,sBAAsB,GAAG,IAAI,CACjC,qCAAqC,EACrC,OAAO,CACP,GAAG;IACH,KAAK,CAAC,EAAE,WAAW,CAAC,qCAAqC,CAAC,OAAO,CAAC,CAAC,CAAC;IACpE,IAAI,EAAE,IAAI,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,YAAY,EACX,QAAQ,EACR,0BAA0B,EAC1B,+BAA+B,EAC/B,0BAA0B,EAC1B,YAAY,EACZ,qBAAqB,EACrB,0BAA0B,EAC1B,sBAAsB,EACtB,2BAA2B,EAC3B,qBAAqB,EACrB,0BAA0B,EAC1B,4BAA4B,GAC5B,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ServiceConfig } from '../../configs';
|
|
2
|
+
import { MessageHistorySearchParams, MessageHistorySearchRawResponse, MessageHistorySearchResult } from '../types/Message.types';
|
|
3
|
+
declare const fetchRawMessageHistory: (config: ServiceConfig) => (threadId: string, params?: MessageHistorySearchParams) => Promise<MessageHistorySearchRawResponse>;
|
|
4
|
+
/**
|
|
5
|
+
* Fetches message history and returns `Message` class instances in `messages`.
|
|
6
|
+
*/
|
|
7
|
+
declare const fetchMessageHistory: (config: ServiceConfig, threadId: string, params?: MessageHistorySearchParams) => Promise<MessageHistorySearchResult>;
|
|
8
|
+
export { fetchMessageHistory, fetchRawMessageHistory };
|
|
9
|
+
//# sourceMappingURL=fetchMessageHistory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetchMessageHistory.d.ts","sourceRoot":"","sources":["../../../../src/modules/messages/utils/fetchMessageHistory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAGnD,OAAO,KAAK,EAEX,0BAA0B,EAC1B,+BAA+B,EAC/B,0BAA0B,EAE1B,MAAM,wBAAwB,CAAC;AAEhC,QAAA,MAAM,sBAAsB,GAC1B,QAAQ,aAAa,MAErB,UAAU,MAAM,EAChB,SAAQ,0BAA+B,KACrC,OAAO,CAAC,+BAA+B,CAMzC,CAAC;AAiBH;;GAEG;AACH,QAAA,MAAM,mBAAmB,GACxB,QAAQ,aAAa,EACrB,UAAU,MAAM,EAChB,SAAQ,0BAA+B,KACrC,OAAO,CAAC,0BAA0B,CAQpC,CAAC;AAEF,OAAO,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ServiceConfig } from '../../configs';
|
|
2
|
+
import { MessageSendFileParams, MessageSendFileRawResponse } from '../types/Message.types';
|
|
3
|
+
declare const sendFileMessage: (config: ServiceConfig, params: MessageSendFileParams) => Promise<MessageSendFileRawResponse>;
|
|
4
|
+
export { sendFileMessage };
|
|
5
|
+
//# sourceMappingURL=sendFileMessage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sendFileMessage.d.ts","sourceRoot":"","sources":["../../../../src/modules/messages/utils/sendFileMessage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnD,OAAO,KAAK,EACX,qBAAqB,EACrB,0BAA0B,EAC1B,MAAM,wBAAwB,CAAC;AAEhC,QAAA,MAAM,eAAe,GACpB,QAAQ,aAAa,EACrB,QAAQ,qBAAqB,KAC3B,OAAO,CAAC,0BAA0B,CAiCpC,CAAC;AAEF,OAAO,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ServiceConfig } from '../../configs';
|
|
2
|
+
import { MessageSendImageParams, MessageSendImageRawResponse } from '../types/Message.types';
|
|
3
|
+
declare const sendImageMessage: (config: ServiceConfig, params: MessageSendImageParams) => Promise<MessageSendImageRawResponse>;
|
|
4
|
+
export { sendImageMessage };
|
|
5
|
+
//# sourceMappingURL=sendImageMessage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sendImageMessage.d.ts","sourceRoot":"","sources":["../../../../src/modules/messages/utils/sendImageMessage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnD,OAAO,KAAK,EACX,sBAAsB,EACtB,2BAA2B,EAC3B,MAAM,wBAAwB,CAAC;AAEhC,QAAA,MAAM,gBAAgB,GACrB,QAAQ,aAAa,EACrB,QAAQ,sBAAsB,KAC5B,OAAO,CAAC,2BAA2B,CAgCrC,CAAC;AAEF,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ServiceConfig } from '../../configs';
|
|
2
|
+
import { MessageSendTextParams, MessageSendTextRawResponse } from '../types/Message.types';
|
|
3
|
+
declare const sendTextMessage: (config: ServiceConfig, params: MessageSendTextParams) => Promise<MessageSendTextRawResponse>;
|
|
4
|
+
export { sendTextMessage };
|
|
5
|
+
//# sourceMappingURL=sendTextMessage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sendTextMessage.d.ts","sourceRoot":"","sources":["../../../../src/modules/messages/utils/sendTextMessage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnD,OAAO,KAAK,EACX,qBAAqB,EACrB,0BAA0B,EAC1B,MAAM,wBAAwB,CAAC;AAEhC,QAAA,MAAM,eAAe,GACpB,QAAQ,aAAa,EACrB,QAAQ,qBAAqB,KAC3B,OAAO,CAAC,0BAA0B,CAEpC,CAAC;AAEF,OAAO,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { SocketConfig } from '../../configs';
|
|
2
|
+
import { ChatsSocketMessage } from '../enums/ChatsSocketMessage.enum';
|
|
3
|
+
import { SocketClientConnectionStatus } from '../enums/SocketClientConnectionStatus.enum';
|
|
4
|
+
export interface IChatsSocketClient {
|
|
5
|
+
connect: () => Promise<void>;
|
|
6
|
+
disconnect: () => void;
|
|
7
|
+
reconnect: () => Promise<void>;
|
|
8
|
+
on: (event: ChatsSocketMessage, callback: IChatsSocketClientEventSubscriber) => void;
|
|
9
|
+
}
|
|
10
|
+
export type IChatsSocketClientEventSubscriber = (data: unknown) => unknown;
|
|
11
|
+
declare class ChatsSocketClient implements IChatsSocketClient {
|
|
12
|
+
private config;
|
|
13
|
+
private emitter;
|
|
14
|
+
private ws;
|
|
15
|
+
private wsConnectionState;
|
|
16
|
+
constructor(config: SocketConfig);
|
|
17
|
+
get connectionState(): SocketClientConnectionStatus;
|
|
18
|
+
connect(): Promise<void>;
|
|
19
|
+
reconnect(): Promise<void>;
|
|
20
|
+
disconnect(): Promise<void>;
|
|
21
|
+
on(event: ChatsSocketMessage, callback: IChatsSocketClientEventSubscriber): void;
|
|
22
|
+
}
|
|
23
|
+
export declare function createChatsSocketClient(config: SocketConfig): ChatsSocketClient;
|
|
24
|
+
export {};
|
|
25
|
+
//# sourceMappingURL=ChatsSoketClient.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChatsSoketClient.d.ts","sourceRoot":"","sources":["../../../../src/modules/socket/classes/ChatsSoketClient.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,4BAA4B,EAAE,MAAM,4CAA4C,CAAC;AAI1F,MAAM,WAAW,kBAAkB;IAClC,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7B,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,SAAS,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/B,EAAE,EAAE,CACH,KAAK,EAAE,kBAAkB,EACzB,QAAQ,EAAE,iCAAiC,KACvC,IAAI,CAAC;CACV;AAED,MAAM,MAAM,iCAAiC,GAAG,CAC/C,IAAI,EAAE,OAAO,KAET,OAAO,CAAC;AAEb,cAAM,iBAAkB,YAAW,kBAAkB;IAQxC,OAAO,CAAC,MAAM;IAP1B,OAAO,CAAC,OAAO,CAA4C;IAE3D,OAAO,CAAC,EAAE,CAA0B;IAEpC,OAAO,CAAC,iBAAiB,CACU;gBAEf,MAAM,EAAE,YAAY;IAExC,IAAI,eAAe,IAAI,4BAA4B,CAElD;IAEK,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IA+BxB,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;IAI1B,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAMjC,EAAE,CACD,KAAK,EAAE,kBAAkB,EACzB,QAAQ,EAAE,iCAAiC,GACzC,IAAI;CAGP;AAED,wBAAgB,uBAAuB,CACtC,MAAM,EAAE,YAAY,GAClB,iBAAiB,CAEnB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @see https://github.com/webitel/im-delivery-service/blob/main/api/asyncapi/asyncapi.yaml#L56
|
|
3
|
+
*/
|
|
4
|
+
export declare const ChatsSocketMessage: {
|
|
5
|
+
readonly Connected: "connected";
|
|
6
|
+
readonly Disconnected: "disconnected";
|
|
7
|
+
readonly Error: "error";
|
|
8
|
+
readonly ThreadMessage: "message";
|
|
9
|
+
readonly ThreadCreated: "thread_created";
|
|
10
|
+
};
|
|
11
|
+
export type ChatsSocketMessage = (typeof ChatsSocketMessage)[keyof typeof ChatsSocketMessage];
|
|
12
|
+
//# sourceMappingURL=ChatsSocketMessage.enum.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChatsSocketMessage.enum.d.ts","sourceRoot":"","sources":["../../../../src/modules/socket/enums/ChatsSocketMessage.enum.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,kBAAkB;;;;;;CAMrB,CAAC;AAEX,MAAM,MAAM,kBAAkB,GAC7B,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,OAAO,kBAAkB,CAAC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const SocketClientConnectionStatus: {
|
|
2
|
+
readonly Idle: "idle";
|
|
3
|
+
readonly Connecting: "connecting";
|
|
4
|
+
readonly Connected: "connected";
|
|
5
|
+
readonly Disconnected: "disconnected";
|
|
6
|
+
readonly Error: "error";
|
|
7
|
+
};
|
|
8
|
+
export type SocketClientConnectionStatus = (typeof SocketClientConnectionStatus)[keyof typeof SocketClientConnectionStatus];
|
|
9
|
+
//# sourceMappingURL=SocketClientConnectionStatus.enum.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SocketClientConnectionStatus.enum.d.ts","sourceRoot":"","sources":["../../../../src/modules/socket/enums/SocketClientConnectionStatus.enum.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,4BAA4B;;;;;;CAM/B,CAAC;AAEX,MAAM,MAAM,4BAA4B,GACvC,CAAC,OAAO,4BAA4B,CAAC,CAAC,MAAM,OAAO,4BAA4B,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/socket/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AACrE,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE,OAAO,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ChatsSocketMessage } from '../enums/ChatsSocketMessage.enum';
|
|
2
|
+
export type ChatsSocketClientEventPayloadMap = {
|
|
3
|
+
[ChatsSocketMessage.ThreadMessage]: unknown;
|
|
4
|
+
[ChatsSocketMessage.ThreadCreated]: unknown;
|
|
5
|
+
[ChatsSocketMessage.Connected]: unknown;
|
|
6
|
+
[ChatsSocketMessage.Disconnected]: unknown;
|
|
7
|
+
[ChatsSocketMessage.Error]: unknown;
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=ChatsSocketClientEventsPayload.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChatsSocketClientEventsPayload.types.d.ts","sourceRoot":"","sources":["../../../../src/modules/socket/types/ChatsSocketClientEventsPayload.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAE3E,MAAM,MAAM,gCAAgC,GAAG;IAC9C,CAAC,kBAAkB,CAAC,aAAa,CAAC,EAAE,OAAO,CAAC;IAC5C,CAAC,kBAAkB,CAAC,aAAa,CAAC,EAAE,OAAO,CAAC;IAC5C,CAAC,kBAAkB,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IACxC,CAAC,kBAAkB,CAAC,YAAY,CAAC,EAAE,OAAO,CAAC;IAC3C,CAAC,kBAAkB,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC;CACpC,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { EventPayload } from '../../../gen/ws/EventPayload';
|
|
2
|
+
import { ChatsSocketMessage } from '../enums/ChatsSocketMessage.enum';
|
|
3
|
+
export declare function getSocketMessageNameFromEvent(sourceEvent: EventPayload): ChatsSocketMessage;
|
|
4
|
+
//# sourceMappingURL=getSocketMessageNameFromEvent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getSocketMessageNameFromEvent.d.ts","sourceRoot":"","sources":["../../../../src/modules/socket/utils/getSocketMessageNameFromEvent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAUtE,wBAAgB,6BAA6B,CAC5C,WAAW,EAAE,YAAY,GACvB,kBAAkB,CAQpB"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ServiceConfig } from '../../configs';
|
|
2
|
+
import { ThreadSearchParams, ThreadSearchRawResult } from '../types/Thread.types';
|
|
3
|
+
export declare const getThreadsService: ({ axiosInstance }: ServiceConfig) => {
|
|
4
|
+
getThreadsList: (params?: ThreadSearchParams) => Promise<ThreadSearchRawResult>;
|
|
5
|
+
};
|
|
6
|
+
//# sourceMappingURL=Threads.api.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Threads.api.d.ts","sourceRoot":"","sources":["../../../../src/modules/threads/api/Threads.api.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,KAAK,EACX,kBAAkB,EAClB,qBAAqB,EACrB,MAAM,uBAAuB,CAAC;AAE/B,eAAO,MAAM,iBAAiB,GAAI,mBAAmB,aAAa;8BAGvD,kBAAkB,KACxB,OAAO,CAAC,qBAAqB,CAAC;CAalC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ServiceConfig } from '../../configs';
|
|
2
|
+
import { IThread, ThreadModel } from '../types/Thread.types';
|
|
3
|
+
export declare function createThread(rawThread: ThreadModel, { serviceConfig, }: {
|
|
4
|
+
serviceConfig: ServiceConfig;
|
|
5
|
+
}): IThread;
|
|
6
|
+
//# sourceMappingURL=Thread.class.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Thread.class.d.ts","sourceRoot":"","sources":["../../../../src/modules/threads/classes/Thread.class.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAKnD,OAAO,KAAK,EACX,OAAO,EACP,WAAW,EAIX,MAAM,uBAAuB,CAAC;AAoE/B,wBAAgB,YAAY,CAC3B,SAAS,EAAE,WAAW,EACtB,EACC,aAAa,GACb,EAAE;IACF,aAAa,EAAE,aAAa,CAAC;CAC7B,GACC,OAAO,CAIT"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/threads/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,YAAY,EACX,OAAO,EACP,WAAW,EACX,kBAAkB,EAClB,kBAAkB,GAClB,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ServiceConfig } from '../configs';
|
|
2
|
+
import { ThreadSearchParams } from './types/Thread.types';
|
|
3
|
+
export declare function useThreadsService(config: ServiceConfig): {
|
|
4
|
+
fetchThreads: (params?: ThreadSearchParams) => Promise<import('.').ThreadSearchResult>;
|
|
5
|
+
};
|
|
6
|
+
//# sourceMappingURL=threadsSevice.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"threadsSevice.d.ts","sourceRoot":"","sources":["../../../src/modules/threads/threadsSevice.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAG/D,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,aAAa;4BAE7B,kBAAkB;EAG3C"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { WebitelImApiGatewayV1Thread as ThreadModel, ThreadManagementSearchParams as ThreadSearchParams, WebitelImApiGatewayV1SearchThreadResponse as ThreadSearchRawResult } from '@webitel/api-services/gen/models';
|
|
2
|
+
import { ServiceConfigurable } from '../../configs';
|
|
3
|
+
import { MessageHistorySearchParams, MessageHistorySearchResult, MessageSendFileParams, MessageSendFileRawResponse, MessageSendImageParams, MessageSendImageRawResponse, MessageSendTextParams, MessageSendTextRawResponse } from '../../messages/types/Message.types';
|
|
4
|
+
type ThreadSendTextMessageParams = Omit<MessageSendTextParams, 'body' | 'to'>;
|
|
5
|
+
type ThreadSendFileMessageParams = Omit<MessageSendFileParams, 'file' | 'threadId' | 'to'>;
|
|
6
|
+
type ThreadSendImageMessageParams = Omit<MessageSendImageParams, 'file' | 'threadId' | 'to'>;
|
|
7
|
+
interface IThread extends ThreadModel, ServiceConfigurable {
|
|
8
|
+
id: string;
|
|
9
|
+
fetchMessageHistory: (params?: MessageHistorySearchParams) => Promise<MessageHistorySearchResult>;
|
|
10
|
+
sendTextMessage: (body: string, params?: ThreadSendTextMessageParams) => Promise<MessageSendTextRawResponse>;
|
|
11
|
+
sendFileMessage: (file: File, params?: ThreadSendFileMessageParams) => Promise<MessageSendFileRawResponse>;
|
|
12
|
+
sendImageMessage: (file: File, params?: ThreadSendImageMessageParams) => Promise<MessageSendImageRawResponse>;
|
|
13
|
+
}
|
|
14
|
+
type ThreadSearchResult = Omit<ThreadSearchRawResult, 'items'> & {
|
|
15
|
+
items: IThread[];
|
|
16
|
+
};
|
|
17
|
+
export type { IThread, ThreadModel, ThreadSearchParams, ThreadSearchRawResult, ThreadSearchResult, ThreadSendFileMessageParams, ThreadSendImageMessageParams, ThreadSendTextMessageParams, };
|
|
18
|
+
//# sourceMappingURL=Thread.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Thread.types.d.ts","sourceRoot":"","sources":["../../../../src/modules/threads/types/Thread.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,2BAA2B,IAAI,WAAW,EAC1C,4BAA4B,IAAI,kBAAkB,EAClD,yCAAyC,IAAI,qBAAqB,EAClE,MAAM,kCAAkC,CAAC;AAE1C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,KAAK,EACX,0BAA0B,EAC1B,0BAA0B,EAC1B,qBAAqB,EACrB,0BAA0B,EAC1B,sBAAsB,EACtB,2BAA2B,EAC3B,qBAAqB,EACrB,0BAA0B,EAC1B,MAAM,oCAAoC,CAAC;AAE5C,KAAK,2BAA2B,GAAG,IAAI,CAAC,qBAAqB,EAAE,MAAM,GAAG,IAAI,CAAC,CAAC;AAC9E,KAAK,2BAA2B,GAAG,IAAI,CACtC,qBAAqB,EACrB,MAAM,GAAG,UAAU,GAAG,IAAI,CAC1B,CAAC;AACF,KAAK,4BAA4B,GAAG,IAAI,CACvC,sBAAsB,EACtB,MAAM,GAAG,UAAU,GAAG,IAAI,CAC1B,CAAC;AAEF,UAAU,OAAQ,SAAQ,WAAW,EAAE,mBAAmB;IACzD,EAAE,EAAE,MAAM,CAAC;IAEX,mBAAmB,EAAE,CACpB,MAAM,CAAC,EAAE,0BAA0B,KAC/B,OAAO,CAAC,0BAA0B,CAAC,CAAC;IAEzC,eAAe,EAAE,CAChB,IAAI,EAAE,MAAM,EACZ,MAAM,CAAC,EAAE,2BAA2B,KAChC,OAAO,CAAC,0BAA0B,CAAC,CAAC;IAEzC,eAAe,EAAE,CAChB,IAAI,EAAE,IAAI,EACV,MAAM,CAAC,EAAE,2BAA2B,KAChC,OAAO,CAAC,0BAA0B,CAAC,CAAC;IAEzC,gBAAgB,EAAE,CACjB,IAAI,EAAE,IAAI,EACV,MAAM,CAAC,EAAE,4BAA4B,KACjC,OAAO,CAAC,2BAA2B,CAAC,CAAC;CAC1C;AAED,KAAK,kBAAkB,GAAG,IAAI,CAAC,qBAAqB,EAAE,OAAO,CAAC,GAAG;IAChE,KAAK,EAAE,OAAO,EAAE,CAAC;CACjB,CAAC;AAEF,YAAY,EACX,OAAO,EACP,WAAW,EACX,kBAAkB,EAClB,qBAAqB,EACrB,kBAAkB,EAClB,2BAA2B,EAC3B,4BAA4B,EAC5B,2BAA2B,GAC3B,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ServiceConfig } from '../../configs';
|
|
2
|
+
import { ThreadSearchParams, ThreadSearchRawResult, ThreadSearchResult } from '../types/Thread.types';
|
|
3
|
+
/**
|
|
4
|
+
* Raw threads from `GET /v1/threads`
|
|
5
|
+
*/
|
|
6
|
+
declare const fetchRawThreads: (config: ServiceConfig) => (params?: ThreadSearchParams) => Promise<ThreadSearchRawResult>;
|
|
7
|
+
/**
|
|
8
|
+
* Fetches threads and returns `Thread` class instances.
|
|
9
|
+
* Requires `ServiceConfig` (same pattern as `fetchContacts`).
|
|
10
|
+
*/
|
|
11
|
+
declare const fetchThreads: (config: ServiceConfig, params?: ThreadSearchParams) => Promise<ThreadSearchResult>;
|
|
12
|
+
export { fetchRawThreads, fetchThreads };
|
|
13
|
+
//# sourceMappingURL=fetchThreads.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetchThreads.d.ts","sourceRoot":"","sources":["../../../../src/modules/threads/utils/fetchThreads.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAGnD,OAAO,KAAK,EAGX,kBAAkB,EAClB,qBAAqB,EACrB,kBAAkB,EAClB,MAAM,uBAAuB,CAAC;AAE/B;;GAEG;AACH,QAAA,MAAM,eAAe,GACnB,QAAQ,aAAa,MACf,SAAQ,kBAAuB,KAAG,OAAO,CAAC,qBAAqB,CAGrE,CAAC;AAiBH;;;GAGG;AACH,QAAA,MAAM,YAAY,GACjB,QAAQ,aAAa,EACrB,SAAQ,kBAAuB,KAC7B,OAAO,CAAC,kBAAkB,CAQ5B,CAAC;AAEF,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WtChatAvatar.ce.d.ts","sourceRoot":"","sources":["../../../../src/modules/ui/components/WtChatAvatar.ce.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,iBAAiB;IACjC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACvB;AAED,eAAO,MAAM,mBAAmB,EAAE,wBAA4D,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
interface WtChatAvatarProps {
|
|
2
|
+
name?: string;
|
|
3
|
+
src?: string;
|
|
4
|
+
size?: number | string;
|
|
5
|
+
}
|
|
6
|
+
declare const _default: import('vue').DefineComponent<WtChatAvatarProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<WtChatAvatarProps> & Readonly<{}>, {
|
|
7
|
+
size: number | string;
|
|
8
|
+
name: string;
|
|
9
|
+
src: string;
|
|
10
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
11
|
+
export default _default;
|
|
12
|
+
//# sourceMappingURL=WtChatAvatar.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WtChatAvatar.vue.d.ts","sourceRoot":"","sources":["../../../../src/modules/ui/components/WtChatAvatar.vue"],"names":[],"mappings":"AAWA;AA2EA,UAAU,iBAAiB;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACvB;;UADO,MAAM,GAAG,MAAM;UAFf,MAAM;SACP,MAAM;;AA4Fb,wBAQG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WtChatMessageBubble.ce.d.ts","sourceRoot":"","sources":["../../../../src/modules/ui/components/WtChatMessageBubble.ce.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,wBAAwB;IACxC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,eAAO,MAAM,0BAA0B,EAAE,wBACA,CAAC"}
|