@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.
Files changed (137) hide show
  1. package/package.json +1 -1
  2. package/src/api/clients/agents/agentChats.ts +25 -22
  3. package/src/api/clients/agents/agents.ts +23 -28
  4. package/src/api/clients/users/users.ts +9 -1
  5. package/src/gen/_models/agentChatServiceGetAgentChatsCounterParams.ts +11 -0
  6. package/src/gen/_models/casesChatCatalogGetCaseChatHistoryParams.ts +4 -2
  7. package/src/gen/_models/catalogGetDialogsParams.ts +6 -2
  8. package/src/gen/_models/catalogGetHistory2Params.ts +4 -2
  9. package/src/gen/_models/catalogGetHistoryParams.ts +4 -2
  10. package/src/gen/_models/configServiceReadSystemObjectsParams.ts +5 -0
  11. package/src/gen/_models/contactsChatCatalogGetContactChatHistory2Params.ts +4 -2
  12. package/src/gen/_models/contactsChatCatalogGetContactChatHistoryParams.ts +4 -2
  13. package/src/gen/_models/index.ts +39 -0
  14. package/src/gen/_models/searchAgentParams.ts +1 -0
  15. package/src/gen/_models/searchUserStatusParams.ts +1 -0
  16. package/src/gen/_models/webitelChatGetAgentChatsCounterResponse.ts +10 -0
  17. package/src/gen/_models/webitelChatInputFile.ts +1 -0
  18. package/src/gen/_models/webitelChatMessage.ts +1 -0
  19. package/src/gen/_models/webitelChatServerAccount.ts +17 -0
  20. package/src/gen/_models/webitelChatServerButton.ts +14 -0
  21. package/src/gen/_models/webitelChatServerButtons.ts +11 -0
  22. package/src/gen/_models/webitelChatServerChannel.ts +18 -0
  23. package/src/gen/_models/webitelChatServerChatTransferResponse.ts +10 -0
  24. package/src/gen/_models/webitelChatServerChatVariablesResponse.ts +14 -0
  25. package/src/gen/_models/webitelChatServerChatVariablesResponseVariables.ts +13 -0
  26. package/src/gen/_models/webitelChatServerCheckSessionResponse.ts +17 -0
  27. package/src/gen/_models/webitelChatServerCheckSessionResponseProperties.ts +13 -0
  28. package/src/gen/_models/webitelChatServerCloseConversationCause.ts +18 -0
  29. package/src/gen/_models/webitelChatServerCloseConversationResponse.ts +10 -0
  30. package/src/gen/_models/webitelChatServerConversation.ts +20 -0
  31. package/src/gen/_models/webitelChatServerDeclineInvitationResponse.ts +10 -0
  32. package/src/gen/_models/webitelChatServerFile.ts +14 -0
  33. package/src/gen/_models/webitelChatServerGateway.ts +12 -0
  34. package/src/gen/_models/webitelChatServerGetConversationByIDResponse.ts +11 -0
  35. package/src/gen/_models/webitelChatServerGetConversationsResponse.ts +13 -0
  36. package/src/gen/_models/webitelChatServerGetHistoryMessagesResponse.ts +13 -0
  37. package/src/gen/_models/webitelChatServerHistoryMessage.ts +18 -0
  38. package/src/gen/_models/webitelChatServerInviteToConversationResponse.ts +10 -0
  39. package/src/gen/_models/webitelChatServerJoinConversationResponse.ts +10 -0
  40. package/src/gen/_models/webitelChatServerLeaveConversationCause.ts +19 -0
  41. package/src/gen/_models/webitelChatServerLeaveConversationResponse.ts +10 -0
  42. package/src/gen/_models/webitelChatServerMember.ts +18 -0
  43. package/src/gen/_models/webitelChatServerMessage.ts +45 -0
  44. package/src/gen/_models/webitelChatServerMessageForwardFromVariables.ts +10 -0
  45. package/src/gen/_models/webitelChatServerMessageReplyToVariables.ts +10 -0
  46. package/src/gen/_models/webitelChatServerMessageVariables.ts +8 -0
  47. package/src/gen/_models/webitelChatServerPostback.ts +18 -0
  48. package/src/gen/_models/webitelChatServerSendMessageResponse.ts +11 -0
  49. package/src/gen/_models/webitelChatServerSendServiceMessageResponse.ts +10 -0
  50. package/src/gen/_models/webitelChatServerSendUserActionResponse.ts +10 -0
  51. package/src/gen/_models/webitelChatServerStartConversationResponse.ts +13 -0
  52. package/src/gen/_models/webitelChatServerUpdateChannelResponse.ts +10 -0
  53. package/src/gen/_models/webitelChatServerUser.ts +13 -0
  54. package/src/gen/_models/webitelChatServerUserAction.ts +23 -0
  55. package/src/gen/_models/webitelChatServerWaitMessageResponse.ts +12 -0
  56. package/src/gen/agent-chat-service/agent-chat-service.api.gen.ts +16 -0
  57. package/src/gen/agent-chat-service/agent-chat-service.msw.api.gen.ts +41 -0
  58. package/src/gen/agent-chat-service/agent-chat-service.zod.gen.ts +10 -0
  59. package/src/gen/agent-service/agent-service.zod.gen.ts +2 -0
  60. package/src/gen/cases-chat-catalog/cases-chat-catalog.msw.api.gen.ts +4 -0
  61. package/src/gen/cases-chat-catalog/cases-chat-catalog.zod.gen.ts +2 -1
  62. package/src/gen/config-service/config-service.zod.gen.ts +5 -0
  63. package/src/gen/contacts-chat-catalog/contacts-chat-catalog.zod.gen.ts +2 -2
  64. package/src/gen/index.ts +3 -6
  65. package/src/gen/{catalog/catalog.api.gen.ts → messages/messages.api.gen.ts} +21 -1
  66. package/src/gen/{catalog/catalog.msw.api.gen.ts → messages/messages.msw.api.gen.ts} +95 -1
  67. package/src/gen/{catalog/catalog.zod.gen.ts → messages/messages.zod.gen.ts} +82 -3
  68. package/src/gen/users/users.api.gen.ts +1 -5
  69. package/src/gen/users/users.msw.api.gen.ts +2 -2
  70. package/types/api/clients/agents/agentChats.d.ts +1 -0
  71. package/types/api/clients/index.d.ts +1 -1
  72. package/types/gen/_models/agentChatServiceGetAgentChatsCounterParams.d.ts +10 -0
  73. package/types/gen/_models/casesChatCatalogGetCaseChatHistoryParams.d.ts +4 -2
  74. package/types/gen/_models/catalogGetDialogsParams.d.ts +6 -2
  75. package/types/gen/_models/catalogGetHistory2Params.d.ts +4 -2
  76. package/types/gen/_models/catalogGetHistoryParams.d.ts +4 -2
  77. package/types/gen/_models/configServiceReadSystemObjectsParams.d.ts +5 -0
  78. package/types/gen/_models/contactsChatCatalogGetContactChatHistory2Params.d.ts +4 -2
  79. package/types/gen/_models/contactsChatCatalogGetContactChatHistoryParams.d.ts +4 -2
  80. package/types/gen/_models/searchAgentParams.d.ts +1 -0
  81. package/types/gen/_models/searchUserStatusParams.d.ts +1 -0
  82. package/types/gen/_models/webitelChatGetAgentChatsCounterResponse.d.ts +9 -0
  83. package/types/gen/_models/webitelChatInputFile.d.ts +1 -0
  84. package/types/gen/_models/webitelChatMessage.d.ts +1 -0
  85. package/types/gen/_models/webitelChatServerAccount.d.ts +16 -0
  86. package/types/gen/_models/webitelChatServerButton.d.ts +13 -0
  87. package/types/gen/_models/webitelChatServerButtons.d.ts +10 -0
  88. package/types/gen/_models/webitelChatServerChannel.d.ts +17 -0
  89. package/types/gen/_models/webitelChatServerChatTransferResponse.d.ts +9 -0
  90. package/types/gen/_models/webitelChatServerChatVariablesResponse.d.ts +13 -0
  91. package/types/gen/_models/webitelChatServerChatVariablesResponseVariables.d.ts +12 -0
  92. package/types/gen/_models/webitelChatServerCheckSessionResponse.d.ts +16 -0
  93. package/types/gen/_models/webitelChatServerCheckSessionResponseProperties.d.ts +12 -0
  94. package/types/gen/_models/webitelChatServerCloseConversationCause.d.ts +14 -0
  95. package/types/gen/_models/webitelChatServerCloseConversationResponse.d.ts +9 -0
  96. package/types/gen/_models/webitelChatServerConversation.d.ts +18 -0
  97. package/types/gen/_models/webitelChatServerDeclineInvitationResponse.d.ts +9 -0
  98. package/types/gen/_models/webitelChatServerFile.d.ts +13 -0
  99. package/types/gen/_models/webitelChatServerGateway.d.ts +11 -0
  100. package/types/gen/_models/webitelChatServerGetConversationByIDResponse.d.ts +10 -0
  101. package/types/gen/_models/webitelChatServerGetConversationsResponse.d.ts +12 -0
  102. package/types/gen/_models/webitelChatServerGetHistoryMessagesResponse.d.ts +12 -0
  103. package/types/gen/_models/webitelChatServerHistoryMessage.d.ts +17 -0
  104. package/types/gen/_models/webitelChatServerInviteToConversationResponse.d.ts +9 -0
  105. package/types/gen/_models/webitelChatServerJoinConversationResponse.d.ts +9 -0
  106. package/types/gen/_models/webitelChatServerLeaveConversationCause.d.ts +15 -0
  107. package/types/gen/_models/webitelChatServerLeaveConversationResponse.d.ts +9 -0
  108. package/types/gen/_models/webitelChatServerMember.d.ts +17 -0
  109. package/types/gen/_models/webitelChatServerMessage.d.ts +43 -0
  110. package/types/gen/_models/webitelChatServerMessageForwardFromVariables.d.ts +9 -0
  111. package/types/gen/_models/webitelChatServerMessageReplyToVariables.d.ts +9 -0
  112. package/types/gen/_models/webitelChatServerMessageVariables.d.ts +9 -0
  113. package/types/gen/_models/webitelChatServerPostback.d.ts +17 -0
  114. package/types/gen/_models/webitelChatServerSendMessageResponse.d.ts +10 -0
  115. package/types/gen/_models/webitelChatServerSendServiceMessageResponse.d.ts +9 -0
  116. package/types/gen/_models/webitelChatServerSendUserActionResponse.d.ts +9 -0
  117. package/types/gen/_models/webitelChatServerStartConversationResponse.d.ts +12 -0
  118. package/types/gen/_models/webitelChatServerUpdateChannelResponse.d.ts +9 -0
  119. package/types/gen/_models/webitelChatServerUser.d.ts +12 -0
  120. package/types/gen/_models/webitelChatServerUserAction.d.ts +19 -0
  121. package/types/gen/_models/webitelChatServerWaitMessageResponse.d.ts +11 -0
  122. package/types/gen/agent-chat-service/agent-chat-service.api.gen.d.ts +3 -1
  123. package/types/gen/agent-chat-service/agent-chat-service.msw.api.gen.d.ts +3 -1
  124. package/types/gen/agent-chat-service/agent-chat-service.zod.gen.d.ts +8 -0
  125. package/types/gen/agent-service/agent-service.zod.gen.d.ts +2 -0
  126. package/types/gen/cases-chat-catalog/cases-chat-catalog.zod.gen.d.ts +1 -0
  127. package/types/gen/config-service/config-service.zod.gen.d.ts +5 -0
  128. package/types/gen/{catalog/catalog.api.gen.d.ts → messages/messages.api.gen.d.ts} +4 -2
  129. package/types/gen/{catalog/catalog.msw.api.gen.d.ts → messages/messages.msw.api.gen.d.ts} +4 -2
  130. package/types/gen/{catalog/catalog.zod.gen.d.ts → messages/messages.zod.gen.d.ts} +47 -0
  131. package/types/gen/users/users.msw.api.gen.d.ts +1 -1
  132. package/src/gen/messages-service/messages-service.api.gen.ts +0 -46
  133. package/src/gen/messages-service/messages-service.msw.api.gen.ts +0 -92
  134. package/src/gen/messages-service/messages-service.zod.gen.ts +0 -82
  135. package/types/gen/messages-service/messages-service.api.gen.d.ts +0 -7
  136. package/types/gen/messages-service/messages-service.msw.api.gen.d.ts +0 -5
  137. 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
