@webitel/api-services 0.1.40 → 0.1.42
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 +2 -2
- package/src/gen/_models/apiGeneratePasswordRequest.ts +12 -0
- package/src/gen/_models/apiGeneratePasswordRequest.zod.ts +12 -0
- package/src/gen/_models/{updateUser2BodyProfile.ts → apiGeneratePasswordResponse.ts} +3 -3
- package/src/gen/_models/{updateUser2BodyProfile.zod.ts → apiGeneratePasswordResponse.zod.ts} +3 -3
- package/src/gen/_models/{updateUserBody.ts → apiInputUser.ts} +9 -15
- package/src/gen/_models/{updateUserBody.zod.ts → apiInputUser.zod.ts} +9 -15
- package/src/gen/_models/apiInputUserBody.ts +12 -0
- package/src/gen/_models/apiInputUserBody.zod.ts +12 -0
- package/src/gen/_models/apiInputUserDevice.ts +13 -0
- package/src/gen/_models/apiInputUserDevice.zod.ts +13 -0
- package/src/gen/_models/{updateUserBodyProfile.ts → apiInputUserProfile.ts} +1 -1
- package/src/gen/_models/{updateUserBodyProfile.zod.ts → apiInputUserProfile.zod.ts} +1 -1
- package/src/gen/_models/apiUser.ts +7 -7
- package/src/gen/_models/apiUser.zod.ts +7 -7
- package/src/gen/_models/apiUserinfo.ts +1 -0
- package/src/gen/_models/apiUserinfo.zod.ts +1 -0
- package/src/gen/_models/contactsCreateContactError.ts +20 -0
- package/src/gen/_models/contactsCreateContactError.zod.ts +20 -0
- package/src/gen/_models/contactsCreateContactsBulkResponse.ts +20 -0
- package/src/gen/_models/contactsCreateContactsBulkResponse.zod.ts +20 -0
- package/src/gen/_models/createContactsParams.ts +13 -0
- package/src/gen/_models/createContactsParams.zod.ts +13 -0
- package/src/gen/_models/createUserParams.ts +31 -0
- package/src/gen/_models/createUserParams.zod.ts +31 -0
- package/src/gen/_models/engineSystemSettingName.ts +2 -0
- package/src/gen/_models/engineSystemSettingName.zod.ts +2 -0
- package/src/gen/_models/index.ts +15 -9
- package/src/gen/_models/index.zod.ts +15 -9
- package/src/gen/_models/messageHistorySearchLeftThreadsMessagesHistoryParams.ts +49 -0
- package/src/gen/_models/messageHistorySearchLeftThreadsMessagesHistoryParams.zod.ts +49 -0
- package/src/gen/_models/searchSystemSettingNameItem.ts +2 -0
- package/src/gen/_models/searchSystemSettingNameItem.zod.ts +2 -0
- package/src/gen/_models/signupParams.ts +5 -0
- package/src/gen/_models/signupParams.zod.ts +5 -0
- package/src/gen/_models/webitelCasesInputPriority.ts +5 -2
- package/src/gen/_models/webitelCasesInputPriority.zod.ts +5 -2
- package/src/gen/_models/webitelCasesPriority.ts +10 -7
- package/src/gen/_models/webitelCasesPriority.zod.ts +10 -7
- package/src/gen/_models/webitelImApiGatewayV1SendContactRequest.ts +2 -0
- package/src/gen/_models/webitelImApiGatewayV1SendContactRequest.zod.ts +2 -0
- package/src/gen/_models/webitelImApiGatewayV1SendDocumentRequest.ts +2 -0
- package/src/gen/_models/webitelImApiGatewayV1SendDocumentRequest.zod.ts +2 -0
- package/src/gen/_models/webitelImApiGatewayV1SendImageRequest.ts +2 -0
- package/src/gen/_models/webitelImApiGatewayV1SendImageRequest.zod.ts +2 -0
- package/src/gen/_models/webitelImApiGatewayV1SendInteractiveMessageRequest.ts +2 -0
- package/src/gen/_models/webitelImApiGatewayV1SendInteractiveMessageRequest.zod.ts +2 -0
- package/src/gen/_models/webitelImApiGatewayV1SendLocationRequest.ts +2 -0
- package/src/gen/_models/webitelImApiGatewayV1SendLocationRequest.zod.ts +2 -0
- package/src/gen/_models/webitelImApiGatewayV1SendTextRequest.ts +2 -0
- package/src/gen/_models/webitelImApiGatewayV1SendTextRequest.zod.ts +2 -0
- package/src/gen/_models/webitelImProviderV1CreateGateRequest.ts +17 -0
- package/src/gen/_models/webitelImProviderV1CreateGateRequest.zod.ts +17 -0
- package/src/gen/_models/webitelImProviderV1CreateWABAGateRequest.ts +14 -0
- package/src/gen/_models/webitelImProviderV1CreateWABAGateRequest.zod.ts +14 -0
- package/src/gen/_models/webitelImProviderV1GateResponse.ts +21 -0
- package/src/gen/_models/webitelImProviderV1GateResponse.zod.ts +21 -0
- package/src/gen/_models/webitelImProviderV1ProviderSendDocumentRequest.ts +1 -0
- package/src/gen/_models/webitelImProviderV1ProviderSendDocumentRequest.zod.ts +1 -0
- package/src/gen/_models/webitelImProviderV1ProviderSendImageRequest.ts +1 -0
- package/src/gen/_models/webitelImProviderV1ProviderSendImageRequest.zod.ts +1 -0
- package/src/gen/_models/webitelImProviderV1ProviderSendTextRequest.ts +1 -0
- package/src/gen/_models/webitelImProviderV1ProviderSendTextRequest.zod.ts +1 -0
- package/src/gen/_models/webitelImProviderV1WhatsAppBusinessAccount.ts +16 -0
- package/src/gen/_models/webitelImProviderV1WhatsAppBusinessAccount.zod.ts +16 -0
- package/src/gen/auth/auth.msw.ts +18 -0
- package/src/gen/auth/auth.zod.ts +8 -0
- package/src/gen/cases/cases.msw.ts +1093 -1387
- package/src/gen/cases/cases.zod.ts +210 -245
- package/src/gen/catalogs/catalogs.msw.ts +836 -1088
- package/src/gen/catalogs/catalogs.zod.ts +198 -216
- package/src/gen/contacts/contacts.msw.ts +2900 -1
- package/src/gen/contacts/contacts.ts +21 -0
- package/src/gen/contacts/contacts.zod.ts +2083 -0
- package/src/gen/priorities/priorities.msw.ts +408 -534
- package/src/gen/priorities/priorities.zod.ts +108 -113
- package/src/gen/services/services.msw.ts +613 -802
- package/src/gen/services/services.zod.ts +96 -108
- package/src/gen/system-setting-service/system-setting-service.zod.ts +16 -0
- package/src/gen/users/users.msw.ts +434 -397
- package/src/gen/users/users.ts +46 -57
- package/src/gen/users/users.zod.ts +443 -459
- package/src/gen/webitel-im-api-gateway-v1-message/webitel-im-api-gateway-v1-message.zod.ts +42 -0
- package/src/gen/webitel-im-api-gateway-v1-messagehistory/webitel-im-api-gateway-v1-messagehistory.msw.ts +931 -0
- package/src/gen/webitel-im-api-gateway-v1-messagehistory/webitel-im-api-gateway-v1-messagehistory.ts +27 -0
- package/src/gen/webitel-im-api-gateway-v1-messagehistory/webitel-im-api-gateway-v1-messagehistory.zod.ts +576 -0
- package/src/gen/webitel-im-provider-v1-providermessageservice/webitel-im-provider-v1-providermessageservice.zod.ts +3 -0
- package/src/gen/webitel-im-provider-v1-whatsappservice/webitel-im-provider-v1-whatsappservice.msw.ts +94 -19
- package/src/gen/webitel-im-provider-v1-whatsappservice/webitel-im-provider-v1-whatsappservice.ts +6 -8
- package/src/gen/webitel-im-provider-v1-whatsappservice/webitel-im-provider-v1-whatsappservice.zod.ts +64 -42
- package/types/gen/_models/apiGeneratePasswordRequest.d.ts +11 -0
- package/types/gen/_models/apiGeneratePasswordRequest.zod.d.ts +11 -0
- package/types/gen/_models/apiGeneratePasswordResponse.d.ts +9 -0
- package/types/gen/_models/apiGeneratePasswordResponse.zod.d.ts +9 -0
- package/types/gen/_models/{updateUserBody.d.ts → apiInputUser.d.ts} +9 -15
- package/types/gen/_models/{updateUserBody.zod.d.ts → apiInputUser.zod.d.ts} +9 -15
- package/types/gen/_models/apiInputUserBody.d.ts +11 -0
- package/types/gen/_models/apiInputUserBody.zod.d.ts +11 -0
- package/types/gen/_models/apiInputUserDevice.d.ts +12 -0
- package/types/gen/_models/apiInputUserDevice.zod.d.ts +12 -0
- package/types/gen/_models/{updateUserBodyProfile.d.ts → apiInputUserProfile.d.ts} +1 -1
- package/types/gen/_models/{updateUserBodyProfile.zod.d.ts → apiInputUserProfile.zod.d.ts} +1 -1
- package/types/gen/_models/apiUser.d.ts +7 -7
- package/types/gen/_models/apiUser.zod.d.ts +7 -7
- package/types/gen/_models/apiUserinfo.d.ts +1 -0
- package/types/gen/_models/apiUserinfo.zod.d.ts +1 -0
- package/types/gen/_models/contactsCreateContactError.d.ts +19 -0
- package/types/gen/_models/contactsCreateContactError.zod.d.ts +19 -0
- package/types/gen/_models/contactsCreateContactsBulkResponse.d.ts +19 -0
- package/types/gen/_models/contactsCreateContactsBulkResponse.zod.d.ts +19 -0
- package/types/gen/_models/createContactsParams.d.ts +12 -0
- package/types/gen/_models/createContactsParams.zod.d.ts +12 -0
- package/types/gen/_models/createUserParams.d.ts +30 -0
- package/types/gen/_models/createUserParams.zod.d.ts +30 -0
- package/types/gen/_models/engineSystemSettingName.d.ts +2 -0
- package/types/gen/_models/engineSystemSettingName.zod.d.ts +2 -0
- package/types/gen/_models/index.zod.d.ts +15 -9
- package/types/gen/_models/messageHistorySearchLeftThreadsMessagesHistoryParams.d.ts +48 -0
- package/types/gen/_models/messageHistorySearchLeftThreadsMessagesHistoryParams.zod.d.ts +48 -0
- package/types/gen/_models/searchSystemSettingNameItem.d.ts +2 -0
- package/types/gen/_models/searchSystemSettingNameItem.zod.d.ts +2 -0
- package/types/gen/_models/signupParams.d.ts +5 -0
- package/types/gen/_models/signupParams.zod.d.ts +5 -0
- package/types/gen/_models/webitelCasesInputPriority.d.ts +5 -2
- package/types/gen/_models/webitelCasesInputPriority.zod.d.ts +5 -2
- package/types/gen/_models/webitelCasesPriority.d.ts +10 -7
- package/types/gen/_models/webitelCasesPriority.zod.d.ts +10 -7
- package/types/gen/_models/webitelImApiGatewayV1SendContactRequest.d.ts +2 -0
- package/types/gen/_models/webitelImApiGatewayV1SendContactRequest.zod.d.ts +2 -0
- package/types/gen/_models/webitelImApiGatewayV1SendDocumentRequest.d.ts +2 -0
- package/types/gen/_models/webitelImApiGatewayV1SendDocumentRequest.zod.d.ts +2 -0
- package/types/gen/_models/webitelImApiGatewayV1SendImageRequest.d.ts +2 -0
- package/types/gen/_models/webitelImApiGatewayV1SendImageRequest.zod.d.ts +2 -0
- package/types/gen/_models/webitelImApiGatewayV1SendInteractiveMessageRequest.d.ts +2 -0
- package/types/gen/_models/webitelImApiGatewayV1SendInteractiveMessageRequest.zod.d.ts +2 -0
- package/types/gen/_models/webitelImApiGatewayV1SendLocationRequest.d.ts +2 -0
- package/types/gen/_models/webitelImApiGatewayV1SendLocationRequest.zod.d.ts +2 -0
- package/types/gen/_models/webitelImApiGatewayV1SendTextRequest.d.ts +2 -0
- package/types/gen/_models/webitelImApiGatewayV1SendTextRequest.zod.d.ts +2 -0
- package/types/gen/_models/webitelImProviderV1CreateGateRequest.d.ts +16 -0
- package/types/gen/_models/webitelImProviderV1CreateGateRequest.zod.d.ts +16 -0
- package/types/gen/_models/webitelImProviderV1CreateWABAGateRequest.d.ts +13 -0
- package/types/gen/_models/webitelImProviderV1CreateWABAGateRequest.zod.d.ts +13 -0
- package/types/gen/_models/webitelImProviderV1GateResponse.d.ts +20 -0
- package/types/gen/_models/webitelImProviderV1GateResponse.zod.d.ts +20 -0
- package/types/gen/_models/webitelImProviderV1ProviderSendDocumentRequest.d.ts +1 -0
- package/types/gen/_models/webitelImProviderV1ProviderSendDocumentRequest.zod.d.ts +1 -0
- package/types/gen/_models/webitelImProviderV1ProviderSendImageRequest.d.ts +1 -0
- package/types/gen/_models/webitelImProviderV1ProviderSendImageRequest.zod.d.ts +1 -0
- package/types/gen/_models/webitelImProviderV1ProviderSendTextRequest.d.ts +1 -0
- package/types/gen/_models/webitelImProviderV1ProviderSendTextRequest.zod.d.ts +1 -0
- package/types/gen/_models/webitelImProviderV1WhatsAppBusinessAccount.d.ts +15 -0
- package/types/gen/_models/webitelImProviderV1WhatsAppBusinessAccount.zod.d.ts +15 -0
- package/types/gen/auth/auth.zod.d.ts +3 -0
- package/types/gen/cases/cases.zod.d.ts +126 -126
- package/types/gen/catalogs/catalogs.zod.d.ts +108 -108
- package/types/gen/contacts/contacts.d.ts +3 -1
- package/types/gen/contacts/contacts.msw.d.ts +3 -1
- package/types/gen/contacts/contacts.zod.d.ts +665 -0
- package/types/gen/priorities/priorities.zod.d.ts +60 -60
- package/types/gen/services/services.zod.d.ts +54 -54
- package/types/gen/system-setting-service/system-setting-service.zod.d.ts +16 -0
- package/types/gen/users/users.d.ts +8 -25
- package/types/gen/users/users.msw.d.ts +7 -5
- package/types/gen/users/users.zod.d.ts +136 -139
- package/types/gen/webitel-im-api-gateway-v1-message/webitel-im-api-gateway-v1-message.zod.d.ts +30 -0
- package/types/gen/webitel-im-api-gateway-v1-messagehistory/webitel-im-api-gateway-v1-messagehistory.d.ts +3 -1
- package/types/gen/webitel-im-api-gateway-v1-messagehistory/webitel-im-api-gateway-v1-messagehistory.msw.d.ts +2 -0
- package/types/gen/webitel-im-api-gateway-v1-messagehistory/webitel-im-api-gateway-v1-messagehistory.zod.d.ts +167 -0
- package/types/gen/webitel-im-provider-v1-providermessageservice/webitel-im-provider-v1-providermessageservice.zod.d.ts +3 -0
- package/types/gen/webitel-im-provider-v1-whatsappservice/webitel-im-provider-v1-whatsappservice.d.ts +3 -3
- package/types/gen/webitel-im-provider-v1-whatsappservice/webitel-im-provider-v1-whatsappservice.msw.d.ts +3 -3
- package/types/gen/webitel-im-provider-v1-whatsappservice/webitel-im-provider-v1-whatsappservice.zod.d.ts +40 -17
- package/src/gen/_models/apiCreateUserRequest.ts +0 -13
- package/src/gen/_models/apiCreateUserRequest.zod.ts +0 -13
- package/src/gen/_models/updateUser2Body.ts +0 -45
- package/src/gen/_models/updateUser2Body.zod.ts +0 -45
- package/src/gen/_models/updateUserUserBody.ts +0 -45
- package/src/gen/_models/updateUserUserBody.zod.ts +0 -45
- package/src/gen/_models/updateUserUserBodyProfile.ts +0 -10
- package/src/gen/_models/updateUserUserBodyProfile.zod.ts +0 -10
- package/src/gen/_models/webitelImProviderV1ProviderCreateWhatsAppGateRequest.ts +0 -17
- package/src/gen/_models/webitelImProviderV1ProviderCreateWhatsAppGateRequest.zod.ts +0 -17
- package/src/gen/_models/webitelImProviderV1ProviderCreateWhatsAppGateResponse.ts +0 -14
- package/src/gen/_models/webitelImProviderV1ProviderCreateWhatsAppGateResponse.zod.ts +0 -14
- package/types/gen/_models/apiCreateUserRequest.d.ts +0 -12
- package/types/gen/_models/apiCreateUserRequest.zod.d.ts +0 -12
- package/types/gen/_models/updateUser2Body.d.ts +0 -44
- package/types/gen/_models/updateUser2Body.zod.d.ts +0 -44
- package/types/gen/_models/updateUser2BodyProfile.d.ts +0 -9
- package/types/gen/_models/updateUser2BodyProfile.zod.d.ts +0 -9
- package/types/gen/_models/updateUserUserBody.d.ts +0 -44
- package/types/gen/_models/updateUserUserBody.zod.d.ts +0 -44
- package/types/gen/_models/updateUserUserBodyProfile.d.ts +0 -9
- package/types/gen/_models/updateUserUserBodyProfile.zod.d.ts +0 -9
- package/types/gen/_models/webitelImProviderV1ProviderCreateWhatsAppGateRequest.d.ts +0 -16
- package/types/gen/_models/webitelImProviderV1ProviderCreateWhatsAppGateRequest.zod.d.ts +0 -16
- package/types/gen/_models/webitelImProviderV1ProviderCreateWhatsAppGateResponse.d.ts +0 -13
- package/types/gen/_models/webitelImProviderV1ProviderCreateWhatsAppGateResponse.zod.d.ts +0 -13
package/src/gen/webitel-im-api-gateway-v1-messagehistory/webitel-im-api-gateway-v1-messagehistory.ts
CHANGED
|
@@ -9,6 +9,7 @@ import axios from '@aliasedDeps/api-services/axios';
|
|
|
9
9
|
import type { AxiosRequestConfig, AxiosResponse } from 'axios';
|
|
10
10
|
|
|
11
11
|
import type {
|
|
12
|
+
MessageHistorySearchLeftThreadsMessagesHistoryParams,
|
|
12
13
|
MessageHistorySearchThreadMessagesHistoryParams,
|
|
13
14
|
WebitelImApiGatewayV1SearchMessageHistoryResponse,
|
|
14
15
|
} from '../_models';
|
|
@@ -22,6 +23,29 @@ export const // --- title start
|
|
|
22
23
|
(axiosInstance: AxiosInstance = axios) => {
|
|
23
24
|
// --- header end
|
|
24
25
|
/**
|
|
26
|
+
* @summary Searches messages grouped by the user's closed membership periods
|
|
27
|
+
within a thread. Active memberships are excluded — their
|
|
28
|
+
messages are available via SearchThreadMessagesHistory.
|
|
29
|
+
*/
|
|
30
|
+
const messageHistorySearchLeftThreadsMessagesHistory = (
|
|
31
|
+
threadId: string,
|
|
32
|
+
params?: MessageHistorySearchLeftThreadsMessagesHistoryParams,
|
|
33
|
+
options?: AxiosRequestConfig,
|
|
34
|
+
): Promise<
|
|
35
|
+
AxiosResponse<WebitelImApiGatewayV1SearchMessageHistoryResponse>
|
|
36
|
+
> => {
|
|
37
|
+
return axiosInstance.get(
|
|
38
|
+
`/v1/threads/${threadId}/left_threads/messages`,
|
|
39
|
+
{
|
|
40
|
+
...options,
|
|
41
|
+
params: {
|
|
42
|
+
...params,
|
|
43
|
+
...options?.params,
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
);
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
25
49
|
* @summary Searches messages within a specific thread.
|
|
26
50
|
Supports cursor-based pagination and field selection.
|
|
27
51
|
*/
|
|
@@ -43,9 +67,12 @@ Supports cursor-based pagination and field selection.
|
|
|
43
67
|
|
|
44
68
|
// --- footer start
|
|
45
69
|
return {
|
|
70
|
+
messageHistorySearchLeftThreadsMessagesHistory,
|
|
46
71
|
messageHistorySearchThreadMessagesHistory,
|
|
47
72
|
};
|
|
48
73
|
};
|
|
74
|
+
export type MessageHistorySearchLeftThreadsMessagesHistoryResult =
|
|
75
|
+
AxiosResponse<WebitelImApiGatewayV1SearchMessageHistoryResponse>;
|
|
49
76
|
export type MessageHistorySearchThreadMessagesHistoryResult =
|
|
50
77
|
AxiosResponse<WebitelImApiGatewayV1SearchMessageHistoryResponse>;
|
|
51
78
|
|
|
@@ -6,6 +6,582 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import * as zod from 'zod';
|
|
8
8
|
|
|
9
|
+
/**
|
|
10
|
+
* @summary Searches messages grouped by the user's closed membership periods
|
|
11
|
+
within a thread. Active memberships are excluded — their
|
|
12
|
+
messages are available via SearchThreadMessagesHistory.
|
|
13
|
+
*/
|
|
14
|
+
export const MessageHistorySearchLeftThreadsMessagesHistoryParams = zod.object({
|
|
15
|
+
thread_id: zod.string().describe('Filter by thread ID.'),
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
export const MessageHistorySearchLeftThreadsMessagesHistoryQueryParams =
|
|
19
|
+
zod.object({
|
|
20
|
+
fields: zod
|
|
21
|
+
.array(zod.string())
|
|
22
|
+
.optional()
|
|
23
|
+
.describe(
|
|
24
|
+
'List of message fields to be returned.\nUsed to reduce payload size.',
|
|
25
|
+
),
|
|
26
|
+
senderIds: zod
|
|
27
|
+
.array(zod.string())
|
|
28
|
+
.optional()
|
|
29
|
+
.describe('Filter messages by sender user IDs.'),
|
|
30
|
+
types: zod
|
|
31
|
+
.array(zod.number())
|
|
32
|
+
.optional()
|
|
33
|
+
.describe('Filter messages by message types.'),
|
|
34
|
+
periodFrom: zod
|
|
35
|
+
.string()
|
|
36
|
+
.optional()
|
|
37
|
+
.describe(
|
|
38
|
+
'Inclusive lower bound on the dialog interval (Unix time, milliseconds).\nZero means unbounded.',
|
|
39
|
+
),
|
|
40
|
+
periodTo: zod
|
|
41
|
+
.string()
|
|
42
|
+
.optional()
|
|
43
|
+
.describe(
|
|
44
|
+
'Inclusive upper bound on the dialog interval (Unix time, milliseconds).\nZero means unbounded.',
|
|
45
|
+
),
|
|
46
|
+
cursorId: zod
|
|
47
|
+
.string()
|
|
48
|
+
.optional()
|
|
49
|
+
.describe(
|
|
50
|
+
'Cursor identifier.\nMust be a valid UUID referencing an existing message.\nDefines the starting point for pagination.',
|
|
51
|
+
),
|
|
52
|
+
cursorBefore: zod
|
|
53
|
+
.boolean()
|
|
54
|
+
.optional()
|
|
55
|
+
.describe(
|
|
56
|
+
'Pagination direction flag.\n\ntrue -> fetch newer messages (back before history)\nfalse -> fetch older messages (back to older history)',
|
|
57
|
+
),
|
|
58
|
+
size: zod
|
|
59
|
+
.number()
|
|
60
|
+
.optional()
|
|
61
|
+
.describe('Maximum number of messages to return.'),
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
export const messageHistorySearchLeftThreadsMessagesHistoryResponseItemsItemSenderRoleDefault = `ROLE_UNSPECIFIED`;
|
|
65
|
+
|
|
66
|
+
export const MessageHistorySearchLeftThreadsMessagesHistoryResponse = zod
|
|
67
|
+
.object({
|
|
68
|
+
items: zod
|
|
69
|
+
.array(
|
|
70
|
+
zod
|
|
71
|
+
.object({
|
|
72
|
+
body: zod.string().optional().describe('Message body content.'),
|
|
73
|
+
contact: zod
|
|
74
|
+
.object({
|
|
75
|
+
email: zod.string().optional(),
|
|
76
|
+
name: zod.string().optional(),
|
|
77
|
+
phone: zod.string().optional(),
|
|
78
|
+
})
|
|
79
|
+
.optional(),
|
|
80
|
+
createdAt: zod
|
|
81
|
+
.string()
|
|
82
|
+
.optional()
|
|
83
|
+
.describe(
|
|
84
|
+
'Message creation timestamp (Unix time, milliseconds).',
|
|
85
|
+
),
|
|
86
|
+
documents: zod
|
|
87
|
+
.array(
|
|
88
|
+
zod
|
|
89
|
+
.object({
|
|
90
|
+
createdAt: zod
|
|
91
|
+
.string()
|
|
92
|
+
.optional()
|
|
93
|
+
.describe(
|
|
94
|
+
'Creation timestamp (Unix time, milliseconds).',
|
|
95
|
+
),
|
|
96
|
+
fileId: zod
|
|
97
|
+
.string()
|
|
98
|
+
.optional()
|
|
99
|
+
.describe('File storage identifier.'),
|
|
100
|
+
id: zod
|
|
101
|
+
.string()
|
|
102
|
+
.optional()
|
|
103
|
+
.describe('Document identifier.'),
|
|
104
|
+
messageId: zod
|
|
105
|
+
.string()
|
|
106
|
+
.optional()
|
|
107
|
+
.describe(
|
|
108
|
+
'Identifier of the message this document belongs to.',
|
|
109
|
+
),
|
|
110
|
+
mime: zod
|
|
111
|
+
.string()
|
|
112
|
+
.optional()
|
|
113
|
+
.describe('MIME type of the document.'),
|
|
114
|
+
name: zod
|
|
115
|
+
.string()
|
|
116
|
+
.optional()
|
|
117
|
+
.describe('Original file name.'),
|
|
118
|
+
size: zod
|
|
119
|
+
.string()
|
|
120
|
+
.optional()
|
|
121
|
+
.describe('File size in bytes.'),
|
|
122
|
+
url: zod
|
|
123
|
+
.string()
|
|
124
|
+
.optional()
|
|
125
|
+
.describe(
|
|
126
|
+
'Public signed URL for downloading the document.',
|
|
127
|
+
),
|
|
128
|
+
})
|
|
129
|
+
.describe(
|
|
130
|
+
'Document represents a file attachment\nassociated with a message.',
|
|
131
|
+
),
|
|
132
|
+
)
|
|
133
|
+
.optional()
|
|
134
|
+
.describe('List of document attachments.'),
|
|
135
|
+
editedAt: zod
|
|
136
|
+
.string()
|
|
137
|
+
.optional()
|
|
138
|
+
.describe(
|
|
139
|
+
'Message last update timestamp (Unix time, milliseconds).',
|
|
140
|
+
),
|
|
141
|
+
id: zod.string().optional().describe('Unique message identifier.'),
|
|
142
|
+
images: zod
|
|
143
|
+
.array(
|
|
144
|
+
zod
|
|
145
|
+
.object({
|
|
146
|
+
createdAt: zod
|
|
147
|
+
.string()
|
|
148
|
+
.optional()
|
|
149
|
+
.describe(
|
|
150
|
+
'Creation timestamp (Unix time, milliseconds).',
|
|
151
|
+
),
|
|
152
|
+
fileId: zod
|
|
153
|
+
.string()
|
|
154
|
+
.optional()
|
|
155
|
+
.describe('File storage identifier.'),
|
|
156
|
+
height: zod
|
|
157
|
+
.number()
|
|
158
|
+
.optional()
|
|
159
|
+
.describe('Image height in pixels.'),
|
|
160
|
+
id: zod.string().optional().describe('Image identifier.'),
|
|
161
|
+
messageId: zod
|
|
162
|
+
.string()
|
|
163
|
+
.optional()
|
|
164
|
+
.describe(
|
|
165
|
+
'Identifier of the message this message belongs to.',
|
|
166
|
+
),
|
|
167
|
+
mime: zod
|
|
168
|
+
.string()
|
|
169
|
+
.optional()
|
|
170
|
+
.describe('MIME type of the image.'),
|
|
171
|
+
url: zod
|
|
172
|
+
.string()
|
|
173
|
+
.optional()
|
|
174
|
+
.describe('Public signed URL for accessing the image.'),
|
|
175
|
+
width: zod
|
|
176
|
+
.number()
|
|
177
|
+
.optional()
|
|
178
|
+
.describe('Image width in pixels.'),
|
|
179
|
+
})
|
|
180
|
+
.describe(
|
|
181
|
+
'Image represents an image attachment\nassociated with a message.',
|
|
182
|
+
),
|
|
183
|
+
)
|
|
184
|
+
.optional()
|
|
185
|
+
.describe('List of image attachments.'),
|
|
186
|
+
interactive: zod
|
|
187
|
+
.object({
|
|
188
|
+
documents: zod
|
|
189
|
+
.object({
|
|
190
|
+
documents: zod
|
|
191
|
+
.array(
|
|
192
|
+
zod
|
|
193
|
+
.object({
|
|
194
|
+
fileName: zod.string().optional(),
|
|
195
|
+
id: zod.string().optional(),
|
|
196
|
+
mimeType: zod.string().optional(),
|
|
197
|
+
sizeBytes: zod.string().optional(),
|
|
198
|
+
url: zod.string().optional(),
|
|
199
|
+
})
|
|
200
|
+
.describe(
|
|
201
|
+
'Represents `Document` message with necessary fields\nto process it into frequently used `document`\nentity in messaging systems.',
|
|
202
|
+
),
|
|
203
|
+
)
|
|
204
|
+
.optional()
|
|
205
|
+
.describe(
|
|
206
|
+
'Documents to be attached to the header of interactive message.\nMax allowed documents: 10.',
|
|
207
|
+
),
|
|
208
|
+
})
|
|
209
|
+
.optional()
|
|
210
|
+
.describe('Document attachments header.'),
|
|
211
|
+
images: zod
|
|
212
|
+
.object({
|
|
213
|
+
images: zod
|
|
214
|
+
.array(
|
|
215
|
+
zod
|
|
216
|
+
.object({
|
|
217
|
+
id: zod.string().optional(),
|
|
218
|
+
link: zod.string().optional(),
|
|
219
|
+
mimeType: zod.string().optional(),
|
|
220
|
+
name: zod.string().optional(),
|
|
221
|
+
})
|
|
222
|
+
.describe(
|
|
223
|
+
'Represents `Image` entity with\nnecessary fields.',
|
|
224
|
+
),
|
|
225
|
+
)
|
|
226
|
+
.optional()
|
|
227
|
+
.describe(
|
|
228
|
+
'Images to be attached to the header of interactive message.\nMax allowed images: 10.',
|
|
229
|
+
),
|
|
230
|
+
})
|
|
231
|
+
.optional()
|
|
232
|
+
.describe('Images attachment header.'),
|
|
233
|
+
listReply: zod
|
|
234
|
+
.object({
|
|
235
|
+
mainButtonTitle: zod
|
|
236
|
+
.string()
|
|
237
|
+
.optional()
|
|
238
|
+
.describe(
|
|
239
|
+
'Title of the main button, that on-click show up list.',
|
|
240
|
+
),
|
|
241
|
+
sections: zod
|
|
242
|
+
.array(
|
|
243
|
+
zod
|
|
244
|
+
.object({
|
|
245
|
+
buttons: zod
|
|
246
|
+
.array(
|
|
247
|
+
zod
|
|
248
|
+
.object({
|
|
249
|
+
callback: zod
|
|
250
|
+
.object({
|
|
251
|
+
data: zod
|
|
252
|
+
.string()
|
|
253
|
+
.optional()
|
|
254
|
+
.describe(
|
|
255
|
+
'Opaque data payload passed back to the server upon interaction.',
|
|
256
|
+
),
|
|
257
|
+
})
|
|
258
|
+
.optional()
|
|
259
|
+
.describe(
|
|
260
|
+
'Triggers a backend event (callback) with associated metadata.',
|
|
261
|
+
),
|
|
262
|
+
id: zod
|
|
263
|
+
.string()
|
|
264
|
+
.optional()
|
|
265
|
+
.describe(
|
|
266
|
+
'Unique idempotent identifier for the button.\nUsed by the frontend to track state and prevent duplicate interactions.',
|
|
267
|
+
),
|
|
268
|
+
label: zod
|
|
269
|
+
.string()
|
|
270
|
+
.optional()
|
|
271
|
+
.describe(
|
|
272
|
+
'The human-readable label displayed on the button.',
|
|
273
|
+
),
|
|
274
|
+
metadata: zod
|
|
275
|
+
.looseObject({})
|
|
276
|
+
.optional()
|
|
277
|
+
.describe(
|
|
278
|
+
'Extensible metadata for UI/UX styling (e.g., "color", "theme", "size").\nUsage: Allows for future-proofing without breaking schema changes.',
|
|
279
|
+
),
|
|
280
|
+
request: zod
|
|
281
|
+
.object({
|
|
282
|
+
action: zod
|
|
283
|
+
.string()
|
|
284
|
+
.optional()
|
|
285
|
+
.describe(
|
|
286
|
+
'The specific action to be performed by the client application.',
|
|
287
|
+
),
|
|
288
|
+
})
|
|
289
|
+
.optional()
|
|
290
|
+
.describe(
|
|
291
|
+
'Requests sensitive information from the client (e.g., location or contact).',
|
|
292
|
+
),
|
|
293
|
+
url: zod
|
|
294
|
+
.object({
|
|
295
|
+
url: zod
|
|
296
|
+
.string()
|
|
297
|
+
.optional()
|
|
298
|
+
.describe(
|
|
299
|
+
'Must be a valid absolute URI (e.g., https://example.com).',
|
|
300
|
+
),
|
|
301
|
+
})
|
|
302
|
+
.optional()
|
|
303
|
+
.describe(
|
|
304
|
+
'Directs the user to an external web resource.',
|
|
305
|
+
),
|
|
306
|
+
})
|
|
307
|
+
.describe(
|
|
308
|
+
'Defines a single interactive element within the keyboard.\nEach button must have a unique identifier and a specific action type.',
|
|
309
|
+
),
|
|
310
|
+
)
|
|
311
|
+
.optional()
|
|
312
|
+
.describe(
|
|
313
|
+
'Collection of buttons within this section.\nMinimum of 1 button is required to prevent empty sections.',
|
|
314
|
+
),
|
|
315
|
+
section: zod
|
|
316
|
+
.string()
|
|
317
|
+
.optional()
|
|
318
|
+
.describe(
|
|
319
|
+
'The header text for this section. Must be concise and descriptive.',
|
|
320
|
+
),
|
|
321
|
+
})
|
|
322
|
+
.describe(
|
|
323
|
+
'Represents a row of buttons grouped under a specific logical section header.\nUseful for creating categorized menus or structured interactive interfaces.',
|
|
324
|
+
),
|
|
325
|
+
)
|
|
326
|
+
.optional()
|
|
327
|
+
.describe('List with sections with buttons.'),
|
|
328
|
+
})
|
|
329
|
+
.optional()
|
|
330
|
+
.describe(
|
|
331
|
+
'List reply with main list button text and sections with buttons.',
|
|
332
|
+
),
|
|
333
|
+
markup: zod
|
|
334
|
+
.object({
|
|
335
|
+
rows: zod
|
|
336
|
+
.array(
|
|
337
|
+
zod
|
|
338
|
+
.object({
|
|
339
|
+
buttons: zod
|
|
340
|
+
.array(
|
|
341
|
+
zod
|
|
342
|
+
.object({
|
|
343
|
+
callback: zod
|
|
344
|
+
.object({
|
|
345
|
+
data: zod
|
|
346
|
+
.string()
|
|
347
|
+
.optional()
|
|
348
|
+
.describe(
|
|
349
|
+
'Opaque data payload passed back to the server upon interaction.',
|
|
350
|
+
),
|
|
351
|
+
})
|
|
352
|
+
.optional()
|
|
353
|
+
.describe(
|
|
354
|
+
'Triggers a backend event (callback) with associated metadata.',
|
|
355
|
+
),
|
|
356
|
+
id: zod
|
|
357
|
+
.string()
|
|
358
|
+
.optional()
|
|
359
|
+
.describe(
|
|
360
|
+
'Unique idempotent identifier for the button.\nUsed by the frontend to track state and prevent duplicate interactions.',
|
|
361
|
+
),
|
|
362
|
+
label: zod
|
|
363
|
+
.string()
|
|
364
|
+
.optional()
|
|
365
|
+
.describe(
|
|
366
|
+
'The human-readable label displayed on the button.',
|
|
367
|
+
),
|
|
368
|
+
metadata: zod
|
|
369
|
+
.looseObject({})
|
|
370
|
+
.optional()
|
|
371
|
+
.describe(
|
|
372
|
+
'Extensible metadata for UI/UX styling (e.g., "color", "theme", "size").\nUsage: Allows for future-proofing without breaking schema changes.',
|
|
373
|
+
),
|
|
374
|
+
request: zod
|
|
375
|
+
.object({
|
|
376
|
+
action: zod
|
|
377
|
+
.string()
|
|
378
|
+
.optional()
|
|
379
|
+
.describe(
|
|
380
|
+
'The specific action to be performed by the client application.',
|
|
381
|
+
),
|
|
382
|
+
})
|
|
383
|
+
.optional()
|
|
384
|
+
.describe(
|
|
385
|
+
'Requests sensitive information from the client (e.g., location or contact).',
|
|
386
|
+
),
|
|
387
|
+
url: zod
|
|
388
|
+
.object({
|
|
389
|
+
url: zod
|
|
390
|
+
.string()
|
|
391
|
+
.optional()
|
|
392
|
+
.describe(
|
|
393
|
+
'Must be a valid absolute URI (e.g., https://example.com).',
|
|
394
|
+
),
|
|
395
|
+
})
|
|
396
|
+
.optional()
|
|
397
|
+
.describe(
|
|
398
|
+
'Directs the user to an external web resource.',
|
|
399
|
+
),
|
|
400
|
+
})
|
|
401
|
+
.describe(
|
|
402
|
+
'Defines a single interactive element within the keyboard.\nEach button must have a unique identifier and a specific action type.',
|
|
403
|
+
),
|
|
404
|
+
)
|
|
405
|
+
.optional()
|
|
406
|
+
.describe(
|
|
407
|
+
'Horizontal collection of buttons.\nCapped at 10 to ensure UI responsiveness and prevent overflow.',
|
|
408
|
+
),
|
|
409
|
+
})
|
|
410
|
+
.describe(
|
|
411
|
+
'A standard horizontal row of interactive buttons without a section header.',
|
|
412
|
+
),
|
|
413
|
+
)
|
|
414
|
+
.optional()
|
|
415
|
+
.describe('Rows of buttons matrix.'),
|
|
416
|
+
})
|
|
417
|
+
.optional()
|
|
418
|
+
.describe('Markup matrix with buttons.'),
|
|
419
|
+
singleUse: zod
|
|
420
|
+
.boolean()
|
|
421
|
+
.optional()
|
|
422
|
+
.describe('Force to block user keyboard.'),
|
|
423
|
+
})
|
|
424
|
+
.optional()
|
|
425
|
+
.describe(
|
|
426
|
+
'Interactive represents a rich message with UI elements.',
|
|
427
|
+
),
|
|
428
|
+
location: zod
|
|
429
|
+
.object({
|
|
430
|
+
address: zod.string().optional(),
|
|
431
|
+
latitude: zod.number().optional(),
|
|
432
|
+
longitude: zod.number().optional(),
|
|
433
|
+
name: zod.string().optional(),
|
|
434
|
+
})
|
|
435
|
+
.optional(),
|
|
436
|
+
metadata: zod
|
|
437
|
+
.looseObject({})
|
|
438
|
+
.optional()
|
|
439
|
+
.describe(
|
|
440
|
+
'Arbitrary message metadata.\nCan contain structured data depending on message type.',
|
|
441
|
+
),
|
|
442
|
+
sender: zod
|
|
443
|
+
.object({
|
|
444
|
+
contact: zod
|
|
445
|
+
.object({
|
|
446
|
+
appId: zod
|
|
447
|
+
.string()
|
|
448
|
+
.optional()
|
|
449
|
+
.describe(
|
|
450
|
+
'Identifier of the specific integration app or bot.',
|
|
451
|
+
),
|
|
452
|
+
createdAt: zod
|
|
453
|
+
.string()
|
|
454
|
+
.optional()
|
|
455
|
+
.describe(
|
|
456
|
+
'Record creation timestamp (Unix Epoch in milliseconds).',
|
|
457
|
+
),
|
|
458
|
+
isBot: zod
|
|
459
|
+
.boolean()
|
|
460
|
+
.optional()
|
|
461
|
+
.describe(
|
|
462
|
+
'Represents if usere is real person or automatic script.',
|
|
463
|
+
),
|
|
464
|
+
iss: zod
|
|
465
|
+
.string()
|
|
466
|
+
.optional()
|
|
467
|
+
.describe(
|
|
468
|
+
'Provider-specific unique identifier (Issuer ID).',
|
|
469
|
+
),
|
|
470
|
+
metadata: zod
|
|
471
|
+
.record(zod.string(), zod.string())
|
|
472
|
+
.optional()
|
|
473
|
+
.describe(
|
|
474
|
+
'Additional dynamic attributes provided by the messenger.',
|
|
475
|
+
),
|
|
476
|
+
name: zod
|
|
477
|
+
.string()
|
|
478
|
+
.optional()
|
|
479
|
+
.describe('Display name of the contact.'),
|
|
480
|
+
sub: zod
|
|
481
|
+
.string()
|
|
482
|
+
.optional()
|
|
483
|
+
.describe(
|
|
484
|
+
'Associated internal system subject/identifier.',
|
|
485
|
+
),
|
|
486
|
+
type: zod
|
|
487
|
+
.string()
|
|
488
|
+
.optional()
|
|
489
|
+
.describe("Channel type (e.g., 'webchat', 'telegram')."),
|
|
490
|
+
updatedAt: zod
|
|
491
|
+
.string()
|
|
492
|
+
.optional()
|
|
493
|
+
.describe(
|
|
494
|
+
'Last record update timestamp (Unix Epoch in milliseconds).',
|
|
495
|
+
),
|
|
496
|
+
username: zod
|
|
497
|
+
.string()
|
|
498
|
+
.optional()
|
|
499
|
+
.describe('Technical username or handle.'),
|
|
500
|
+
vias: zod
|
|
501
|
+
.array(
|
|
502
|
+
zod.object({
|
|
503
|
+
contactId: zod.string().optional(),
|
|
504
|
+
createdAt: zod.string().optional(),
|
|
505
|
+
disable: zod.boolean().optional(),
|
|
506
|
+
disableReason: zod.string().optional(),
|
|
507
|
+
metadata: zod.looseObject({}).optional(),
|
|
508
|
+
updatedAt: zod.string().optional(),
|
|
509
|
+
via: zod.string().optional(),
|
|
510
|
+
}),
|
|
511
|
+
)
|
|
512
|
+
.optional(),
|
|
513
|
+
})
|
|
514
|
+
.optional()
|
|
515
|
+
.describe(
|
|
516
|
+
'Contact represents an external messaging identity.',
|
|
517
|
+
),
|
|
518
|
+
id: zod.string().optional(),
|
|
519
|
+
permissions: zod
|
|
520
|
+
.object({
|
|
521
|
+
canAddMembers: zod.boolean().optional(),
|
|
522
|
+
canChangeMembersPermissions: zod.boolean().optional(),
|
|
523
|
+
canChangeThreadInfo: zod.boolean().optional(),
|
|
524
|
+
canRemoveMembers: zod.boolean().optional(),
|
|
525
|
+
canSendMessages: zod.boolean().optional(),
|
|
526
|
+
createdAt: zod.string().optional(),
|
|
527
|
+
id: zod.string().optional(),
|
|
528
|
+
memberId: zod.string().optional(),
|
|
529
|
+
updatedAt: zod.string().optional(),
|
|
530
|
+
})
|
|
531
|
+
.optional(),
|
|
532
|
+
role: zod
|
|
533
|
+
.enum([
|
|
534
|
+
'ROLE_UNSPECIFIED',
|
|
535
|
+
'ROLE_MEMBER',
|
|
536
|
+
'ROLE_ADMIN',
|
|
537
|
+
'ROLE_OWNER',
|
|
538
|
+
'ROLE_SUPERVISOR',
|
|
539
|
+
])
|
|
540
|
+
.default(
|
|
541
|
+
messageHistorySearchLeftThreadsMessagesHistoryResponseItemsItemSenderRoleDefault,
|
|
542
|
+
),
|
|
543
|
+
})
|
|
544
|
+
.optional()
|
|
545
|
+
.describe('Sender user aggregated information.'),
|
|
546
|
+
threadId: zod
|
|
547
|
+
.string()
|
|
548
|
+
.optional()
|
|
549
|
+
.describe('Identifier of the thread the message belongs to.'),
|
|
550
|
+
type: zod.number().optional().describe('Message type identifier.'),
|
|
551
|
+
})
|
|
552
|
+
.describe(
|
|
553
|
+
'HistoryMessage represents a single message\nin thread history.',
|
|
554
|
+
),
|
|
555
|
+
)
|
|
556
|
+
.optional()
|
|
557
|
+
.describe('List of messages matching the search criteria.'),
|
|
558
|
+
nextCursor: zod
|
|
559
|
+
.object({
|
|
560
|
+
id: zod
|
|
561
|
+
.string()
|
|
562
|
+
.optional()
|
|
563
|
+
.describe('Unique identifier last message where cursor stopped.'),
|
|
564
|
+
})
|
|
565
|
+
.optional()
|
|
566
|
+
.describe(
|
|
567
|
+
"Cursor that represents position to get older messages (used without 'before' param).",
|
|
568
|
+
),
|
|
569
|
+
prevCursor: zod
|
|
570
|
+
.object({
|
|
571
|
+
id: zod
|
|
572
|
+
.string()
|
|
573
|
+
.optional()
|
|
574
|
+
.describe('Unique identifier last message where cursor stopped.'),
|
|
575
|
+
})
|
|
576
|
+
.optional()
|
|
577
|
+
.describe(
|
|
578
|
+
"Cursor that represents position to get newest messages (used with 'before' param).",
|
|
579
|
+
),
|
|
580
|
+
})
|
|
581
|
+
.describe(
|
|
582
|
+
'SearchMessageHistoryResponse contains\nmessage history search results and pagination metadata.',
|
|
583
|
+
);
|
|
584
|
+
|
|
9
585
|
/**
|
|
10
586
|
* @summary Searches messages within a specific thread.
|
|
11
587
|
Supports cursor-based pagination and field selection.
|
|
@@ -27,6 +27,7 @@ export const ProviderMessageServiceSendDocumentBody = zod
|
|
|
27
27
|
.describe('ProviderFile represents a generic file attachment.'),
|
|
28
28
|
)
|
|
29
29
|
.optional(),
|
|
30
|
+
domainId: zod.number().optional(),
|
|
30
31
|
externalUserId: zod.string().optional(),
|
|
31
32
|
gateId: zod.string().optional(),
|
|
32
33
|
type: zod
|
|
@@ -66,6 +67,7 @@ export const providerMessageServiceSendImageBodyTypeDefault = `PROVIDER_TYPE_UNS
|
|
|
66
67
|
export const ProviderMessageServiceSendImageBody = zod
|
|
67
68
|
.object({
|
|
68
69
|
caption: zod.string().optional(),
|
|
70
|
+
domainId: zod.number().optional(),
|
|
69
71
|
externalUserId: zod.string().optional(),
|
|
70
72
|
gateId: zod.string().optional(),
|
|
71
73
|
images: zod
|
|
@@ -117,6 +119,7 @@ export const providerMessageServiceSendTextBodyTypeDefault = `PROVIDER_TYPE_UNSP
|
|
|
117
119
|
|
|
118
120
|
export const ProviderMessageServiceSendTextBody = zod
|
|
119
121
|
.object({
|
|
122
|
+
domainId: zod.number().optional(),
|
|
120
123
|
externalUserId: zod.string().optional(),
|
|
121
124
|
gateId: zod.string().optional(),
|
|
122
125
|
metadata: zod.record(zod.string(), zod.string()).optional(),
|