@webitel/api-services 26.8.65 → 26.8.67

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 (97) hide show
  1. package/package.json +1 -1
  2. package/src/gen/_models/engineListOfMemberCommunication.ts +12 -0
  3. package/src/gen/_models/googleProtobufNullValue.ts +8 -3
  4. package/src/gen/_models/index.ts +10 -1
  5. package/src/gen/_models/messageRead2Params.ts +14 -0
  6. package/src/gen/_models/searchMemberCommunicationParams.ts +13 -0
  7. package/src/gen/_models/{messageReadParams.ts → webitelImApiGatewayV1HandBackToBotResponse.ts} +3 -3
  8. package/src/gen/_models/webitelImApiGatewayV1MessageFailure.ts +17 -0
  9. package/src/gen/_models/webitelImApiGatewayV1MessageFailureError.ts +11 -0
  10. package/src/gen/_models/webitelImApiGatewayV1MessageReadBody.ts +13 -0
  11. package/src/gen/_models/webitelImApiGatewayV1SearchMessageHistoryResponse.ts +1 -1
  12. package/src/gen/_models/webitelImApiGatewayV1SearchThreadResponse.ts +1 -1
  13. package/{types/gen/_models/messageReadParams.d.ts → src/gen/_models/webitelImApiGatewayV1TakeOverFromBotResponse.ts} +4 -3
  14. package/src/gen/_models/webitelImApiGatewayV1Thread.ts +1 -1
  15. package/src/gen/_models/webitelImApiGatewayV1ThreadManagementHandBackToBotBody.ts +10 -0
  16. package/src/gen/_models/webitelImApiGatewayV1ThreadManagementTakeOverFromBotBody.ts +10 -0
  17. package/src/gen/_models/webitelImApiGatewayV1ThreadUpdates.ts +8 -2
  18. package/src/gen-wire/_models/engineListOfMemberCommunication.ts +12 -0
  19. package/src/gen-wire/_models/googleProtobufNullValue.ts +8 -3
  20. package/src/gen-wire/_models/index.ts +10 -1
  21. package/src/gen-wire/_models/messageRead2Params.ts +14 -0
  22. package/src/gen-wire/_models/searchMemberCommunicationParams.ts +13 -0
  23. package/src/gen-wire/_models/{messageReadParams.ts → webitelImApiGatewayV1HandBackToBotResponse.ts} +3 -3
  24. package/src/gen-wire/_models/webitelImApiGatewayV1MessageFailure.ts +17 -0
  25. package/src/gen-wire/_models/webitelImApiGatewayV1MessageFailureError.ts +11 -0
  26. package/src/gen-wire/_models/webitelImApiGatewayV1MessageReadBody.ts +13 -0
  27. package/src/gen-wire/_models/webitelImApiGatewayV1SearchMessageHistoryResponse.ts +1 -1
  28. package/src/gen-wire/_models/webitelImApiGatewayV1SearchThreadResponse.ts +1 -1
  29. package/{types/gen-wire/_models/messageReadParams.d.ts → src/gen-wire/_models/webitelImApiGatewayV1TakeOverFromBotResponse.ts} +4 -3
  30. package/src/gen-wire/_models/webitelImApiGatewayV1Thread.ts +1 -1
  31. package/src/gen-wire/_models/webitelImApiGatewayV1ThreadManagementHandBackToBotBody.ts +10 -0
  32. package/src/gen-wire/_models/webitelImApiGatewayV1ThreadManagementTakeOverFromBotBody.ts +10 -0
  33. package/src/gen-wire/_models/webitelImApiGatewayV1ThreadUpdates.ts +8 -2
  34. package/src/gen-wire/index.ts +13 -1
  35. package/src/gen-wire/member-service/member-service.ts +25 -0
  36. package/src/gen-wire/member-service/member-service.zod.ts +48 -0
  37. package/src/gen-wire/webitel-im-api-gateway-v1-message/webitel-im-api-gateway-v1-message.ts +28 -7
  38. package/src/gen-wire/webitel-im-api-gateway-v1-message/webitel-im-api-gateway-v1-message.zod.ts +39 -6
  39. package/src/gen-wire/webitel-im-api-gateway-v1-messagehistory/webitel-im-api-gateway-v1-messagehistory.zod.ts +3 -3
  40. package/src/gen-wire/webitel-im-api-gateway-v1-threadmanagement/webitel-im-api-gateway-v1-threadmanagement.ts +40 -0
  41. package/src/gen-wire/webitel-im-api-gateway-v1-threadmanagement/webitel-im-api-gateway-v1-threadmanagement.zod.ts +27 -5
  42. package/src/gen-wire/webitel-im-api-gateway-v1-updates/webitel-im-api-gateway-v1-updates.zod.ts +135 -3
  43. package/src/validations/index.ts +4 -0
  44. package/src/validations/team/__tests__/team.validations.spec.ts +85 -0
  45. package/src/validations/team/team.validations.ts +20 -0
  46. package/src/validations/teamAgent/__tests__/teamAgent.validations.spec.ts +24 -0
  47. package/src/validations/teamAgent/teamAgent.validations.ts +7 -0
  48. package/src/validations/teamFlow/__tests__/teamFlow.validations.spec.ts +32 -0
  49. package/src/validations/teamFlow/teamFlow.validations.ts +12 -0
  50. package/src/validations/teamHook/__tests__/teamHook.validations.spec.ts +32 -0
  51. package/src/validations/teamHook/teamHook.validations.ts +12 -0
  52. package/types/.tsbuildinfo +1 -1
  53. package/types/gen/_models/engineListOfMemberCommunication.d.ts +11 -0
  54. package/types/gen/_models/googleProtobufNullValue.d.ts +8 -3
  55. package/types/gen/_models/index.d.ts +10 -1
  56. package/types/gen/_models/messageRead2Params.d.ts +13 -0
  57. package/types/gen/_models/searchMemberCommunicationParams.d.ts +12 -0
  58. package/types/gen/_models/webitelImApiGatewayV1HandBackToBotResponse.d.ts +9 -0
  59. package/types/gen/_models/webitelImApiGatewayV1MessageFailure.d.ts +16 -0
  60. package/types/gen/_models/webitelImApiGatewayV1MessageFailureError.d.ts +10 -0
  61. package/types/gen/_models/webitelImApiGatewayV1MessageReadBody.d.ts +12 -0
  62. package/types/gen/_models/webitelImApiGatewayV1SearchMessageHistoryResponse.d.ts +1 -1
  63. package/types/gen/_models/webitelImApiGatewayV1SearchThreadResponse.d.ts +1 -1
  64. package/types/gen/_models/webitelImApiGatewayV1TakeOverFromBotResponse.d.ts +9 -0
  65. package/types/gen/_models/webitelImApiGatewayV1Thread.d.ts +1 -1
  66. package/types/gen/_models/webitelImApiGatewayV1ThreadManagementHandBackToBotBody.d.ts +9 -0
  67. package/types/gen/_models/webitelImApiGatewayV1ThreadManagementTakeOverFromBotBody.d.ts +9 -0
  68. package/types/gen/_models/webitelImApiGatewayV1ThreadUpdates.d.ts +8 -2
  69. package/types/gen-wire/_models/engineListOfMemberCommunication.d.ts +11 -0
  70. package/types/gen-wire/_models/googleProtobufNullValue.d.ts +8 -3
  71. package/types/gen-wire/_models/index.d.ts +10 -1
  72. package/types/gen-wire/_models/messageRead2Params.d.ts +13 -0
  73. package/types/gen-wire/_models/searchMemberCommunicationParams.d.ts +12 -0
  74. package/types/gen-wire/_models/webitelImApiGatewayV1HandBackToBotResponse.d.ts +9 -0
  75. package/types/gen-wire/_models/webitelImApiGatewayV1MessageFailure.d.ts +16 -0
  76. package/types/gen-wire/_models/webitelImApiGatewayV1MessageFailureError.d.ts +10 -0
  77. package/types/gen-wire/_models/webitelImApiGatewayV1MessageReadBody.d.ts +12 -0
  78. package/types/gen-wire/_models/webitelImApiGatewayV1SearchMessageHistoryResponse.d.ts +1 -1
  79. package/types/gen-wire/_models/webitelImApiGatewayV1SearchThreadResponse.d.ts +1 -1
  80. package/types/gen-wire/_models/webitelImApiGatewayV1TakeOverFromBotResponse.d.ts +9 -0
  81. package/types/gen-wire/_models/webitelImApiGatewayV1Thread.d.ts +1 -1
  82. package/types/gen-wire/_models/webitelImApiGatewayV1ThreadManagementHandBackToBotBody.d.ts +9 -0
  83. package/types/gen-wire/_models/webitelImApiGatewayV1ThreadManagementTakeOverFromBotBody.d.ts +9 -0
  84. package/types/gen-wire/_models/webitelImApiGatewayV1ThreadUpdates.d.ts +8 -2
  85. package/types/gen-wire/index.d.ts +3 -3
  86. package/types/gen-wire/member-service/member-service.d.ts +3 -1
  87. package/types/gen-wire/member-service/member-service.zod.d.ts +37 -0
  88. package/types/gen-wire/webitel-im-api-gateway-v1-message/webitel-im-api-gateway-v1-message.d.ts +5 -3
  89. package/types/gen-wire/webitel-im-api-gateway-v1-message/webitel-im-api-gateway-v1-message.zod.d.ts +20 -5
  90. package/types/gen-wire/webitel-im-api-gateway-v1-threadmanagement/webitel-im-api-gateway-v1-threadmanagement.d.ts +5 -1
  91. package/types/gen-wire/webitel-im-api-gateway-v1-threadmanagement/webitel-im-api-gateway-v1-threadmanagement.zod.d.ts +16 -0
  92. package/types/gen-wire/webitel-im-api-gateway-v1-updates/webitel-im-api-gateway-v1-updates.zod.d.ts +51 -0
  93. package/types/validations/index.d.ts +4 -0
  94. package/types/validations/team/team.validations.d.ts +18 -0
  95. package/types/validations/teamAgent/teamAgent.validations.d.ts +7 -0
  96. package/types/validations/teamFlow/teamFlow.validations.d.ts +8 -0
  97. package/types/validations/teamHook/teamHook.validations.d.ts +8 -0
