@webitel/api-services 26.8.90 → 26.8.92

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 (151) hide show
  1. package/package.json +1 -1
  2. package/src/api/clients/calendars/calendars.ts +3 -0
  3. package/src/api/clients/cases/cases.ts +1 -0
  4. package/src/gen/_models/contactsIMClient.ts +6 -0
  5. package/src/gen/_models/contactsInputIMClient.ts +5 -0
  6. package/src/gen/_models/contactsSearchParams.ts +4 -0
  7. package/src/gen/_models/delContactLanguagesParams.ts +1 -0
  8. package/src/gen/_models/deleteContactGroupsParams.ts +1 -0
  9. package/src/gen/_models/deleteEmailsParams.ts +1 -0
  10. package/src/gen/_models/deleteLabelsParams.ts +1 -0
  11. package/src/gen/_models/deleteManagersParams.ts +1 -0
  12. package/src/gen/_models/deletePhonesParams.ts +1 -0
  13. package/src/gen/_models/deletePhotosParams.ts +1 -0
  14. package/src/gen/_models/deleteTimezonesParams.ts +1 -0
  15. package/src/gen/_models/deleteVariablesParams.ts +1 -0
  16. package/src/gen/_models/iMClientsLinkIMContactBody.ts +17 -0
  17. package/src/gen/_models/index.ts +5 -0
  18. package/src/gen/_models/protobufNullValue.ts +8 -3
  19. package/src/gen/_models/threadManagementSearchParams.ts +10 -0
  20. package/src/gen/_models/webitelImApiGatewayV1Contact.ts +2 -0
  21. package/src/gen/_models/webitelImApiGatewayV1DeletedMessage.ts +18 -0
  22. package/src/gen/_models/webitelImApiGatewayV1SetCrmContactResponse.ts +10 -0
  23. package/src/gen/_models/webitelImApiGatewayV1Thread.ts +8 -0
  24. package/src/gen/_models/webitelImApiGatewayV1ThreadManagementSetCrmContactBody.ts +11 -0
  25. package/src/gen/_models/webitelImApiGatewayV1ThreadTags.ts +13 -0
  26. package/src/gen/_models/webitelImApiGatewayV1ThreadUpdates.ts +12 -1
  27. package/src/gen-wire/_models/contactsIMClient.ts +6 -0
  28. package/src/gen-wire/_models/contactsInputIMClient.ts +5 -0
  29. package/src/gen-wire/_models/contactsSearchParams.ts +4 -0
  30. package/src/gen-wire/_models/delContactLanguagesParams.ts +1 -0
  31. package/src/gen-wire/_models/deleteContactGroupsParams.ts +1 -0
  32. package/src/gen-wire/_models/deleteEmailsParams.ts +1 -0
  33. package/src/gen-wire/_models/deleteLabelsParams.ts +1 -0
  34. package/src/gen-wire/_models/deleteManagersParams.ts +1 -0
  35. package/src/gen-wire/_models/deletePhonesParams.ts +1 -0
  36. package/src/gen-wire/_models/deletePhotosParams.ts +1 -0
  37. package/src/gen-wire/_models/deleteTimezonesParams.ts +1 -0
  38. package/src/gen-wire/_models/deleteVariablesParams.ts +1 -0
  39. package/src/gen-wire/_models/iMClientsLinkIMContactBody.ts +17 -0
  40. package/src/gen-wire/_models/index.ts +5 -0
  41. package/src/gen-wire/_models/protobufNullValue.ts +8 -3
  42. package/src/gen-wire/_models/threadManagementSearchParams.ts +10 -0
  43. package/src/gen-wire/_models/webitelImApiGatewayV1Contact.ts +2 -0
  44. package/src/gen-wire/_models/webitelImApiGatewayV1DeletedMessage.ts +18 -0
  45. package/src/gen-wire/_models/webitelImApiGatewayV1SetCrmContactResponse.ts +10 -0
  46. package/src/gen-wire/_models/webitelImApiGatewayV1Thread.ts +8 -0
  47. package/src/gen-wire/_models/webitelImApiGatewayV1ThreadManagementSetCrmContactBody.ts +11 -0
  48. package/src/gen-wire/_models/webitelImApiGatewayV1ThreadTags.ts +13 -0
  49. package/src/gen-wire/_models/webitelImApiGatewayV1ThreadUpdates.ts +12 -1
  50. package/src/gen-wire/contact-groups/contact-groups.zod.ts +4 -1
  51. package/src/gen-wire/contacts/contacts.zod.ts +60 -0
  52. package/src/gen-wire/emails/emails.zod.ts +1 -0
  53. package/src/gen-wire/groups/groups.zod.ts +12 -0
  54. package/src/gen-wire/imclients/imclients.ts +20 -0
  55. package/src/gen-wire/imclients/imclients.zod.ts +146 -0
  56. package/src/gen-wire/index.ts +6 -0
  57. package/src/gen-wire/labels/labels.zod.ts +1 -0
  58. package/src/gen-wire/languages/languages.zod.ts +1 -0
  59. package/src/gen-wire/managers/managers.zod.ts +4 -1
  60. package/src/gen-wire/phones/phones.zod.ts +4 -1
  61. package/src/gen-wire/photos/photos.zod.ts +4 -1
  62. package/src/gen-wire/presence/presence.zod.ts +2 -2
  63. package/src/gen-wire/timezones/timezones.zod.ts +4 -1
  64. package/src/gen-wire/variables/variables.zod.ts +1 -0
  65. package/src/gen-wire/webitel-im-api-gateway-v1-contacts/webitel-im-api-gateway-v1-contacts.zod.ts +2 -0
  66. package/src/gen-wire/webitel-im-api-gateway-v1-messagehistory/webitel-im-api-gateway-v1-messagehistory.zod.ts +64 -0
  67. package/src/gen-wire/webitel-im-api-gateway-v1-threadmanagement/webitel-im-api-gateway-v1-threadmanagement.ts +20 -0
  68. package/src/gen-wire/webitel-im-api-gateway-v1-threadmanagement/webitel-im-api-gateway-v1-threadmanagement.zod.ts +253 -0
  69. package/src/gen-wire/webitel-im-api-gateway-v1-threadpreviewservice/webitel-im-api-gateway-v1-threadpreviewservice.zod.ts +3 -0
  70. package/src/gen-wire/webitel-im-api-gateway-v1-threadtagmanagement/webitel-im-api-gateway-v1-threadtagmanagement.ts +49 -0
  71. package/src/gen-wire/webitel-im-api-gateway-v1-threadtagmanagement/webitel-im-api-gateway-v1-threadtagmanagement.zod.ts +34 -0
  72. package/src/gen-wire/webitel-im-api-gateway-v1-updates/webitel-im-api-gateway-v1-updates.zod.ts +236 -2
  73. package/src/locale/en/en.ts +12 -0
  74. package/src/locale/es/es.ts +12 -0
  75. package/src/locale/kz/kz.ts +12 -0
  76. package/src/locale/pl/pl.ts +12 -0
  77. package/src/locale/ro/ro.ts +12 -0
  78. package/src/locale/ru/ru.ts +12 -0
  79. package/src/locale/uk/uk.ts +12 -0
  80. package/src/locale/uz/uz.ts +12 -0
  81. package/src/locale/vi/vi.ts +12 -0
  82. package/types/.tsbuildinfo +1 -1
  83. package/types/gen/_models/contactsIMClient.d.ts +6 -0
  84. package/types/gen/_models/contactsInputIMClient.d.ts +5 -0
  85. package/types/gen/_models/contactsSearchParams.d.ts +4 -0
  86. package/types/gen/_models/delContactLanguagesParams.d.ts +1 -0
  87. package/types/gen/_models/deleteContactGroupsParams.d.ts +1 -0
  88. package/types/gen/_models/deleteEmailsParams.d.ts +1 -0
  89. package/types/gen/_models/deleteLabelsParams.d.ts +1 -0
  90. package/types/gen/_models/deleteManagersParams.d.ts +1 -0
  91. package/types/gen/_models/deletePhonesParams.d.ts +1 -0
  92. package/types/gen/_models/deletePhotosParams.d.ts +1 -0
  93. package/types/gen/_models/deleteTimezonesParams.d.ts +1 -0
  94. package/types/gen/_models/deleteVariablesParams.d.ts +1 -0
  95. package/types/gen/_models/iMClientsLinkIMContactBody.d.ts +16 -0
  96. package/types/gen/_models/index.d.ts +5 -0
  97. package/types/gen/_models/protobufNullValue.d.ts +8 -3
  98. package/types/gen/_models/threadManagementSearchParams.d.ts +10 -0
  99. package/types/gen/_models/webitelImApiGatewayV1Contact.d.ts +2 -0
  100. package/types/gen/_models/webitelImApiGatewayV1DeletedMessage.d.ts +17 -0
  101. package/types/gen/_models/webitelImApiGatewayV1SetCrmContactResponse.d.ts +9 -0
  102. package/types/gen/_models/webitelImApiGatewayV1Thread.d.ts +8 -0
  103. package/types/gen/_models/webitelImApiGatewayV1ThreadManagementSetCrmContactBody.d.ts +10 -0
  104. package/types/gen/_models/webitelImApiGatewayV1ThreadTags.d.ts +12 -0
  105. package/types/gen/_models/webitelImApiGatewayV1ThreadUpdates.d.ts +12 -1
  106. package/types/gen-wire/_models/contactsIMClient.d.ts +6 -0
  107. package/types/gen-wire/_models/contactsInputIMClient.d.ts +5 -0
  108. package/types/gen-wire/_models/contactsSearchParams.d.ts +4 -0
  109. package/types/gen-wire/_models/delContactLanguagesParams.d.ts +1 -0
  110. package/types/gen-wire/_models/deleteContactGroupsParams.d.ts +1 -0
  111. package/types/gen-wire/_models/deleteEmailsParams.d.ts +1 -0
  112. package/types/gen-wire/_models/deleteLabelsParams.d.ts +1 -0
  113. package/types/gen-wire/_models/deleteManagersParams.d.ts +1 -0
  114. package/types/gen-wire/_models/deletePhonesParams.d.ts +1 -0
  115. package/types/gen-wire/_models/deletePhotosParams.d.ts +1 -0
  116. package/types/gen-wire/_models/deleteTimezonesParams.d.ts +1 -0
  117. package/types/gen-wire/_models/deleteVariablesParams.d.ts +1 -0
  118. package/types/gen-wire/_models/iMClientsLinkIMContactBody.d.ts +16 -0
  119. package/types/gen-wire/_models/index.d.ts +5 -0
  120. package/types/gen-wire/_models/protobufNullValue.d.ts +8 -3
  121. package/types/gen-wire/_models/threadManagementSearchParams.d.ts +10 -0
  122. package/types/gen-wire/_models/webitelImApiGatewayV1Contact.d.ts +2 -0
  123. package/types/gen-wire/_models/webitelImApiGatewayV1DeletedMessage.d.ts +17 -0
  124. package/types/gen-wire/_models/webitelImApiGatewayV1SetCrmContactResponse.d.ts +9 -0
  125. package/types/gen-wire/_models/webitelImApiGatewayV1Thread.d.ts +8 -0
  126. package/types/gen-wire/_models/webitelImApiGatewayV1ThreadManagementSetCrmContactBody.d.ts +10 -0
  127. package/types/gen-wire/_models/webitelImApiGatewayV1ThreadTags.d.ts +12 -0
  128. package/types/gen-wire/_models/webitelImApiGatewayV1ThreadUpdates.d.ts +12 -1
  129. package/types/gen-wire/contacts/contacts.zod.d.ts +11 -0
  130. package/types/gen-wire/groups/groups.zod.d.ts +2 -0
  131. package/types/gen-wire/imclients/imclients.d.ts +3 -1
  132. package/types/gen-wire/imclients/imclients.zod.d.ts +46 -0
  133. package/types/gen-wire/index.d.ts +2 -2
  134. package/types/gen-wire/webitel-im-api-gateway-v1-contacts/webitel-im-api-gateway-v1-contacts.zod.d.ts +2 -0
  135. package/types/gen-wire/webitel-im-api-gateway-v1-messagehistory/webitel-im-api-gateway-v1-messagehistory.zod.d.ts +16 -0
  136. package/types/gen-wire/webitel-im-api-gateway-v1-threadmanagement/webitel-im-api-gateway-v1-threadmanagement.d.ts +3 -1
  137. package/types/gen-wire/webitel-im-api-gateway-v1-threadmanagement/webitel-im-api-gateway-v1-threadmanagement.zod.d.ts +81 -0
  138. package/types/gen-wire/webitel-im-api-gateway-v1-threadpreviewservice/webitel-im-api-gateway-v1-threadpreviewservice.zod.d.ts +3 -0
  139. package/types/gen-wire/webitel-im-api-gateway-v1-threadtagmanagement/webitel-im-api-gateway-v1-threadtagmanagement.d.ts +6 -0
  140. package/types/gen-wire/webitel-im-api-gateway-v1-threadtagmanagement/webitel-im-api-gateway-v1-threadtagmanagement.zod.d.ts +28 -0
  141. package/types/gen-wire/webitel-im-api-gateway-v1-updates/webitel-im-api-gateway-v1-updates.zod.d.ts +76 -0
  142. package/types/locale/en/en.d.ts +12 -0
  143. package/types/locale/es/es.d.ts +12 -0
  144. package/types/locale/index.d.ts +108 -0
  145. package/types/locale/kz/kz.d.ts +12 -0
  146. package/types/locale/pl/pl.d.ts +12 -0
  147. package/types/locale/ro/ro.d.ts +12 -0
  148. package/types/locale/ru/ru.d.ts +12 -0
  149. package/types/locale/uk/uk.d.ts +12 -0
  150. package/types/locale/uz/uz.d.ts +12 -0
  151. package/types/locale/vi/vi.d.ts +12 -0
