@webitel/api-services 26.8.91 → 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 (131) hide show
  1. package/package.json +1 -1
  2. package/src/api/clients/cases/cases.ts +1 -0
  3. package/src/gen/_models/contactsIMClient.ts +6 -0
  4. package/src/gen/_models/contactsInputIMClient.ts +5 -0
  5. package/src/gen/_models/contactsSearchParams.ts +4 -0
  6. package/src/gen/_models/delContactLanguagesParams.ts +1 -0
  7. package/src/gen/_models/deleteContactGroupsParams.ts +1 -0
  8. package/src/gen/_models/deleteEmailsParams.ts +1 -0
  9. package/src/gen/_models/deleteLabelsParams.ts +1 -0
  10. package/src/gen/_models/deleteManagersParams.ts +1 -0
  11. package/src/gen/_models/deletePhonesParams.ts +1 -0
  12. package/src/gen/_models/deletePhotosParams.ts +1 -0
  13. package/src/gen/_models/deleteTimezonesParams.ts +1 -0
  14. package/src/gen/_models/deleteVariablesParams.ts +1 -0
  15. package/src/gen/_models/iMClientsLinkIMContactBody.ts +17 -0
  16. package/src/gen/_models/index.ts +5 -0
  17. package/src/gen/_models/protobufNullValue.ts +8 -3
  18. package/src/gen/_models/threadManagementSearchParams.ts +10 -0
  19. package/src/gen/_models/webitelImApiGatewayV1Contact.ts +2 -0
  20. package/src/gen/_models/webitelImApiGatewayV1DeletedMessage.ts +18 -0
  21. package/src/gen/_models/webitelImApiGatewayV1SetCrmContactResponse.ts +10 -0
  22. package/src/gen/_models/webitelImApiGatewayV1Thread.ts +8 -0
  23. package/src/gen/_models/webitelImApiGatewayV1ThreadManagementSetCrmContactBody.ts +11 -0
  24. package/src/gen/_models/webitelImApiGatewayV1ThreadTags.ts +13 -0
  25. package/src/gen/_models/webitelImApiGatewayV1ThreadUpdates.ts +12 -1
  26. package/src/gen-wire/_models/contactsIMClient.ts +6 -0
  27. package/src/gen-wire/_models/contactsInputIMClient.ts +5 -0
  28. package/src/gen-wire/_models/contactsSearchParams.ts +4 -0
  29. package/src/gen-wire/_models/delContactLanguagesParams.ts +1 -0
  30. package/src/gen-wire/_models/deleteContactGroupsParams.ts +1 -0
  31. package/src/gen-wire/_models/deleteEmailsParams.ts +1 -0
  32. package/src/gen-wire/_models/deleteLabelsParams.ts +1 -0
  33. package/src/gen-wire/_models/deleteManagersParams.ts +1 -0
  34. package/src/gen-wire/_models/deletePhonesParams.ts +1 -0
  35. package/src/gen-wire/_models/deletePhotosParams.ts +1 -0
  36. package/src/gen-wire/_models/deleteTimezonesParams.ts +1 -0
  37. package/src/gen-wire/_models/deleteVariablesParams.ts +1 -0
  38. package/src/gen-wire/_models/iMClientsLinkIMContactBody.ts +17 -0
  39. package/src/gen-wire/_models/index.ts +5 -0
  40. package/src/gen-wire/_models/protobufNullValue.ts +8 -3
  41. package/src/gen-wire/_models/threadManagementSearchParams.ts +10 -0
  42. package/src/gen-wire/_models/webitelImApiGatewayV1Contact.ts +2 -0
  43. package/src/gen-wire/_models/webitelImApiGatewayV1DeletedMessage.ts +18 -0
  44. package/src/gen-wire/_models/webitelImApiGatewayV1SetCrmContactResponse.ts +10 -0
  45. package/src/gen-wire/_models/webitelImApiGatewayV1Thread.ts +8 -0
  46. package/src/gen-wire/_models/webitelImApiGatewayV1ThreadManagementSetCrmContactBody.ts +11 -0
  47. package/src/gen-wire/_models/webitelImApiGatewayV1ThreadTags.ts +13 -0
  48. package/src/gen-wire/_models/webitelImApiGatewayV1ThreadUpdates.ts +12 -1
  49. package/src/gen-wire/contact-groups/contact-groups.zod.ts +4 -1
  50. package/src/gen-wire/contacts/contacts.zod.ts +60 -0
  51. package/src/gen-wire/emails/emails.zod.ts +1 -0
  52. package/src/gen-wire/groups/groups.zod.ts +12 -0
  53. package/src/gen-wire/imclients/imclients.ts +20 -0
  54. package/src/gen-wire/imclients/imclients.zod.ts +146 -0
  55. package/src/gen-wire/index.ts +6 -0
  56. package/src/gen-wire/labels/labels.zod.ts +1 -0
  57. package/src/gen-wire/languages/languages.zod.ts +1 -0
  58. package/src/gen-wire/managers/managers.zod.ts +4 -1
  59. package/src/gen-wire/phones/phones.zod.ts +4 -1
  60. package/src/gen-wire/photos/photos.zod.ts +4 -1
  61. package/src/gen-wire/presence/presence.zod.ts +2 -2
  62. package/src/gen-wire/timezones/timezones.zod.ts +4 -1
  63. package/src/gen-wire/variables/variables.zod.ts +1 -0
  64. package/src/gen-wire/webitel-im-api-gateway-v1-contacts/webitel-im-api-gateway-v1-contacts.zod.ts +2 -0
  65. package/src/gen-wire/webitel-im-api-gateway-v1-messagehistory/webitel-im-api-gateway-v1-messagehistory.zod.ts +64 -0
  66. package/src/gen-wire/webitel-im-api-gateway-v1-threadmanagement/webitel-im-api-gateway-v1-threadmanagement.ts +20 -0
  67. package/src/gen-wire/webitel-im-api-gateway-v1-threadmanagement/webitel-im-api-gateway-v1-threadmanagement.zod.ts +253 -0
  68. package/src/gen-wire/webitel-im-api-gateway-v1-threadpreviewservice/webitel-im-api-gateway-v1-threadpreviewservice.zod.ts +3 -0
  69. package/src/gen-wire/webitel-im-api-gateway-v1-threadtagmanagement/webitel-im-api-gateway-v1-threadtagmanagement.ts +49 -0
  70. package/src/gen-wire/webitel-im-api-gateway-v1-threadtagmanagement/webitel-im-api-gateway-v1-threadtagmanagement.zod.ts +34 -0
  71. package/src/gen-wire/webitel-im-api-gateway-v1-updates/webitel-im-api-gateway-v1-updates.zod.ts +236 -2
  72. package/types/.tsbuildinfo +1 -1
  73. package/types/gen/_models/contactsIMClient.d.ts +6 -0
  74. package/types/gen/_models/contactsInputIMClient.d.ts +5 -0
  75. package/types/gen/_models/contactsSearchParams.d.ts +4 -0
  76. package/types/gen/_models/delContactLanguagesParams.d.ts +1 -0
  77. package/types/gen/_models/deleteContactGroupsParams.d.ts +1 -0
  78. package/types/gen/_models/deleteEmailsParams.d.ts +1 -0
  79. package/types/gen/_models/deleteLabelsParams.d.ts +1 -0
  80. package/types/gen/_models/deleteManagersParams.d.ts +1 -0
  81. package/types/gen/_models/deletePhonesParams.d.ts +1 -0
  82. package/types/gen/_models/deletePhotosParams.d.ts +1 -0
  83. package/types/gen/_models/deleteTimezonesParams.d.ts +1 -0
  84. package/types/gen/_models/deleteVariablesParams.d.ts +1 -0
  85. package/types/gen/_models/iMClientsLinkIMContactBody.d.ts +16 -0
  86. package/types/gen/_models/index.d.ts +5 -0
  87. package/types/gen/_models/protobufNullValue.d.ts +8 -3
  88. package/types/gen/_models/threadManagementSearchParams.d.ts +10 -0
  89. package/types/gen/_models/webitelImApiGatewayV1Contact.d.ts +2 -0
  90. package/types/gen/_models/webitelImApiGatewayV1DeletedMessage.d.ts +17 -0
  91. package/types/gen/_models/webitelImApiGatewayV1SetCrmContactResponse.d.ts +9 -0
  92. package/types/gen/_models/webitelImApiGatewayV1Thread.d.ts +8 -0
  93. package/types/gen/_models/webitelImApiGatewayV1ThreadManagementSetCrmContactBody.d.ts +10 -0
  94. package/types/gen/_models/webitelImApiGatewayV1ThreadTags.d.ts +12 -0
  95. package/types/gen/_models/webitelImApiGatewayV1ThreadUpdates.d.ts +12 -1
  96. package/types/gen-wire/_models/contactsIMClient.d.ts +6 -0
  97. package/types/gen-wire/_models/contactsInputIMClient.d.ts +5 -0
  98. package/types/gen-wire/_models/contactsSearchParams.d.ts +4 -0
  99. package/types/gen-wire/_models/delContactLanguagesParams.d.ts +1 -0
  100. package/types/gen-wire/_models/deleteContactGroupsParams.d.ts +1 -0
  101. package/types/gen-wire/_models/deleteEmailsParams.d.ts +1 -0
  102. package/types/gen-wire/_models/deleteLabelsParams.d.ts +1 -0
  103. package/types/gen-wire/_models/deleteManagersParams.d.ts +1 -0
  104. package/types/gen-wire/_models/deletePhonesParams.d.ts +1 -0
  105. package/types/gen-wire/_models/deletePhotosParams.d.ts +1 -0
  106. package/types/gen-wire/_models/deleteTimezonesParams.d.ts +1 -0
  107. package/types/gen-wire/_models/deleteVariablesParams.d.ts +1 -0
  108. package/types/gen-wire/_models/iMClientsLinkIMContactBody.d.ts +16 -0
  109. package/types/gen-wire/_models/index.d.ts +5 -0
  110. package/types/gen-wire/_models/protobufNullValue.d.ts +8 -3
  111. package/types/gen-wire/_models/threadManagementSearchParams.d.ts +10 -0
  112. package/types/gen-wire/_models/webitelImApiGatewayV1Contact.d.ts +2 -0
  113. package/types/gen-wire/_models/webitelImApiGatewayV1DeletedMessage.d.ts +17 -0
  114. package/types/gen-wire/_models/webitelImApiGatewayV1SetCrmContactResponse.d.ts +9 -0
  115. package/types/gen-wire/_models/webitelImApiGatewayV1Thread.d.ts +8 -0
  116. package/types/gen-wire/_models/webitelImApiGatewayV1ThreadManagementSetCrmContactBody.d.ts +10 -0
  117. package/types/gen-wire/_models/webitelImApiGatewayV1ThreadTags.d.ts +12 -0
  118. package/types/gen-wire/_models/webitelImApiGatewayV1ThreadUpdates.d.ts +12 -1
  119. package/types/gen-wire/contacts/contacts.zod.d.ts +11 -0
  120. package/types/gen-wire/groups/groups.zod.d.ts +2 -0
  121. package/types/gen-wire/imclients/imclients.d.ts +3 -1
  122. package/types/gen-wire/imclients/imclients.zod.d.ts +46 -0
  123. package/types/gen-wire/index.d.ts +2 -2
  124. package/types/gen-wire/webitel-im-api-gateway-v1-contacts/webitel-im-api-gateway-v1-contacts.zod.d.ts +2 -0
  125. package/types/gen-wire/webitel-im-api-gateway-v1-messagehistory/webitel-im-api-gateway-v1-messagehistory.zod.d.ts +16 -0
  126. package/types/gen-wire/webitel-im-api-gateway-v1-threadmanagement/webitel-im-api-gateway-v1-threadmanagement.d.ts +3 -1
  127. package/types/gen-wire/webitel-im-api-gateway-v1-threadmanagement/webitel-im-api-gateway-v1-threadmanagement.zod.d.ts +81 -0
  128. package/types/gen-wire/webitel-im-api-gateway-v1-threadpreviewservice/webitel-im-api-gateway-v1-threadpreviewservice.zod.d.ts +3 -0
  129. package/types/gen-wire/webitel-im-api-gateway-v1-threadtagmanagement/webitel-im-api-gateway-v1-threadtagmanagement.d.ts +6 -0
  130. package/types/gen-wire/webitel-im-api-gateway-v1-threadtagmanagement/webitel-im-api-gateway-v1-threadtagmanagement.zod.d.ts +28 -0
  131. package/types/gen-wire/webitel-im-api-gateway-v1-updates/webitel-im-api-gateway-v1-updates.zod.d.ts +76 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webitel/api-services",
