@webitel/api-services 0.0.62 → 0.0.64
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/package.json +1 -1
- package/src/api/clients/agents/agentChats.ts +25 -22
- package/src/api/clients/agents/agents.ts +23 -28
- package/src/api/clients/users/users.ts +9 -1
- package/src/gen/_models/agentChatServiceGetAgentChatsCounterParams.ts +11 -0
- package/src/gen/_models/casesChatCatalogGetCaseChatHistoryParams.ts +4 -2
- package/src/gen/_models/catalogGetDialogsParams.ts +6 -2
- package/src/gen/_models/catalogGetHistory2Params.ts +4 -2
- package/src/gen/_models/catalogGetHistoryParams.ts +4 -2
- package/src/gen/_models/configServiceReadSystemObjectsParams.ts +5 -0
- package/src/gen/_models/contactsChatCatalogGetContactChatHistory2Params.ts +4 -2
- package/src/gen/_models/contactsChatCatalogGetContactChatHistoryParams.ts +4 -2
- package/src/gen/_models/index.ts +39 -0
- package/src/gen/_models/searchAgentParams.ts +1 -0
- package/src/gen/_models/searchUserStatusParams.ts +1 -0
- package/src/gen/_models/webitelChatGetAgentChatsCounterResponse.ts +10 -0
- package/src/gen/_models/webitelChatInputFile.ts +1 -0
- package/src/gen/_models/webitelChatMessage.ts +1 -0
- package/src/gen/_models/webitelChatServerAccount.ts +17 -0
- package/src/gen/_models/webitelChatServerButton.ts +14 -0
- package/src/gen/_models/webitelChatServerButtons.ts +11 -0
- package/src/gen/_models/webitelChatServerChannel.ts +18 -0
- package/src/gen/_models/webitelChatServerChatTransferResponse.ts +10 -0
- package/src/gen/_models/webitelChatServerChatVariablesResponse.ts +14 -0
- package/src/gen/_models/webitelChatServerChatVariablesResponseVariables.ts +13 -0
- package/src/gen/_models/webitelChatServerCheckSessionResponse.ts +17 -0
- package/src/gen/_models/webitelChatServerCheckSessionResponseProperties.ts +13 -0
- package/src/gen/_models/webitelChatServerCloseConversationCause.ts +18 -0
- package/src/gen/_models/webitelChatServerCloseConversationResponse.ts +10 -0
- package/src/gen/_models/webitelChatServerConversation.ts +20 -0
- package/src/gen/_models/webitelChatServerDeclineInvitationResponse.ts +10 -0
- package/src/gen/_models/webitelChatServerFile.ts +14 -0
- package/src/gen/_models/webitelChatServerGateway.ts +12 -0
- package/src/gen/_models/webitelChatServerGetConversationByIDResponse.ts +11 -0
- package/src/gen/_models/webitelChatServerGetConversationsResponse.ts +13 -0
- package/src/gen/_models/webitelChatServerGetHistoryMessagesResponse.ts +13 -0
- package/src/gen/_models/webitelChatServerHistoryMessage.ts +18 -0
- package/src/gen/_models/webitelChatServerInviteToConversationResponse.ts +10 -0
- package/src/gen/_models/webitelChatServerJoinConversationResponse.ts +10 -0
- package/src/gen/_models/webitelChatServerLeaveConversationCause.ts +19 -0
- package/src/gen/_models/webitelChatServerLeaveConversationResponse.ts +10 -0
- package/src/gen/_models/webitelChatServerMember.ts +18 -0
- package/src/gen/_models/webitelChatServerMessage.ts +45 -0
- package/src/gen/_models/webitelChatServerMessageForwardFromVariables.ts +10 -0
- package/src/gen/_models/webitelChatServerMessageReplyToVariables.ts +10 -0
- package/src/gen/_models/webitelChatServerMessageVariables.ts +8 -0
- package/src/gen/_models/webitelChatServerPostback.ts +18 -0
- package/src/gen/_models/webitelChatServerSendMessageResponse.ts +11 -0
- package/src/gen/_models/webitelChatServerSendServiceMessageResponse.ts +10 -0
- package/src/gen/_models/webitelChatServerSendUserActionResponse.ts +10 -0
- package/src/gen/_models/webitelChatServerStartConversationResponse.ts +13 -0
- package/src/gen/_models/webitelChatServerUpdateChannelResponse.ts +10 -0
- package/src/gen/_models/webitelChatServerUser.ts +13 -0
- package/src/gen/_models/webitelChatServerUserAction.ts +23 -0
- package/src/gen/_models/webitelChatServerWaitMessageResponse.ts +12 -0
- package/src/gen/agent-chat-service/agent-chat-service.api.gen.ts +16 -0
- package/src/gen/agent-chat-service/agent-chat-service.msw.api.gen.ts +41 -0
- package/src/gen/agent-chat-service/agent-chat-service.zod.gen.ts +10 -0
- package/src/gen/agent-service/agent-service.zod.gen.ts +2 -0
- package/src/gen/cases-chat-catalog/cases-chat-catalog.msw.api.gen.ts +4 -0
- package/src/gen/cases-chat-catalog/cases-chat-catalog.zod.gen.ts +2 -1
- package/src/gen/config-service/config-service.zod.gen.ts +5 -0
- package/src/gen/contacts-chat-catalog/contacts-chat-catalog.zod.gen.ts +2 -2
- package/src/gen/index.ts +3 -6
- package/src/gen/{catalog/catalog.api.gen.ts → messages/messages.api.gen.ts} +21 -1
- package/src/gen/{catalog/catalog.msw.api.gen.ts → messages/messages.msw.api.gen.ts} +95 -1
- package/src/gen/{catalog/catalog.zod.gen.ts → messages/messages.zod.gen.ts} +82 -3
- package/src/gen/users/users.api.gen.ts +1 -5
- package/src/gen/users/users.msw.api.gen.ts +2 -2
- package/types/api/clients/agents/agentChats.d.ts +1 -0
- package/types/api/clients/index.d.ts +1 -1
- package/types/gen/_models/agentChatServiceGetAgentChatsCounterParams.d.ts +10 -0
- package/types/gen/_models/casesChatCatalogGetCaseChatHistoryParams.d.ts +4 -2
- package/types/gen/_models/catalogGetDialogsParams.d.ts +6 -2
- package/types/gen/_models/catalogGetHistory2Params.d.ts +4 -2
- package/types/gen/_models/catalogGetHistoryParams.d.ts +4 -2
- package/types/gen/_models/configServiceReadSystemObjectsParams.d.ts +5 -0
- package/types/gen/_models/contactsChatCatalogGetContactChatHistory2Params.d.ts +4 -2
- package/types/gen/_models/contactsChatCatalogGetContactChatHistoryParams.d.ts +4 -2
- package/types/gen/_models/searchAgentParams.d.ts +1 -0
- package/types/gen/_models/searchUserStatusParams.d.ts +1 -0
- package/types/gen/_models/webitelChatGetAgentChatsCounterResponse.d.ts +9 -0
- package/types/gen/_models/webitelChatInputFile.d.ts +1 -0
- package/types/gen/_models/webitelChatMessage.d.ts +1 -0
- package/types/gen/_models/webitelChatServerAccount.d.ts +16 -0
- package/types/gen/_models/webitelChatServerButton.d.ts +13 -0
- package/types/gen/_models/webitelChatServerButtons.d.ts +10 -0
- package/types/gen/_models/webitelChatServerChannel.d.ts +17 -0
- package/types/gen/_models/webitelChatServerChatTransferResponse.d.ts +9 -0
- package/types/gen/_models/webitelChatServerChatVariablesResponse.d.ts +13 -0
- package/types/gen/_models/webitelChatServerChatVariablesResponseVariables.d.ts +12 -0
- package/types/gen/_models/webitelChatServerCheckSessionResponse.d.ts +16 -0
- package/types/gen/_models/webitelChatServerCheckSessionResponseProperties.d.ts +12 -0
- package/types/gen/_models/webitelChatServerCloseConversationCause.d.ts +14 -0
- package/types/gen/_models/webitelChatServerCloseConversationResponse.d.ts +9 -0
- package/types/gen/_models/webitelChatServerConversation.d.ts +18 -0
- package/types/gen/_models/webitelChatServerDeclineInvitationResponse.d.ts +9 -0
- package/types/gen/_models/webitelChatServerFile.d.ts +13 -0
- package/types/gen/_models/webitelChatServerGateway.d.ts +11 -0
- package/types/gen/_models/webitelChatServerGetConversationByIDResponse.d.ts +10 -0
- package/types/gen/_models/webitelChatServerGetConversationsResponse.d.ts +12 -0
- package/types/gen/_models/webitelChatServerGetHistoryMessagesResponse.d.ts +12 -0
- package/types/gen/_models/webitelChatServerHistoryMessage.d.ts +17 -0
- package/types/gen/_models/webitelChatServerInviteToConversationResponse.d.ts +9 -0
- package/types/gen/_models/webitelChatServerJoinConversationResponse.d.ts +9 -0
- package/types/gen/_models/webitelChatServerLeaveConversationCause.d.ts +15 -0
- package/types/gen/_models/webitelChatServerLeaveConversationResponse.d.ts +9 -0
- package/types/gen/_models/webitelChatServerMember.d.ts +17 -0
- package/types/gen/_models/webitelChatServerMessage.d.ts +43 -0
- package/types/gen/_models/webitelChatServerMessageForwardFromVariables.d.ts +9 -0
- package/types/gen/_models/webitelChatServerMessageReplyToVariables.d.ts +9 -0
- package/types/gen/_models/webitelChatServerMessageVariables.d.ts +9 -0
- package/types/gen/_models/webitelChatServerPostback.d.ts +17 -0
- package/types/gen/_models/webitelChatServerSendMessageResponse.d.ts +10 -0
- package/types/gen/_models/webitelChatServerSendServiceMessageResponse.d.ts +9 -0
- package/types/gen/_models/webitelChatServerSendUserActionResponse.d.ts +9 -0
- package/types/gen/_models/webitelChatServerStartConversationResponse.d.ts +12 -0
- package/types/gen/_models/webitelChatServerUpdateChannelResponse.d.ts +9 -0
- package/types/gen/_models/webitelChatServerUser.d.ts +12 -0
- package/types/gen/_models/webitelChatServerUserAction.d.ts +19 -0
- package/types/gen/_models/webitelChatServerWaitMessageResponse.d.ts +11 -0
- package/types/gen/agent-chat-service/agent-chat-service.api.gen.d.ts +3 -1
- package/types/gen/agent-chat-service/agent-chat-service.msw.api.gen.d.ts +3 -1
- package/types/gen/agent-chat-service/agent-chat-service.zod.gen.d.ts +8 -0
- package/types/gen/agent-service/agent-service.zod.gen.d.ts +2 -0
- package/types/gen/cases-chat-catalog/cases-chat-catalog.zod.gen.d.ts +1 -0
- package/types/gen/config-service/config-service.zod.gen.d.ts +5 -0
- package/types/gen/{catalog/catalog.api.gen.d.ts → messages/messages.api.gen.d.ts} +4 -2
- package/types/gen/{catalog/catalog.msw.api.gen.d.ts → messages/messages.msw.api.gen.d.ts} +4 -2
- package/types/gen/{catalog/catalog.zod.gen.d.ts → messages/messages.zod.gen.d.ts} +47 -0
- package/types/gen/users/users.msw.api.gen.d.ts +1 -1
- package/src/gen/messages-service/messages-service.api.gen.ts +0 -46
- package/src/gen/messages-service/messages-service.msw.api.gen.ts +0 -92
- package/src/gen/messages-service/messages-service.zod.gen.ts +0 -82
- package/types/gen/messages-service/messages-service.api.gen.d.ts +0 -7
- package/types/gen/messages-service/messages-service.msw.api.gen.d.ts +0 -5
- package/types/gen/messages-service/messages-service.zod.gen.d.ts +0 -50
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval v7.10.0 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Webitel API
|
|
5
|
+
* OpenAPI spec version: 24.04.0
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
export interface WebitelChatServerFile {
|
|
9
|
+
id?: string;
|
|
10
|
+
mime?: string;
|
|
11
|
+
name?: string;
|
|
12
|
+
size?: string;
|
|
13
|
+
url?: string;
|
|
14
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval v7.10.0 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Webitel API
|
|
5
|
+
* OpenAPI spec version: 24.04.0
|
|
6
|
+
*/
|
|
7
|
+
import type { WebitelChatServerConversation } from './webitelChatServerConversation';
|
|
8
|
+
|
|
9
|
+
export interface WebitelChatServerGetConversationByIDResponse {
|
|
10
|
+
item?: WebitelChatServerConversation;
|
|
11
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval v7.10.0 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Webitel API
|
|
5
|
+
* OpenAPI spec version: 24.04.0
|
|
6
|
+
*/
|
|
7
|
+
import type { WebitelChatServerConversation } from './webitelChatServerConversation';
|
|
8
|
+
|
|
9
|
+
export interface WebitelChatServerGetConversationsResponse {
|
|
10
|
+
items?: WebitelChatServerConversation[];
|
|
11
|
+
next?: boolean;
|
|
12
|
+
page?: number;
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval v7.10.0 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Webitel API
|
|
5
|
+
* OpenAPI spec version: 24.04.0
|
|
6
|
+
*/
|
|
7
|
+
import type { WebitelChatServerHistoryMessage } from './webitelChatServerHistoryMessage';
|
|
8
|
+
|
|
9
|
+
export interface WebitelChatServerGetHistoryMessagesResponse {
|
|
10
|
+
items?: WebitelChatServerHistoryMessage[];
|
|
11
|
+
next?: boolean;
|
|
12
|
+
page?: number;
|
|
13
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval v7.10.0 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Webitel API
|
|
5
|
+
* OpenAPI spec version: 24.04.0
|
|
6
|
+
*/
|
|
7
|
+
import type { WebitelChatServerFile } from './webitelChatServerFile';
|
|
8
|
+
|
|
9
|
+
export interface WebitelChatServerHistoryMessage {
|
|
10
|
+
channelId?: string;
|
|
11
|
+
createdAt?: string;
|
|
12
|
+
file?: WebitelChatServerFile;
|
|
13
|
+
id?: string;
|
|
14
|
+
kind?: string;
|
|
15
|
+
text?: string;
|
|
16
|
+
type?: string;
|
|
17
|
+
updatedAt?: string;
|
|
18
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval v7.10.0 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Webitel API
|
|
5
|
+
* OpenAPI spec version: 24.04.0
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
export type WebitelChatServerLeaveConversationCause =
|
|
9
|
+
(typeof WebitelChatServerLeaveConversationCause)[keyof typeof WebitelChatServerLeaveConversationCause];
|
|
10
|
+
|
|
11
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
12
|
+
export const WebitelChatServerLeaveConversationCause = {
|
|
13
|
+
DefaultCause: 'default_cause',
|
|
14
|
+
AgentTimeout: 'agent_timeout',
|
|
15
|
+
ClientTimeout: 'client_timeout',
|
|
16
|
+
AgentLeave: 'agent_leave',
|
|
17
|
+
Transfer: 'transfer',
|
|
18
|
+
SilenceTimeout: 'silence_timeout',
|
|
19
|
+
} as const;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval v7.10.0 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Webitel API
|
|
5
|
+
* OpenAPI spec version: 24.04.0
|
|
6
|
+
*/
|
|
7
|
+
import type { WebitelChatServerGateway } from './webitelChatServerGateway';
|
|
8
|
+
|
|
9
|
+
export interface WebitelChatServerMember {
|
|
10
|
+
channelId?: string;
|
|
11
|
+
externalId?: string;
|
|
12
|
+
internal?: boolean;
|
|
13
|
+
type?: string;
|
|
14
|
+
updatedAt?: string;
|
|
15
|
+
userId?: string;
|
|
16
|
+
username?: string;
|
|
17
|
+
via?: WebitelChatServerGateway;
|
|
18
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval v7.10.0 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Webitel API
|
|
5
|
+
* OpenAPI spec version: 24.04.0
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import type { WebitelChatServerAccount } from './webitelChatServerAccount';
|
|
9
|
+
import type { WebitelChatServerButtons } from './webitelChatServerButtons';
|
|
10
|
+
import type { WebitelChatServerFile } from './webitelChatServerFile';
|
|
11
|
+
import type { WebitelChatServerMessageForwardFromVariables } from './webitelChatServerMessageForwardFromVariables';
|
|
12
|
+
import type { WebitelChatServerMessageReplyToVariables } from './webitelChatServerMessageReplyToVariables';
|
|
13
|
+
import type { WebitelChatServerMessageVariables } from './webitelChatServerMessageVariables';
|
|
14
|
+
import type { WebitelChatServerPostback } from './webitelChatServerPostback';
|
|
15
|
+
|
|
16
|
+
export interface WebitelChatServerMessage {
|
|
17
|
+
buttons?: WebitelChatServerButtons[];
|
|
18
|
+
contact?: WebitelChatServerAccount;
|
|
19
|
+
/** Optional. Send message date (epochtime ms) Generates by the service. */
|
|
20
|
+
createdAt?: string;
|
|
21
|
+
file?: WebitelChatServerFile;
|
|
22
|
+
forwardFromChatId?: string;
|
|
23
|
+
forwardFromMessageId?: string;
|
|
24
|
+
forwardFromVariables?: WebitelChatServerMessageForwardFromVariables;
|
|
25
|
+
from?: WebitelChatServerAccount;
|
|
26
|
+
id?: string;
|
|
27
|
+
inline?: WebitelChatServerButtons[];
|
|
28
|
+
kind?: string;
|
|
29
|
+
leftChatMember?: WebitelChatServerAccount;
|
|
30
|
+
newChatMembers?: WebitelChatServerAccount[];
|
|
31
|
+
/** An option used to block input to force the user
|
|
32
|
+
to respond with one of the `Buttons`.
|
|
33
|
+
Instructs client agents to disable input capabilities.
|
|
34
|
+
Can only be used with a set of `Buttons`. */
|
|
35
|
+
noInput?: boolean;
|
|
36
|
+
/** Postback. Reply Button Click[ed]. */
|
|
37
|
+
postback?: WebitelChatServerPostback;
|
|
38
|
+
replyToMessageId?: string;
|
|
39
|
+
replyToVariables?: WebitelChatServerMessageReplyToVariables;
|
|
40
|
+
text?: string;
|
|
41
|
+
/** Type of this Message to notify e.g.: text, file, read, status etc. */
|
|
42
|
+
type?: string;
|
|
43
|
+
updatedAt?: string;
|
|
44
|
+
variables?: WebitelChatServerMessageVariables;
|
|
45
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval v7.10.0 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Webitel API
|
|
5
|
+
* OpenAPI spec version: 24.04.0
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Postback. Reply Button Click[ed].
|
|
10
|
+
*/
|
|
11
|
+
export interface WebitelChatServerPostback {
|
|
12
|
+
/** Button's callback data associated. */
|
|
13
|
+
code?: string;
|
|
14
|
+
/** Message ID of the button. */
|
|
15
|
+
mid?: string;
|
|
16
|
+
/** Button's caption. Text to display. */
|
|
17
|
+
text?: string;
|
|
18
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval v7.10.0 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Webitel API
|
|
5
|
+
* OpenAPI spec version: 24.04.0
|
|
6
|
+
*/
|
|
7
|
+
import type { WebitelChatServerMessage } from './webitelChatServerMessage';
|
|
8
|
+
|
|
9
|
+
export interface WebitelChatServerSendMessageResponse {
|
|
10
|
+
message?: WebitelChatServerMessage;
|
|
11
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval v7.10.0 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Webitel API
|
|
5
|
+
* OpenAPI spec version: 24.04.0
|
|
6
|
+
*/
|
|
7
|
+
import type { WebitelChatServerMessage } from './webitelChatServerMessage';
|
|
8
|
+
|
|
9
|
+
export interface WebitelChatServerStartConversationResponse {
|
|
10
|
+
channelId?: string;
|
|
11
|
+
conversationId?: string;
|
|
12
|
+
message?: WebitelChatServerMessage;
|
|
13
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval v7.10.0 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Webitel API
|
|
5
|
+
* OpenAPI spec version: 24.04.0
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* User actions. Use this to provide users with detailed info
|
|
10
|
+
about their chat partner's actions: typing or sending attachments of all kinds.
|
|
11
|
+
|
|
12
|
+
- Typing: User is typing.
|
|
13
|
+
- Cancel: Invalidate all previous action updates.
|
|
14
|
+
E.g. when user deletes entered text or aborts a video upload.
|
|
15
|
+
*/
|
|
16
|
+
export type WebitelChatServerUserAction =
|
|
17
|
+
(typeof WebitelChatServerUserAction)[keyof typeof WebitelChatServerUserAction];
|
|
18
|
+
|
|
19
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
20
|
+
export const WebitelChatServerUserAction = {
|
|
21
|
+
Typing: 'Typing',
|
|
22
|
+
Cancel: 'Cancel',
|
|
23
|
+
} as const;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval v7.10.0 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Webitel API
|
|
5
|
+
* OpenAPI spec version: 24.04.0
|
|
6
|
+
*/
|
|
7
|
+
import type { WebitelChatServerMessage } from './webitelChatServerMessage';
|
|
8
|
+
|
|
9
|
+
export interface WebitelChatServerWaitMessageResponse {
|
|
10
|
+
messages?: WebitelChatServerMessage[];
|
|
11
|
+
timeoutSec?: string;
|
|
12
|
+
}
|
|
@@ -9,7 +9,9 @@ import axios from '@aliasedDeps/api-services/axios';
|
|
|
9
9
|
import type { AxiosRequestConfig, AxiosResponse } from 'axios';
|
|
10
10
|
|
|
11
11
|
import type {
|
|
12
|
+
AgentChatServiceGetAgentChatsCounterParams,
|
|
12
13
|
AgentChatServiceGetAgentChatsParams,
|
|
14
|
+
WebitelChatGetAgentChatsCounterResponse,
|
|
13
15
|
WebitelChatGetAgentChatsResponse,
|
|
14
16
|
WebitelChatMarkChatProcessedResponse,
|
|
15
17
|
} from '.././_models';
|
|
@@ -33,6 +35,17 @@ export const // --- title start
|
|
|
33
35
|
params: { ...params, ...options?.params },
|
|
34
36
|
});
|
|
35
37
|
};
|
|
38
|
+
const agentChatServiceGetAgentChatsCounter = <
|
|
39
|
+
TData = AxiosResponse<WebitelChatGetAgentChatsCounterResponse>,
|
|
40
|
+
>(
|
|
41
|
+
params?: AgentChatServiceGetAgentChatsCounterParams,
|
|
42
|
+
options?: AxiosRequestConfig,
|
|
43
|
+
): Promise<TData> => {
|
|
44
|
+
return axios.get('/agent/chats/counter', {
|
|
45
|
+
...options,
|
|
46
|
+
params: { ...params, ...options?.params },
|
|
47
|
+
});
|
|
48
|
+
};
|
|
36
49
|
const agentChatServiceMarkChatProcessed = <
|
|
37
50
|
TData = AxiosResponse<WebitelChatMarkChatProcessedResponse>,
|
|
38
51
|
>(
|
|
@@ -45,11 +58,14 @@ export const // --- title start
|
|
|
45
58
|
// --- footer start
|
|
46
59
|
return {
|
|
47
60
|
agentChatServiceGetAgentChats,
|
|
61
|
+
agentChatServiceGetAgentChatsCounter,
|
|
48
62
|
agentChatServiceMarkChatProcessed,
|
|
49
63
|
};
|
|
50
64
|
};
|
|
51
65
|
export type AgentChatServiceGetAgentChatsResult =
|
|
52
66
|
AxiosResponse<WebitelChatGetAgentChatsResponse>;
|
|
67
|
+
export type AgentChatServiceGetAgentChatsCounterResult =
|
|
68
|
+
AxiosResponse<WebitelChatGetAgentChatsCounterResponse>;
|
|
53
69
|
export type AgentChatServiceMarkChatProcessedResult =
|
|
54
70
|
AxiosResponse<WebitelChatMarkChatProcessedResponse>;
|
|
55
71
|
|
|
@@ -8,6 +8,7 @@ import { faker } from '@faker-js/faker';
|
|
|
8
8
|
|
|
9
9
|
import { delay, HttpResponse, http } from 'msw';
|
|
10
10
|
import type {
|
|
11
|
+
WebitelChatGetAgentChatsCounterResponse,
|
|
11
12
|
WebitelChatGetAgentChatsResponse,
|
|
12
13
|
WebitelChatMarkChatProcessedResponse,
|
|
13
14
|
} from '.././_models';
|
|
@@ -271,6 +272,10 @@ export const getAgentChatServiceGetAgentChatsResponseMock = (
|
|
|
271
272
|
},
|
|
272
273
|
undefined,
|
|
273
274
|
]),
|
|
275
|
+
kind: faker.helpers.arrayElement([
|
|
276
|
+
faker.string.alpha({ length: { min: 10, max: 20 } }),
|
|
277
|
+
undefined,
|
|
278
|
+
]),
|
|
274
279
|
postback: faker.helpers.arrayElement([
|
|
275
280
|
{
|
|
276
281
|
code: faker.helpers.arrayElement([
|
|
@@ -432,6 +437,16 @@ export const getAgentChatServiceGetAgentChatsResponseMock = (
|
|
|
432
437
|
...overrideResponse,
|
|
433
438
|
});
|
|
434
439
|
|
|
440
|
+
export const getAgentChatServiceGetAgentChatsCounterResponseMock = (
|
|
441
|
+
overrideResponse: Partial<WebitelChatGetAgentChatsCounterResponse> = {},
|
|
442
|
+
): WebitelChatGetAgentChatsCounterResponse => ({
|
|
443
|
+
count: faker.helpers.arrayElement([
|
|
444
|
+
faker.number.int({ min: undefined, max: undefined, multipleOf: undefined }),
|
|
445
|
+
undefined,
|
|
446
|
+
]),
|
|
447
|
+
...overrideResponse,
|
|
448
|
+
});
|
|
449
|
+
|
|
435
450
|
export const getAgentChatServiceMarkChatProcessedResponseMock =
|
|
436
451
|
(): WebitelChatMarkChatProcessedResponse => ({});
|
|
437
452
|
|
|
@@ -460,6 +475,31 @@ export const getAgentChatServiceGetAgentChatsMockHandler = (
|
|
|
460
475
|
});
|
|
461
476
|
};
|
|
462
477
|
|
|
478
|
+
export const getAgentChatServiceGetAgentChatsCounterMockHandler = (
|
|
479
|
+
overrideResponse?:
|
|
480
|
+
| WebitelChatGetAgentChatsCounterResponse
|
|
481
|
+
| ((
|
|
482
|
+
info: Parameters<Parameters<typeof http.get>[1]>[0],
|
|
483
|
+
) =>
|
|
484
|
+
| Promise<WebitelChatGetAgentChatsCounterResponse>
|
|
485
|
+
| WebitelChatGetAgentChatsCounterResponse),
|
|
486
|
+
) => {
|
|
487
|
+
return http.get('*/agent/chats/counter', async (info) => {
|
|
488
|
+
await delay(1000);
|
|
489
|
+
|
|
490
|
+
return new HttpResponse(
|
|
491
|
+
JSON.stringify(
|
|
492
|
+
overrideResponse !== undefined
|
|
493
|
+
? typeof overrideResponse === 'function'
|
|
494
|
+
? await overrideResponse(info)
|
|
495
|
+
: overrideResponse
|
|
496
|
+
: getAgentChatServiceGetAgentChatsCounterResponseMock(),
|
|
497
|
+
),
|
|
498
|
+
{ status: 200, headers: { 'Content-Type': 'application/json' } },
|
|
499
|
+
);
|
|
500
|
+
});
|
|
501
|
+
};
|
|
502
|
+
|
|
463
503
|
export const getAgentChatServiceMarkChatProcessedMockHandler = (
|
|
464
504
|
overrideResponse?:
|
|
465
505
|
| WebitelChatMarkChatProcessedResponse
|
|
@@ -486,5 +526,6 @@ export const getAgentChatServiceMarkChatProcessedMockHandler = (
|
|
|
486
526
|
};
|
|
487
527
|
export const getAgentChatServiceMock = () => [
|
|
488
528
|
getAgentChatServiceGetAgentChatsMockHandler(),
|
|
529
|
+
getAgentChatServiceGetAgentChatsCounterMockHandler(),
|
|
489
530
|
getAgentChatServiceMarkChatProcessedMockHandler(),
|
|
490
531
|
];
|
|
@@ -239,6 +239,7 @@ export const agentChatServiceGetAgentChatsResponse = zod.object({
|
|
|
239
239
|
),
|
|
240
240
|
})
|
|
241
241
|
.optional(),
|
|
242
|
+
kind: zod.string().optional(),
|
|
242
243
|
postback: zod
|
|
243
244
|
.object({
|
|
244
245
|
code: zod
|
|
@@ -378,6 +379,15 @@ export const agentChatServiceGetAgentChatsResponse = zod.object({
|
|
|
378
379
|
page: zod.number().optional(),
|
|
379
380
|
});
|
|
380
381
|
|
|
382
|
+
export const agentChatServiceGetAgentChatsCounterQueryParams = zod.object({
|
|
383
|
+
onlyClosed: zod.boolean().optional(),
|
|
384
|
+
onlyUnprocessed: zod.boolean().optional(),
|
|
385
|
+
});
|
|
386
|
+
|
|
387
|
+
export const agentChatServiceGetAgentChatsCounterResponse = zod.object({
|
|
388
|
+
count: zod.number().optional(),
|
|
389
|
+
});
|
|
390
|
+
|
|
381
391
|
export const agentChatServiceMarkChatProcessedParams = zod.object({
|
|
382
392
|
chat_id: zod.string(),
|
|
383
393
|
});
|
|
@@ -29,6 +29,7 @@ export const searchAgentQueryParams = zod.object({
|
|
|
29
29
|
extension: zod.array(zod.string()).optional(),
|
|
30
30
|
notTeamId: zod.array(zod.number()).optional(),
|
|
31
31
|
notSkillId: zod.array(zod.number()).optional(),
|
|
32
|
+
notUserId: zod.array(zod.string()).optional(),
|
|
32
33
|
});
|
|
33
34
|
|
|
34
35
|
export const searchAgentResponse = zod.object({
|
|
@@ -1225,6 +1226,7 @@ export const searchUserStatusQueryParams = zod.object({
|
|
|
1225
1226
|
q: zod.string().optional(),
|
|
1226
1227
|
sort: zod.string().optional(),
|
|
1227
1228
|
fields: zod.array(zod.string()).optional(),
|
|
1229
|
+
notUserId: zod.array(zod.string()).optional(),
|
|
1228
1230
|
});
|
|
1229
1231
|
|
|
1230
1232
|
export const searchUserStatusResponse = zod.object({
|
|
@@ -320,6 +320,10 @@ export const getCasesChatCatalogGetCaseChatHistoryResponseMock = (
|
|
|
320
320
|
},
|
|
321
321
|
undefined,
|
|
322
322
|
]),
|
|
323
|
+
kind: faker.helpers.arrayElement([
|
|
324
|
+
faker.string.alpha({ length: { min: 10, max: 20 } }),
|
|
325
|
+
undefined,
|
|
326
|
+
]),
|
|
323
327
|
postback: faker.helpers.arrayElement([
|
|
324
328
|
{
|
|
325
329
|
code: faker.helpers.arrayElement([
|
|
@@ -31,7 +31,7 @@ export const casesChatCatalogGetCaseChatHistoryQueryParams = zod.object({
|
|
|
31
31
|
.string()
|
|
32
32
|
.optional()
|
|
33
33
|
.describe(
|
|
34
|
-
'
|
|
34
|
+
'Includes the history of ONLY those dialogs\nwhose member channel(s) contain\na specified set of variables.',
|
|
35
35
|
),
|
|
36
36
|
});
|
|
37
37
|
|
|
@@ -317,6 +317,7 @@ export const casesChatCatalogGetCaseChatHistoryResponse = zod.object({
|
|
|
317
317
|
),
|
|
318
318
|
})
|
|
319
319
|
.optional(),
|
|
320
|
+
kind: zod.string().optional(),
|
|
320
321
|
postback: zod
|
|
321
322
|
.object({
|
|
322
323
|
code: zod
|
|
@@ -8,6 +8,11 @@ import { z as zod } from 'zod/v4';
|
|
|
8
8
|
|
|
9
9
|
export const configServiceReadSystemObjectsQueryParams = zod.object({
|
|
10
10
|
includeExisting: zod.boolean().optional(),
|
|
11
|
+
page: zod.number().optional(),
|
|
12
|
+
size: zod.number().optional(),
|
|
13
|
+
q: zod.string().optional(),
|
|
14
|
+
sort: zod.string().optional(),
|
|
15
|
+
fields: zod.array(zod.string()).optional(),
|
|
11
16
|
});
|
|
12
17
|
|
|
13
18
|
export const configServiceReadSystemObjectsResponse = zod.object({
|
|
@@ -31,7 +31,7 @@ export const contactsChatCatalogGetContactChatHistory2QueryParams = zod.object({
|
|
|
31
31
|
.string()
|
|
32
32
|
.optional()
|
|
33
33
|
.describe(
|
|
34
|
-
'
|
|
34
|
+
'Includes the history of ONLY those dialogs\nwhose member channel(s) contain\na specified set of variables.',
|
|
35
35
|
),
|
|
36
36
|
});
|
|
37
37
|
|
|
@@ -420,7 +420,7 @@ export const contactsChatCatalogGetContactChatHistoryQueryParams = zod.object({
|
|
|
420
420
|
.string()
|
|
421
421
|
.optional()
|
|
422
422
|
.describe(
|
|
423
|
-
'
|
|
423
|
+
'Includes the history of ONLY those dialogs\nwhose member channel(s) contain\na specified set of variables.',
|
|
424
424
|
),
|
|
425
425
|
});
|
|
426
426
|
|
package/src/gen/index.ts
CHANGED
|
@@ -68,9 +68,6 @@ export * from './cases/cases.zod.gen';
|
|
|
68
68
|
export * from './cases-chat-catalog/cases-chat-catalog.api.gen';
|
|
69
69
|
export * from './cases-chat-catalog/cases-chat-catalog.msw.api.gen';
|
|
70
70
|
export * from './cases-chat-catalog/cases-chat-catalog.zod.gen';
|
|
71
|
-
export * from './catalog/catalog.api.gen';
|
|
72
|
-
export * from './catalog/catalog.msw.api.gen';
|
|
73
|
-
export * from './catalog/catalog.zod.gen';
|
|
74
71
|
export * from './catalogs/catalogs.api.gen';
|
|
75
72
|
export * from './catalogs/catalogs.msw.api.gen';
|
|
76
73
|
export * from './catalogs/catalogs.zod.gen';
|
|
@@ -188,9 +185,9 @@ export * from './media-file-service/media-file-service.zod.gen';
|
|
|
188
185
|
export * from './member-service/member-service.api.gen';
|
|
189
186
|
export * from './member-service/member-service.msw.api.gen';
|
|
190
187
|
export * from './member-service/member-service.zod.gen';
|
|
191
|
-
export * from './messages
|
|
192
|
-
export * from './messages
|
|
193
|
-
export * from './messages
|
|
188
|
+
export * from './messages/messages.api.gen';
|
|
189
|
+
export * from './messages/messages.msw.api.gen';
|
|
190
|
+
export * from './messages/messages.zod.gen';
|
|
194
191
|
export * from './oauth2-federation/oauth2-federation.api.gen';
|
|
195
192
|
export * from './oauth2-federation/oauth2-federation.msw.api.gen';
|
|
196
193
|
export * from './oauth2-federation/oauth2-federation.zod.gen';
|