@@ -4,6 +4,7 @@
4
4
  * Webitel API
5
5
  * OpenAPI spec version: 24.04.0
6
6
  */
7
+ import type { WebitelImApiGatewayV1ChatTag } from './webitelImApiGatewayV1ChatTag';
7
8
  import type { WebitelImApiGatewayV1HistoryMessage } from './webitelImApiGatewayV1HistoryMessage';
8
9
  import type { WebitelImApiGatewayV1MemberReadState } from './webitelImApiGatewayV1MemberReadState';
9
10
  import type { WebitelImApiGatewayV1ThreadKind } from './webitelImApiGatewayV1ThreadKind';
@@ -15,8 +16,15 @@ import type { WebitelImApiGatewayV1ThreadVariables } from './webitelImApiGateway
15
16
  * Thread represents a thread (aka chat or conversation) entity.
16
17
  */
17
18
  export interface WebitelImApiGatewayV1Thread {
19
+ /** The caller's own tags on this thread. Empty if the caller hasn't tagged it. */
20
+ tags?: WebitelImApiGatewayV1ChatTag[];
18
21
  /** Thread creation timestamp (Unix time, milliseconds). */
19
22
  created_at?: string;
23
+ /**
24
+ * Webitel CRM contact selected by an operator for this thread.
25
+ * Empty if no CRM contact has been selected.
26
+ */
27
+ crm_contact_id?: string;
20
28
  /** Optional thread description. */
21
29
  description?: string;
22
30
  /** Unique thread identifier. */
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Generated by orval 🍺
3
+ * Do not edit manually.
4
+ * Webitel API
5
+ * OpenAPI spec version: 24.04.0
6
+ */
7
+
8
+ export interface WebitelImApiGatewayV1ThreadManagementSetCrmContactBody {
9
+ /** Webitel CRM contact id. Empty string clears the selection. */
10
+ crm_contact_id?: string;
11
+ }
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Generated by orval 🍺
3
+ * Do not edit manually.
4
+ * Webitel API
5
+ * OpenAPI spec version: 24.04.0
6
+ */
7
+
8
+ /**
9
+ * ThreadTags is the caller's own tags on a thread.
10
+ */
11
+ export interface WebitelImApiGatewayV1ThreadTags {
12
+ items?: string[];
13
+ }
@@ -4,15 +4,26 @@
4
4
  * Webitel API
5
5
  * OpenAPI spec version: 24.04.0
6
6
  */
7
+ import type { WebitelImApiGatewayV1DeletedMessage } from './webitelImApiGatewayV1DeletedMessage';
7
8
  import type { WebitelImApiGatewayV1MemberReadState } from './webitelImApiGatewayV1MemberReadState';
8
9
  import type { WebitelImApiGatewayV1Thread } from './webitelImApiGatewayV1Thread';
9
10
  import type { WebitelImApiGatewayV1ThreadMemberChange } from './webitelImApiGatewayV1ThreadMemberChange';
11
+ import type { WebitelImApiGatewayV1ThreadTags } from './webitelImApiGatewayV1ThreadTags';
10
12
  import type { WebitelImApiGatewayV1UpdatedMessage } from './webitelImApiGatewayV1UpdatedMessage';
11
13
 
12
14
  export interface WebitelImApiGatewayV1ThreadUpdates {
15
+ /**
16
+ * The caller's current tags on the thread, set only when they changed since cursor; replace the
17
+ * cached ones. Absent means unchanged, empty items means every tag was removed.
18
+ */
19
+ tags?: WebitelImApiGatewayV1ThreadTags;
20
+ /** Ids of deleted_messages, kept for older clients; prefer deleted_messages. */
13
21
  deleted_message_ids?: string[];
22
+ /** Messages deleted since cursor, with when and who deleted them; drop them by id. */
23
+ deleted_messages?: WebitelImApiGatewayV1DeletedMessage[];
14
24
  /**
15
- * The thread itself, set when it is new to the caller (created or joined since cursor).
25
+ * The thread itself, set when it is new to the caller (created or joined since cursor)
26
+ * or when its attributes changed since cursor (e.g. crm_contact_id); replace the cached thread.
16
27
  * Same model as the thread list, except last_msg and updates_cursor are never set here.
17
28
  */
18
29
  dialog?: WebitelImApiGatewayV1Thread;
@@ -18,7 +18,10 @@ export const DeleteContactGroupsQueryParams = zod.object({
18
18
  .array(zod.string())
19
19
  .optional()
20
20
  .describe('Fields to be retrieved as a result.'),
21
- etag: zod.array(zod.string()).describe('Set of unique ID(s) to remove.'),
21
+ etag: zod
22
+ .array(zod.string())
23
+ .min(1)
24
+ .describe('Set of unique ID(s) to remove.'),
22
25
  });
23
26
 
24
27
  export const DeleteContactGroupsResponse = zod
@@ -569,6 +569,12 @@ export const SearchContactsResponse = zod
569
569
  .describe(
570
570
  'The unique ID of the association. Never changes.',
571
571
  ),
572
+ im_contact_id: zod
573
+ .string()
574
+ .optional()
575
+ .describe(
576
+ 'IM-stack contact ID (UUID) from the im-contact-service.\nMutually exclusive with .user: a link has either a legacy\nchat client (.user) or an IM-stack contact, never both.',
577
+ ),
572
578
  protocol: zod
573
579
  .string()
574
580
  .optional()
@@ -1477,6 +1483,12 @@ export const CreateContactBody = zod
1477
1483
  .string()
1478
1484
  .optional()
1479
1485
  .describe('App (Text-Gateway) used to connect the IM client.'),
1486
+ im_contact_id: zod
1487
+ .string()
1488
+ .optional()
1489
+ .describe(
1490
+ 'IM-stack contact ID (UUID) from the im-contact-service.\nExactly one of .external_user or .im_contact_id must be set.',
1491
+ ),
1480
1492
  protocol: zod.string().optional(),
1481
1493
  via: zod
1482
1494
  .string()
@@ -2087,6 +2099,12 @@ export const CreateContactResponse = zod
2087
2099
  .string()
2088
2100
  .optional()
2089
2101
  .describe('The unique ID of the association. Never changes.'),
2102
+ im_contact_id: zod
2103
+ .string()
2104
+ .optional()
2105
+ .describe(
2106
+ 'IM-stack contact ID (UUID) from the im-contact-service.\nMutually exclusive with .user: a link has either a legacy\nchat client (.user) or an IM-stack contact, never both.',
2107
+ ),
2090
2108
  protocol: zod
2091
2109
  .string()
2092
2110
  .optional()
@@ -2943,6 +2961,12 @@ export const CreateContactsBodyItem = zod
2943
2961
  .string()
2944
2962
  .optional()
2945
2963
  .describe('App (Text-Gateway) used to connect the IM client.'),
2964
+ im_contact_id: zod
2965
+ .string()
2966
+ .optional()
2967
+ .describe(
2968
+ 'IM-stack contact ID (UUID) from the im-contact-service.\nExactly one of .external_user or .im_contact_id must be set.',
2969
+ ),
2946
2970
  protocol: zod.string().optional(),
2947
2971
  via: zod
2948
2972
  .string()
@@ -3584,6 +3608,12 @@ export const CreateContactsResponse = zod
3584
3608
  .describe(
3585
3609
  'The unique ID of the association. Never changes.',
3586
3610
  ),
3611
+ im_contact_id: zod
3612
+ .string()
3613
+ .optional()
3614
+ .describe(
3615
+ 'IM-stack contact ID (UUID) from the im-contact-service.\nMutually exclusive with .user: a link has either a legacy\nchat client (.user) or an IM-stack contact, never both.',
3616
+ ),
3587
3617
  protocol: zod
3588
3618
  .string()
3589
3619
  .optional()
@@ -4500,6 +4530,12 @@ export const CreateContactsResponse = zod
4500
4530
  .describe(
4501
4531
  'App (Text-Gateway) used to connect the IM client.',
4502
4532
  ),
4533
+ im_contact_id: zod
4534
+ .string()
4535
+ .optional()
4536
+ .describe(
4537
+ 'IM-stack contact ID (UUID) from the im-contact-service.\nExactly one of .external_user or .im_contact_id must be set.',
4538
+ ),
4503
4539
  protocol: zod.string().optional(),
4504
4540
  via: zod
4505
4541
  .string()
@@ -5170,6 +5206,12 @@ export const DeleteContactResponse = zod
5170
5206
  .string()
5171
5207
  .optional()
5172
5208
  .describe('The unique ID of the association. Never changes.'),
5209
+ im_contact_id: zod
5210
+ .string()
5211
+ .optional()
5212
+ .describe(
5213
+ 'IM-stack contact ID (UUID) from the im-contact-service.\nMutually exclusive with .user: a link has either a legacy\nchat client (.user) or an IM-stack contact, never both.',
5214
+ ),
5173
5215
  protocol: zod
5174
5216
  .string()
5175
5217
  .optional()
@@ -6318,6 +6360,12 @@ export const LocateContactResponse = zod
6318
6360
  .string()
6319
6361
  .optional()
6320
6362
  .describe('The unique ID of the association. Never changes.'),
6363
+ im_contact_id: zod
6364
+ .string()
6365
+ .optional()
6366
+ .describe(
6367
+ 'IM-stack contact ID (UUID) from the im-contact-service.\nMutually exclusive with .user: a link has either a legacy\nchat client (.user) or an IM-stack contact, never both.',
6368
+ ),
6321
6369
  protocol: zod
6322
6370
  .string()
6323
6371
  .optional()
@@ -7167,6 +7215,12 @@ export const UpdateContactBody = zod.object({
7167
7215
  .string()
7168
7216
  .optional()
7169
7217
  .describe('App (Text-Gateway) used to connect the IM client.'),
7218
+ im_contact_id: zod
7219
+ .string()
7220
+ .optional()
7221
+ .describe(
7222
+ 'IM-stack contact ID (UUID) from the im-contact-service.\nExactly one of .external_user or .im_contact_id must be set.',
7223
+ ),
7170
7224
  protocol: zod.string().optional(),
7171
7225
  via: zod
7172
7226
  .string()
@@ -7771,6 +7825,12 @@ export const UpdateContactResponse = zod
7771
7825
  .string()
7772
7826
  .optional()
7773
7827
  .describe('The unique ID of the association. Never changes.'),
7828
+ im_contact_id: zod
7829
+ .string()
7830
+ .optional()
7831
+ .describe(
7832
+ 'IM-stack contact ID (UUID) from the im-contact-service.\nMutually exclusive with .user: a link has either a legacy\nchat client (.user) or an IM-stack contact, never both.',
7833
+ ),
7774
7834
  protocol: zod
7775
7835
  .string()
7776
7836
  .optional()
@@ -22,6 +22,7 @@ export const DeleteEmailsQueryParams = zod.object({
22
22
  .describe('Fields to be retrieved as a result.'),
23
23
  etag: zod
24
24
  .array(zod.string().regex(deleteEmailsQueryEtagItemRegExp))
25
+ .min(1)
25
26
  .describe('Set of unique ID(s) to remove.'),
26
27
  });
27
28
 
@@ -791,6 +791,12 @@ export const AddContactsToGroupsResponse = zod
791
791
  .describe(
792
792
  'The unique ID of the association. Never changes.',
793
793
  ),
794
+ im_contact_id: zod
795
+ .string()
796
+ .optional()
797
+ .describe(
798
+ 'IM-stack contact ID (UUID) from the im-contact-service.\nMutually exclusive with .user: a link has either a legacy\nchat client (.user) or an IM-stack contact, never both.',
799
+ ),
794
800
  protocol: zod
795
801
  .string()
796
802
  .optional()
@@ -2002,6 +2008,12 @@ export const RemoveContactsFromGroupResponse = zod
2002
2008
  .describe(
2003
2009
  'The unique ID of the association. Never changes.',
2004
2010
  ),
2011
+ im_contact_id: zod
2012
+ .string()
2013
+ .optional()
2014
+ .describe(
2015
+ 'IM-stack contact ID (UUID) from the im-contact-service.\nMutually exclusive with .user: a link has either a legacy\nchat client (.user) or an IM-stack contact, never both.',
2016
+ ),
2005
2017
  protocol: zod
2006
2018
  .string()
2007
2019
  .optional()
@@ -10,7 +10,9 @@ import axios from '../../api/axios/genClient';
10
10
 
11
11
  import type {
12
12
  ContactsEmptyResponse,
13
+ ContactsIMClient,
13
14
  ContactsIMClientList,
15
+ IMClientsLinkIMContactBody,
14
16
  ListIMClientsParams,
15
17
  } from '../_models';
16
18
 
@@ -38,6 +40,22 @@ export const // --- title start
38
40
  },
39
41
  });
40
42
  };