- getCatalog =
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 getCatalogMock = () => [
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
- 'This is a request variable of the map type. The query format is \"map_name[key]=value\", e.g. If the map name is Age, the key type is string, and the value type is integer, the query parameter is expressed as Age[\"bob\"]=18',
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
- 'This is a request variable of the map type. The query format is \"map_name[key]=value\", e.g. If the map name is Age, the key type is string, and the value type is integer, the query parameter is expressed as Age[\"bob\"]=18',
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
- 'This is a request variable of the map type. The query format is \"map_name[key]=value\", e.g. If the map name is Age, the key type is string, and the value type is integer, the query parameter is expressed as Age[\"bob\"]=18',
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.patch(
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.patch>[1]>[0],
2599
+ info: Parameters<Parameters<typeof http.put>[1]>[0],
2600
2600
  ) => Promise<ApiUpdatePasswordResponse> | ApiUpdatePasswordResponse),
2601
2601
  ) => {
2602
- return http.patch('*/users/password', async (info) => {
2602
+ return http.put('*/users/password', async (info) => {
2603
2603
  await delay(1000);
2604
2604
 
2605
2605
  return new HttpResponse(
@@ -4,4 +4,5 @@ export declare const AgentChatsAPI: {
4
4
  next: any;
5
5
  }>;
6
6
  markChatProcessed: (chatId: any) => Promise<any>;
7
+ getChatCount: (params: any) => Promise<any>;
7
8
  };
@@ -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';
@@ -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
+ export type AgentChatServiceGetAgentChatsCounterParams = {
8
+ onlyClosed?: boolean;
9
+ onlyUnprocessed?: boolean;
10
+ };
@@ -27,7 +27,9 @@ export type CasesChatCatalogGetCaseChatHistoryParams = {
27
27
  */
28
28
  fields?: string[];
29
29
  /**
30
- * This is a request variable of the map type. The query format is "map_name[key]=value", e.g. If the map name is Age, the key type is string, and the value type is integer, the query parameter is expressed as Age["bob"]=18
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
- * This is a request variable of the map type. The query format is "map_name[key]=value", e.g. If the map name is Age, the key type is string, and the value type is integer, the query parameter is expressed as Age["bob"]=18
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
- * This is a request variable of the map type. The query format is "map_name[key]=value", e.g. If the map name is Age, the key type is string, and the value type is integer, the query parameter is expressed as Age["bob"]=18
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
- * This is a request variable of the map type. The query format is "map_name[key]=value", e.g. If the map name is Age, the key type is string, and the value type is integer, the query parameter is expressed as Age["bob"]=18
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
  };
@@ -6,4 +6,9 @@
6
6
  */
7
7
  export type ConfigServiceReadSystemObjectsParams = {
8
8
  includeExisting?: boolean;
9
+ page?: number;
10
+ size?: number;
11
+ q?: string;
12
+ sort?: string;
13
+ fields?: string[];
9
14
  };
@@ -31,7 +31,9 @@ export type ContactsChatCatalogGetContactChatHistory2Params = {
31
31
  */
32
32
  chatId?: string;
33
33
  /**
34
- * This is a request variable of the map type. The query format is "map_name[key]=value", e.g. If the map name is Age, the key type is string, and the value type is integer, the query parameter is expressed as Age["bob"]=18
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
- * This is a request variable of the map type. The query format is "map_name[key]=value", e.g. If the map name is Age, the key type is string, and the value type is integer, the query parameter is expressed as Age["bob"]=18
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
  };
@@ -24,4 +24,5 @@ export type SearchAgentParams = {
24
24
  extension?: string[];
25
25
  notTeamId?: number[];
26
26
  notSkillId?: number[];
27
+ notUserId?: string[];
27
28
  };
@@ -10,4 +10,5 @@ export type SearchUserStatusParams = {
10
10
  q?: string;
11
11
  sort?: string;
12
12
  fields?: string[];
13
+ notUserId?: string[];
13
14
  };
@@ -0,0 +1,9 @@
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 WebitelChatGetAgentChatsCounterResponse {
8
+ count?: number;
9
+ }
@@ -6,5 +6,6 @@
6
6
  */
7
7
  export interface WebitelChatInputFile {
8
8
  id?: string;
9
+ source?: string;
9
10
  url?: string;
10
11
  }
@@ -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,9 @@
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 WebitelChatServerChatTransferResponse {
8
+ [key: string]: unknown;
9
+ }
@@ -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,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
+ * optional: extra context
9
+ */
10
+ export type WebitelChatServerCheckSessionResponseProperties = {
11
+ [key: string]: string;
12
+ };
@@ -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
+ };