@@ -19,6 +19,7 @@ import type {
19
19
  EngineListHistoryAttempt,
20
20
  EngineListMember,
21
21
  EngineListMemberAttempt,
22
+ EngineListOfMemberCommunication,
22
23
  EngineMemberBulkResponse,
23
24
  EngineMemberInQueue,
24
25
  EngineMemberServiceAssignAttemptBody,
@@ -44,6 +45,7 @@ import type {
44
45
  SearchAttemptsHistoryParams,
45
46
  SearchAttemptsParams,
46
47
  SearchMemberAttemptsParams,
48
+ SearchMemberCommunicationParams,
47
49
  SearchMemberInQueueParams,
48
50
  SearchMembersParams,
49
51
  } from '../_models';
@@ -396,6 +398,26 @@ Can be used to preview the impact of a reset request.
396
398
  options,
397
399
  );
398
400
  };
401
+ /**
402
+ * @summary List of a member's communications
403
+ */
404
+ const searchMemberCommunication = (
405
+ queueId: string,
406
+ memberId: string,
407
+ params?: SearchMemberCommunicationParams,
408
+ options?: AxiosRequestConfig,
409
+ ): Promise<AxiosResponse<EngineListOfMemberCommunication>> => {
410
+ return axiosInstance.get(
411
+ `/call_center/queues/${queueId}/members/${memberId}/communications`,
412
+ {
413
+ ...options,
414
+ params: {
415
+ ...params,
416
+ ...options?.params,
417
+ },
418
+ },
419
+ );
420
+ };
399
421
 