43
+ /**
44
+ * @summary Link an IM-stack contact (im-contact-service UUID) with the Contact.
45
+ If the IM contact is already linked to another Contact
46
+ within the domain, the link is reassigned to this Contact.
47
+ */
48
+ const linkIMContact = (
49
+ contactId: string,
50
+ iMClientsLinkIMContactBody: IMClientsLinkIMContactBody,
51
+ options?: AxiosRequestConfig,
52
+ ): Promise<AxiosResponse<ContactsIMClient>> => {
53
+ return axiosInstance.post(
54
+ `/contacts/${contactId}/imclients`,
55
+ iMClientsLinkIMContactBody,
56
+ options,
57
+ );
58
+ };
41
59
  const deleteIMClient = (
42
60
  contactId: string,
43
61
  id: string,
@@ -52,10 +70,12 @@ export const // --- title start
52
70
  // --- footer start
53
71
  return {
54
72
  listIMClients,
73
+ linkIMContact,
55
74
  deleteIMClient,
56
75
  };
57
76
  };
58
77
  export type ListIMClientsResult = AxiosResponse<ContactsIMClientList>;
78
+ export type LinkIMContactResult = AxiosResponse<ContactsIMClient>;
59
79
  export type DeleteIMClientResult = AxiosResponse<ContactsEmptyResponse>;
