@webitel/api-services 26.8.87 → 26.8.88

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 (102) hide show
  1. package/package.json +1 -1
  2. package/src/api/clients/lists/blacklistNumbers.ts +43 -0
  3. package/src/gen/_models/engineCreateListCommunicationBulkItem.ts +12 -0
  4. package/src/gen/_models/engineListCommunicationBulkError.ts +14 -0
  5. package/src/gen/_models/engineListCommunicationBulkResponse.ts +13 -0
  6. package/src/gen/_models/engineListServiceCreateListCommunicationBulkBody.ts +11 -0
  7. package/src/gen/_models/index.ts +13 -2
  8. package/src/gen/_models/threadManagementSearchParams.ts +5 -0
  9. package/src/gen/_models/webitelImApiGatewayV1DeliveryError.ts +14 -0
  10. package/src/gen/_models/webitelImApiGatewayV1DeliveryFailure.ts +16 -0
  11. package/src/gen/_models/webitelImApiGatewayV1GivePreviewResponse.ts +11 -0
  12. package/src/gen/_models/webitelImApiGatewayV1HistoryMessage.ts +6 -0
  13. package/src/gen/_models/{webitelImApiGatewayV1MessageFailureError.ts → webitelImApiGatewayV1RemoveFromPreviewResponse.ts} +2 -3
  14. package/src/gen/_models/webitelImApiGatewayV1ThreadManagementTransferBody.ts +5 -0
  15. package/src/gen/_models/webitelImApiGatewayV1ThreadPreview.ts +18 -0
  16. package/src/gen/_models/webitelImApiGatewayV1ThreadPreviewServiceGivePreviewBody.ts +14 -0
  17. package/src/gen/_models/webitelImApiGatewayV1ThreadPreviewServiceRemoveFromPreviewBody.ts +12 -0
  18. package/src/gen/_models/webitelImApiGatewayV1ThreadPreviewServiceUpgradePreviewToFullMemberBody.ts +14 -0
  19. package/src/gen/_models/webitelImApiGatewayV1ThreadUpdates.ts +0 -3
  20. package/src/gen/_models/webitelImApiGatewayV1UpdatedMessage.ts +6 -0
  21. package/src/gen/_models/webitelImApiGatewayV1UpgradePreviewToFullMemberResponse.ts +11 -0
  22. package/src/gen-wire/_models/engineCreateListCommunicationBulkItem.ts +12 -0
  23. package/src/gen-wire/_models/engineListCommunicationBulkError.ts +14 -0
  24. package/src/gen-wire/_models/engineListCommunicationBulkResponse.ts +13 -0
  25. package/src/gen-wire/_models/engineListServiceCreateListCommunicationBulkBody.ts +11 -0
  26. package/src/gen-wire/_models/index.ts +13 -2
  27. package/src/gen-wire/_models/threadManagementSearchParams.ts +5 -0
  28. package/src/gen-wire/_models/webitelImApiGatewayV1DeliveryError.ts +14 -0
  29. package/src/gen-wire/_models/webitelImApiGatewayV1DeliveryFailure.ts +16 -0
  30. package/src/gen-wire/_models/webitelImApiGatewayV1GivePreviewResponse.ts +11 -0
  31. package/src/gen-wire/_models/webitelImApiGatewayV1HistoryMessage.ts +6 -0
  32. package/src/gen-wire/_models/{webitelImApiGatewayV1MessageFailureError.ts → webitelImApiGatewayV1RemoveFromPreviewResponse.ts} +2 -3
  33. package/src/gen-wire/_models/webitelImApiGatewayV1ThreadManagementTransferBody.ts +5 -0
  34. package/src/gen-wire/_models/webitelImApiGatewayV1ThreadPreview.ts +18 -0
  35. package/src/gen-wire/_models/webitelImApiGatewayV1ThreadPreviewServiceGivePreviewBody.ts +14 -0
  36. package/src/gen-wire/_models/webitelImApiGatewayV1ThreadPreviewServiceRemoveFromPreviewBody.ts +12 -0
  37. package/src/gen-wire/_models/webitelImApiGatewayV1ThreadPreviewServiceUpgradePreviewToFullMemberBody.ts +14 -0
  38. package/src/gen-wire/_models/webitelImApiGatewayV1ThreadUpdates.ts +0 -3
  39. package/src/gen-wire/_models/webitelImApiGatewayV1UpdatedMessage.ts +6 -0
  40. package/src/gen-wire/_models/webitelImApiGatewayV1UpgradePreviewToFullMemberResponse.ts +11 -0
  41. package/src/gen-wire/index.ts +12 -0
  42. package/src/gen-wire/index.zod.ts +1 -0
  43. package/src/gen-wire/list-service/list-service.ts +19 -0
  44. package/src/gen-wire/list-service/list-service.zod.ts +62 -0
  45. package/src/gen-wire/webitel-im-api-gateway-v1-messagehistory/webitel-im-api-gateway-v1-messagehistory.zod.ts +402 -0
  46. package/src/gen-wire/webitel-im-api-gateway-v1-threadmanagement/webitel-im-api-gateway-v1-threadmanagement.zod.ts +560 -0
  47. package/src/gen-wire/webitel-im-api-gateway-v1-threadpreviewservice/webitel-im-api-gateway-v1-threadpreviewservice.ts +89 -0
  48. package/src/gen-wire/webitel-im-api-gateway-v1-threadpreviewservice/webitel-im-api-gateway-v1-threadpreviewservice.zod.ts +351 -0
  49. package/src/gen-wire/webitel-im-api-gateway-v1-updates/webitel-im-api-gateway-v1-updates.zod.ts +406 -130
  50. package/types/.tsbuildinfo +1 -1
  51. package/types/api/clients/lists/blacklistNumbers.d.ts +5 -1
  52. package/types/gen/_models/engineCreateListCommunicationBulkItem.d.ts +11 -0
  53. package/types/gen/_models/engineListCommunicationBulkError.d.ts +13 -0
  54. package/types/gen/_models/engineListCommunicationBulkResponse.d.ts +12 -0
  55. package/types/gen/_models/engineListServiceCreateListCommunicationBulkBody.d.ts +10 -0
  56. package/types/gen/_models/index.d.ts +13 -2
  57. package/types/gen/_models/threadManagementSearchParams.d.ts +5 -0
  58. package/types/gen/_models/webitelImApiGatewayV1DeliveryError.d.ts +13 -0
  59. package/types/gen/_models/webitelImApiGatewayV1DeliveryFailure.d.ts +15 -0
  60. package/types/gen/_models/webitelImApiGatewayV1GivePreviewResponse.d.ts +10 -0
  61. package/types/gen/_models/webitelImApiGatewayV1HistoryMessage.d.ts +6 -0
  62. package/types/gen/_models/{webitelImApiGatewayV1MessageFailureError.d.ts → webitelImApiGatewayV1RemoveFromPreviewResponse.d.ts} +2 -3
  63. package/types/gen/_models/webitelImApiGatewayV1ThreadManagementTransferBody.d.ts +5 -0
  64. package/types/gen/_models/webitelImApiGatewayV1ThreadPreview.d.ts +17 -0
  65. package/types/gen/_models/webitelImApiGatewayV1ThreadPreviewServiceGivePreviewBody.d.ts +13 -0
  66. package/types/gen/_models/webitelImApiGatewayV1ThreadPreviewServiceRemoveFromPreviewBody.d.ts +11 -0
  67. package/types/gen/_models/webitelImApiGatewayV1ThreadPreviewServiceUpgradePreviewToFullMemberBody.d.ts +13 -0
  68. package/types/gen/_models/webitelImApiGatewayV1ThreadUpdates.d.ts +0 -3
  69. package/types/gen/_models/webitelImApiGatewayV1UpdatedMessage.d.ts +6 -0
  70. package/types/gen/_models/webitelImApiGatewayV1UpgradePreviewToFullMemberResponse.d.ts +10 -0
  71. package/types/gen-wire/_models/engineCreateListCommunicationBulkItem.d.ts +11 -0
  72. package/types/gen-wire/_models/engineListCommunicationBulkError.d.ts +13 -0
  73. package/types/gen-wire/_models/engineListCommunicationBulkResponse.d.ts +12 -0
  74. package/types/gen-wire/_models/engineListServiceCreateListCommunicationBulkBody.d.ts +10 -0
  75. package/types/gen-wire/_models/index.d.ts +13 -2
  76. package/types/gen-wire/_models/threadManagementSearchParams.d.ts +5 -0
  77. package/types/gen-wire/_models/webitelImApiGatewayV1DeliveryError.d.ts +13 -0
  78. package/types/gen-wire/_models/webitelImApiGatewayV1DeliveryFailure.d.ts +15 -0
  79. package/types/gen-wire/_models/webitelImApiGatewayV1GivePreviewResponse.d.ts +10 -0
  80. package/types/gen-wire/_models/webitelImApiGatewayV1HistoryMessage.d.ts +6 -0
  81. package/types/gen-wire/_models/{webitelImApiGatewayV1MessageFailureError.d.ts → webitelImApiGatewayV1RemoveFromPreviewResponse.d.ts} +2 -3
  82. package/types/gen-wire/_models/webitelImApiGatewayV1ThreadManagementTransferBody.d.ts +5 -0
  83. package/types/gen-wire/_models/webitelImApiGatewayV1ThreadPreview.d.ts +17 -0
  84. package/types/gen-wire/_models/webitelImApiGatewayV1ThreadPreviewServiceGivePreviewBody.d.ts +13 -0
  85. package/types/gen-wire/_models/webitelImApiGatewayV1ThreadPreviewServiceRemoveFromPreviewBody.d.ts +11 -0
  86. package/types/gen-wire/_models/webitelImApiGatewayV1ThreadPreviewServiceUpgradePreviewToFullMemberBody.d.ts +13 -0
  87. package/types/gen-wire/_models/webitelImApiGatewayV1ThreadUpdates.d.ts +0 -3
  88. package/types/gen-wire/_models/webitelImApiGatewayV1UpdatedMessage.d.ts +6 -0
  89. package/types/gen-wire/_models/webitelImApiGatewayV1UpgradePreviewToFullMemberResponse.d.ts +10 -0
  90. package/types/gen-wire/index.d.ts +5 -3
  91. package/types/gen-wire/index.zod.d.ts +1 -0
  92. package/types/gen-wire/list-service/list-service.d.ts +3 -1
  93. package/types/gen-wire/list-service/list-service.zod.d.ts +39 -0
  94. package/types/gen-wire/webitel-im-api-gateway-v1-messagehistory/webitel-im-api-gateway-v1-messagehistory.zod.d.ts +150 -0
  95. package/types/gen-wire/webitel-im-api-gateway-v1-threadmanagement/webitel-im-api-gateway-v1-threadmanagement.zod.d.ts +207 -0
  96. package/types/gen-wire/webitel-im-api-gateway-v1-threadpreviewservice/webitel-im-api-gateway-v1-threadpreviewservice.d.ts +17 -0
  97. package/types/gen-wire/webitel-im-api-gateway-v1-threadpreviewservice/webitel-im-api-gateway-v1-threadpreviewservice.zod.d.ts +155 -0
  98. package/types/gen-wire/webitel-im-api-gateway-v1-updates/webitel-im-api-gateway-v1-updates.zod.d.ts +150 -51
  99. package/src/gen/_models/webitelImApiGatewayV1MessageFailure.ts +0 -17
  100. package/src/gen-wire/_models/webitelImApiGatewayV1MessageFailure.ts +0 -17
  101. package/types/gen/_models/webitelImApiGatewayV1MessageFailure.d.ts +0 -16
  102. package/types/gen-wire/_models/webitelImApiGatewayV1MessageFailure.d.ts +0 -16
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webitel/api-services",
3
- "version": "26.8.87",
3
+ "version": "26.8.88",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
@@ -10,6 +10,7 @@ import {
10
10
  starToSearch,
11
11
  } from '../../transformers';
