@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.
- package/package.json +1 -1
- package/src/api/clients/lists/blacklistNumbers.ts +43 -0
- package/src/gen/_models/engineCreateListCommunicationBulkItem.ts +12 -0
- package/src/gen/_models/engineListCommunicationBulkError.ts +14 -0
- package/src/gen/_models/engineListCommunicationBulkResponse.ts +13 -0
- package/src/gen/_models/engineListServiceCreateListCommunicationBulkBody.ts +11 -0
- package/src/gen/_models/index.ts +13 -2
- package/src/gen/_models/threadManagementSearchParams.ts +5 -0
- package/src/gen/_models/webitelImApiGatewayV1DeliveryError.ts +14 -0
- package/src/gen/_models/webitelImApiGatewayV1DeliveryFailure.ts +16 -0
- package/src/gen/_models/webitelImApiGatewayV1GivePreviewResponse.ts +11 -0
- package/src/gen/_models/webitelImApiGatewayV1HistoryMessage.ts +6 -0
- package/src/gen/_models/{webitelImApiGatewayV1MessageFailureError.ts → webitelImApiGatewayV1RemoveFromPreviewResponse.ts} +2 -3
- package/src/gen/_models/webitelImApiGatewayV1ThreadManagementTransferBody.ts +5 -0
- package/src/gen/_models/webitelImApiGatewayV1ThreadPreview.ts +18 -0
- package/src/gen/_models/webitelImApiGatewayV1ThreadPreviewServiceGivePreviewBody.ts +14 -0
- package/src/gen/_models/webitelImApiGatewayV1ThreadPreviewServiceRemoveFromPreviewBody.ts +12 -0
- package/src/gen/_models/webitelImApiGatewayV1ThreadPreviewServiceUpgradePreviewToFullMemberBody.ts +14 -0
- package/src/gen/_models/webitelImApiGatewayV1ThreadUpdates.ts +0 -3
- package/src/gen/_models/webitelImApiGatewayV1UpdatedMessage.ts +6 -0
- package/src/gen/_models/webitelImApiGatewayV1UpgradePreviewToFullMemberResponse.ts +11 -0
- package/src/gen-wire/_models/engineCreateListCommunicationBulkItem.ts +12 -0
- package/src/gen-wire/_models/engineListCommunicationBulkError.ts +14 -0
- package/src/gen-wire/_models/engineListCommunicationBulkResponse.ts +13 -0
- package/src/gen-wire/_models/engineListServiceCreateListCommunicationBulkBody.ts +11 -0
- package/src/gen-wire/_models/index.ts +13 -2
- package/src/gen-wire/_models/threadManagementSearchParams.ts +5 -0
- package/src/gen-wire/_models/webitelImApiGatewayV1DeliveryError.ts +14 -0
- package/src/gen-wire/_models/webitelImApiGatewayV1DeliveryFailure.ts +16 -0
- package/src/gen-wire/_models/webitelImApiGatewayV1GivePreviewResponse.ts +11 -0
- package/src/gen-wire/_models/webitelImApiGatewayV1HistoryMessage.ts +6 -0
- package/src/gen-wire/_models/{webitelImApiGatewayV1MessageFailureError.ts → webitelImApiGatewayV1RemoveFromPreviewResponse.ts} +2 -3
- package/src/gen-wire/_models/webitelImApiGatewayV1ThreadManagementTransferBody.ts +5 -0
- package/src/gen-wire/_models/webitelImApiGatewayV1ThreadPreview.ts +18 -0
- package/src/gen-wire/_models/webitelImApiGatewayV1ThreadPreviewServiceGivePreviewBody.ts +14 -0
- package/src/gen-wire/_models/webitelImApiGatewayV1ThreadPreviewServiceRemoveFromPreviewBody.ts +12 -0
- package/src/gen-wire/_models/webitelImApiGatewayV1ThreadPreviewServiceUpgradePreviewToFullMemberBody.ts +14 -0
- package/src/gen-wire/_models/webitelImApiGatewayV1ThreadUpdates.ts +0 -3
- package/src/gen-wire/_models/webitelImApiGatewayV1UpdatedMessage.ts +6 -0
- package/src/gen-wire/_models/webitelImApiGatewayV1UpgradePreviewToFullMemberResponse.ts +11 -0
- package/src/gen-wire/index.ts +12 -0
- package/src/gen-wire/index.zod.ts +1 -0
- package/src/gen-wire/list-service/list-service.ts +19 -0
- package/src/gen-wire/list-service/list-service.zod.ts +62 -0
- package/src/gen-wire/webitel-im-api-gateway-v1-messagehistory/webitel-im-api-gateway-v1-messagehistory.zod.ts +402 -0
- package/src/gen-wire/webitel-im-api-gateway-v1-threadmanagement/webitel-im-api-gateway-v1-threadmanagement.zod.ts +560 -0
- package/src/gen-wire/webitel-im-api-gateway-v1-threadpreviewservice/webitel-im-api-gateway-v1-threadpreviewservice.ts +89 -0
- package/src/gen-wire/webitel-im-api-gateway-v1-threadpreviewservice/webitel-im-api-gateway-v1-threadpreviewservice.zod.ts +351 -0
- package/src/gen-wire/webitel-im-api-gateway-v1-updates/webitel-im-api-gateway-v1-updates.zod.ts +406 -130
- package/types/.tsbuildinfo +1 -1
- package/types/api/clients/lists/blacklistNumbers.d.ts +5 -1
- package/types/gen/_models/engineCreateListCommunicationBulkItem.d.ts +11 -0
- package/types/gen/_models/engineListCommunicationBulkError.d.ts +13 -0
- package/types/gen/_models/engineListCommunicationBulkResponse.d.ts +12 -0
- package/types/gen/_models/engineListServiceCreateListCommunicationBulkBody.d.ts +10 -0
- package/types/gen/_models/index.d.ts +13 -2
- package/types/gen/_models/threadManagementSearchParams.d.ts +5 -0
- package/types/gen/_models/webitelImApiGatewayV1DeliveryError.d.ts +13 -0
- package/types/gen/_models/webitelImApiGatewayV1DeliveryFailure.d.ts +15 -0
- package/types/gen/_models/webitelImApiGatewayV1GivePreviewResponse.d.ts +10 -0
- package/types/gen/_models/webitelImApiGatewayV1HistoryMessage.d.ts +6 -0
- package/types/gen/_models/{webitelImApiGatewayV1MessageFailureError.d.ts → webitelImApiGatewayV1RemoveFromPreviewResponse.d.ts} +2 -3
- package/types/gen/_models/webitelImApiGatewayV1ThreadManagementTransferBody.d.ts +5 -0
- package/types/gen/_models/webitelImApiGatewayV1ThreadPreview.d.ts +17 -0
- package/types/gen/_models/webitelImApiGatewayV1ThreadPreviewServiceGivePreviewBody.d.ts +13 -0
- package/types/gen/_models/webitelImApiGatewayV1ThreadPreviewServiceRemoveFromPreviewBody.d.ts +11 -0
- package/types/gen/_models/webitelImApiGatewayV1ThreadPreviewServiceUpgradePreviewToFullMemberBody.d.ts +13 -0
- package/types/gen/_models/webitelImApiGatewayV1ThreadUpdates.d.ts +0 -3
- package/types/gen/_models/webitelImApiGatewayV1UpdatedMessage.d.ts +6 -0
- package/types/gen/_models/webitelImApiGatewayV1UpgradePreviewToFullMemberResponse.d.ts +10 -0
- package/types/gen-wire/_models/engineCreateListCommunicationBulkItem.d.ts +11 -0
- package/types/gen-wire/_models/engineListCommunicationBulkError.d.ts +13 -0
- package/types/gen-wire/_models/engineListCommunicationBulkResponse.d.ts +12 -0
- package/types/gen-wire/_models/engineListServiceCreateListCommunicationBulkBody.d.ts +10 -0
- package/types/gen-wire/_models/index.d.ts +13 -2
- package/types/gen-wire/_models/threadManagementSearchParams.d.ts +5 -0
- package/types/gen-wire/_models/webitelImApiGatewayV1DeliveryError.d.ts +13 -0
- package/types/gen-wire/_models/webitelImApiGatewayV1DeliveryFailure.d.ts +15 -0
- package/types/gen-wire/_models/webitelImApiGatewayV1GivePreviewResponse.d.ts +10 -0
- package/types/gen-wire/_models/webitelImApiGatewayV1HistoryMessage.d.ts +6 -0
- package/types/gen-wire/_models/{webitelImApiGatewayV1MessageFailureError.d.ts → webitelImApiGatewayV1RemoveFromPreviewResponse.d.ts} +2 -3
- package/types/gen-wire/_models/webitelImApiGatewayV1ThreadManagementTransferBody.d.ts +5 -0
- package/types/gen-wire/_models/webitelImApiGatewayV1ThreadPreview.d.ts +17 -0
- package/types/gen-wire/_models/webitelImApiGatewayV1ThreadPreviewServiceGivePreviewBody.d.ts +13 -0
- package/types/gen-wire/_models/webitelImApiGatewayV1ThreadPreviewServiceRemoveFromPreviewBody.d.ts +11 -0
- package/types/gen-wire/_models/webitelImApiGatewayV1ThreadPreviewServiceUpgradePreviewToFullMemberBody.d.ts +13 -0
- package/types/gen-wire/_models/webitelImApiGatewayV1ThreadUpdates.d.ts +0 -3
- package/types/gen-wire/_models/webitelImApiGatewayV1UpdatedMessage.d.ts +6 -0
- package/types/gen-wire/_models/webitelImApiGatewayV1UpgradePreviewToFullMemberResponse.d.ts +10 -0
- package/types/gen-wire/index.d.ts +5 -3
- package/types/gen-wire/index.zod.d.ts +1 -0
- package/types/gen-wire/list-service/list-service.d.ts +3 -1
- package/types/gen-wire/list-service/list-service.zod.d.ts +39 -0
- package/types/gen-wire/webitel-im-api-gateway-v1-messagehistory/webitel-im-api-gateway-v1-messagehistory.zod.d.ts +150 -0
- package/types/gen-wire/webitel-im-api-gateway-v1-threadmanagement/webitel-im-api-gateway-v1-threadmanagement.zod.d.ts +207 -0
- package/types/gen-wire/webitel-im-api-gateway-v1-threadpreviewservice/webitel-im-api-gateway-v1-threadpreviewservice.d.ts +17 -0
- package/types/gen-wire/webitel-im-api-gateway-v1-threadpreviewservice/webitel-im-api-gateway-v1-threadpreviewservice.zod.d.ts +155 -0
- package/types/gen-wire/webitel-im-api-gateway-v1-updates/webitel-im-api-gateway-v1-updates.zod.d.ts +150 -51
- package/src/gen/_models/webitelImApiGatewayV1MessageFailure.ts +0 -17
- package/src/gen-wire/_models/webitelImApiGatewayV1MessageFailure.ts +0 -17
- package/types/gen/_models/webitelImApiGatewayV1MessageFailure.d.ts +0 -16
- package/types/gen-wire/_models/webitelImApiGatewayV1MessageFailure.d.ts +0 -16
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Webitel API
|
|
5
|
+
* OpenAPI spec version: 24.04.0
|
|
6
|
+
*/
|
|
7
|
+
import type { AxiosInstance, AxiosRequestConfig, AxiosResponse } from 'axios';
|
|
8
|
+
|
|
9
|
+
import axios from '../../api/axios/genClient';
|
|
10
|
+
|
|
11
|
+
import type {
|
|
12
|
+
WebitelImApiGatewayV1GivePreviewResponse,
|
|
13
|
+
WebitelImApiGatewayV1RemoveFromPreviewResponse,
|
|
14
|
+
WebitelImApiGatewayV1ThreadPreviewServiceGivePreviewBody,
|
|
15
|
+
WebitelImApiGatewayV1ThreadPreviewServiceRemoveFromPreviewBody,
|
|
16
|
+
WebitelImApiGatewayV1ThreadPreviewServiceUpgradePreviewToFullMemberBody,
|
|
17
|
+
WebitelImApiGatewayV1UpgradePreviewToFullMemberResponse,
|
|
18
|
+
} from '../_models';
|
|
19
|
+
|
|
20
|
+
// --- header start
|
|
21
|
+
//
|
|
22
|
+
|
|
23
|
+
export const // --- title start
|
|
24
|
+
getWebitelImApiGatewayV1Threadpreviewservice =
|
|
25
|
+
// --- title end
|
|
26
|
+
(axiosInstance: AxiosInstance = axios) => {
|
|
27
|
+
// --- header end
|
|
28
|
+
/**
|
|
29
|
+
* @summary GivePreview grants (or, while active, extends) a preview.
|
|
30
|
+
*/
|
|
31
|
+
const threadPreviewServiceGivePreview = (
|
|
32
|
+
threadId: string,
|
|
33
|
+
webitelImApiGatewayV1ThreadPreviewServiceGivePreviewBody: WebitelImApiGatewayV1ThreadPreviewServiceGivePreviewBody,
|
|
34
|
+
options?: AxiosRequestConfig,
|
|
35
|
+
): Promise<AxiosResponse<WebitelImApiGatewayV1GivePreviewResponse>> => {
|
|
36
|
+
return axiosInstance.post(
|
|
37
|
+
`/v1/threads/${threadId}/preview`,
|
|
38
|
+
webitelImApiGatewayV1ThreadPreviewServiceGivePreviewBody,
|
|
39
|
+
options,
|
|
40
|
+
);
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* @summary RemoveFromPreview revokes the contact's active preview.
|
|
44
|
+
*/
|
|
45
|
+
const threadPreviewServiceRemoveFromPreview = (
|
|
46
|
+
threadId: string,
|
|
47
|
+
webitelImApiGatewayV1ThreadPreviewServiceRemoveFromPreviewBody: WebitelImApiGatewayV1ThreadPreviewServiceRemoveFromPreviewBody,
|
|
48
|
+
options?: AxiosRequestConfig,
|
|
49
|
+
): Promise<
|
|
50
|
+
AxiosResponse<WebitelImApiGatewayV1RemoveFromPreviewResponse>
|
|
51
|
+
> => {
|
|
52
|
+
return axiosInstance.post(
|
|
53
|
+
`/v1/threads/${threadId}/preview/remove`,
|
|
54
|
+
webitelImApiGatewayV1ThreadPreviewServiceRemoveFromPreviewBody,
|
|
55
|
+
options,
|
|
56
|
+
);
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* @summary UpgradePreviewToFullMember atomically revokes the active preview and adds the contact as a full member.
|
|
60
|
+
*/
|
|
61
|
+
const threadPreviewServiceUpgradePreviewToFullMember = (
|
|
62
|
+
threadId: string,
|
|
63
|
+
webitelImApiGatewayV1ThreadPreviewServiceUpgradePreviewToFullMemberBody: WebitelImApiGatewayV1ThreadPreviewServiceUpgradePreviewToFullMemberBody,
|
|
64
|
+
options?: AxiosRequestConfig,
|
|
65
|
+
): Promise<
|
|
66
|
+
AxiosResponse<WebitelImApiGatewayV1UpgradePreviewToFullMemberResponse>
|
|
67
|
+
> => {
|
|
68
|
+
return axiosInstance.post(
|
|
69
|
+
`/v1/threads/${threadId}/preview/upgrade`,
|
|
70
|
+
webitelImApiGatewayV1ThreadPreviewServiceUpgradePreviewToFullMemberBody,
|
|
71
|
+
options,
|
|
72
|
+
);
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
// --- footer start
|
|
76
|
+
return {
|
|
77
|
+
threadPreviewServiceGivePreview,
|
|
78
|
+
threadPreviewServiceRemoveFromPreview,
|
|
79
|
+
threadPreviewServiceUpgradePreviewToFullMember,
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
export type ThreadPreviewServiceGivePreviewResult =
|
|
83
|
+
AxiosResponse<WebitelImApiGatewayV1GivePreviewResponse>;
|
|
84
|
+
export type ThreadPreviewServiceRemoveFromPreviewResult =
|
|
85
|
+
AxiosResponse<WebitelImApiGatewayV1RemoveFromPreviewResponse>;
|
|
86
|
+
export type ThreadPreviewServiceUpgradePreviewToFullMemberResult =
|
|
87
|
+
AxiosResponse<WebitelImApiGatewayV1UpgradePreviewToFullMemberResponse>;
|
|
88
|
+
|
|
89
|
+
// --- footer end
|
|
@@ -0,0 +1,351 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Webitel API
|
|
5
|
+
* OpenAPI spec version: 24.04.0
|
|
6
|
+
*/
|
|
7
|
+
import * as zod from 'zod';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* @summary GivePreview grants (or, while active, extends) a preview.
|
|
11
|
+
*/
|
|
12
|
+
export const ThreadPreviewServiceGivePreviewParams = zod.object({
|
|
13
|
+
thread_id: zod.string(),
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
export const ThreadPreviewServiceGivePreviewBody = zod.object({
|
|
17
|
+
contact: zod
|
|
18
|
+
.object({
|
|
19
|
+
chat_name: zod
|
|
20
|
+
.string()
|
|
21
|
+
.optional()
|
|
22
|
+
.describe(
|
|
23
|
+
'chat_name is the name external clients see instead of the real one.',
|
|
24
|
+
),
|
|
25
|
+
iss: zod.string().optional(),
|
|
26
|
+
sub: zod.string().optional(),
|
|
27
|
+
via: zod.string().optional(),
|
|
28
|
+
})
|
|
29
|
+
.optional()
|
|
30
|
+
.describe('The contact receiving the preview.'),
|
|
31
|
+
duration_ms: zod
|
|
32
|
+
.string()
|
|
33
|
+
.optional()
|
|
34
|
+
.describe('Preview lifetime from now, in milliseconds.'),
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
export const ThreadPreviewServiceGivePreviewResponse = zod.object({
|
|
38
|
+
preview: zod
|
|
39
|
+
.object({
|
|
40
|
+
contact: zod
|
|
41
|
+
.object({
|
|
42
|
+
app_id: zod
|
|
43
|
+
.string()
|
|
44
|
+
.optional()
|
|
45
|
+
.describe('Identifier of the specific integration app or bot.'),
|
|
46
|
+
created_at: zod
|
|
47
|
+
.string()
|
|
48
|
+
.optional()
|
|
49
|
+
.describe(
|
|
50
|
+
'Record creation timestamp (Unix Epoch in milliseconds).',
|
|
51
|
+
),
|
|
52
|
+
is_bot: zod
|
|
53
|
+
.boolean()
|
|
54
|
+
.optional()
|
|
55
|
+
.describe(
|
|
56
|
+
'Represents if usere is real person or automatic script.',
|
|
57
|
+
),
|
|
58
|
+
iss: zod
|
|
59
|
+
.string()
|
|
60
|
+
.optional()
|
|
61
|
+
.describe('Provider-specific unique identifier (Issuer ID).'),
|
|
62
|
+
metadata: zod
|
|
63
|
+
.record(zod.string(), zod.string())
|
|
64
|
+
.optional()
|
|
65
|
+
.describe(
|
|
66
|
+
'Additional dynamic attributes provided by the messenger.',
|
|
67
|
+
),
|
|
68
|
+
name: zod
|
|
69
|
+
.string()
|
|
70
|
+
.optional()
|
|
71
|
+
.describe('Display name of the contact.'),
|
|
72
|
+
sub: zod
|
|
73
|
+
.string()
|
|
74
|
+
.optional()
|
|
75
|
+
.describe('Associated internal system subject/identifier.'),
|
|
76
|
+
type: zod
|
|
77
|
+
.string()
|
|
78
|
+
.optional()
|
|
79
|
+
.describe("Channel type (e.g., 'webchat', 'telegram')."),
|
|
80
|
+
updated_at: zod
|
|
81
|
+
.string()
|
|
82
|
+
.optional()
|
|
83
|
+
.describe(
|
|
84
|
+
'Last record update timestamp (Unix Epoch in milliseconds).',
|
|
85
|
+
),
|
|
86
|
+
username: zod
|
|
87
|
+
.string()
|
|
88
|
+
.optional()
|
|
89
|
+
.describe('Technical username or handle.'),
|
|
90
|
+
vias: zod
|
|
91
|
+
.array(
|
|
92
|
+
zod.object({
|
|
93
|
+
contact_id: zod.string().optional(),
|
|
94
|
+
created_at: zod.string().optional(),
|
|
95
|
+
disable: zod.boolean().optional(),
|
|
96
|
+
disable_reason: zod.string().optional(),
|
|
97
|
+
metadata: zod.looseObject({}).optional(),
|
|
98
|
+
updated_at: zod.string().optional(),
|
|
99
|
+
via: zod.string().optional(),
|
|
100
|
+
}),
|
|
101
|
+
)
|
|
102
|
+
.optional(),
|
|
103
|
+
})
|
|
104
|
+
.optional()
|
|
105
|
+
.describe('Contact represents an external messaging identity.'),
|
|
106
|
+
created_at: zod.string().optional().describe('Unix milliseconds.'),
|
|
107
|
+
expires_at: zod
|
|
108
|
+
.string()
|
|
109
|
+
.optional()
|
|
110
|
+
.describe(
|
|
111
|
+
'Unix milliseconds; the preview stops granting access at this moment.',
|
|
112
|
+
),
|
|
113
|
+
id: zod.string().optional(),
|
|
114
|
+
initiator: zod
|
|
115
|
+
.object({
|
|
116
|
+
app_id: zod
|
|
117
|
+
.string()
|
|
118
|
+
.optional()
|
|
119
|
+
.describe('Identifier of the specific integration app or bot.'),
|
|
120
|
+
created_at: zod
|
|
121
|
+
.string()
|
|
122
|
+
.optional()
|
|
123
|
+
.describe(
|
|
124
|
+
'Record creation timestamp (Unix Epoch in milliseconds).',
|
|
125
|
+
),
|
|
126
|
+
is_bot: zod
|
|
127
|
+
.boolean()
|
|
128
|
+
.optional()
|
|
129
|
+
.describe(
|
|
130
|
+
'Represents if usere is real person or automatic script.',
|
|
131
|
+
),
|
|
132
|
+
iss: zod
|
|
133
|
+
.string()
|
|
134
|
+
.optional()
|
|
135
|
+
.describe('Provider-specific unique identifier (Issuer ID).'),
|
|
136
|
+
metadata: zod
|
|
137
|
+
.record(zod.string(), zod.string())
|
|
138
|
+
.optional()
|
|
139
|
+
.describe(
|
|
140
|
+
'Additional dynamic attributes provided by the messenger.',
|
|
141
|
+
),
|
|
142
|
+
name: zod
|
|
143
|
+
.string()
|
|
144
|
+
.optional()
|
|
145
|
+
.describe('Display name of the contact.'),
|
|
146
|
+
sub: zod
|
|
147
|
+
.string()
|
|
148
|
+
.optional()
|
|
149
|
+
.describe('Associated internal system subject/identifier.'),
|
|
150
|
+
type: zod
|
|
151
|
+
.string()
|
|
152
|
+
.optional()
|
|
153
|
+
.describe("Channel type (e.g., 'webchat', 'telegram')."),
|
|
154
|
+
updated_at: zod
|
|
155
|
+
.string()
|
|
156
|
+
.optional()
|
|
157
|
+
.describe(
|
|
158
|
+
'Last record update timestamp (Unix Epoch in milliseconds).',
|
|
159
|
+
),
|
|
160
|
+
username: zod
|
|
161
|
+
.string()
|
|
162
|
+
.optional()
|
|
163
|
+
.describe('Technical username or handle.'),
|
|
164
|
+
vias: zod
|
|
165
|
+
.array(
|
|
166
|
+
zod.object({
|
|
167
|
+
contact_id: zod.string().optional(),
|
|
168
|
+
created_at: zod.string().optional(),
|
|
169
|
+
disable: zod.boolean().optional(),
|
|
170
|
+
disable_reason: zod.string().optional(),
|
|
171
|
+
metadata: zod.looseObject({}).optional(),
|
|
172
|
+
updated_at: zod.string().optional(),
|
|
173
|
+
via: zod.string().optional(),
|
|
174
|
+
}),
|
|
175
|
+
)
|
|
176
|
+
.optional(),
|
|
177
|
+
})
|
|
178
|
+
.optional()
|
|
179
|
+
.describe('Contact represents an external messaging identity.'),
|
|
180
|
+
thread_id: zod.string().optional(),
|
|
181
|
+
})
|
|
182
|
+
.optional(),
|
|
183
|
+
});
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* @summary RemoveFromPreview revokes the contact's active preview.
|
|
187
|
+
*/
|
|
188
|
+
export const ThreadPreviewServiceRemoveFromPreviewParams = zod.object({
|
|
189
|
+
thread_id: zod.string(),
|
|
190
|
+
});
|
|
191
|
+
|
|
192
|
+
export const ThreadPreviewServiceRemoveFromPreviewBody = zod.object({
|
|
193
|
+
contact: zod
|
|
194
|
+
.object({
|
|
195
|
+
chat_name: zod
|
|
196
|
+
.string()
|
|
197
|
+
.optional()
|
|
198
|
+
.describe(
|
|
199
|
+
'chat_name is the name external clients see instead of the real one.',
|
|
200
|
+
),
|
|
201
|
+
iss: zod.string().optional(),
|
|
202
|
+
sub: zod.string().optional(),
|
|
203
|
+
via: zod.string().optional(),
|
|
204
|
+
})
|
|
205
|
+
.optional()
|
|
206
|
+
.describe('The contact whose preview is revoked.'),
|
|
207
|
+
});
|
|
208
|
+
|
|
209
|
+
export const ThreadPreviewServiceRemoveFromPreviewResponse = zod.looseObject(
|
|
210
|
+
{},
|
|
211
|
+
);
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* @summary UpgradePreviewToFullMember atomically revokes the active preview and adds the contact as a full member.
|
|
215
|
+
*/
|
|
216
|
+
export const ThreadPreviewServiceUpgradePreviewToFullMemberParams = zod.object({
|
|
217
|
+
thread_id: zod.string(),
|
|
218
|
+
});
|
|
219
|
+
|
|
220
|
+
export const threadPreviewServiceUpgradePreviewToFullMemberBodyRoleDefault = `ROLE_UNSPECIFIED`;
|
|
221
|
+
|
|
222
|
+
export const ThreadPreviewServiceUpgradePreviewToFullMemberBody = zod.object({
|
|
223
|
+
contact: zod
|
|
224
|
+
.object({
|
|
225
|
+
chat_name: zod
|
|
226
|
+
.string()
|
|
227
|
+
.optional()
|
|
228
|
+
.describe(
|
|
229
|
+
'chat_name is the name external clients see instead of the real one.',
|
|
230
|
+
),
|
|
231
|
+
iss: zod.string().optional(),
|
|
232
|
+
sub: zod.string().optional(),
|
|
233
|
+
via: zod.string().optional(),
|
|
234
|
+
})
|
|
235
|
+
.optional()
|
|
236
|
+
.describe('The contact to upgrade to a full member.'),
|
|
237
|
+
role: zod
|
|
238
|
+
.enum([
|
|
239
|
+
'ROLE_UNSPECIFIED',
|
|
240
|
+
'ROLE_MEMBER',
|
|
241
|
+
'ROLE_ADMIN',
|
|
242
|
+
'ROLE_OWNER',
|
|
243
|
+
'ROLE_SUPERVISOR',
|
|
244
|
+
])
|
|
245
|
+
.default(threadPreviewServiceUpgradePreviewToFullMemberBodyRoleDefault),
|
|
246
|
+
});
|
|
247
|
+
|
|
248
|
+
export const threadPreviewServiceUpgradePreviewToFullMemberResponseMemberRoleDefault = `ROLE_UNSPECIFIED`;
|
|
249
|
+
|
|
250
|
+
export const ThreadPreviewServiceUpgradePreviewToFullMemberResponse =
|
|
251
|
+
zod.object({
|
|
252
|
+
member: zod
|
|
253
|
+
.object({
|
|
254
|
+
contact: zod
|
|
255
|
+
.object({
|
|
256
|
+
app_id: zod
|
|
257
|
+
.string()
|
|
258
|
+
.optional()
|
|
259
|
+
.describe('Identifier of the specific integration app or bot.'),
|
|
260
|
+
created_at: zod
|
|
261
|
+
.string()
|
|
262
|
+
.optional()
|
|
263
|
+
.describe(
|
|
264
|
+
'Record creation timestamp (Unix Epoch in milliseconds).',
|
|
265
|
+
),
|
|
266
|
+
is_bot: zod
|
|
267
|
+
.boolean()
|
|
268
|
+
.optional()
|
|
269
|
+
.describe(
|
|
270
|
+
'Represents if usere is real person or automatic script.',
|
|
271
|
+
),
|
|
272
|
+
iss: zod
|
|
273
|
+
.string()
|
|
274
|
+
.optional()
|
|
275
|
+
.describe('Provider-specific unique identifier (Issuer ID).'),
|
|
276
|
+
metadata: zod
|
|
277
|
+
.record(zod.string(), zod.string())
|
|
278
|
+
.optional()
|
|
279
|
+
.describe(
|
|
280
|
+
'Additional dynamic attributes provided by the messenger.',
|
|
281
|
+
),
|
|
282
|
+
name: zod
|
|
283
|
+
.string()
|
|
284
|
+
.optional()
|
|
285
|
+
.describe('Display name of the contact.'),
|
|
286
|
+
sub: zod
|
|
287
|
+
.string()
|
|
288
|
+
.optional()
|
|
289
|
+
.describe('Associated internal system subject/identifier.'),
|
|
290
|
+
type: zod
|
|
291
|
+
.string()
|
|
292
|
+
.optional()
|
|
293
|
+
.describe("Channel type (e.g., 'webchat', 'telegram')."),
|
|
294
|
+
updated_at: zod
|
|
295
|
+
.string()
|
|
296
|
+
.optional()
|
|
297
|
+
.describe(
|
|
298
|
+
'Last record update timestamp (Unix Epoch in milliseconds).',
|
|
299
|
+
),
|
|
300
|
+
username: zod
|
|
301
|
+
.string()
|
|
302
|
+
.optional()
|
|
303
|
+
.describe('Technical username or handle.'),
|
|
304
|
+
vias: zod
|
|
305
|
+
.array(
|
|
306
|
+
zod.object({
|
|
307
|
+
contact_id: zod.string().optional(),
|
|
308
|
+
created_at: zod.string().optional(),
|
|
309
|
+
disable: zod.boolean().optional(),
|
|
310
|
+
disable_reason: zod.string().optional(),
|
|
311
|
+
metadata: zod.looseObject({}).optional(),
|
|
312
|
+
updated_at: zod.string().optional(),
|
|
313
|
+
via: zod.string().optional(),
|
|
314
|
+
}),
|
|
315
|
+
)
|
|
316
|
+
.optional(),
|
|
317
|
+
})
|
|
318
|
+
.optional()
|
|
319
|
+
.describe('Contact represents an external messaging identity.'),
|
|
320
|
+
id: zod.string().optional(),
|
|
321
|
+
permissions: zod
|
|
322
|
+
.object({
|
|
323
|
+
can_add_members: zod.boolean().optional(),
|
|
324
|
+
can_change_members_permissions: zod.boolean().optional(),
|
|
325
|
+
can_change_thread_info: zod.boolean().optional(),
|
|
326
|
+
can_delete_messages: zod.boolean().optional(),
|
|
327
|
+
can_remove_members: zod.boolean().optional(),
|
|
328
|
+
can_send_messages: zod.boolean().optional(),
|
|
329
|
+
created_at: zod.string().optional(),
|
|
330
|
+
id: zod.string().optional(),
|
|
331
|
+
member_id: zod.string().optional(),
|
|
332
|
+
updated_at: zod.string().optional(),
|
|
333
|
+
})
|
|
334
|
+
.optional(),
|
|
335
|
+
role: zod
|
|
336
|
+
.enum([
|
|
337
|
+
'ROLE_UNSPECIFIED',
|
|
338
|
+
'ROLE_MEMBER',
|
|
339
|
+
'ROLE_ADMIN',
|
|
340
|
+
'ROLE_OWNER',
|
|
341
|
+
'ROLE_SUPERVISOR',
|
|
342
|
+
])
|
|
343
|
+
.default(
|
|
344
|
+
threadPreviewServiceUpgradePreviewToFullMemberResponseMemberRoleDefault,
|
|
345
|
+
),
|
|
346
|
+
})
|
|
347
|
+
.optional()
|
|
348
|
+
.describe(
|
|
349
|
+
'ThreadMember represents a thread participant\nwith optional type-specific settings.',
|
|
350
|
+
),
|
|
351
|
+
});
|