60
80
 
61
81
  // --- footer end
@@ -98,6 +98,12 @@ export const ListIMClientsResponse = zod.object({
98
98
  .string()
99
99
  .optional()
100
100
  .describe('The unique ID of the association. Never changes.'),
101
+ im_contact_id: zod
102
+ .string()
103
+ .optional()
104
+ .describe(
105
+ 'IM-stack contact ID (UUID) from the im-contact-service.\nMutually exclusive with .user: a link has either a legacy\nchat client (.user) or an IM-stack contact, never both.',
106
+ ),
101
107
  protocol: zod
102
108
  .string()
103
109
  .optional()
@@ -163,6 +169,146 @@ export const ListIMClientsResponse = zod.object({
163
169
  page: zod.int().optional().describe('The page number of the partial result.'),
164
170
  });
165
171
 
172
+ /**
173
+ * @summary Link an IM-stack contact (im-contact-service UUID) with the Contact.
174
+ If the IM contact is already linked to another Contact
175
+ within the domain, the link is reassigned to this Contact.
176
+ */
177
+ export const LinkIMContactParams = zod.object({
178
+ contact_id: zod.string().describe('Link contact ID (or etag).'),
179
+ });
180
+
181
+ export const LinkIMContactBody = zod.object({
182
+ gateway_id: zod
183
+ .string()
184
+ .optional()
185
+ .describe('App (gateway) the IM contact is connected through. Optional.'),
186
+ im_contact_id: zod
187
+ .string()
188
+ .optional()
189
+ .describe(
190
+ 'IM-stack contact ID (UUID) from the im-contact-service. Required.',
191
+ ),
192
+ protocol: zod
193
+ .string()
194
+ .optional()
195
+ .describe(
196
+ 'Protocol (provider type) of the IM conversation, e.g. "telegram". Required.',
197
+ ),
198
+ via: zod
199
+ .string()
200
+ .optional()
201
+ .describe(
202
+ '[Via] App(-specific) peer(-id) to connect[from] the IM contact. Optional.',
203
+ ),
204
+ });
205
+
206
+ export const LinkIMContactResponse = zod
207
+ .object({
208
+ app: zod
209
+ .object({
210
+ id: zod.string().optional().describe('Reference Object unique ID.'),
211
+ name: zod
212
+ .string()
213
+ .optional()
214
+ .describe('Reference Object display name.'),
215
+ type: zod
216
+ .string()
217
+ .optional()
218
+ .describe('Reference Object well-known type.'),
219
+ })
220
+ .optional()
221
+ .describe(
222
+ 'App (Text-Gateway) used to connect the IM client.\nId will be internal id of gateway.\nName will be name of the gateway.',
223
+ ),
224
+ created_at: zod
225
+ .string()
226
+ .optional()
227
+ .describe('The user who created this Field.'),
228
+ created_by: zod
229
+ .object({
230
+ id: zod.string().optional().describe('Reference Object unique ID.'),
231
+ name: zod
232
+ .string()
233
+ .optional()
234
+ .describe('Reference Object display name.'),
235
+ type: zod
236
+ .string()
237
+ .optional()
238
+ .describe('Reference Object well-known type.'),
239
+ })
240
+ .optional()
241
+ .describe('Timestamp(milli) of the Field creation.'),
242
+ etag: zod
243
+ .string()
244
+ .optional()
245
+ .describe(
246
+ 'Unique ID of the latest version of the update.\nThis ID changes after any update to the underlying value(s).',
247
+ ),
248
+ external_id: zod.string().optional().describe('External user id.'),
249
+ id: zod
250
+ .string()
251
+ .optional()
252
+ .describe('The unique ID of the association. Never changes.'),
253
+ im_contact_id: zod
254
+ .string()
255
+ .optional()
256
+ .describe(
257
+ 'IM-stack contact ID (UUID) from the im-contact-service.\nMutually exclusive with .user: a link has either a legacy\nchat client (.user) or an IM-stack contact, never both.',
258
+ ),
259
+ protocol: zod
260
+ .string()
261
+ .optional()
262
+ .describe('Protocol used to connect the IM client.'),
263
+ updated_at: zod
264
+ .string()
265
+ .optional()
266
+ .describe(
267
+ 'Timestamp(milli) of the last Field update.\nTake part in Etag generation.',
268
+ ),
269
+ updated_by: zod
270
+ .object({
271
+ id: zod.string().optional().describe('Reference Object unique ID.'),
272
+ name: zod
273
+ .string()
274
+ .optional()
275
+ .describe('Reference Object display name.'),
276
+ type: zod
277
+ .string()
278
+ .optional()
279
+ .describe('Reference Object well-known type.'),
280
+ })
281
+ .optional()
282
+ .describe('The user who performed last Update.'),
283
+ user: zod
284
+ .object({
285
+ id: zod.string().optional().describe('Reference Object unique ID.'),
286
+ name: zod
287
+ .string()
288
+ .optional()
289
+ .describe('Reference Object display name.'),
290
+ type: zod
291
+ .string()
292
+ .optional()
293
+ .describe('Reference Object well-known type.'),
294
+ })
295
+ .optional()
296
+ .describe(
297
+ 'External user which contacted to us.\nId will be from external service.\nName will be from external service.',
298
+ ),
299
+ ver: zod
300
+ .int()
301
+ .optional()
302
+ .describe('Version of the latest update. Numeric sequence.'),
303
+ via: zod
304
+ .string()
305
+ .optional()
306
+ .describe(
307
+ '[Via] App(-specific) peer(-id) to connect[from] the IM client.',
308
+ ),
309
+ })
310
+ .describe("A contact's [I]nstant[M]essaging client.");
311
+
166
312
  export const DeleteIMClientParams = zod.object({
167
313
  contact_id: zod.string(),
168
314
  id: zod.string(),
@@ -1252,6 +1252,9 @@ export * from './imclients/imclients';
1252
1252
  export {
1253
1253
  DeleteIMClientParams,
1254
1254
  DeleteIMClientResponse,
1255
+ LinkIMContactBody,
1256
+ LinkIMContactParams,
1257
+ LinkIMContactResponse,
1255
1258
  ListIMClientsParams,
1256
1259
  ListIMClientsQueryParams,
1257
1260
  ListIMClientsResponse,
@@ -2742,6 +2745,9 @@ export {
2742
2745
  ThreadManagementSearchResponse,
2743
2746
  ThreadManagementSearchVariablesQueryParams,
2744
2747
  ThreadManagementSearchVariablesResponse,
2748
+ ThreadManagementSetCrmContactBody,
2749
+ ThreadManagementSetCrmContactParams,
2750
+ ThreadManagementSetCrmContactResponse,
2745
2751
  ThreadManagementSetVariablesBody,
2746
2752
  ThreadManagementSetVariablesParams,
2747
2753
  ThreadManagementSetVariablesResponse,
@@ -86,6 +86,7 @@ export const DeleteLabelsQueryParams = zod.object({
86
86
  .describe('Fields to be retrieved into result.'),
87
87
  etag: zod
88
88
  .array(zod.string().regex(deleteLabelsQueryEtagItemRegExp))
89
+ .min(1)
89
90
  .describe('Set of unique label(s).etag identifiers.'),
90
91
  });
91
92
 
@@ -20,6 +20,7 @@ export const DelContactLanguagesQueryParams = zod.object({
20
20
  .describe('Fields to be retrieved as a result.'),
21
21
  etag: zod
22
22
  .array(zod.string())
23
+ .min(1)
23
24
  .describe('Set of unique language{etag} association(s) to remove.'),
24
25
  });
25
26
 
@@ -18,7 +18,10 @@ export const DeleteManagersQueryParams = zod.object({
18
18
  .array(zod.string())
19
19
  .optional()
20
20
  .describe('Fields to be retrieved as a result.'),
21
- etag: zod.array(zod.string()).describe('Set of unique ID(s) to remove.'),
21
+ etag: zod
22
+ .array(zod.string())
23
+ .min(1)
24
+ .describe('Set of unique ID(s) to remove.'),
22
25
  });
23
26
 
24
27
  export const DeleteManagersResponseItem = zod
@@ -18,7 +18,10 @@ export const DeletePhonesQueryParams = zod.object({
18
18
  .array(zod.string())
19
19
  .optional()
20
20
  .describe('Fields to be retrieved into result.'),
21
- etag: zod.array(zod.string()).describe('Set of linked ID(s) to be removed.'),
21
+ etag: zod
22
+ .array(zod.string())
23
+ .min(1)
24
+ .describe('Set of linked ID(s) to be removed.'),
22
25
  });
23
26
 
24
27
  export const DeletePhonesResponse = zod
@@ -18,7 +18,10 @@ export const DeletePhotosQueryParams = zod.object({
18
18
  .array(zod.string())
19
19
  .optional()
20
20
  .describe('Fields to be retrieved into result of changes.'),
21
- etag: zod.array(zod.string()).describe('Set of linked ID(s) to be removed.'),
21
+ etag: zod
22
+ .array(zod.string())
23
+ .min(1)
24
+ .describe('Set of linked ID(s) to be removed.'),
22
25
  });
23
26
 
24
27
  export const DeletePhotosResponse = zod
@@ -37,7 +37,7 @@ export const SetStatus2Response = zod.object({
37
37
  .array(zod.unknown())
38
38
  .optional()
39
39
  .describe(
40
- '// FIXME: well-known types ?\r\n repeated Dialog call = 9;\r\n repeated Sipreg sip = 9;\r\n repeated Websock wss = 9;',
40
+ '// FIXME: well-known types ?\n repeated Dialog call = 9;\n repeated Sipreg sip = 9;\n repeated Websock wss = 9;',
41
41
  ),
42
42
  priority: zod.int().optional(),
43
43
  sequence: zod.string().optional(),
@@ -79,7 +79,7 @@ export const SetStatusResponse = zod.object({
79
79
  .array(zod.unknown())
80
80
  .optional()
81
81
  .describe(
82
- '// FIXME: well-known types ?\r\n repeated Dialog call = 9;\r\n repeated Sipreg sip = 9;\r\n repeated Websock wss = 9;',
82
+ '// FIXME: well-known types ?\n repeated Dialog call = 9;\n repeated Sipreg sip = 9;\n repeated Websock wss = 9;',
83
83
  ),
84
84
  priority: zod.int().optional(),
85
85
  sequence: zod.string().optional(),
@@ -18,7 +18,10 @@ export const DeleteTimezonesQueryParams = zod.object({
18
18
  .array(zod.string())
19
19
  .optional()
20
20
  .describe('Fields to be retrieved as a result.'),
21
- etag: zod.array(zod.string()).describe('Set of unique ID(s) to remove.'),
21
+ etag: zod
22
+ .array(zod.string())
23
+ .min(1)
24
+ .describe('Set of unique ID(s) to remove.'),
22
25
  });
23
26
 
24
27
  export const DeleteTimezonesResponse = zod
@@ -22,6 +22,7 @@ export const DeleteVariablesQueryParams = zod.object({
22
22
  .describe('Fields to be retrieved as a result.'),
23
23
  etag: zod
24
24
  .array(zod.string().regex(deleteVariablesQueryEtagItemRegExp))
25
+ .min(1)
25
26
  .describe('Set of unique ID(s) to remove.'),
26
27
  });
27
28
 
@@ -38,6 +38,7 @@ export const ContactsSearchQueryParams = zod.object({
38
38
  .optional()
39
39
  .describe('Filter by internal system subjects/user IDs.'),
40
40
  only_bots: zod.boolean().optional(),
41
+ ids: zod.array(zod.string()).optional().describe('Filter by contact IDs.'),
41
42
  });
42
43
 
43
44
  export const ContactsSearchResponse = zod
@@ -56,6 +57,7 @@ export const ContactsSearchResponse = zod
56
57
  .describe(
57
58
  'Record creation timestamp (Unix Epoch in milliseconds).',
58
59
  ),
60
+ id: zod.string().optional().describe('Unique contact identifier.'),
59
61
  is_bot: zod
60
62
  .boolean()
61
63
  .optional()