3
- "version": "26.8.91",
3
+ "version": "26.8.92",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
@@ -303,6 +303,7 @@ const addCase = async ({ itemInstance }: AddItemParams) => {
303
303
  const response = await casesService.createCase(item);
304
304
  return applyTransform(response.data, [
305
305
  snakeToCamel(),
306
+ transformSourceType,
306
307
  ]);
307
308
  } catch (err) {
308
309
  throw applyTransform(err, [
@@ -29,6 +29,12 @@ export interface ContactsIMClient {
29
29
  externalId?: string;
30
30
  /** The unique ID of the association. Never changes. */
31
31
  id?: string;
32
+ /**
33
+ * IM-stack contact ID (UUID) from the im-contact-service.
34
+ * Mutually exclusive with .user: a link has either a legacy
35
+ * chat client (.user) or an IM-stack contact, never both.
36
+ */
37
+ imContactId?: string;
32
38
  /** Protocol used to connect the IM client. */
33
39
  protocol?: string;
34
40
  /**
@@ -14,6 +14,11 @@ export interface ContactsInputIMClient {
14
14
  externalUser?: string;
15
15
  /** App (Text-Gateway) used to connect the IM client. */
16
16
  gatewayId?: string;
17
+ /**
18
+ * IM-stack contact ID (UUID) from the im-contact-service.
19
+ * Exactly one of .external_user or .im_contact_id must be set.
20
+ */
21
+ imContactId?: string;
17
22
  protocol?: string;
18
23
  /** [Via] App(-specific) peer(-id) to connect[from] the IM client. */
19
24
  via?: string;
@@ -35,4 +35,8 @@ export type ContactsSearchParams = {
35
35
  */
36
36
  subjects?: string[];
37
37
  onlyBots?: boolean;
38
+ /**
39
+ * Filter by contact IDs.
40
+ */
41
+ ids?: string[];
38
42
  };
@@ -12,6 +12,7 @@ export type DelContactLanguagesParams = {
12
12
  fields?: string[];
13
13
  /**
14
14
  * Set of unique language{etag} association(s) to remove.
15
+ * @minItems 1
15
16
  */
16
17
  etag: string[];
17
18
  };
@@ -12,6 +12,7 @@ export type DeleteContactGroupsParams = {
12
12
  fields?: string[];
13
13
  /**
14
14
  * Set of unique ID(s) to remove.
15
+ * @minItems 1
15
16
  */
16
17
  etag: string[];
17
18
  };
@@ -12,6 +12,7 @@ export type DeleteEmailsParams = {
12
12
  fields?: string[];
13
13
  /**
14
14
  * Set of unique ID(s) to remove.
15
+ * @minItems 1
15
16
  * @items.pattern ^.+$
16
17
  */
17
18
  etag: string[];
@@ -12,6 +12,7 @@ export type DeleteLabelsParams = {
12
12
  fields?: string[];
13
13
  /**
14
14
  * Set of unique label(s).etag identifiers.
15
+ * @minItems 1
15
16
  * @items.pattern ^(\w+)(,\w+)*$
16
17
  */
17
18
  etag: string[];
@@ -12,6 +12,7 @@ export type DeleteManagersParams = {
12
12
  fields?: string[];
13
13
  /**
14
14
  * Set of unique ID(s) to remove.
15
+ * @minItems 1
15
16
  */
16
17
  etag: string[];
17
18
  };
@@ -12,6 +12,7 @@ export type DeletePhonesParams = {
12
12
  fields?: string[];
13
13
  /**
14
14
  * Set of linked ID(s) to be removed.
15
+ * @minItems 1
15
16
  */
16
17
  etag: string[];
17
18
  };
@@ -12,6 +12,7 @@ export type DeletePhotosParams = {
12
12
  fields?: string[];
13
13
  /**
14
14
  * Set of linked ID(s) to be removed.
15
+ * @minItems 1
15
16
  */
16
17
  etag: string[];
17
18
  };
@@ -12,6 +12,7 @@ export type DeleteTimezonesParams = {
12
12
  fields?: string[];
13
13
  /**
14
14
  * Set of unique ID(s) to remove.
15
+ * @minItems 1
15
16
  */
16
17
  etag: string[];
17
18
  };
@@ -12,6 +12,7 @@ export type DeleteVariablesParams = {
12
12
  fields?: string[];
13
13
  /**
14
14
  * Set of unique ID(s) to remove.
15
+ * @minItems 1
15
16
  * @items.pattern ^.+$
16
17
  */
17
18
  etag: string[];
@@ -0,0 +1,17 @@
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 IMClientsLinkIMContactBody {
9
+ /** App (gateway) the IM contact is connected through. Optional. */
10
+ gatewayId?: string;
11
+ /** IM-stack contact ID (UUID) from the im-contact-service. Required. */
12
+ imContactId?: string;
13
+ /** Protocol (provider type) of the IM conversation, e.g. "telegram". Required. */
14
+ protocol?: string;
15
+ /** [Via] App(-specific) peer(-id) to connect[from] the IM contact. Optional. */
16
+ via?: string;
17
+ }
@@ -821,6 +821,7 @@ export * from './getUserAccessTokenParams';
821
821
  export * from './googleProtobufAny';
822
822
  export * from './googleProtobufNullValue';
823
823
  export * from './googleRpcStatus';
824
+ export * from './iMClientsLinkIMContactBody';
824
825
  export * from './importCSVRequestAction';
825
826
  export * from './imServiceProviderV1CreateTelegramBotGateRequest';
826
827
  export * from './imServiceProviderV1CreateTelegramBotGateResponse';
@@ -1636,6 +1637,7 @@ export * from './webitelImApiGatewayV1ContactMetadata';
1636
1637
  export * from './webitelImApiGatewayV1ContactSettings';
1637
1638
  export * from './webitelImApiGatewayV1CreateBotRequest';
1638
1639
  export * from './webitelImApiGatewayV1CreateBotRequestMetadata';
1640
+ export * from './webitelImApiGatewayV1DeletedMessage';
1639
1641
  export * from './webitelImApiGatewayV1DeleteMessagesRequest';
1640
1642
  export * from './webitelImApiGatewayV1DeleteMessagesResponse';
1641
1643
  export * from './webitelImApiGatewayV1DeliveryError';
@@ -1724,6 +1726,7 @@ export * from './webitelImApiGatewayV1SendTextRequest';
1724
1726
  export * from './webitelImApiGatewayV1SendTextRequestVariables';
1725
1727
  export * from './webitelImApiGatewayV1SendTextResponse';
1726
1728
  export * from './webitelImApiGatewayV1SendTypingResponse';
1729
+ export * from './webitelImApiGatewayV1SetCrmContactResponse';
1727
1730
  export * from './webitelImApiGatewayV1SetReactionResponse';
1728
1731
  export * from './webitelImApiGatewayV1SkippedMessage';
1729
1732
  export * from './webitelImApiGatewayV1SkippedMessageReason';
@@ -1737,6 +1740,7 @@ export * from './webitelImApiGatewayV1ThreadManagementCreateRequest';
1737
1740
  export * from './webitelImApiGatewayV1ThreadManagementCreateResponse';
1738
1741
  export * from './webitelImApiGatewayV1ThreadManagementFlushVariablesBody';
1739
1742
  export * from './webitelImApiGatewayV1ThreadManagementHandBackToBotBody';
1743
+ export * from './webitelImApiGatewayV1ThreadManagementSetCrmContactBody';
1740
1744
  export * from './webitelImApiGatewayV1ThreadManagementSetVariablesBody';
1741
1745
  export * from './webitelImApiGatewayV1ThreadManagementTakeOverFromBotBody';
1742
1746
  export * from './webitelImApiGatewayV1ThreadManagementTransferBody';
@@ -1751,6 +1755,7 @@ export * from './webitelImApiGatewayV1ThreadPreviewServiceUpgradePreviewToFullMe
1751
1755
  export * from './webitelImApiGatewayV1ThreadRole';
1752
1756
  export * from './webitelImApiGatewayV1ThreadSettings';
1753
1757
  export * from './webitelImApiGatewayV1ThreadTagManagementAddTagBody';
1758
+ export * from './webitelImApiGatewayV1ThreadTags';
1754
1759
  export * from './webitelImApiGatewayV1ThreadUpdates';
1755
1760
  export * from './webitelImApiGatewayV1ThreadVariables';
1756
1761
  export * from './webitelImApiGatewayV1ThreadVariablesVariables';
@@ -6,10 +6,15 @@
6
6
  */
7
7
 
8
8
  /**
9
- * `NullValue` is a singleton enumeration to represent the null value for the
10
- * `Value` type union.
9
+ * Represents a JSON `null`.
11
10
  *
12
- * The JSON representation for `NullValue` is JSON `null`.
11
+ * `NullValue` is a sentinel, using an enum with only one value to represent
12
+ * the null value for the `Value` type union.
13
+ *
14
+ * A field of type `NullValue` with any value other than `0` is considered
15
+ * invalid. Most ProtoJSON serializers will emit a Value with a `null_value` set
16
+ * as a JSON `null` regardless of the integer value, and so will round trip to
17
+ * a `0` value.
13
18
  *
14
19
  * - NULL_VALUE: Null value.
15
20
  */
@@ -60,4 +60,14 @@ export type ThreadManagementSearchParams = {
60
60
  * Ignored when false.
61
61
  */
62
62
  unread?: boolean;
63
+ /**
64
+ * Return only threads the caller has tagged with every one of these tags (AND semantics).
65
+ * Ignored when empty.
66
+ */
67
+ tags?: string[];
68
+ /**
69
+ * Exclude threads the caller has tagged with any of these tags.
70
+ * Ignored when empty.
71
+ */
72
+ excludeTags?: string[];
63
73
  };
@@ -15,6 +15,8 @@ export interface WebitelImApiGatewayV1Contact {
15
15
  appId?: string;
16
16
  /** Record creation timestamp (Unix Epoch in milliseconds). */
17
17
  createdAt?: string;
18
+ /** Unique contact identifier. */
19
+ id?: string;
18
20
  /** Represents if usere is real person or automatic script. */
19
21
  isBot?: boolean;
20
22
  /** Provider-specific unique identifier (Issuer ID). */
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Generated by orval 🍺
3
+ * Do not edit manually.
4
+ * Webitel API
5
+ * OpenAPI spec version: 24.04.0
6
+ */
7
+ import type { WebitelImApiGatewayV1ThreadMember } from './webitelImApiGatewayV1ThreadMember';
8
+
9
+ /**
10
+ * DeletedMessage is a message deleted since cursor.
11
+ */
12
+ export interface WebitelImApiGatewayV1DeletedMessage {
13
+ /** Unix time in milliseconds when the message was deleted. */
14
+ deletedAt?: string;
15
+ /** Member who deleted the message, in the same shape as a message's sender. */
16
+ deletedBy?: WebitelImApiGatewayV1ThreadMember;
17
+ id?: string;
18
+ }
@@ -0,0 +1,10 @@
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 WebitelImApiGatewayV1SetCrmContactResponse {
9
+ crmContactId?: string;
10
+ }
@@ -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
  createdAt?: string;
23
+ /**
24
+ * Webitel CRM contact selected by an operator for this thread.
25
+ * Empty if no CRM contact has been selected.
26
+ */
27
+ crmContactId?: 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
+ crmContactId?: 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
  deletedMessageIds?: string[];
22
+ /** Messages deleted since cursor, with when and who deleted them; drop them by id. */
23
+ deletedMessages?: 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;
@@ -29,6 +29,12 @@ export interface ContactsIMClient {
29
29
  external_id?: string;
30
30
  /** The unique ID of the association. Never changes. */
31
31
  id?: string;
32
+ /**
33
+ * IM-stack contact ID (UUID) from the im-contact-service.
34
+ * Mutually exclusive with .user: a link has either a legacy
35
+ * chat client (.user) or an IM-stack contact, never both.
36
+ */
37
+ im_contact_id?: string;
32
38
  /** Protocol used to connect the IM client. */
33
39
  protocol?: string;
34
40
  /**
@@ -14,6 +14,11 @@ export interface ContactsInputIMClient {
14
14
  external_user?: string;
15
15
  /** App (Text-Gateway) used to connect the IM client. */
16
16
  gateway_id?: string;
17
+ /**
18
+ * IM-stack contact ID (UUID) from the im-contact-service.
19
+ * Exactly one of .external_user or .im_contact_id must be set.
20
+ */
21
+ im_contact_id?: string;
17
22
  protocol?: string;
18
23
  /** [Via] App(-specific) peer(-id) to connect[from] the IM client. */
19
24
  via?: string;
@@ -35,4 +35,8 @@ export type ContactsSearchParams = {
35
35
  */
36
36
  subjects?: string[];
37
37
  only_bots?: boolean;
38
+ /**
39
+ * Filter by contact IDs.
40
+ */
41
+ ids?: string[];
38
42
  };
@@ -12,6 +12,7 @@ export type DelContactLanguagesParams = {
12
12
  fields?: string[];
13
13
  /**
14
14
  * Set of unique language{etag} association(s) to remove.
15
+ * @minItems 1
15
16
  */
16
17
  etag: string[];
17
18
  };
@@ -12,6 +12,7 @@ export type DeleteContactGroupsParams = {
12
12
  fields?: string[];
13
13
  /**
14
14
  * Set of unique ID(s) to remove.
15
+ * @minItems 1
15
16
  */
16
17
  etag: string[];
17
18
  };
@@ -12,6 +12,7 @@ export type DeleteEmailsParams = {
12
12
  fields?: string[];
13
13
  /**
14
14
  * Set of unique ID(s) to remove.
15
+ * @minItems 1
15
16
  * @items.pattern ^.+$
16
17
  */
17
18
  etag: string[];
@@ -12,6 +12,7 @@ export type DeleteLabelsParams = {
12
12
  fields?: string[];
13
13
  /**
14
14
  * Set of unique label(s).etag identifiers.
15
+ * @minItems 1
15
16
  * @items.pattern ^(\w+)(,\w+)*$
16
17
  */
17
18
  etag: string[];
@@ -12,6 +12,7 @@ export type DeleteManagersParams = {
12
12
  fields?: string[];
13
13
  /**
14
14
  * Set of unique ID(s) to remove.
15
+ * @minItems 1
15
16
  */
16
17
  etag: string[];
17
18
  };
@@ -12,6 +12,7 @@ export type DeletePhonesParams = {
12
12
  fields?: string[];
13
13
  /**
14
14
  * Set of linked ID(s) to be removed.
15
+ * @minItems 1
15
16
  */
16
17
  etag: string[];
17
18
  };
@@ -12,6 +12,7 @@ export type DeletePhotosParams = {
12
12
  fields?: string[];
13
13
  /**
14
14
  * Set of linked ID(s) to be removed.
15
+ * @minItems 1
15
16
  */
16
17
  etag: string[];
17
18
  };
@@ -12,6 +12,7 @@ export type DeleteTimezonesParams = {
12
12
  fields?: string[];
13
13
  /**
14
14
  * Set of unique ID(s) to remove.
15
+ * @minItems 1
15
16
  */
16
17
  etag: string[];
17
18
  };
@@ -12,6 +12,7 @@ export type DeleteVariablesParams = {
12
12
  fields?: string[];
13
13
  /**
14
14
  * Set of unique ID(s) to remove.
15
+ * @minItems 1
15
16
  * @items.pattern ^.+$
16
17
  */
17
18
  etag: string[];
@@ -0,0 +1,17 @@
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 IMClientsLinkIMContactBody {
9
+ /** App (gateway) the IM contact is connected through. Optional. */
10
+ gateway_id?: string;
11
+ /** IM-stack contact ID (UUID) from the im-contact-service. Required. */
12
+ im_contact_id?: string;
13
+ /** Protocol (provider type) of the IM conversation, e.g. "telegram". Required. */
14
+ protocol?: string;
15
+ /** [Via] App(-specific) peer(-id) to connect[from] the IM contact. Optional. */
16
+ via?: string;
17
+ }
@@ -813,6 +813,7 @@ export * from './getUserAccessTokenParams';
813
813
  export * from './googleProtobufAny';
814
814
  export * from './googleProtobufNullValue';
815
815
  export * from './googleRpcStatus';
816
+ export * from './iMClientsLinkIMContactBody';
816
817
  export * from './importCSVRequestAction';
817
818
  export * from './imServiceProviderV1CreateTelegramBotGateRequest';
818
819
  export * from './imServiceProviderV1CreateTelegramBotGateResponse';
@@ -1624,6 +1625,7 @@ export * from './webitelImApiGatewayV1ContactMetadata';
1624
1625
  export * from './webitelImApiGatewayV1ContactSettings';
1625
1626
  export * from './webitelImApiGatewayV1CreateBotRequest';
1626
1627
  export * from './webitelImApiGatewayV1CreateBotRequestMetadata';
1628
+ export * from './webitelImApiGatewayV1DeletedMessage';
1627
1629
  export * from './webitelImApiGatewayV1DeleteMessagesRequest';
1628
1630
  export * from './webitelImApiGatewayV1DeleteMessagesResponse';
1629
1631
  export * from './webitelImApiGatewayV1DeliveryError';
@@ -1712,6 +1714,7 @@ export * from './webitelImApiGatewayV1SendTextRequest';
1712
1714
  export * from './webitelImApiGatewayV1SendTextRequestVariables';
1713
1715
  export * from './webitelImApiGatewayV1SendTextResponse';
1714
1716
  export * from './webitelImApiGatewayV1SendTypingResponse';
1717
+ export * from './webitelImApiGatewayV1SetCrmContactResponse';
1715
1718
  export * from './webitelImApiGatewayV1SetReactionResponse';
1716
1719
  export * from './webitelImApiGatewayV1SkippedMessage';
1717
1720
  export * from './webitelImApiGatewayV1SkippedMessageReason';
@@ -1725,6 +1728,7 @@ export * from './webitelImApiGatewayV1ThreadManagementCreateRequest';
1725
1728
  export * from './webitelImApiGatewayV1ThreadManagementCreateResponse';
1726
1729
  export * from './webitelImApiGatewayV1ThreadManagementFlushVariablesBody';
1727
1730
  export * from './webitelImApiGatewayV1ThreadManagementHandBackToBotBody';
1731
+ export * from './webitelImApiGatewayV1ThreadManagementSetCrmContactBody';
1728
1732
  export * from './webitelImApiGatewayV1ThreadManagementSetVariablesBody';
1729
1733
  export * from './webitelImApiGatewayV1ThreadManagementTakeOverFromBotBody';
1730
1734
  export * from './webitelImApiGatewayV1ThreadManagementTransferBody';
@@ -1739,6 +1743,7 @@ export * from './webitelImApiGatewayV1ThreadPreviewServiceUpgradePreviewToFullMe
1739
1743
  export * from './webitelImApiGatewayV1ThreadRole';
1740
1744
  export * from './webitelImApiGatewayV1ThreadSettings';
1741
1745
  export * from './webitelImApiGatewayV1ThreadTagManagementAddTagBody';
1746
+ export * from './webitelImApiGatewayV1ThreadTags';
1742
1747
  export * from './webitelImApiGatewayV1ThreadUpdates';
1743
1748
  export * from './webitelImApiGatewayV1ThreadVariables';
1744
1749
  export * from './webitelImApiGatewayV1ThreadVariablesVariables';
@@ -6,10 +6,15 @@
6
6
  */
7
7
 
8
8
  /**
9
- * `NullValue` is a singleton enumeration to represent the null value for the
10
- * `Value` type union.
9
+ * Represents a JSON `null`.
11
10
  *
12
- * The JSON representation for `NullValue` is JSON `null`.
11
+ * `NullValue` is a sentinel, using an enum with only one value to represent
12
+ * the null value for the `Value` type union.
13
+ *
14
+ * A field of type `NullValue` with any value other than `0` is considered
15
+ * invalid. Most ProtoJSON serializers will emit a Value with a `null_value` set
16
+ * as a JSON `null` regardless of the integer value, and so will round trip to
17
+ * a `0` value.
13
18
  *
14
19
  * - NULL_VALUE: Null value.
15
20
  */
@@ -60,4 +60,14 @@ export type ThreadManagementSearchParams = {
60
60
  * Ignored when false.
61
61
  */
62
62
  unread?: boolean;
63
+ /**
64
+ * Return only threads the caller has tagged with every one of these tags (AND semantics).
65
+ * Ignored when empty.
66
+ */
67
+ tags?: string[];
68
+ /**
69
+ * Exclude threads the caller has tagged with any of these tags.
70
+ * Ignored when empty.
71
+ */
72
+ exclude_tags?: string[];
63
73
  };
@@ -15,6 +15,8 @@ export interface WebitelImApiGatewayV1Contact {
15
15
  app_id?: string;
16
16
  /** Record creation timestamp (Unix Epoch in milliseconds). */
17
17
  created_at?: string;
18
+ /** Unique contact identifier. */
19
+ id?: string;
18
20
  /** Represents if usere is real person or automatic script. */
19
21
  is_bot?: boolean;
20
22
  /** Provider-specific unique identifier (Issuer ID). */
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Generated by orval 🍺
3
+ * Do not edit manually.
4
+ * Webitel API
5
+ * OpenAPI spec version: 24.04.0
6
+ */
7
+ import type { WebitelImApiGatewayV1ThreadMember } from './webitelImApiGatewayV1ThreadMember';
8
+
9
+ /**
10
+ * DeletedMessage is a message deleted since cursor.
11
+ */
12
+ export interface WebitelImApiGatewayV1DeletedMessage {
13
+ /** Unix time in milliseconds when the message was deleted. */
14
+ deleted_at?: string;
15
+ /** Member who deleted the message, in the same shape as a message's sender. */
16
+ deleted_by?: WebitelImApiGatewayV1ThreadMember;
17
+ id?: string;
18
+ }
@@ -0,0 +1,10 @@
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 WebitelImApiGatewayV1SetCrmContactResponse {
9
+ crm_contact_id?: string;
10
+ }
@@ -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
+ }