@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
|
@@ -14,6 +14,8 @@ import type {
|
|
|
14
14
|
CatalogGetHistory2Params,
|
|
15
15
|
CatalogGetHistoryParams,
|
|
16
16
|
CatalogGetMembersParams,
|
|
17
|
+
WebitelChatBroadcastMessageRequest,
|
|
18
|
+
WebitelChatBroadcastMessageResponse,
|
|
17
19
|
WebitelChatChatCustomers,
|
|
18
20
|
WebitelChatChatDialogs,
|
|
19
21
|
WebitelChatChatMembers,
|
|
@@ -24,10 +26,25 @@ import type {
|
|
|
24
26
|
//
|
|
25
27
|
|
|
26
28
|
export const // --- title start
|
|
27
|
-
|
|
29
|
+
getMessages =
|
|
28
30
|
// --- title end
|
|
29
31
|
() => {
|
|
30
32
|
// --- header end
|
|
33
|
+
/**
|
|
34
|
+
* @summary Broadcast message send message from via to peer recipients.
|
|
35
|
+
*/
|
|
36
|
+
const messagesServiceBroadcastMessage = <
|
|
37
|
+
TData = AxiosResponse<WebitelChatBroadcastMessageResponse>,
|
|
38
|
+
>(
|
|
39
|
+
webitelChatBroadcastMessageRequest: WebitelChatBroadcastMessageRequest,
|
|
40
|
+
options?: AxiosRequestConfig,
|
|
41
|
+
): Promise<TData> => {
|
|
42
|
+
return axios.post(
|
|
43
|
+
'/chat/broadcast',
|
|
44
|
+
webitelChatBroadcastMessageRequest,
|
|
45
|
+
options,
|
|
46
|
+
);
|
|
47
|
+
};
|
|
31
48
|
/**
|
|
32
49
|
* @summary Query of external chat customers
|
|
33
50
|
*/
|
|
@@ -99,6 +116,7 @@ export const // --- title start
|
|
|
99
116
|
|
|
100
117
|
// --- footer start
|
|
101
118
|
return {
|
|
119
|
+
messagesServiceBroadcastMessage,
|
|
102
120
|
catalogGetCustomers,
|
|
103
121
|
catalogGetDialogs,
|
|
104
122
|
catalogGetMembers,
|
|
@@ -106,6 +124,8 @@ export const // --- title start
|
|
|
106
124
|
catalogGetHistory2,
|
|
107
125
|
};
|
|
108
126
|
};
|
|
127
|
+
export type MessagesServiceBroadcastMessageResult =
|
|
128
|
+
AxiosResponse<WebitelChatBroadcastMessageResponse>;
|
|
109
129
|
export type CatalogGetCustomersResult = AxiosResponse<WebitelChatChatCustomers>;
|
|
110
130
|
export type CatalogGetDialogsResult = AxiosResponse<WebitelChatChatDialogs>;
|
|
111
131
|
export type CatalogGetMembersResult = AxiosResponse<WebitelChatChatMembers>;
|
|
@@ -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
|
+
WebitelChatBroadcastMessageResponse,
|
|
11
12
|
WebitelChatChatCustomers,
|
|
12
13
|
WebitelChatChatDialogs,
|
|
13
14
|
WebitelChatChatMembers,
|
|
@@ -15,6 +16,61 @@ import type {
|
|
|
15
16
|
} from '.././_models';
|
|
16
17
|
import { WebitelChatButtonRequest } from '.././_models';
|
|
17
18
|
|
|
19
|
+
export const getMessagesServiceBroadcastMessageResponseMock = (
|
|
20
|
+
overrideResponse: Partial<WebitelChatBroadcastMessageResponse> = {},
|
|
21
|
+
): WebitelChatBroadcastMessageResponse => ({
|
|
22
|
+
failure: faker.helpers.arrayElement([
|
|
23
|
+
Array.from(
|
|
24
|
+
{ length: faker.number.int({ min: 1, max: 10 }) },
|
|
25
|
+
(_, i) => i + 1,
|
|
26
|
+
).map(() => ({
|
|
27
|
+
error: faker.helpers.arrayElement([
|
|
28
|
+
{
|
|
29
|
+
code: faker.helpers.arrayElement([
|
|
30
|
+
faker.number.int({
|
|
31
|
+
min: undefined,
|
|
32
|
+
max: undefined,
|
|
33
|
+
multipleOf: undefined,
|
|
34
|
+
}),
|
|
35
|
+
undefined,
|
|
36
|
+
]),
|
|
37
|
+
details: faker.helpers.arrayElement([
|
|
38
|
+
Array.from(
|
|
39
|
+
{ length: faker.number.int({ min: 1, max: 10 }) },
|
|
40
|
+
(_, i) => i + 1,
|
|
41
|
+
).map(() => ({
|
|
42
|
+
'@type': faker.helpers.arrayElement([
|
|
43
|
+
faker.string.alpha({ length: { min: 10, max: 20 } }),
|
|
44
|
+
undefined,
|
|
45
|
+
]),
|
|
46
|
+
})),
|
|
47
|
+
undefined,
|
|
48
|
+
]),
|
|
49
|
+
message: faker.helpers.arrayElement([
|
|
50
|
+
faker.string.alpha({ length: { min: 10, max: 20 } }),
|
|
51
|
+
undefined,
|
|
52
|
+
]),
|
|
53
|
+
},
|
|
54
|
+
undefined,
|
|
55
|
+
]),
|
|
56
|
+
peerId: faker.helpers.arrayElement([
|
|
57
|
+
faker.string.alpha({ length: { min: 10, max: 20 } }),
|
|
58
|
+
undefined,
|
|
59
|
+
]),
|
|
60
|
+
})),
|
|
61
|
+
undefined,
|
|
62
|
+
]),
|
|
63
|
+
variables: faker.helpers.arrayElement([
|
|
64
|
+
{
|
|
65
|
+
[faker.string.alphanumeric(5)]: faker.string.alpha({
|
|
66
|
+
length: { min: 10, max: 20 },
|
|
67
|
+
}),
|
|
68
|
+
},
|
|
69
|
+
undefined,
|
|
70
|
+
]),
|
|
71
|
+
...overrideResponse,
|
|
72
|
+
});
|
|
73
|
+
|
|
18
74
|
export const getCatalogGetCustomersResponseMock = (
|
|
19
75
|
overrideResponse: Partial<WebitelChatChatCustomers> = {},
|
|
20
76
|
): WebitelChatChatCustomers => ({
|
|
@@ -443,6 +499,10 @@ export const getCatalogGetDialogsResponseMock = (
|
|
|
443
499
|
},
|
|
444
500
|
undefined,
|
|
445
501
|
]),
|
|
502
|
+
kind: faker.helpers.arrayElement([
|
|
503
|
+
faker.string.alpha({ length: { min: 10, max: 20 } }),
|
|
504
|
+
undefined,
|
|
505
|
+
]),
|
|
446
506
|
postback: faker.helpers.arrayElement([
|
|
447
507
|
{
|
|
448
508
|
code: faker.helpers.arrayElement([
|
|
@@ -1038,6 +1098,10 @@ export const getCatalogGetHistoryResponseMock = (
|
|
|
1038
1098
|
},
|
|
1039
1099
|
undefined,
|
|
1040
1100
|
]),
|
|
1101
|
+
kind: faker.helpers.arrayElement([
|
|
1102
|
+
faker.string.alpha({ length: { min: 10, max: 20 } }),
|
|
1103
|
+
undefined,
|
|
1104
|
+
]),
|
|
1041
1105
|
postback: faker.helpers.arrayElement([
|
|
1042
1106
|
{
|
|
1043
1107
|
code: faker.helpers.arrayElement([
|
|
@@ -1497,6 +1561,10 @@ export const getCatalogGetHistory2ResponseMock = (
|
|
|
1497
1561
|
},
|
|
1498
1562
|
undefined,
|
|
1499
1563
|
]),
|
|
1564
|
+
kind: faker.helpers.arrayElement([
|
|
1565
|
+
faker.string.alpha({ length: { min: 10, max: 20 } }),
|
|
1566
|
+
undefined,
|
|
1567
|
+
]),
|
|
1500
1568
|
postback: faker.helpers.arrayElement([
|
|
1501
1569
|
{
|
|
1502
1570
|
code: faker.helpers.arrayElement([
|
|
@@ -1646,6 +1714,31 @@ export const getCatalogGetHistory2ResponseMock = (
|
|
|
1646
1714
|
...overrideResponse,
|
|
1647
1715
|
});
|
|
1648
1716
|
|
|
1717
|
+
export const getMessagesServiceBroadcastMessageMockHandler = (
|
|
1718
|
+
overrideResponse?:
|
|
1719
|
+
| WebitelChatBroadcastMessageResponse
|
|
1720
|
+
| ((
|
|
1721
|
+
info: Parameters<Parameters<typeof http.post>[1]>[0],
|
|
1722
|
+
) =>
|
|
1723
|
+
| Promise<WebitelChatBroadcastMessageResponse>
|
|
1724
|
+
| WebitelChatBroadcastMessageResponse),
|
|
1725
|
+
) => {
|
|
1726
|
+
return http.post('*/chat/broadcast', async (info) => {
|
|
1727
|
+
await delay(1000);
|
|
1728
|
+
|
|
1729
|
+
return new HttpResponse(
|
|
1730
|
+
JSON.stringify(
|
|
1731
|
+
overrideResponse !== undefined
|
|
1732
|
+
? typeof overrideResponse === 'function'
|
|
1733
|
+
? await overrideResponse(info)
|
|
1734
|
+
: overrideResponse
|
|
1735
|
+
: getMessagesServiceBroadcastMessageResponseMock(),
|
|
1736
|
+
),
|
|
1737
|
+
{ status: 200, headers: { 'Content-Type': 'application/json' } },
|
|
1738
|
+
);
|
|
1739
|
+
});
|
|
1740
|
+
};
|
|
1741
|
+
|
|
1649
1742
|
export const getCatalogGetCustomersMockHandler = (
|
|
1650
1743
|
overrideResponse?:
|
|
1651
1744
|
| WebitelChatChatCustomers
|
|
@@ -1760,7 +1853,8 @@ export const getCatalogGetHistory2MockHandler = (
|
|
|
1760
1853
|
);
|
|
1761
1854
|
});
|
|
1762
1855
|
};
|
|
1763
|
-
export const
|
|
1856
|
+
export const getMessagesMock = () => [
|
|
1857
|
+
getMessagesServiceBroadcastMessageMockHandler(),
|
|
1764
1858
|
getCatalogGetCustomersMockHandler(),
|
|
1765
1859
|
getCatalogGetDialogsMockHandler(),
|
|
1766
1860
|
getCatalogGetMembersMockHandler(),
|
|
@@ -6,6 +6,82 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { z as zod } from 'zod/v4';
|
|
8
8
|
|
|
9
|
+
/**
|
|
10
|
+
* @summary Broadcast message send message from via to peer recipients.
|
|
11
|
+
*/
|
|
12
|
+
export const messagesServiceBroadcastMessageBody = zod.object({
|
|
13
|
+
message: zod
|
|
14
|
+
.object({
|
|
15
|
+
file: zod
|
|
16
|
+
.object({
|
|
17
|
+
id: zod.string().optional(),
|
|
18
|
+
source: zod.string().optional(),
|
|
19
|
+
url: zod.string().optional(),
|
|
20
|
+
})
|
|
21
|
+
.optional(),
|
|
22
|
+
keyboard: zod
|
|
23
|
+
.object({
|
|
24
|
+
rows: zod
|
|
25
|
+
.array(
|
|
26
|
+
zod.object({
|
|
27
|
+
buttons: zod
|
|
28
|
+
.array(
|
|
29
|
+
zod.object({
|
|
30
|
+
caption: zod.string().optional(),
|
|
31
|
+
code: zod.string().optional(),
|
|
32
|
+
text: zod.string().optional(),
|
|
33
|
+
type: zod.string().optional(),
|
|
34
|
+
url: zod.string().optional(),
|
|
35
|
+
}),
|
|
36
|
+
)
|
|
37
|
+
.optional(),
|
|
38
|
+
}),
|
|
39
|
+
)
|
|
40
|
+
.optional(),
|
|
41
|
+
})
|
|
42
|
+
.optional(),
|
|
43
|
+
text: zod.string().optional(),
|
|
44
|
+
})
|
|
45
|
+
.optional(),
|
|
46
|
+
peers: zod
|
|
47
|
+
.array(
|
|
48
|
+
zod
|
|
49
|
+
.object({
|
|
50
|
+
id: zod.string().optional(),
|
|
51
|
+
type: zod.string().optional(),
|
|
52
|
+
via: zod.string().optional(),
|
|
53
|
+
})
|
|
54
|
+
.describe('InputPeer identity.'),
|
|
55
|
+
)
|
|
56
|
+
.optional(),
|
|
57
|
+
timeout: zod.string().optional(),
|
|
58
|
+
variables: zod.record(zod.string(), zod.string()).optional(),
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
export const messagesServiceBroadcastMessageResponse = zod.object({
|
|
62
|
+
failure: zod
|
|
63
|
+
.array(
|
|
64
|
+
zod.object({
|
|
65
|
+
error: zod
|
|
66
|
+
.object({
|
|
67
|
+
code: zod.number().optional(),
|
|
68
|
+
details: zod
|
|
69
|
+
.array(
|
|
70
|
+
zod.object({
|
|
71
|
+
'@type': zod.string().optional(),
|
|
72
|
+
}),
|
|
73
|
+
)
|
|
74
|
+
.optional(),
|
|
75
|
+
message: zod.string().optional(),
|
|
76
|
+
})
|
|
77
|
+
.optional(),
|
|
78
|
+
peerId: zod.string().optional(),
|
|
79
|
+
}),
|
|
80
|
+
)
|
|
81
|
+
.optional(),
|
|
82
|
+
variables: zod.record(zod.string(), zod.string()).optional(),
|
|
83
|
+
});
|
|
84
|
+
|
|
9
85
|
/**
|
|
10
86
|
* @summary Query of external chat customers
|
|
11
87
|
*/
|
|
@@ -162,7 +238,7 @@ export const catalogGetDialogsQueryParams = zod.object({
|
|
|
162
238
|
.string()
|
|
163
239
|
.optional()
|
|
164
240
|
.describe(
|
|
165
|
-
'
|
|
241
|
+
'Includes ONLY those chat dialogs\nwhose member channel(s) contain\na specified set of variables.\n\n10',
|
|
166
242
|
),
|
|
167
243
|
});
|
|
168
244
|
|
|
@@ -488,6 +564,7 @@ export const catalogGetDialogsResponse = zod.object({
|
|
|
488
564
|
),
|
|
489
565
|
})
|
|
490
566
|
.optional(),
|
|
567
|
+
kind: zod.string().optional(),
|
|
491
568
|
postback: zod
|
|
492
569
|
.object({
|
|
493
570
|
code: zod
|
|
@@ -855,7 +932,7 @@ export const catalogGetHistoryQueryParams = zod.object({
|
|
|
855
932
|
.string()
|
|
856
933
|
.optional()
|
|
857
934
|
.describe(
|
|
858
|
-
'
|
|
935
|
+
'Includes the history of ONLY those dialogs\nwhose member channel(s) contain\na specified set of variables.',
|
|
859
936
|
),
|
|
860
937
|
});
|
|
861
938
|
|
|
@@ -1141,6 +1218,7 @@ export const catalogGetHistoryResponse = zod.object({
|
|
|
1141
1218
|
),
|
|
1142
1219
|
})
|
|
1143
1220
|
.optional(),
|
|
1221
|
+
kind: zod.string().optional(),
|
|
1144
1222
|
postback: zod
|
|
1145
1223
|
.object({
|
|
1146
1224
|
code: zod
|
|
@@ -1309,7 +1387,7 @@ export const catalogGetHistory2QueryParams = zod.object({
|
|
|
1309
1387
|
.string()
|
|
1310
1388
|
.optional()
|
|
1311
1389
|
.describe(
|
|
1312
|
-
'
|
|
1390
|
+
'Includes the history of ONLY those dialogs\nwhose member channel(s) contain\na specified set of variables.',
|
|
1313
1391
|
),
|
|
1314
1392
|
});
|
|
1315
1393
|
|
|
@@ -1595,6 +1673,7 @@ export const catalogGetHistory2Response = zod.object({
|
|
|
1595
1673
|
),
|
|
1596
1674
|
})
|
|
1597
1675
|
.optional(),
|
|
1676
|
+
kind: zod.string().optional(),
|
|
1598
1677
|
postback: zod
|
|
1599
1678
|
.object({
|
|
1600
1679
|
code: zod
|
|
@@ -78,11 +78,7 @@ export const // --- title start
|
|
|
78
78
|
apiUpdatePasswordRequest: ApiUpdatePasswordRequest,
|
|
79
79
|
options?: AxiosRequestConfig,
|
|
80
80
|
): Promise<TData> => {
|
|
81
|
-
return axios.
|
|
82
|
-
'/users/password',
|
|
83
|
-
apiUpdatePasswordRequest,
|
|
84
|
-
options,
|
|
85
|
-
);
|
|
81
|
+
return axios.put('/users/password', apiUpdatePasswordRequest, options);
|
|
86
82
|
};
|
|
87
83
|
const searchUsers2 = <TData = AxiosResponse<ApiSearchUsersResponse>>(
|
|
88
84
|
apiSearchUsersRequest: ApiSearchUsersRequest,
|
|
@@ -2596,10 +2596,10 @@ export const getUpdatePasswordMockHandler = (
|
|
|
2596
2596
|
overrideResponse?:
|
|
2597
2597
|
| ApiUpdatePasswordResponse
|
|
2598
2598
|
| ((
|
|
2599
|
-
info: Parameters<Parameters<typeof http.
|
|
2599
|
+
info: Parameters<Parameters<typeof http.put>[1]>[0],
|
|
2600
2600
|
) => Promise<ApiUpdatePasswordResponse> | ApiUpdatePasswordResponse),
|
|
2601
2601
|
) => {
|
|
2602
|
-
return http.
|
|
2602
|
+
return http.put('*/users/password', async (info) => {
|
|
2603
2603
|
await delay(1000);
|
|
2604
2604
|
|
|
2605
2605
|
return new HttpResponse(
|
|
@@ -2,8 +2,8 @@ export * from './_shared/generatePermissionsApi';
|
|
|
2
2
|
export * from './agents/agentChats';
|
|
3
3
|
export * from './agents/agents';
|
|
4
4
|
export * from './buckets/buckets';
|
|
5
|
-
export * from './callHistory/callHistory';
|
|
6
5
|
export * from './calendars/calendars';
|
|
6
|
+
export * from './callHistory/callHistory';
|
|
7
7
|
export * from './caseCloseReasonGroups/caseCloseReasonGroups';
|
|
8
8
|
export * from './caseCloseReasons/caseCloseReasons';
|
|
9
9
|
export * from './casePriorities/casePriorities';
|
|
@@ -27,7 +27,9 @@ export type CasesChatCatalogGetCaseChatHistoryParams = {
|
|
|
27
27
|
*/
|
|
28
28
|
fields?: string[];
|
|
29
29
|
/**
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
* Includes the history of ONLY those dialogs
|
|
31
|
+
whose member channel(s) contain
|
|
32
|
+
a specified set of variables.
|
|
33
|
+
*/
|
|
32
34
|
groupString?: string;
|
|
33
35
|
};
|
|
@@ -71,7 +71,11 @@ Contact **type**-specific string.
|
|
|
71
71
|
*/
|
|
72
72
|
online?: boolean;
|
|
73
73
|
/**
|
|
74
|
-
|
|
75
|
-
|
|
74
|
+
* Includes ONLY those chat dialogs
|
|
75
|
+
whose member channel(s) contain
|
|
76
|
+
a specified set of variables.
|
|
77
|
+
|
|
78
|
+
10
|
|
79
|
+
*/
|
|
76
80
|
groupString?: string;
|
|
77
81
|
};
|
|
@@ -34,7 +34,9 @@ export type CatalogGetHistory2Params = {
|
|
|
34
34
|
*/
|
|
35
35
|
peerName?: string;
|
|
36
36
|
/**
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
* Includes the history of ONLY those dialogs
|
|
38
|
+
whose member channel(s) contain
|
|
39
|
+
a specified set of variables.
|
|
40
|
+
*/
|
|
39
41
|
groupStringString?: string;
|
|
40
42
|
};
|
|
@@ -39,7 +39,9 @@ Contact **type**-specific string.
|
|
|
39
39
|
*/
|
|
40
40
|
peerName?: string;
|
|
41
41
|
/**
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
* Includes the history of ONLY those dialogs
|
|
43
|
+
whose member channel(s) contain
|
|
44
|
+
a specified set of variables.
|
|
45
|
+
*/
|
|
44
46
|
groupString?: string;
|
|
45
47
|
};
|
|
@@ -31,7 +31,9 @@ export type ContactsChatCatalogGetContactChatHistory2Params = {
|
|
|
31
31
|
*/
|
|
32
32
|
chatId?: string;
|
|
33
33
|
/**
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
* Includes the history of ONLY those dialogs
|
|
35
|
+
whose member channel(s) contain
|
|
36
|
+
a specified set of variables.
|
|
37
|
+
*/
|
|
36
38
|
groupStringString?: string;
|
|
37
39
|
};
|
|
@@ -27,7 +27,9 @@ export type ContactsChatCatalogGetContactChatHistoryParams = {
|
|
|
27
27
|
*/
|
|
28
28
|
fields?: string[];
|
|
29
29
|
/**
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
* Includes the history of ONLY those dialogs
|
|
31
|
+
whose member channel(s) contain
|
|
32
|
+
a specified set of variables.
|
|
33
|
+
*/
|
|
32
34
|
groupString?: string;
|
|
33
35
|
};
|
|
@@ -30,6 +30,7 @@ export interface WebitelChatMessage {
|
|
|
30
30
|
id?: string;
|
|
31
31
|
/** Keyboard. Buttons. Quick Replies. */
|
|
32
32
|
keyboard?: WebitelChatReplyMarkup;
|
|
33
|
+
kind?: string;
|
|
33
34
|
/** Postback. Reply Button Click[ed]. */
|
|
34
35
|
postback?: WebitelChatPostback;
|
|
35
36
|
/** Chat Sender of the message, sent on behalf of a chat (member). */
|
|
@@ -0,0 +1,16 @@
|
|
|
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
|
+
export interface WebitelChatServerAccount {
|
|
8
|
+
/** e.g.: bot, user, phone, telegram, facebook, viber, skype ... */
|
|
9
|
+
channel?: string;
|
|
10
|
+
/** optional: channel specific contact string */
|
|
11
|
+
contact?: string;
|
|
12
|
+
firstName?: string;
|
|
13
|
+
id?: string;
|
|
14
|
+
lastName?: string;
|
|
15
|
+
username?: string;
|
|
16
|
+
}
|
|
@@ -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
|
+
export interface WebitelChatServerButton {
|
|
8
|
+
caption?: string;
|
|
9
|
+
code?: string;
|
|
10
|
+
text?: string;
|
|
11
|
+
type?: string;
|
|
12
|
+
url?: string;
|
|
13
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
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 { WebitelChatServerButton } from './webitelChatServerButton';
|
|
8
|
+
export interface WebitelChatServerButtons {
|
|
9
|
+
button?: WebitelChatServerButton[];
|
|
10
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
export interface WebitelChatServerChannel {
|
|
8
|
+
closedAt?: string;
|
|
9
|
+
connection?: string;
|
|
10
|
+
createdAt?: string;
|
|
11
|
+
domainId?: string;
|
|
12
|
+
id?: string;
|
|
13
|
+
internal?: boolean;
|
|
14
|
+
props?: string;
|
|
15
|
+
type?: string;
|
|
16
|
+
userId?: string;
|
|
17
|
+
}
|
|
@@ -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 { WebitelChatServerChatVariablesResponseVariables } from './webitelChatServerChatVariablesResponseVariables';
|
|
8
|
+
export interface WebitelChatServerChatVariablesResponse {
|
|
9
|
+
/** Unique Chat Channel IDentifier. */
|
|
10
|
+
channelId?: string;
|
|
11
|
+
/** Result Chat Channel's Variables SET. */
|
|
12
|
+
variables?: WebitelChatServerChatVariablesResponseVariables;
|
|
13
|
+
}
|
|
@@ -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
|
+
/**
|
|
8
|
+
* Result Chat Channel's Variables SET.
|
|
9
|
+
*/
|
|
10
|
+
export type WebitelChatServerChatVariablesResponseVariables = {
|
|
11
|
+
[key: string]: string;
|
|
12
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
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 { WebitelChatServerAccount } from './webitelChatServerAccount';
|
|
8
|
+
import type { WebitelChatServerCheckSessionResponseProperties } from './webitelChatServerCheckSessionResponseProperties';
|
|
9
|
+
export interface WebitelChatServerCheckSessionResponse {
|
|
10
|
+
account?: WebitelChatServerAccount;
|
|
11
|
+
channelId?: string;
|
|
12
|
+
clientId?: string;
|
|
13
|
+
exists?: boolean;
|
|
14
|
+
/** optional: extra context */
|
|
15
|
+
properties?: WebitelChatServerCheckSessionResponseProperties;
|
|
16
|
+
}
|
|
@@ -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
|
+
export type WebitelChatServerCloseConversationCause = (typeof WebitelChatServerCloseConversationCause)[keyof typeof WebitelChatServerCloseConversationCause];
|
|
8
|
+
export declare const WebitelChatServerCloseConversationCause: {
|
|
9
|
+
readonly NoCause: "no_cause";
|
|
10
|
+
readonly FlowEnd: "flow_end";
|
|
11
|
+
readonly ClientLeave: "client_leave";
|
|
12
|
+
readonly FlowErr: "flow_err";
|
|
13
|
+
readonly BroadcastEnd: "broadcast_end";
|
|
14
|
+
};
|