12
12
  import type {
13
+ ApiId,
13
14
  ApiParams,
14
15
  NestedAddItemParams,
15
16
  NestedDeleteItemParams,
@@ -25,6 +26,13 @@ const fieldsToSend = [
25
26
  'expireAt',
26
27
  ];
27
28
 
29
+ /** [Claude] The bulk item has no `listId`: the list goes in the path. */
30
+ const bulkFieldsToSend = [
31
+ 'number',
32
+ 'description',
33
+ 'expireAt',
34
+ ];
35
+
28
36
  const getBlacklistNumbersList = async (params: ApiParams) => {
29
37
  const { parentId, page, size, search, sort, fields, id } = applyTransform(
30
38
  params,
@@ -104,6 +112,40 @@ const addBlacklistNumber = async ({
104
112
  }
105
113
  };
106
114
 
115
+ /**
116
+ * [Claude] CSV import. Not part of the ApiModule contract — called straight from the popup.
117
+ * Rows the backend rejects (e.g. duplicates) come back in `failures`, not as an error.
118
+ */
119
+ const addBlacklistNumberBulk = async ({
120
+ parentId,
121
+ items,
122
+ }: {
123
+ parentId: ApiId;
124
+ items: ApiParams[];
125
+ }) => {
126
+ const body = {
127
+ items: items.map((item) =>
128
+ applyTransform(item, [
129
+ sanitize(bulkFieldsToSend),
130
+ camelToSnake(),
131
+ ]),
132
+ ),
133
+ };
134
+ try {
135
+ const response = await getListService().createListCommunicationBulk(
136
+ String(parentId),
137
+ body,
138
+ );
139
+ return applyTransform(response.data, [
140
+ snakeToCamel(),
141
+ ]);
142
+ } catch (err) {
143
+ throw applyTransform(err, [
144
+ notify,
145
+ ]);
146
+ }
147
+ };
148
+
107
149
  const updateBlacklistNumber = async ({
108
150
  parentId,
109
151
  itemInstance,
@@ -150,6 +192,7 @@ export const BlacklistNumbersAPI = {
150
192
  getList: getBlacklistNumbersList,
151
193
  get: getBlacklistNumber,
152
194
  add: addBlacklistNumber,
195
+ addBulk: addBlacklistNumberBulk,
153
196
  update: updateBlacklistNumber,
154
197
  delete: deleteBlacklistNumber,
155
198
  };
@@ -0,0 +1,12 @@
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 EngineCreateListCommunicationBulkItem {
9
+ description?: string;
10
+ expireAt?: string;
11
+ number?: string;
12
+ }
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Generated by orval 🍺
3
+ * Do not edit manually.
4
+ * Webitel API
5
+ * OpenAPI spec version: 24.04.0
6
+ */
7
+ import type { EngineListCommunication } from './engineListCommunication';
8
+ import type { GoogleRpcStatus } from './googleRpcStatus';
9
+
10
+ export interface EngineListCommunicationBulkError {
11
+ error?: GoogleRpcStatus;
12
+ index?: number;
13
+ item?: EngineListCommunication;
14
+ }
@@ -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
+ import type { EngineListCommunication } from './engineListCommunication';
8
+ import type { EngineListCommunicationBulkError } from './engineListCommunicationBulkError';
9
+
10
+ export interface EngineListCommunicationBulkResponse {
11
+ data?: EngineListCommunication[];
12
+ failures?: EngineListCommunicationBulkError[];
13
+ }
@@ -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
+ import type { EngineCreateListCommunicationBulkItem } from './engineCreateListCommunicationBulkItem';
8
+
9
+ export interface EngineListServiceCreateListCommunicationBulkBody {
10
+ items?: EngineCreateListCommunicationBulkItem[];
11
+ }
@@ -473,6 +473,7 @@ export * from './engineCreateCallRequestEndpointRequest';
473
473
  export * from './engineCreateCallResponse';
474
474
  export * from './engineCreateChatPlanRequest';
475
475
  export * from './engineCreateEmailProfileRequest';
476
+ export * from './engineCreateListCommunicationBulkItem';
476
477
  export * from './engineCreateListRequest';
477
478
  export * from './engineCreateMemberBulkItem';
478
479
  export * from './engineCreateMemberBulkItemVariables';
@@ -555,6 +556,8 @@ export * from './engineListCall';
555
556
  export * from './engineListChatPlan';
556
557
  export * from './engineListChatTag';
557
558
  export * from './engineListCommunication';
559
+ export * from './engineListCommunicationBulkError';
560
+ export * from './engineListCommunicationBulkResponse';
558
561
  export * from './engineListCommunicationType';
559
562
  export * from './engineListEmailProfile';
560
563
  export * from './engineListHistoryAttempt';
@@ -585,6 +588,7 @@ export * from './engineListRoutingSchemaTags';
585
588
  export * from './engineListRoutingVariable';
586
589
  export * from './engineListSchemaVariable';
587
590
  export * from './engineListServiceCreateListCommunicationBody';
591
+ export * from './engineListServiceCreateListCommunicationBulkBody';
588
592
  export * from './engineListServiceUpdateListBody';
589
593
  export * from './engineListServiceUpdateListCommunicationBody';
590
594
  export * from './engineListSkill';
@@ -1634,6 +1638,8 @@ export * from './webitelImApiGatewayV1CreateBotRequest';
1634
1638
  export * from './webitelImApiGatewayV1CreateBotRequestMetadata';
1635
1639
  export * from './webitelImApiGatewayV1DeleteMessagesRequest';
1636
1640
  export * from './webitelImApiGatewayV1DeleteMessagesResponse';
1641
+ export * from './webitelImApiGatewayV1DeliveryError';
1642
+ export * from './webitelImApiGatewayV1DeliveryFailure';
1637
1643
  export * from './webitelImApiGatewayV1Device';
1638
1644
  export * from './webitelImApiGatewayV1DirectConfig';
1639
1645
  export * from './webitelImApiGatewayV1Document';
@@ -1651,6 +1657,7 @@ export * from './webitelImApiGatewayV1GetThreadPermissionsResponse';
1651
1657
  export * from './webitelImApiGatewayV1GetUnreadSummaryResponse';
1652
1658
  export * from './webitelImApiGatewayV1GetUpdatesRequest';
1653
1659
  export * from './webitelImApiGatewayV1GetUpdatesResponse';
1660
+ export * from './webitelImApiGatewayV1GivePreviewResponse';
1654
1661
  export * from './webitelImApiGatewayV1HandBackToBotResponse';
1655
1662
  export * from './webitelImApiGatewayV1HistoryMessage';
1656
1663
  export * from './webitelImApiGatewayV1HistoryMessageCursorRequest';
@@ -1679,8 +1686,6 @@ export * from './webitelImApiGatewayV1MemberReadState';
1679
1686
  export * from './webitelImApiGatewayV1MenuPlacement';
1680
1687
  export * from './webitelImApiGatewayV1MessageContact';
1681
1688
  export * from './webitelImApiGatewayV1MessageEditMessageBody';
1682
- export * from './webitelImApiGatewayV1MessageFailure';
1683
- export * from './webitelImApiGatewayV1MessageFailureError';
1684
1689
  export * from './webitelImApiGatewayV1MessageLocation';
1685
1690
  export * from './webitelImApiGatewayV1MessageReaction';
1686
1691
  export * from './webitelImApiGatewayV1MessageReadBody';
@@ -1695,6 +1700,7 @@ export * from './webitelImApiGatewayV1PUSHSubscription';
1695
1700
  export * from './webitelImApiGatewayV1PUSHSubscriptionBody';
1696
1701
  export * from './webitelImApiGatewayV1ReadMessageResponse';
1697
1702
  export * from './webitelImApiGatewayV1RegisterDeviceResponse';
1703
+ export * from './webitelImApiGatewayV1RemoveFromPreviewResponse';
1698
1704
  export * from './webitelImApiGatewayV1RemoveMemberResponse';
1699
1705
  export * from './webitelImApiGatewayV1RemoveThreadTagResponse';
1700
1706
  export * from './webitelImApiGatewayV1ReplyToMessage';
@@ -1738,6 +1744,10 @@ export * from './webitelImApiGatewayV1ThreadMember';
1738
1744
  export * from './webitelImApiGatewayV1ThreadMemberChange';
1739
1745
  export * from './webitelImApiGatewayV1ThreadMemberChangeAction';
1740
1746
  export * from './webitelImApiGatewayV1ThreadPermissions';
1747
+ export * from './webitelImApiGatewayV1ThreadPreview';
1748
+ export * from './webitelImApiGatewayV1ThreadPreviewServiceGivePreviewBody';
1749
+ export * from './webitelImApiGatewayV1ThreadPreviewServiceRemoveFromPreviewBody';
1750
+ export * from './webitelImApiGatewayV1ThreadPreviewServiceUpgradePreviewToFullMemberBody';
1741
1751
  export * from './webitelImApiGatewayV1ThreadRole';
1742
1752
  export * from './webitelImApiGatewayV1ThreadSettings';
1743
1753
  export * from './webitelImApiGatewayV1ThreadTagManagementAddTagBody';
@@ -1751,6 +1761,7 @@ export * from './webitelImApiGatewayV1UpdateContactSettingsResponse';
1751
1761
  export * from './webitelImApiGatewayV1UpdatedMessage';
1752
1762
  export * from './webitelImApiGatewayV1UpdatedMessageMetadata';
1753
1763
  export * from './webitelImApiGatewayV1UpdateThreadPermissionsResponse';
1764
+ export * from './webitelImApiGatewayV1UpgradePreviewToFullMemberResponse';
1754
1765
  export * from './webitelImApiGatewayV1UserAgent';
1755
1766
  export * from './webitelImApiGatewayV1UserFilter';
1756
1767
  export * from './webitelImApiGatewayV1VariableEntry';
@@ -55,4 +55,9 @@ export type ThreadManagementSearchParams = {
55
55
  * Filter threads by participant contact IDs.
56
56
  */
57
57
  contactIds?: string[];
58
+ /**
59
+ * Return only threads where the caller has at least one unread message.
60
+ * Ignored when false.
61
+ */
62
+ unread?: boolean;
58
63
  };
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Generated by orval 🍺
3
+ * Do not edit manually.
4
+ * Webitel API
5
+ * OpenAPI spec version: 24.04.0
6
+ */
7
+
8
+ /**
9
+ * DeliveryError is a provider's delivery failure, e.g. {code: "403", message: "bot was blocked by the user"}.
10
+ */
11
+ export interface WebitelImApiGatewayV1DeliveryError {
12
+ code?: string;
13
+ message?: string;
14
+ }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Generated by orval 🍺
3
+ * Do not edit manually.
4
+ * Webitel API
5
+ * OpenAPI spec version: 24.04.0
6
+ */
7
+ import type { WebitelImApiGatewayV1DeliveryError } from './webitelImApiGatewayV1DeliveryError';
8
+ import type { WebitelImApiGatewayV1ThreadMember } from './webitelImApiGatewayV1ThreadMember';
9
+
10
+ /**
11
+ * DeliveryFailure is one member a message could not be delivered to.
12
+ */
13
+ export interface WebitelImApiGatewayV1DeliveryFailure {
14
+ error?: WebitelImApiGatewayV1DeliveryError;
15
+ member?: WebitelImApiGatewayV1ThreadMember;
16
+ }
@@ -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
+ import type { WebitelImApiGatewayV1ThreadPreview } from './webitelImApiGatewayV1ThreadPreview';
8
+
9
+ export interface WebitelImApiGatewayV1GivePreviewResponse {
10
+ preview?: WebitelImApiGatewayV1ThreadPreview;
11
+ }
@@ -4,6 +4,7 @@
4
4
  * Webitel API
5
5
  * OpenAPI spec version: 24.04.0
6
6
  */
7
+ import type { WebitelImApiGatewayV1DeliveryFailure } from './webitelImApiGatewayV1DeliveryFailure';
7
8
  import type { WebitelImApiGatewayV1Document } from './webitelImApiGatewayV1Document';
8
9
  import type { WebitelImApiGatewayV1ForwardOrigin } from './webitelImApiGatewayV1ForwardOrigin';
9
10
  import type { WebitelImApiGatewayV1HistoryMessageMetadata } from './webitelImApiGatewayV1HistoryMessageMetadata';
@@ -44,6 +45,11 @@ export interface WebitelImApiGatewayV1HistoryMessage {
44
45
  documents?: WebitelImApiGatewayV1Document[];
45
46
  /** Message last update timestamp (Unix time, milliseconds). */
46
47
  editedAt?: string;
48
+ /**
49
+ * Members the message could not be delivered to, with the provider's reason.
50
+ * Empty when it reached everyone; an entry is dropped once a later delivery succeeds.
51
+ */
52
+ failures?: WebitelImApiGatewayV1DeliveryFailure[];
47
53
  /**
48
54
  * Set when this message is a forward. Never populated for a deleted
49
55
  * message: the tombstone must not leak the origin name.
@@ -5,7 +5,6 @@
5
5
  * OpenAPI spec version: 24.04.0
6
6
  */
7
7
 
8
- export interface WebitelImApiGatewayV1MessageFailureError {
9
- code?: string;
10
- message?: string;
8
+ export interface WebitelImApiGatewayV1RemoveFromPreviewResponse {
9
+ [key: string]: unknown;
11
10
  }
@@ -9,5 +9,10 @@ import type { WebitelImApiGatewayV1ThreadRole } from './webitelImApiGatewayV1Thr
9
9
 
10
10
  export interface WebitelImApiGatewayV1ThreadManagementTransferBody {
11
11
  contact?: WebitelImApiGatewayV1PeerIdentity;
12
+ /**
13
+ * Member the thread is transferred from. Honored only for trusted service
14
+ * callers (schema/engine); user calls always transfer from the caller.
15
+ */
16
+ initiator?: WebitelImApiGatewayV1PeerIdentity;
12
17
  role?: WebitelImApiGatewayV1ThreadRole;
13
18
  }
@@ -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 { WebitelImApiGatewayV1Contact } from './webitelImApiGatewayV1Contact';
8
+
9
+ export interface WebitelImApiGatewayV1ThreadPreview {
10
+ contact?: WebitelImApiGatewayV1Contact;
11
+ /** Unix milliseconds. */
12
+ createdAt?: string;
13
+ /** Unix milliseconds; the preview stops granting access at this moment. */
14
+ expiresAt?: string;
15
+ id?: string;
16
+ initiator?: WebitelImApiGatewayV1Contact;
17
+ threadId?: string;
18
+ }
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Generated by orval 🍺
3
+ * Do not edit manually.
4
+ * Webitel API
5
+ * OpenAPI spec version: 24.04.0
6
+ */
7
+ import type { WebitelImApiGatewayV1PeerIdentity } from './webitelImApiGatewayV1PeerIdentity';
8
+
9
+ export interface WebitelImApiGatewayV1ThreadPreviewServiceGivePreviewBody {
10
+ /** The contact receiving the preview. */
11
+ contact?: WebitelImApiGatewayV1PeerIdentity;
12
+ /** Preview lifetime from now, in milliseconds. */
13
+ durationMs?: string;
14
+ }
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Generated by orval 🍺
3
+ * Do not edit manually.
4
+ * Webitel API
5
+ * OpenAPI spec version: 24.04.0
6
+ */
7
+ import type { WebitelImApiGatewayV1PeerIdentity } from './webitelImApiGatewayV1PeerIdentity';
8
+
9
+ export interface WebitelImApiGatewayV1ThreadPreviewServiceRemoveFromPreviewBody {
10
+ /** The contact whose preview is revoked. */
11
+ contact?: WebitelImApiGatewayV1PeerIdentity;
12
+ }
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Generated by orval 🍺
3
+ * Do not edit manually.
4
+ * Webitel API
5
+ * OpenAPI spec version: 24.04.0
6
+ */
7
+ import type { WebitelImApiGatewayV1PeerIdentity } from './webitelImApiGatewayV1PeerIdentity';
8
+ import type { WebitelImApiGatewayV1ThreadRole } from './webitelImApiGatewayV1ThreadRole';
9
+
10
+ export interface WebitelImApiGatewayV1ThreadPreviewServiceUpgradePreviewToFullMemberBody {
11
+ /** The contact to upgrade to a full member. */
12
+ contact?: WebitelImApiGatewayV1PeerIdentity;
13
+ role?: WebitelImApiGatewayV1ThreadRole;
14
+ }
@@ -5,7 +5,6 @@
5
5
  * OpenAPI spec version: 24.04.0
6
6
  */
7
7
  import type { WebitelImApiGatewayV1MemberReadState } from './webitelImApiGatewayV1MemberReadState';
8
- import type { WebitelImApiGatewayV1MessageFailure } from './webitelImApiGatewayV1MessageFailure';
9
8
  import type { WebitelImApiGatewayV1Thread } from './webitelImApiGatewayV1Thread';
10
9
  import type { WebitelImApiGatewayV1ThreadMemberChange } from './webitelImApiGatewayV1ThreadMemberChange';
11
10
  import type { WebitelImApiGatewayV1UpdatedMessage } from './webitelImApiGatewayV1UpdatedMessage';
@@ -17,8 +16,6 @@ export interface WebitelImApiGatewayV1ThreadUpdates {
17
16
  * Same model as the thread list, except last_msg and updates_cursor are never set here.
18
17
  */
19
18
  dialog?: WebitelImApiGatewayV1Thread;
20
- /** Messages that failed to reach a member since the cursor. */
21
- failures?: WebitelImApiGatewayV1MessageFailure[];
22
19
  /** The caller is no longer a member: drop the thread. */
23
20
  left?: boolean;
24
21
  memberChanges?: WebitelImApiGatewayV1ThreadMemberChange[];
@@ -4,6 +4,7 @@
4
4
  * Webitel API
5
5
  * OpenAPI spec version: 24.04.0
6
6
  */
7
+ import type { WebitelImApiGatewayV1DeliveryFailure } from './webitelImApiGatewayV1DeliveryFailure';
7
8
  import type { WebitelImApiGatewayV1Document } from './webitelImApiGatewayV1Document';
8
9
  import type { WebitelImApiGatewayV1ForwardOrigin } from './webitelImApiGatewayV1ForwardOrigin';
9
10
  import type { WebitelImApiGatewayV1Image } from './webitelImApiGatewayV1Image';
@@ -26,6 +27,11 @@ export interface WebitelImApiGatewayV1UpdatedMessage {
26
27
  documents?: WebitelImApiGatewayV1Document[];
27
28
  /** Set when the message was edited. */
28
29
  editedAt?: string;
30
+ /**
31
+ * Members the message could not be delivered to, with the provider's reason.
32
+ * Empty when it reached everyone.
33
+ */
34
+ failures?: WebitelImApiGatewayV1DeliveryFailure[];
29
35
  forwardOrigin?: WebitelImApiGatewayV1ForwardOrigin;
30
36
  id?: string;
31
37
  images?: WebitelImApiGatewayV1Image[];
@@ -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
+ import type { WebitelImApiGatewayV1ThreadMember } from './webitelImApiGatewayV1ThreadMember';
8
+
9
+ export interface WebitelImApiGatewayV1UpgradePreviewToFullMemberResponse {
10
+ member?: WebitelImApiGatewayV1ThreadMember;
11
+ }
@@ -0,0 +1,12 @@
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 EngineCreateListCommunicationBulkItem {
9
+ description?: string;
10
+ expire_at?: string;
11
+ number?: string;
12
+ }
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Generated by orval 🍺
3
+ * Do not edit manually.
4
+ * Webitel API
5
+ * OpenAPI spec version: 24.04.0
6
+ */
7
+ import type { EngineListCommunication } from './engineListCommunication';
8
+ import type { GoogleRpcStatus } from './googleRpcStatus';
9
+
10
+ export interface EngineListCommunicationBulkError {
11
+ error?: GoogleRpcStatus;
12
+ index?: number;
13
+ item?: EngineListCommunication;
14
+ }
@@ -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
+ import type { EngineListCommunication } from './engineListCommunication';
8
+ import type { EngineListCommunicationBulkError } from './engineListCommunicationBulkError';
9
+
10
+ export interface EngineListCommunicationBulkResponse {
11
+ data?: EngineListCommunication[];
12
+ failures?: EngineListCommunicationBulkError[];
13
+ }
@@ -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
+ import type { EngineCreateListCommunicationBulkItem } from './engineCreateListCommunicationBulkItem';
8
+
9
+ export interface EngineListServiceCreateListCommunicationBulkBody {
10
+ items?: EngineCreateListCommunicationBulkItem[];
11
+ }
@@ -465,6 +465,7 @@ export * from './engineCreateCallRequestEndpointRequest';
465
465
  export * from './engineCreateCallResponse';
466
466
  export * from './engineCreateChatPlanRequest';
467
467
  export * from './engineCreateEmailProfileRequest';
468
+ export * from './engineCreateListCommunicationBulkItem';
468
469
  export * from './engineCreateListRequest';
469
470
  export * from './engineCreateMemberBulkItem';
470
471
  export * from './engineCreateMemberBulkItemVariables';
@@ -547,6 +548,8 @@ export * from './engineListCall';
547
548
  export * from './engineListChatPlan';
548
549
  export * from './engineListChatTag';
549
550
  export * from './engineListCommunication';
551
+ export * from './engineListCommunicationBulkError';
552
+ export * from './engineListCommunicationBulkResponse';
550
553
  export * from './engineListCommunicationType';
551
554
  export * from './engineListEmailProfile';
552
555
  export * from './engineListHistoryAttempt';
@@ -577,6 +580,7 @@ export * from './engineListRoutingSchemaTags';
577
580
  export * from './engineListRoutingVariable';
578
581
  export * from './engineListSchemaVariable';
579
582
  export * from './engineListServiceCreateListCommunicationBody';
583
+ export * from './engineListServiceCreateListCommunicationBulkBody';
580
584
  export * from './engineListServiceUpdateListBody';
581
585
  export * from './engineListServiceUpdateListCommunicationBody';
582
586
  export * from './engineListSkill';
@@ -1622,6 +1626,8 @@ export * from './webitelImApiGatewayV1CreateBotRequest';
1622
1626
  export * from './webitelImApiGatewayV1CreateBotRequestMetadata';
1623
1627
  export * from './webitelImApiGatewayV1DeleteMessagesRequest';
1624
1628
  export * from './webitelImApiGatewayV1DeleteMessagesResponse';
1629
+ export * from './webitelImApiGatewayV1DeliveryError';
1630
+ export * from './webitelImApiGatewayV1DeliveryFailure';
1625
1631
  export * from './webitelImApiGatewayV1Device';
1626
1632
  export * from './webitelImApiGatewayV1DirectConfig';
1627
1633
  export * from './webitelImApiGatewayV1Document';
@@ -1639,6 +1645,7 @@ export * from './webitelImApiGatewayV1GetThreadPermissionsResponse';
1639
1645
  export * from './webitelImApiGatewayV1GetUnreadSummaryResponse';
1640
1646
  export * from './webitelImApiGatewayV1GetUpdatesRequest';
1641
1647
  export * from './webitelImApiGatewayV1GetUpdatesResponse';
1648
+ export * from './webitelImApiGatewayV1GivePreviewResponse';
1642
1649
  export * from './webitelImApiGatewayV1HandBackToBotResponse';
1643
1650
  export * from './webitelImApiGatewayV1HistoryMessage';
1644
1651
  export * from './webitelImApiGatewayV1HistoryMessageCursorRequest';
@@ -1667,8 +1674,6 @@ export * from './webitelImApiGatewayV1MemberReadState';
1667
1674
  export * from './webitelImApiGatewayV1MenuPlacement';
1668
1675
  export * from './webitelImApiGatewayV1MessageContact';
1669
1676
  export * from './webitelImApiGatewayV1MessageEditMessageBody';
1670
- export * from './webitelImApiGatewayV1MessageFailure';
1671
- export * from './webitelImApiGatewayV1MessageFailureError';
1672
1677
  export * from './webitelImApiGatewayV1MessageLocation';
1673
1678
  export * from './webitelImApiGatewayV1MessageReaction';
1674
1679
  export * from './webitelImApiGatewayV1MessageReadBody';
@@ -1683,6 +1688,7 @@ export * from './webitelImApiGatewayV1PUSHSubscription';
1683
1688
  export * from './webitelImApiGatewayV1PUSHSubscriptionBody';
1684
1689
  export * from './webitelImApiGatewayV1ReadMessageResponse';
1685
1690
  export * from './webitelImApiGatewayV1RegisterDeviceResponse';
1691
+ export * from './webitelImApiGatewayV1RemoveFromPreviewResponse';
1686
1692
  export * from './webitelImApiGatewayV1RemoveMemberResponse';
1687
1693
  export * from './webitelImApiGatewayV1RemoveThreadTagResponse';
1688
1694
  export * from './webitelImApiGatewayV1ReplyToMessage';
@@ -1726,6 +1732,10 @@ export * from './webitelImApiGatewayV1ThreadMember';
1726
1732
  export * from './webitelImApiGatewayV1ThreadMemberChange';
1727
1733
  export * from './webitelImApiGatewayV1ThreadMemberChangeAction';
1728
1734
  export * from './webitelImApiGatewayV1ThreadPermissions';
1735
+ export * from './webitelImApiGatewayV1ThreadPreview';
1736
+ export * from './webitelImApiGatewayV1ThreadPreviewServiceGivePreviewBody';
1737
+ export * from './webitelImApiGatewayV1ThreadPreviewServiceRemoveFromPreviewBody';
1738
+ export * from './webitelImApiGatewayV1ThreadPreviewServiceUpgradePreviewToFullMemberBody';
1729
1739
  export * from './webitelImApiGatewayV1ThreadRole';
1730
1740
  export * from './webitelImApiGatewayV1ThreadSettings';
1731
1741
  export * from './webitelImApiGatewayV1ThreadTagManagementAddTagBody';
@@ -1739,6 +1749,7 @@ export * from './webitelImApiGatewayV1UpdateContactSettingsResponse';
1739
1749
  export * from './webitelImApiGatewayV1UpdatedMessage';
1740
1750
  export * from './webitelImApiGatewayV1UpdatedMessageMetadata';
1741
1751
  export * from './webitelImApiGatewayV1UpdateThreadPermissionsResponse';
1752
+ export * from './webitelImApiGatewayV1UpgradePreviewToFullMemberResponse';
1742
1753
  export * from './webitelImApiGatewayV1UserAgent';
1743
1754
  export * from './webitelImApiGatewayV1UserFilter';
1744
1755
  export * from './webitelImApiGatewayV1VariableEntry';
@@ -55,4 +55,9 @@ export type ThreadManagementSearchParams = {
55
55
  * Filter threads by participant contact IDs.
56
56
  */
57
57
  contact_ids?: string[];
58
+ /**
59
+ * Return only threads where the caller has at least one unread message.
60
+ * Ignored when false.
61
+ */
62
+ unread?: boolean;
58
63
  };
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Generated by orval 🍺
3
+ * Do not edit manually.
4
+ * Webitel API
5
+ * OpenAPI spec version: 24.04.0
6
+ */
7
+
8
+ /**
9
+ * DeliveryError is a provider's delivery failure, e.g. {code: "403", message: "bot was blocked by the user"}.
10
+ */
11
+ export interface WebitelImApiGatewayV1DeliveryError {
12
+ code?: string;
13
+ message?: string;
14
+ }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Generated by orval 🍺
3
+ * Do not edit manually.
4
+ * Webitel API
5
+ * OpenAPI spec version: 24.04.0
6
+ */
7
+ import type { WebitelImApiGatewayV1DeliveryError } from './webitelImApiGatewayV1DeliveryError';
8
+ import type { WebitelImApiGatewayV1ThreadMember } from './webitelImApiGatewayV1ThreadMember';
9
+
10
+ /**
11
+ * DeliveryFailure is one member a message could not be delivered to.
12
+ */
13
+ export interface WebitelImApiGatewayV1DeliveryFailure {
14
+ error?: WebitelImApiGatewayV1DeliveryError;
15
+ member?: WebitelImApiGatewayV1ThreadMember;
16
+ }
@@ -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
+ import type { WebitelImApiGatewayV1ThreadPreview } from './webitelImApiGatewayV1ThreadPreview';
8
+
9
+ export interface WebitelImApiGatewayV1GivePreviewResponse {
10
+ preview?: WebitelImApiGatewayV1ThreadPreview;
11
+ }
@@ -4,6 +4,7 @@
4
4
  * Webitel API
5
5
  * OpenAPI spec version: 24.04.0
6
6
  */
7
+ import type { WebitelImApiGatewayV1DeliveryFailure } from './webitelImApiGatewayV1DeliveryFailure';
7
8
  import type { WebitelImApiGatewayV1Document } from './webitelImApiGatewayV1Document';
8
9
  import type { WebitelImApiGatewayV1ForwardOrigin } from './webitelImApiGatewayV1ForwardOrigin';
9
10
  import type { WebitelImApiGatewayV1HistoryMessageMetadata } from './webitelImApiGatewayV1HistoryMessageMetadata';
@@ -44,6 +45,11 @@ export interface WebitelImApiGatewayV1HistoryMessage {
44
45
  documents?: WebitelImApiGatewayV1Document[];
45
46
  /** Message last update timestamp (Unix time, milliseconds). */
46
47
  edited_at?: string;
48
+ /**
49
+ * Members the message could not be delivered to, with the provider's reason.
50
+ * Empty when it reached everyone; an entry is dropped once a later delivery succeeds.
51
+ */
52
+ failures?: WebitelImApiGatewayV1DeliveryFailure[];
47
53
  /**
48
54
  * Set when this message is a forward. Never populated for a deleted
49
55
  * message: the tombstone must not leak the origin name.
@@ -5,7 +5,6 @@
5
5
  * OpenAPI spec version: 24.04.0
6
6
  */
7
7
 
8
- export interface WebitelImApiGatewayV1MessageFailureError {
9
- code?: string;
10
- message?: string;
8
+ export interface WebitelImApiGatewayV1RemoveFromPreviewResponse {
9
+ [key: string]: unknown;
11
10
  }