400
422
  // --- footer start
401
423
  return {
@@ -422,6 +444,7 @@ Can be used to preview the impact of a reset request.
422
444
  searchMemberAttempts,
423
445
  createAttempt,
424
446
  attemptResult,
447
+ searchMemberCommunication,
425
448
  };
426
449
  };
427
450
  export type AttemptCallbackResult = AxiosResponse<EngineAttemptResultResponse>;
@@ -451,5 +474,7 @@ export type UpdateMemberResult = AxiosResponse<EngineMemberInQueue>;
451
474
  export type SearchMemberAttemptsResult = AxiosResponse<EngineListMemberAttempt>;
452
475
  export type CreateAttemptResult = AxiosResponse<EngineCreateAttemptResponse>;
453
476
  export type AttemptResultResult = AxiosResponse<EngineAttemptResultResponse>;
477
+ export type SearchMemberCommunicationResult =
478
+ AxiosResponse<EngineListOfMemberCommunication>;
454
479
 
455
480
  // --- footer end
@@ -1825,3 +1825,51 @@ export const AttemptResultBody = zod.object({
1825
1825
  export const AttemptResultResponse = zod.object({
1826
1826
  status: zod.string().optional(),
1827
1827
  });
1828
+
1829
+ /**
1830
+ * @summary List of a member's communications
1831
+ */
1832
+ export const SearchMemberCommunicationParams = zod.object({
1833
+ queue_id: zod.string(),
1834
+ member_id: zod.string(),
1835
+ });
1836
+
1837
+ export const SearchMemberCommunicationQueryParams = zod.object({
1838
+ page: zod.int().optional(),
1839
+ size: zod.int().optional(),
1840
+ sort: zod.string().optional(),
1841
+ fields: zod.array(zod.string()).optional(),
1842
+ });
1843
+
1844
+ export const SearchMemberCommunicationResponse = zod.object({
1845
+ items: zod
1846
+ .array(
1847
+ zod.object({
1848
+ attempts: zod.int().optional(),
1849
+ description: zod.string().optional(),
1850
+ destination: zod.string().optional(),
1851
+ display: zod.string().optional(),
1852
+ dtmf: zod.string().optional(),
1853
+ id: zod.string().optional(),
1854
+ last_activity_at: zod.string().optional(),
1855
+ last_cause: zod.string().optional(),
1856
+ priority: zod.int().optional(),
1857
+ resource: zod
1858
+ .object({
1859
+ id: zod.string().optional(),
1860
+ name: zod.string().optional(),
1861
+ })
1862
+ .optional(),
1863
+ state: zod.int().optional(),
1864
+ stop_at: zod.string().optional(),
1865
+ type: zod
1866
+ .object({
1867
+ id: zod.string().optional(),
1868
+ name: zod.string().optional(),
1869
+ })
1870
+ .optional(),
1871
+ }),
1872
+ )
1873
+ .optional(),
1874
+ next: zod.boolean().optional(),
1875
+ });
@@ -9,7 +9,7 @@ import type { AxiosInstance, AxiosRequestConfig, AxiosResponse } from 'axios';
9
9
  import axios from '../../api/axios/genClient';
10
10
 
11
11
  import type {
12
- MessageReadParams,
12
+ MessageRead2Params,
13
13
  WebitelImApiGatewayV1DeleteMessagesRequest,
14
14
  WebitelImApiGatewayV1DeleteMessagesResponse,
15
15
  WebitelImApiGatewayV1EditMessageResponse,
@@ -17,6 +17,7 @@ import type {
17
17
  WebitelImApiGatewayV1ForwardMessagesResponse,
18
18
  WebitelImApiGatewayV1InteractiveCallbackResponse,
19
19
  WebitelImApiGatewayV1MessageEditMessageBody,
20
+ WebitelImApiGatewayV1MessageReadBody,
20
21
  WebitelImApiGatewayV1MessageSendInteractiveCallbackBody,
21
22
  WebitelImApiGatewayV1MessageSendTypingBody,
22
23
  WebitelImApiGatewayV1MessageSetReactionBody,
@@ -188,12 +189,13 @@ We use the shared Request/Response types directly to avoid duplication.
188
189
  );
189
190
  };
190
191
  /**
191
- * @summary Marks the thread as read up to the given message (inclusive):
192
- every earlier unread message of the caller in the thread is covered.
192
+ * @summary Marks the thread as read up to the given message (inclusive): every earlier unread
193
+ message of the caller in the thread is covered. Prefer the thread route with up_to_seq;
194
+ the read horizon only moves forward.
193
195
  */
194
- const messageRead = (
196
+ const messageRead2 = (
195
197
  id: string,
196
- params?: MessageReadParams,
198
+ params?: MessageRead2Params,
197
199
  options?: AxiosRequestConfig,
198
200
  ): Promise<AxiosResponse<WebitelImApiGatewayV1ReadMessageResponse>> => {
199
201
  return axiosInstance.post(`/v1/messages/${id}/read`, undefined, {
@@ -219,6 +221,22 @@ every earlier unread message of the caller in the thread is covered.
219
221
  );
220
222
  };
221
223
  /**
224
+ * @summary Marks the thread as read up to the given message (inclusive): every earlier unread
225
+ message of the caller in the thread is covered. Prefer the thread route with up_to_seq;
226
+ the read horizon only moves forward.
227
+ */
228
+ const messageRead = (
229
+ threadId: string,
230
+ webitelImApiGatewayV1MessageReadBody: WebitelImApiGatewayV1MessageReadBody,
231
+ options?: AxiosRequestConfig,
232
+ ): Promise<AxiosResponse<WebitelImApiGatewayV1ReadMessageResponse>> => {
233
+ return axiosInstance.post(
234
+ `/v1/threads/${threadId}/read`,
235
+ webitelImApiGatewayV1MessageReadBody,
236
+ options,
237
+ );
238
+ };
239
+ /**
222
240
  * @summary Sends an ephemeral "…is typing" indicator to the other participants of a
223
241
  thread. Real-time only: it is never stored and never triggers a push. The
224
242
  typing member is the authenticated caller, resolved from the token.
@@ -247,8 +265,9 @@ typing member is the authenticated caller, resolved from the token.
247
265
  messageSendLocation,
248
266
  messageSendText,
249
267
  messageEditMessage,
250
- messageRead,
268
+ messageRead2,
251
269
  messageSetReaction,
270
+ messageRead,
252
271
  messageSendTyping,
253
272
  };
254
273
  };
@@ -272,10 +291,12 @@ export type MessageSendTextResult =
272
291
  AxiosResponse<WebitelImApiGatewayV1SendTextResponse>;
273
292
  export type MessageEditMessageResult =
274
293
  AxiosResponse<WebitelImApiGatewayV1EditMessageResponse>;
275
- export type MessageReadResult =
294
+ export type MessageRead2Result =
276
295
  AxiosResponse<WebitelImApiGatewayV1ReadMessageResponse>;
277
296
  export type MessageSetReactionResult =
278
297
  AxiosResponse<WebitelImApiGatewayV1SetReactionResponse>;
298
+ export type MessageReadResult =
299
+ AxiosResponse<WebitelImApiGatewayV1ReadMessageResponse>;
279
300
  export type MessageSendTypingResult =
280
301
  AxiosResponse<WebitelImApiGatewayV1SendTypingResponse>;
281
302
 
@@ -1190,18 +1190,27 @@ export const MessageEditMessageResponse = zod.object({
1190
1190
  });
1191
1191
 
1192
1192
  /**
1193
- * @summary Marks the thread as read up to the given message (inclusive):
1194
- every earlier unread message of the caller in the thread is covered.
1193
+ * @summary Marks the thread as read up to the given message (inclusive): every earlier unread
1194
+ message of the caller in the thread is covered. Prefer the thread route with up_to_seq;
1195
+ the read horizon only moves forward.
1195
1196
  */
1196
- export const MessageReadParams = zod.object({
1197
- id: zod.string(),
1197
+ export const MessageRead2Params = zod.object({
1198
+ id: zod
1199
+ .string()
1200
+ .describe(
1201
+ 'Message to read up to; resolved to its seq. Ignored when up_to_seq is set.',
1202
+ ),
1198
1203
  });
1199
1204
 
1200
- export const MessageReadQueryParams = zod.object({
1205
+ export const MessageRead2QueryParams = zod.object({
1201
1206
  thread_id: zod.string().optional(),
1207
+ up_to_seq: zod
1208
+ .string()
1209
+ .optional()
1210
+ .describe('Read up to this per-thread message seq (inclusive).'),
1202
1211
  });
1203
1212
 
1204
- export const MessageReadResponse = zod.looseObject({});
1213
+ export const MessageRead2Response = zod.looseObject({});
1205
1214
 
1206
1215
  /**
1207
1216
  * @summary Sets or clears the caller's emoji reaction on a single message.
@@ -1246,6 +1255,30 @@ export const MessageSetReactionResponse = zod.object({
1246
1255
  ),
1247
1256
  });
1248
1257
 
1258
+ /**
1259
+ * @summary Marks the thread as read up to the given message (inclusive): every earlier unread
1260
+ message of the caller in the thread is covered. Prefer the thread route with up_to_seq;
1261
+ the read horizon only moves forward.
1262
+ */
1263
+ export const MessageReadParams = zod.object({
1264
+ thread_id: zod.string(),
1265
+ });
1266
+
1267
+ export const MessageReadBody = zod.object({
1268
+ id: zod
1269
+ .string()
1270
+ .optional()
1271
+ .describe(
1272
+ 'Message to read up to; resolved to its seq. Ignored when up_to_seq is set.',
1273
+ ),
1274
+ up_to_seq: zod
1275
+ .string()
1276
+ .optional()
1277
+ .describe('Read up to this per-thread message seq (inclusive).'),
1278
+ });
1279
+
1280
+ export const MessageReadResponse = zod.looseObject({});
1281
+
1249
1282
  /**
1250
1283
  * @summary Sends an ephemeral "…is typing" indicator to the other participants of a
1251
1284
  thread. Real-time only: it is never stored and never triggers a push. The
@@ -1108,7 +1108,7 @@ export const MessageHistorySearchMessagesResponse = zod
1108
1108
  .string()
1109
1109
  .optional()
1110
1110
  .describe(
1111
- 'GetUpdates cursor read before this page: every later change comes from GetUpdates(updates_cursor).',
1111
+ "The caller's GetUpdates cursor as of this read: every later change comes from GetUpdates(updates_cursor).",
1112
1112
  ),
1113
1113
  })
1114
1114
  .describe(
@@ -2383,7 +2383,7 @@ export const MessageHistorySearchLeftThreadsMessagesHistoryResponse = zod
2383
2383
  .string()
2384
2384
  .optional()
2385
2385
  .describe(
2386
- 'GetUpdates cursor read before this page: every later change comes from GetUpdates(updates_cursor).',
2386
+ "The caller's GetUpdates cursor as of this read: every later change comes from GetUpdates(updates_cursor).",
2387
2387
  ),
2388
2388
  })
2389
2389
  .describe(
@@ -3486,7 +3486,7 @@ export const MessageHistorySearchThreadMessagesHistoryResponse = zod
3486
3486
  .string()
3487
3487
  .optional()
3488
3488
  .describe(
3489
- 'GetUpdates cursor read before this page: every later change comes from GetUpdates(updates_cursor).',
3489
+ "The caller's GetUpdates cursor as of this read: every later change comes from GetUpdates(updates_cursor).",
3490
3490
  ),
3491
3491
  })
3492
3492
  .describe(
@@ -15,16 +15,20 @@ import type {
15
15
  ThreadManagementSearchVariablesParams,
16
16
  WebitelImApiGatewayV1AddMemberResponse,
17
17
  WebitelImApiGatewayV1GetUnreadSummaryResponse,
18
+ WebitelImApiGatewayV1HandBackToBotResponse,
18
19
  WebitelImApiGatewayV1RemoveMemberResponse,
19
20
  WebitelImApiGatewayV1SearchLeftResponse,
20
21
  WebitelImApiGatewayV1SearchThreadResponse,
21
22
  WebitelImApiGatewayV1SearchVariablesResponse,
23
+ WebitelImApiGatewayV1TakeOverFromBotResponse,
22
24
  WebitelImApiGatewayV1Thread,
23
25
  WebitelImApiGatewayV1ThreadManagementAddMemberBody,
24
26
  WebitelImApiGatewayV1ThreadManagementCreateRequest,
25
27
  WebitelImApiGatewayV1ThreadManagementCreateResponse,
26
28
  WebitelImApiGatewayV1ThreadManagementFlushVariablesBody,
29
+ WebitelImApiGatewayV1ThreadManagementHandBackToBotBody,
27
30
  WebitelImApiGatewayV1ThreadManagementSetVariablesBody,
31
+ WebitelImApiGatewayV1ThreadManagementTakeOverFromBotBody,
28
32
  WebitelImApiGatewayV1ThreadManagementTransferBody,
29
33
  WebitelImApiGatewayV1ThreadVariables,
30
34
  WebitelImApiGatewayV1TransferResponse,
@@ -107,6 +111,36 @@ chats with unread messages and the total number of unread messages.
107
111
  },
108
112
  });
109
113
  };
114
+ /**
115
+ * @summary Hands the conversation to the thread's bot; the operator stays in the thread.
116
+ */
117
+ const threadManagementHandBackToBot = (
118
+ threadId: string,
119
+ webitelImApiGatewayV1ThreadManagementHandBackToBotBody: WebitelImApiGatewayV1ThreadManagementHandBackToBotBody,
120
+ options?: AxiosRequestConfig,
121
+ ): Promise<AxiosResponse<WebitelImApiGatewayV1HandBackToBotResponse>> => {
122
+ return axiosInstance.post(
123
+ `/v1/threads/${threadId}/bot/handback`,
124
+ webitelImApiGatewayV1ThreadManagementHandBackToBotBody,
125
+ options,
126
+ );
127
+ };
128
+ /**
129
+ * @summary Takes the conversation from the thread's bot back to the operator.
130
+ */
131
+ const threadManagementTakeOverFromBot = (
132
+ threadId: string,
133
+ webitelImApiGatewayV1ThreadManagementTakeOverFromBotBody: WebitelImApiGatewayV1ThreadManagementTakeOverFromBotBody,
134
+ options?: AxiosRequestConfig,
135
+ ): Promise<
136
+ AxiosResponse<WebitelImApiGatewayV1TakeOverFromBotResponse>
137
+ > => {
138
+ return axiosInstance.post(
139
+ `/v1/threads/${threadId}/bot/takeover`,
140
+ webitelImApiGatewayV1ThreadManagementTakeOverFromBotBody,
141
+ options,
142
+ );
143
+ };
110
144
  /**
111
145
  * @summary Add member to the thread.
112
146
  */
@@ -215,6 +249,8 @@ Supports pagination and field projection.
215
249
  threadManagementSearchLeft,
216
250
  threadManagementGetUnreadSummary,
217
251
  threadManagementGet,
252
+ threadManagementHandBackToBot,
253
+ threadManagementTakeOverFromBot,
218
254
  threadManagementAddMember,
219
255
  threadManagementRemoveMember,
220
256
  threadManagementTransfer,
@@ -234,6 +270,10 @@ export type ThreadManagementGetUnreadSummaryResult =
234
270
  AxiosResponse<WebitelImApiGatewayV1GetUnreadSummaryResponse>;
235
271
  export type ThreadManagementGetResult =
236
272
  AxiosResponse<WebitelImApiGatewayV1Thread>;
273
+ export type ThreadManagementHandBackToBotResult =
274
+ AxiosResponse<WebitelImApiGatewayV1HandBackToBotResponse>;
275
+ export type ThreadManagementTakeOverFromBotResult =
276
+ AxiosResponse<WebitelImApiGatewayV1TakeOverFromBotResponse>;
237
277
  export type ThreadManagementAddMemberResult =
238
278
  AxiosResponse<WebitelImApiGatewayV1AddMemberResponse>;
239
279
  export type ThreadManagementRemoveMemberResult =
@@ -1402,7 +1402,7 @@ export const ThreadManagementSearchResponse = zod
1402
1402
  .string()
1403
1403
  .optional()
1404
1404
  .describe(
1405
- 'GetUpdates cursor read before this thread (set by Get; Search carries it on the response).',
1405
+ "The caller's GetUpdates cursor as of this read (set by Get; Search carries it on the response).",
1406
1406
  ),
1407
1407
  variables: zod
1408
1408
  .object({
@@ -1528,7 +1528,7 @@ export const ThreadManagementSearchResponse = zod
1528
1528
  .string()
1529
1529
  .optional()
1530
1530
  .describe(
1531
- 'GetUpdates cursor read before this page: every later change comes from GetUpdates(updates_cursor).',
1531
+ "The caller's GetUpdates cursor as of this read: every later change comes from GetUpdates(updates_cursor).",
1532
1532
  ),
1533
1533
  })
1534
1534
  .describe(
@@ -2884,7 +2884,7 @@ export const ThreadManagementCreateResponse = zod
2884
2884
  .string()
2885
2885
  .optional()
2886
2886
  .describe(
2887
- 'GetUpdates cursor read before this thread (set by Get; Search carries it on the response).',
2887
+ "The caller's GetUpdates cursor as of this read (set by Get; Search carries it on the response).",
2888
2888
  ),
2889
2889
  variables: zod
2890
2890
  .object({
@@ -4370,7 +4370,7 @@ export const ThreadManagementSearchLeftResponse = zod.object({
4370
4370
  .string()
4371
4371
  .optional()
4372
4372
  .describe(
4373
- 'GetUpdates cursor read before this thread (set by Get; Search carries it on the response).',
4373
+ "The caller's GetUpdates cursor as of this read (set by Get; Search carries it on the response).",
4374
4374
  ),
4375
4375
  variables: zod
4376
4376
  .object({
@@ -5777,7 +5777,7 @@ export const ThreadManagementGetResponse = zod
5777
5777
  .string()
5778
5778
  .optional()
5779
5779
  .describe(
5780
- 'GetUpdates cursor read before this thread (set by Get; Search carries it on the response).',
5780
+ "The caller's GetUpdates cursor as of this read (set by Get; Search carries it on the response).",
5781
5781
  ),
5782
5782
  variables: zod
5783
5783
  .object({
@@ -5889,6 +5889,28 @@ export const ThreadManagementGetResponse = zod
5889
5889
  })
5890
5890
  .describe('Thread represents a thread (aka chat or conversation) entity.');
5891
5891
 
5892
+ /**
5893
+ * @summary Hands the conversation to the thread's bot; the operator stays in the thread.
5894
+ */
5895
+ export const ThreadManagementHandBackToBotParams = zod.object({
5896
+ thread_id: zod.string(),
5897
+ });
5898
+
5899
+ export const ThreadManagementHandBackToBotBody = zod.looseObject({});
5900
+
5901
+ export const ThreadManagementHandBackToBotResponse = zod.looseObject({});
5902
+
5903
+ /**
5904
+ * @summary Takes the conversation from the thread's bot back to the operator.
5905
+ */
5906
+ export const ThreadManagementTakeOverFromBotParams = zod.object({
5907
+ thread_id: zod.string(),
5908
+ });
5909
+
5910
+ export const ThreadManagementTakeOverFromBotBody = zod.looseObject({});
5911
+
5912
+ export const ThreadManagementTakeOverFromBotResponse = zod.looseObject({});
5913
+
5892
5914
  /**
5893
5915
  * @summary Add member to the thread.
5894
5916
  */
@@ -27,6 +27,7 @@ export const updatesGetUpdatesResponseThreadsItemDialogLastMsgSenderRoleDefault
27
27
  export const updatesGetUpdatesResponseThreadsItemDialogMembersItemRoleDefault = `ROLE_UNSPECIFIED`;
28
28
  export const updatesGetUpdatesResponseThreadsItemDialogReadStatesItemMemberRoleDefault = `ROLE_UNSPECIFIED`;
29
29
  export const updatesGetUpdatesResponseThreadsItemDialogTypeDefault = `UNKNOWN`;
30
+ export const updatesGetUpdatesResponseThreadsItemFailuresItemMemberRoleDefault = `ROLE_UNSPECIFIED`;
30
31
  export const updatesGetUpdatesResponseThreadsItemMemberChangesItemActionDefault = `THREAD_MEMBER_CHANGE_ACTION_UNSPECIFIED`;
31
32
  export const updatesGetUpdatesResponseThreadsItemMemberChangesItemByRoleDefault = `ROLE_UNSPECIFIED`;
32
33
  export const updatesGetUpdatesResponseThreadsItemMemberChangesItemMemberRoleDefault = `ROLE_UNSPECIFIED`;
@@ -1386,7 +1387,7 @@ export const UpdatesGetUpdatesResponse = zod.object({
1386
1387
  .string()
1387
1388
  .optional()
1388
1389
  .describe(
1389
- 'GetUpdates cursor read before this thread (set by Get; Search carries it on the response).',
1390
+ "The caller's GetUpdates cursor as of this read (set by Get; Search carries it on the response).",
1390
1391
  ),
1391
1392
  variables: zod
1392
1393
  .object({
@@ -1500,8 +1501,137 @@ export const UpdatesGetUpdatesResponse = zod.object({
1500
1501
  })
1501
1502
  .optional()
1502
1503
  .describe(
1503
- 'The thread itself, set when it is new to the caller (created or joined since cursor).',
1504
+ 'The thread itself, set when it is new to the caller (created or joined since cursor).\nSame model as the thread list, except last_msg and updates_cursor are never set here.',
1504
1505
  ),
1506
+ failures: zod
1507
+ .array(
1508
+ zod
1509
+ .object({
1510
+ error: zod
1511
+ .object({
1512
+ code: zod.string().optional(),
1513
+ message: zod.string().optional(),
1514
+ })
1515
+ .optional(),
1516
+ member: zod
1517
+ .object({
1518
+ contact: zod
1519
+ .object({
1520
+ app_id: zod
1521
+ .string()
1522
+ .optional()
1523
+ .describe(
1524
+ 'Identifier of the specific integration app or bot.',
1525
+ ),
1526
+ created_at: zod
1527
+ .string()
1528
+ .optional()
1529
+ .describe(
1530
+ 'Record creation timestamp (Unix Epoch in milliseconds).',
1531
+ ),
1532
+ is_bot: zod
1533
+ .boolean()
1534
+ .optional()
1535
+ .describe(
1536
+ 'Represents if usere is real person or automatic script.',
1537
+ ),
1538
+ iss: zod
1539
+ .string()
1540
+ .optional()
1541
+ .describe(
1542
+ 'Provider-specific unique identifier (Issuer ID).',
1543
+ ),
1544
+ metadata: zod
1545
+ .record(zod.string(), zod.string())
1546
+ .optional()
1547
+ .describe(
1548
+ 'Additional dynamic attributes provided by the messenger.',
1549
+ ),
1550
+ name: zod
1551
+ .string()
1552
+ .optional()
1553
+ .describe('Display name of the contact.'),
1554
+ sub: zod
1555
+ .string()
1556
+ .optional()
1557
+ .describe(
1558
+ 'Associated internal system subject/identifier.',
1559
+ ),
1560
+ type: zod
1561
+ .string()
1562
+ .optional()
1563
+ .describe(
1564
+ "Channel type (e.g., 'webchat', 'telegram').",
1565
+ ),
1566
+ updated_at: zod
1567
+ .string()
1568
+ .optional()
1569
+ .describe(
1570
+ 'Last record update timestamp (Unix Epoch in milliseconds).',
1571
+ ),
1572
+ username: zod
1573
+ .string()
1574
+ .optional()
1575
+ .describe('Technical username or handle.'),
1576
+ vias: zod
1577
+ .array(
1578
+ zod.object({
1579
+ contact_id: zod.string().optional(),
1580
+ created_at: zod.string().optional(),
1581
+ disable: zod.boolean().optional(),
1582
+ disable_reason: zod.string().optional(),
1583
+ metadata: zod.looseObject({}).optional(),
1584
+ updated_at: zod.string().optional(),
1585
+ via: zod.string().optional(),
1586
+ }),
1587
+ )
1588
+ .optional(),
1589
+ })
1590
+ .optional()
1591
+ .describe(
1592
+ 'Contact represents an external messaging identity.',
1593
+ ),
1594
+ id: zod.string().optional(),
1595
+ permissions: zod
1596
+ .object({
1597
+ can_add_members: zod.boolean().optional(),
1598
+ can_change_members_permissions: zod
1599
+ .boolean()
1600
+ .optional(),
1601
+ can_change_thread_info: zod.boolean().optional(),
1602
+ can_delete_messages: zod.boolean().optional(),
1603
+ can_remove_members: zod.boolean().optional(),
1604
+ can_send_messages: zod.boolean().optional(),
1605
+ created_at: zod.string().optional(),
1606
+ id: zod.string().optional(),
1607
+ member_id: zod.string().optional(),
1608
+ updated_at: zod.string().optional(),
1609
+ })
1610
+ .optional(),
1611
+ role: zod
1612
+ .enum([
1613
+ 'ROLE_UNSPECIFIED',
1614
+ 'ROLE_MEMBER',
1615
+ 'ROLE_ADMIN',
1616
+ 'ROLE_OWNER',
1617
+ 'ROLE_SUPERVISOR',
1618
+ ])
1619
+ .default(
1620
+ updatesGetUpdatesResponseThreadsItemFailuresItemMemberRoleDefault,
1621
+ ),
1622
+ })
1623
+ .optional()
1624
+ .describe(
1625
+ 'ThreadMember represents a thread participant\nwith optional type-specific settings.',
1626
+ ),
1627
+ message_id: zod.string().optional(),
1628
+ })
1629
+ .describe(
1630
+ 'MessageFailure is a message that could not be delivered to a member.',
1631
+ ),
1632
+ )
1633
+ .optional()
1634
+ .describe('Messages that failed to reach a member since the cursor.'),
1505
1635
  left: zod
1506
1636
  .boolean()
1507
1637
  .optional()
@@ -3341,7 +3471,9 @@ export const UpdatesGetUpdatesResponse = zod.object({
3341
3471
  type: zod.int().optional(),
3342
3472
  })
3343
3473
  .optional()
3344
- .describe('Newest message for the list preview; set with dialog.'),
3474
+ .describe(
3475
+ 'Newest message for the list preview, in place of dialog.last_msg; set with dialog.',
3476
+ ),
3345
3477
  unread_count: zod.string().optional(),
3346
3478
  }),
3347
3479
  )
@@ -46,6 +46,10 @@ export * from './queueResGroup/queueResGroup.validations';
46
46
  export * from './queueSkill/queueSkill.validations';
47
47
  export * from './sla/sla.validations';
48
48
  export * from './slaCondition/slaCondition.validations';
49
+ export * from './team/team.validations';
50
+ export * from './teamAgent/teamAgent.validations';
51
+ export * from './teamFlow/teamFlow.validations';
52
+ export * from './teamHook/teamHook.validations';
49
53
  export * from './typeExtension/typeExtension.validations';
50
54
  export * from './types';
51
55
  export * from './user/user.validations';