@webitel/api-services 26.8.46 → 26.8.48
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/catalog/__tests__/catalog.spec.ts +79 -0
- package/src/api/clients/catalog/catalog.ts +16 -3
- package/src/gen/_models/apiUserSetting.ts +1 -0
- package/src/gen/_models/deleteMediaFileParams.ts +1 -0
- package/src/gen/_models/deleteRoleParams.ts +17 -0
- package/src/gen/_models/engineAttemptHistory.ts +1 -0
- package/src/gen/_models/engineCreateRoutingSchemaRequest.ts +1 -0
- package/src/gen/_models/engineCreateSchemaVariableRequest.ts +1 -0
- package/src/gen/_models/engineCreateSystemSettingRequest.ts +1 -0
- package/src/gen/_models/engineQueueType.ts +24 -0
- package/src/gen/_models/engineRoutingSchema.ts +1 -0
- package/src/gen/_models/engineRoutingSchemaServicePatchRoutingSchemaBody.ts +1 -0
- package/src/gen/_models/engineRoutingSchemaServiceUpdateRoutingSchemaBody.ts +1 -0
- package/src/gen/_models/engineSchemaVariable.ts +1 -0
- package/src/gen/_models/engineSchemaVariablesServicePatchSchemaVariableBody.ts +1 -0
- package/src/gen/_models/engineSchemaVariablesServiceUpdateSchemaVariableBody.ts +1 -0
- package/src/gen/_models/engineSchemaVersion.ts +1 -0
- package/src/gen/_models/engineSearchHistoryCallRequest.ts +2 -0
- package/src/gen/_models/engineSystemSetting.ts +1 -0
- package/src/gen/_models/engineSystemSettingServicePatchSystemSettingBody.ts +1 -0
- package/src/gen/_models/engineSystemSettingServiceUpdateSystemSettingBody.ts +1 -1
- package/src/gen/_models/index.ts +25 -2
- package/src/gen/_models/locateArticleParams.ts +13 -0
- package/src/gen/_models/readRoleParams.ts +15 -0
- package/src/gen/_models/roleMetadataParams.ts +17 -0
- package/src/gen/_models/searchHistoryCallExcludedQueueTypesItem.ts +24 -0
- package/src/gen/_models/searchHistoryCallParams.ts +2 -0
- package/src/gen/_models/searchRecordAvailableRolesParams.ts +53 -0
- package/src/gen/_models/searchRetrievalParams.ts +3 -2
- package/src/gen/_models/searchRetrievalTagMatch.ts +1 -0
- package/src/gen/_models/searchRolesParams.ts +50 -0
- package/src/gen/_models/updateArticle2Params.ts +13 -0
- package/src/gen/_models/updateArticleParams.ts +13 -0
- package/src/gen/_models/updateModel2Params.ts +13 -0
- package/src/gen/_models/updateModelParams.ts +13 -0
- package/src/gen/_models/updateSpace2Params.ts +13 -0
- package/src/gen/_models/updateSpaceParams.ts +13 -0
- package/src/gen/_models/webitelCasesCaseTimelinePostprocessingResult.ts +13 -0
- package/src/gen/_models/webitelCasesCaseTimelineVariable.ts +11 -0
- package/src/gen/_models/webitelCasesGetTimelineItemInfoResponse.ts +13 -0
- package/src/gen/_models/webitelImApiGatewayV1GetUpdatesRequest.ts +11 -0
- package/src/gen/_models/webitelImApiGatewayV1GetUpdatesResponse.ts +19 -0
- package/src/gen/_models/webitelImApiGatewayV1HistoryMessage.ts +0 -10
- package/src/gen/_models/webitelImApiGatewayV1MemberReadState.ts +19 -0
- package/src/gen/_models/webitelImApiGatewayV1SearchMessageHistoryResponse.ts +2 -0
- package/src/gen/_models/webitelImApiGatewayV1SearchThreadResponse.ts +2 -0
- package/src/gen/_models/webitelImApiGatewayV1Thread.ts +8 -0
- package/src/gen/_models/webitelImApiGatewayV1ThreadMemberChange.ts +15 -0
- package/src/gen/_models/webitelImApiGatewayV1ThreadMemberChangeAction.ts +16 -0
- package/src/gen/_models/webitelImApiGatewayV1ThreadUpdates.ts +27 -0
- package/src/gen/_models/webitelImApiGatewayV1UpdatedMessage.ts +41 -0
- package/src/gen/_models/webitelImApiGatewayV1UpdatedMessageMetadata.ts +10 -0
- package/src/gen/_models/webitelKbArticle.ts +3 -0
- package/src/gen/_models/webitelKbSemanticSearchRequest.ts +1 -1
- package/src/gen/_models/webitelKbTagMatch.ts +3 -1
- package/src/gen-wire/_models/deleteMediaFileParams.ts +1 -0
- package/src/gen-wire/_models/engineAttemptHistory.ts +1 -0
- package/src/gen-wire/_models/engineQueueType.ts +24 -0
- package/src/gen-wire/_models/engineSearchHistoryCallRequest.ts +2 -0
- package/src/gen-wire/_models/index.ts +20 -2
- package/src/gen-wire/_models/locateArticleParams.ts +13 -0
- package/src/gen-wire/_models/searchHistoryCallExcludedQueueTypesItem.ts +24 -0
- package/src/gen-wire/_models/searchHistoryCallParams.ts +2 -0
- package/src/gen-wire/_models/searchRetrievalParams.ts +3 -2
- package/src/gen-wire/_models/searchRetrievalTagMatch.ts +1 -0
- package/src/gen-wire/_models/updateArticle2Params.ts +13 -0
- package/src/gen-wire/_models/updateArticleParams.ts +13 -0
- package/src/gen-wire/_models/updateModel2Params.ts +13 -0
- package/src/gen-wire/_models/updateModelParams.ts +13 -0
- package/src/gen-wire/_models/updateSpace2Params.ts +13 -0
- package/src/gen-wire/_models/updateSpaceParams.ts +13 -0
- package/src/gen-wire/_models/webitelCasesCaseTimelinePostprocessingResult.ts +13 -0
- package/src/gen-wire/_models/webitelCasesCaseTimelineVariable.ts +11 -0
- package/src/gen-wire/_models/webitelCasesGetTimelineItemInfoResponse.ts +13 -0
- package/src/gen-wire/_models/webitelImApiGatewayV1GetUpdatesRequest.ts +11 -0
- package/src/gen-wire/_models/webitelImApiGatewayV1GetUpdatesResponse.ts +19 -0
- package/src/gen-wire/_models/webitelImApiGatewayV1HistoryMessage.ts +0 -10
- package/src/gen-wire/_models/webitelImApiGatewayV1MemberReadState.ts +19 -0
- package/src/gen-wire/_models/webitelImApiGatewayV1SearchMessageHistoryResponse.ts +2 -0
- package/src/gen-wire/_models/webitelImApiGatewayV1SearchThreadResponse.ts +2 -0
- package/src/gen-wire/_models/webitelImApiGatewayV1Thread.ts +8 -0
- package/src/gen-wire/_models/webitelImApiGatewayV1ThreadMemberChange.ts +15 -0
- package/src/gen-wire/_models/webitelImApiGatewayV1ThreadMemberChangeAction.ts +16 -0
- package/src/gen-wire/_models/webitelImApiGatewayV1ThreadUpdates.ts +27 -0
- package/src/gen-wire/_models/webitelImApiGatewayV1UpdatedMessage.ts +41 -0
- package/src/gen-wire/_models/webitelImApiGatewayV1UpdatedMessageMetadata.ts +10 -0
- package/src/gen-wire/_models/webitelKbArticle.ts +3 -0
- package/src/gen-wire/_models/webitelKbSemanticSearchRequest.ts +1 -1
- package/src/gen-wire/_models/webitelKbTagMatch.ts +3 -1
- package/src/gen-wire/articles/articles.ts +42 -3
- package/src/gen-wire/articles/articles.zod.ts +586 -0
- package/src/gen-wire/call-service/call-service.zod.ts +40 -0
- package/src/gen-wire/case-timeline/case-timeline.ts +15 -0
- package/src/gen-wire/case-timeline/case-timeline.zod.ts +35 -0
- package/src/gen-wire/embedding-models/embedding-models.ts +18 -2
- package/src/gen-wire/embedding-models/embedding-models.zod.ts +18 -0
- package/src/gen-wire/index.ts +41 -17
- package/src/gen-wire/index.zod.ts +1 -0
- package/src/gen-wire/media-file-service/media-file-service.zod.ts +1 -0
- package/src/gen-wire/member-service/member-service.zod.ts +1 -0
- package/src/gen-wire/retrieval/retrieval.zod.ts +6 -4
- package/src/gen-wire/spaces/spaces.ts +18 -10
- package/src/gen-wire/spaces/spaces.zod.ts +18 -0
- package/src/gen-wire/timeline/timeline.ts +3 -3
- package/src/gen-wire/timeline/timeline.zod.ts +2 -2
- package/src/gen-wire/webitel-im-api-gateway-v1-messagehistory/webitel-im-api-gateway-v1-messagehistory.zod.ts +18 -189
- package/src/gen-wire/webitel-im-api-gateway-v1-threadmanagement/webitel-im-api-gateway-v1-threadmanagement.zod.ts +597 -309
- package/src/gen-wire/webitel-im-api-gateway-v1-updates/webitel-im-api-gateway-v1-updates.ts +47 -0
- package/src/gen-wire/webitel-im-api-gateway-v1-updates/webitel-im-api-gateway-v1-updates.zod.ts +3350 -0
- package/src/validations/agentSkill/__tests__/agentSkill.validations.spec.ts +67 -0
- package/src/validations/agentSkill/agentSkill.validations.ts +9 -0
- package/src/validations/index.ts +1 -0
- package/types/.tsbuildinfo +1 -1
- package/types/api/clients/catalog/catalog.d.ts +4 -1
- package/types/gen/_models/apiUserSetting.d.ts +1 -0
- package/types/gen/_models/deleteMediaFileParams.d.ts +1 -0
- package/types/gen/_models/deleteRoleParams.d.ts +16 -0
- package/types/gen/_models/engineAttemptHistory.d.ts +1 -0
- package/types/gen/_models/engineCreateRoutingSchemaRequest.d.ts +1 -0
- package/types/gen/_models/engineCreateSchemaVariableRequest.d.ts +1 -0
- package/types/gen/_models/engineCreateSystemSettingRequest.d.ts +1 -0
- package/types/gen/_models/engineQueueType.d.ts +21 -0
- package/types/gen/_models/engineRoutingSchema.d.ts +1 -0
- package/types/gen/_models/engineRoutingSchemaServicePatchRoutingSchemaBody.d.ts +1 -0
- package/types/gen/_models/engineRoutingSchemaServiceUpdateRoutingSchemaBody.d.ts +1 -0
- package/types/gen/_models/engineSchemaVariable.d.ts +1 -0
- package/types/gen/_models/engineSchemaVariablesServicePatchSchemaVariableBody.d.ts +1 -0
- package/types/gen/_models/engineSchemaVariablesServiceUpdateSchemaVariableBody.d.ts +1 -0
- package/types/gen/_models/engineSchemaVersion.d.ts +1 -0
- package/types/gen/_models/engineSearchHistoryCallRequest.d.ts +2 -0
- package/types/gen/_models/engineSystemSetting.d.ts +1 -0
- package/types/gen/_models/engineSystemSettingServicePatchSystemSettingBody.d.ts +1 -0
- package/types/gen/_models/engineSystemSettingServiceUpdateSystemSettingBody.d.ts +1 -1
- package/types/gen/_models/index.d.ts +25 -2
- package/types/gen/_models/locateArticleParams.d.ts +12 -0
- package/types/gen/_models/readRoleParams.d.ts +14 -0
- package/types/gen/_models/roleMetadataParams.d.ts +16 -0
- package/types/gen/_models/searchHistoryCallExcludedQueueTypesItem.d.ts +21 -0
- package/types/gen/_models/searchHistoryCallParams.d.ts +2 -0
- package/types/gen/_models/searchRecordAvailableRolesParams.d.ts +52 -0
- package/types/gen/_models/searchRetrievalParams.d.ts +3 -2
- package/types/gen/_models/searchRetrievalTagMatch.d.ts +1 -0
- package/types/gen/_models/searchRolesParams.d.ts +49 -0
- package/types/gen/_models/updateArticle2Params.d.ts +12 -0
- package/types/gen/_models/updateArticleParams.d.ts +12 -0
- package/types/gen/_models/updateModel2Params.d.ts +12 -0
- package/types/gen/_models/updateModelParams.d.ts +12 -0
- package/types/gen/_models/updateSpace2Params.d.ts +12 -0
- package/types/gen/_models/updateSpaceParams.d.ts +12 -0
- package/types/gen/_models/webitelCasesCaseTimelinePostprocessingResult.d.ts +12 -0
- package/types/gen/_models/webitelCasesCaseTimelineVariable.d.ts +10 -0
- package/types/gen/_models/webitelCasesGetTimelineItemInfoResponse.d.ts +12 -0
- package/types/gen/_models/webitelImApiGatewayV1GetUpdatesRequest.d.ts +10 -0
- package/types/gen/_models/webitelImApiGatewayV1GetUpdatesResponse.d.ts +18 -0
- package/types/gen/_models/webitelImApiGatewayV1HistoryMessage.d.ts +0 -10
- package/types/gen/_models/webitelImApiGatewayV1MemberReadState.d.ts +18 -0
- package/types/gen/_models/webitelImApiGatewayV1SearchMessageHistoryResponse.d.ts +2 -0
- package/types/gen/_models/webitelImApiGatewayV1SearchThreadResponse.d.ts +2 -0
- package/types/gen/_models/webitelImApiGatewayV1Thread.d.ts +8 -0
- package/types/gen/_models/webitelImApiGatewayV1ThreadMemberChange.d.ts +14 -0
- package/types/gen/_models/webitelImApiGatewayV1ThreadMemberChangeAction.d.ts +12 -0
- package/types/gen/_models/webitelImApiGatewayV1ThreadUpdates.d.ts +26 -0
- package/types/gen/_models/webitelImApiGatewayV1UpdatedMessage.d.ts +40 -0
- package/types/gen/_models/webitelImApiGatewayV1UpdatedMessageMetadata.d.ts +9 -0
- package/types/gen/_models/webitelKbArticle.d.ts +3 -0
- package/types/gen/_models/webitelKbSemanticSearchRequest.d.ts +1 -1
- package/types/gen/_models/webitelKbTagMatch.d.ts +3 -1
- package/types/gen-wire/_models/deleteMediaFileParams.d.ts +1 -0
- package/types/gen-wire/_models/engineAttemptHistory.d.ts +1 -0
- package/types/gen-wire/_models/engineQueueType.d.ts +21 -0
- package/types/gen-wire/_models/engineSearchHistoryCallRequest.d.ts +2 -0
- package/types/gen-wire/_models/index.d.ts +20 -2
- package/types/gen-wire/_models/locateArticleParams.d.ts +12 -0
- package/types/gen-wire/_models/searchHistoryCallExcludedQueueTypesItem.d.ts +21 -0
- package/types/gen-wire/_models/searchHistoryCallParams.d.ts +2 -0
- package/types/gen-wire/_models/searchRetrievalParams.d.ts +3 -2
- package/types/gen-wire/_models/searchRetrievalTagMatch.d.ts +1 -0
- package/types/gen-wire/_models/updateArticle2Params.d.ts +12 -0
- package/types/gen-wire/_models/updateArticleParams.d.ts +12 -0
- package/types/gen-wire/_models/updateModel2Params.d.ts +12 -0
- package/types/gen-wire/_models/updateModelParams.d.ts +12 -0
- package/types/gen-wire/_models/updateSpace2Params.d.ts +12 -0
- package/types/gen-wire/_models/updateSpaceParams.d.ts +12 -0
- package/types/gen-wire/_models/webitelCasesCaseTimelinePostprocessingResult.d.ts +12 -0
- package/types/gen-wire/_models/webitelCasesCaseTimelineVariable.d.ts +10 -0
- package/types/gen-wire/_models/webitelCasesGetTimelineItemInfoResponse.d.ts +12 -0
- package/types/gen-wire/_models/webitelImApiGatewayV1GetUpdatesRequest.d.ts +10 -0
- package/types/gen-wire/_models/webitelImApiGatewayV1GetUpdatesResponse.d.ts +18 -0
- package/types/gen-wire/_models/webitelImApiGatewayV1HistoryMessage.d.ts +0 -10
- package/types/gen-wire/_models/webitelImApiGatewayV1MemberReadState.d.ts +18 -0
- package/types/gen-wire/_models/webitelImApiGatewayV1SearchMessageHistoryResponse.d.ts +2 -0
- package/types/gen-wire/_models/webitelImApiGatewayV1SearchThreadResponse.d.ts +2 -0
- package/types/gen-wire/_models/webitelImApiGatewayV1Thread.d.ts +8 -0
- package/types/gen-wire/_models/webitelImApiGatewayV1ThreadMemberChange.d.ts +14 -0
- package/types/gen-wire/_models/webitelImApiGatewayV1ThreadMemberChangeAction.d.ts +12 -0
- package/types/gen-wire/_models/webitelImApiGatewayV1ThreadUpdates.d.ts +26 -0
- package/types/gen-wire/_models/webitelImApiGatewayV1UpdatedMessage.d.ts +40 -0
- package/types/gen-wire/_models/webitelImApiGatewayV1UpdatedMessageMetadata.d.ts +9 -0
- package/types/gen-wire/_models/webitelKbArticle.d.ts +3 -0
- package/types/gen-wire/_models/webitelKbSemanticSearchRequest.d.ts +1 -1
- package/types/gen-wire/_models/webitelKbTagMatch.d.ts +3 -1
- package/types/gen-wire/articles/articles.d.ts +6 -4
- package/types/gen-wire/articles/articles.zod.d.ts +221 -0
- package/types/gen-wire/call-service/call-service.zod.d.ts +29 -0
- package/types/gen-wire/case-timeline/case-timeline.d.ts +3 -1
- package/types/gen-wire/case-timeline/case-timeline.zod.d.ts +23 -0
- package/types/gen-wire/embedding-models/embedding-models.d.ts +3 -3
- package/types/gen-wire/embedding-models/embedding-models.zod.d.ts +6 -0
- package/types/gen-wire/index.d.ts +10 -8
- package/types/gen-wire/index.zod.d.ts +1 -0
- package/types/gen-wire/media-file-service/media-file-service.zod.d.ts +1 -0
- package/types/gen-wire/member-service/member-service.zod.d.ts +1 -0
- package/types/gen-wire/retrieval/retrieval.zod.d.ts +4 -2
- package/types/gen-wire/spaces/spaces.d.ts +3 -3
- package/types/gen-wire/spaces/spaces.zod.d.ts +6 -0
- package/types/gen-wire/timeline/timeline.d.ts +2 -2
- package/types/gen-wire/timeline/timeline.zod.d.ts +2 -2
- package/types/gen-wire/webitel-im-api-gateway-v1-messagehistory/webitel-im-api-gateway-v1-messagehistory.zod.d.ts +3 -72
- package/types/gen-wire/webitel-im-api-gateway-v1-threadmanagement/webitel-im-api-gateway-v1-threadmanagement.zod.d.ts +201 -96
- package/types/gen-wire/webitel-im-api-gateway-v1-updates/webitel-im-api-gateway-v1-updates.d.ts +13 -0
- package/types/gen-wire/webitel-im-api-gateway-v1-updates/webitel-im-api-gateway-v1-updates.zod.d.ts +1122 -0
- package/types/validations/agentSkill/agentSkill.validations.d.ts +9 -0
- package/types/validations/index.d.ts +1 -0
- package/src/gen/_models/webitelImApiGatewayV1MessageDeliveryStatus.ts +0 -27
- package/src/gen/_models/webitelImApiGatewayV1MessageRecipientStatus.ts +0 -24
- package/src/gen-wire/_models/webitelImApiGatewayV1MessageDeliveryStatus.ts +0 -27
- package/src/gen-wire/_models/webitelImApiGatewayV1MessageRecipientStatus.ts +0 -24
- package/types/gen/_models/webitelImApiGatewayV1MessageDeliveryStatus.d.ts +0 -24
- package/types/gen/_models/webitelImApiGatewayV1MessageRecipientStatus.d.ts +0 -23
- package/types/gen-wire/_models/webitelImApiGatewayV1MessageDeliveryStatus.d.ts +0 -24
- package/types/gen-wire/_models/webitelImApiGatewayV1MessageRecipientStatus.d.ts +0 -23
package/src/gen-wire/webitel-im-api-gateway-v1-updates/webitel-im-api-gateway-v1-updates.zod.ts
ADDED
|
@@ -0,0 +1,3350 @@
|
|
|
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 GetUpdates returns what changed across all of the caller's threads since cursor, as a
|
|
11
|
+
diff per thread the client applies on top of its UI.
|
|
12
|
+
*/
|
|
13
|
+
export const UpdatesGetUpdatesBody = zod.object({
|
|
14
|
+
cursor: zod
|
|
15
|
+
.string()
|
|
16
|
+
.optional()
|
|
17
|
+
.describe('From the previous response; empty on the first sync.'),
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
export const updatesGetUpdatesResponseThreadsItemDialogLastMsgDeletedByRoleDefault = `ROLE_UNSPECIFIED`;
|
|
21
|
+
export const updatesGetUpdatesResponseThreadsItemDialogLastMsgForwardOriginKindDefault = `FORWARD_ORIGIN_KIND_UNSPECIFIED`;
|
|
22
|
+
export const updatesGetUpdatesResponseThreadsItemDialogLastMsgInteractiveInputFieldStateDefault = `INPUT_FIELD_STATE_UNSPECIFIED`;
|
|
23
|
+
export const updatesGetUpdatesResponseThreadsItemDialogLastMsgInteractivePlacementDefault = `MENU_PLACEMENT_UNSPECIFIED`;
|
|
24
|
+
export const updatesGetUpdatesResponseThreadsItemDialogLastMsgReactedMetadataReactedByRoleDefault = `ROLE_UNSPECIFIED`;
|
|
25
|
+
export const updatesGetUpdatesResponseThreadsItemDialogLastMsgReplyToSenderRoleDefault = `ROLE_UNSPECIFIED`;
|
|
26
|
+
export const updatesGetUpdatesResponseThreadsItemDialogLastMsgSenderRoleDefault = `ROLE_UNSPECIFIED`;
|
|
27
|
+
export const updatesGetUpdatesResponseThreadsItemDialogMembersItemRoleDefault = `ROLE_UNSPECIFIED`;
|
|
28
|
+
export const updatesGetUpdatesResponseThreadsItemDialogReadStatesItemMemberRoleDefault = `ROLE_UNSPECIFIED`;
|
|
29
|
+
export const updatesGetUpdatesResponseThreadsItemDialogTypeDefault = `UNKNOWN`;
|
|
30
|
+
export const updatesGetUpdatesResponseThreadsItemMemberChangesItemActionDefault = `THREAD_MEMBER_CHANGE_ACTION_UNSPECIFIED`;
|
|
31
|
+
export const updatesGetUpdatesResponseThreadsItemMemberChangesItemByRoleDefault = `ROLE_UNSPECIFIED`;
|
|
32
|
+
export const updatesGetUpdatesResponseThreadsItemMemberChangesItemMemberRoleDefault = `ROLE_UNSPECIFIED`;
|
|
33
|
+
export const updatesGetUpdatesResponseThreadsItemMessagesItemForwardOriginKindDefault = `FORWARD_ORIGIN_KIND_UNSPECIFIED`;
|
|
34
|
+
export const updatesGetUpdatesResponseThreadsItemMessagesItemInteractiveInputFieldStateDefault = `INPUT_FIELD_STATE_UNSPECIFIED`;
|
|
35
|
+
export const updatesGetUpdatesResponseThreadsItemMessagesItemInteractivePlacementDefault = `MENU_PLACEMENT_UNSPECIFIED`;
|
|
36
|
+
export const updatesGetUpdatesResponseThreadsItemMessagesItemReplyToSenderRoleDefault = `ROLE_UNSPECIFIED`;
|
|
37
|
+
export const updatesGetUpdatesResponseThreadsItemMessagesItemSenderRoleDefault = `ROLE_UNSPECIFIED`;
|
|
38
|
+
export const updatesGetUpdatesResponseThreadsItemReadStatesItemMemberRoleDefault = `ROLE_UNSPECIFIED`;
|
|
39
|
+
export const updatesGetUpdatesResponseThreadsItemTopMessageForwardOriginKindDefault = `FORWARD_ORIGIN_KIND_UNSPECIFIED`;
|
|
40
|
+
export const updatesGetUpdatesResponseThreadsItemTopMessageInteractiveInputFieldStateDefault = `INPUT_FIELD_STATE_UNSPECIFIED`;
|
|
41
|
+
export const updatesGetUpdatesResponseThreadsItemTopMessageInteractivePlacementDefault = `MENU_PLACEMENT_UNSPECIFIED`;
|
|
42
|
+
export const updatesGetUpdatesResponseThreadsItemTopMessageReplyToSenderRoleDefault = `ROLE_UNSPECIFIED`;
|
|
43
|
+
export const updatesGetUpdatesResponseThreadsItemTopMessageSenderRoleDefault = `ROLE_UNSPECIFIED`;
|
|
44
|
+
|
|
45
|
+
export const UpdatesGetUpdatesResponse = zod.object({
|
|
46
|
+
cursor: zod
|
|
47
|
+
.string()
|
|
48
|
+
.optional()
|
|
49
|
+
.describe('Pass back as cursor on the next call.'),
|
|
50
|
+
resync: zod
|
|
51
|
+
.boolean()
|
|
52
|
+
.optional()
|
|
53
|
+
.describe(
|
|
54
|
+
'Empty cursor, unusable cursor or more than 1000 changes: reload the thread list,\nthen continue from cursor.',
|
|
55
|
+
),
|
|
56
|
+
threads: zod
|
|
57
|
+
.array(
|
|
58
|
+
zod.object({
|
|
59
|
+
deleted_message_ids: zod.array(zod.string()).optional(),
|
|
60
|
+
dialog: zod
|
|
61
|
+
.object({
|
|
62
|
+
created_at: zod
|
|
63
|
+
.string()
|
|
64
|
+
.optional()
|
|
65
|
+
.describe('Thread creation timestamp (Unix time, milliseconds).'),
|
|
66
|
+
description: zod
|
|
67
|
+
.string()
|
|
68
|
+
.optional()
|
|
69
|
+
.describe('Optional thread description.'),
|
|
70
|
+
id: zod.string().optional().describe('Unique thread identifier.'),
|
|
71
|
+
last_msg: zod
|
|
72
|
+
.object({
|
|
73
|
+
body: zod.string().optional().describe('Message body content.'),
|
|
74
|
+
contact: zod
|
|
75
|
+
.object({
|
|
76
|
+
email: zod.string().optional(),
|
|
77
|
+
name: zod.string().optional(),
|
|
78
|
+
phone: zod.string().optional(),
|
|
79
|
+
})
|
|
80
|
+
.optional(),
|
|
81
|
+
created_at: zod
|
|
82
|
+
.string()
|
|
83
|
+
.optional()
|
|
84
|
+
.describe(
|
|
85
|
+
'Message creation timestamp (Unix time, milliseconds).',
|
|
86
|
+
),
|
|
87
|
+
deleted: zod
|
|
88
|
+
.boolean()
|
|
89
|
+
.optional()
|
|
90
|
+
.describe(
|
|
91
|
+
'True when the message was deleted by its author. Every content field\n(body, attachments, contact, location, interactive, metadata) is cleared,\nso clients should render a tombstone.',
|
|
92
|
+
),
|
|
93
|
+
deleted_at: zod
|
|
94
|
+
.string()
|
|
95
|
+
.optional()
|
|
96
|
+
.describe(
|
|
97
|
+
'Unix time in milliseconds when the message was deleted.',
|
|
98
|
+
),
|
|
99
|
+
deleted_by: zod
|
|
100
|
+
.object({
|
|
101
|
+
contact: zod
|
|
102
|
+
.object({
|
|
103
|
+
app_id: zod
|
|
104
|
+
.string()
|
|
105
|
+
.optional()
|
|
106
|
+
.describe(
|
|
107
|
+
'Identifier of the specific integration app or bot.',
|
|
108
|
+
),
|
|
109
|
+
created_at: zod
|
|
110
|
+
.string()
|
|
111
|
+
.optional()
|
|
112
|
+
.describe(
|
|
113
|
+
'Record creation timestamp (Unix Epoch in milliseconds).',
|
|
114
|
+
),
|
|
115
|
+
is_bot: zod
|
|
116
|
+
.boolean()
|
|
117
|
+
.optional()
|
|
118
|
+
.describe(
|
|
119
|
+
'Represents if usere is real person or automatic script.',
|
|
120
|
+
),
|
|
121
|
+
iss: zod
|
|
122
|
+
.string()
|
|
123
|
+
.optional()
|
|
124
|
+
.describe(
|
|
125
|
+
'Provider-specific unique identifier (Issuer ID).',
|
|
126
|
+
),
|
|
127
|
+
metadata: zod
|
|
128
|
+
.record(zod.string(), zod.string())
|
|
129
|
+
.optional()
|
|
130
|
+
.describe(
|
|
131
|
+
'Additional dynamic attributes provided by the messenger.',
|
|
132
|
+
),
|
|
133
|
+
name: zod
|
|
134
|
+
.string()
|
|
135
|
+
.optional()
|
|
136
|
+
.describe('Display name of the contact.'),
|
|
137
|
+
sub: zod
|
|
138
|
+
.string()
|
|
139
|
+
.optional()
|
|
140
|
+
.describe(
|
|
141
|
+
'Associated internal system subject/identifier.',
|
|
142
|
+
),
|
|
143
|
+
type: zod
|
|
144
|
+
.string()
|
|
145
|
+
.optional()
|
|
146
|
+
.describe(
|
|
147
|
+
"Channel type (e.g., 'webchat', 'telegram').",
|
|
148
|
+
),
|
|
149
|
+
updated_at: zod
|
|
150
|
+
.string()
|
|
151
|
+
.optional()
|
|
152
|
+
.describe(
|
|
153
|
+
'Last record update timestamp (Unix Epoch in milliseconds).',
|
|
154
|
+
),
|
|
155
|
+
username: zod
|
|
156
|
+
.string()
|
|
157
|
+
.optional()
|
|
158
|
+
.describe('Technical username or handle.'),
|
|
159
|
+
vias: zod
|
|
160
|
+
.array(
|
|
161
|
+
zod.object({
|
|
162
|
+
contact_id: zod.string().optional(),
|
|
163
|
+
created_at: zod.string().optional(),
|
|
164
|
+
disable: zod.boolean().optional(),
|
|
165
|
+
disable_reason: zod.string().optional(),
|
|
166
|
+
metadata: zod.looseObject({}).optional(),
|
|
167
|
+
updated_at: zod.string().optional(),
|
|
168
|
+
via: zod.string().optional(),
|
|
169
|
+
}),
|
|
170
|
+
)
|
|
171
|
+
.optional(),
|
|
172
|
+
})
|
|
173
|
+
.optional()
|
|
174
|
+
.describe(
|
|
175
|
+
'Contact represents an external messaging identity.',
|
|
176
|
+
),
|
|
177
|
+
id: zod.string().optional(),
|
|
178
|
+
permissions: zod
|
|
179
|
+
.object({
|
|
180
|
+
can_add_members: zod.boolean().optional(),
|
|
181
|
+
can_change_members_permissions: zod
|
|
182
|
+
.boolean()
|
|
183
|
+
.optional(),
|
|
184
|
+
can_change_thread_info: zod.boolean().optional(),
|
|
185
|
+
can_delete_messages: zod.boolean().optional(),
|
|
186
|
+
can_remove_members: zod.boolean().optional(),
|
|
187
|
+
can_send_messages: zod.boolean().optional(),
|
|
188
|
+
created_at: zod.string().optional(),
|
|
189
|
+
id: zod.string().optional(),
|
|
190
|
+
member_id: zod.string().optional(),
|
|
191
|
+
updated_at: zod.string().optional(),
|
|
192
|
+
})
|
|
193
|
+
.optional(),
|
|
194
|
+
role: zod
|
|
195
|
+
.enum([
|
|
196
|
+
'ROLE_UNSPECIFIED',
|
|
197
|
+
'ROLE_MEMBER',
|
|
198
|
+
'ROLE_ADMIN',
|
|
199
|
+
'ROLE_OWNER',
|
|
200
|
+
'ROLE_SUPERVISOR',
|
|
201
|
+
])
|
|
202
|
+
.default(
|
|
203
|
+
updatesGetUpdatesResponseThreadsItemDialogLastMsgDeletedByRoleDefault,
|
|
204
|
+
),
|
|
205
|
+
})
|
|
206
|
+
.optional()
|
|
207
|
+
.describe(
|
|
208
|
+
'Member who deleted the message, enriched exactly like sender; unset while\nthe message is live.',
|
|
209
|
+
),
|
|
210
|
+
documents: zod
|
|
211
|
+
.array(
|
|
212
|
+
zod
|
|
213
|
+
.object({
|
|
214
|
+
created_at: zod
|
|
215
|
+
.string()
|
|
216
|
+
.optional()
|
|
217
|
+
.describe(
|
|
218
|
+
'Creation timestamp (Unix time, milliseconds).',
|
|
219
|
+
),
|
|
220
|
+
file_id: zod
|
|
221
|
+
.string()
|
|
222
|
+
.optional()
|
|
223
|
+
.describe('File storage identifier.'),
|
|
224
|
+
id: zod
|
|
225
|
+
.string()
|
|
226
|
+
.optional()
|
|
227
|
+
.describe('Document identifier.'),
|
|
228
|
+
message_id: zod
|
|
229
|
+
.string()
|
|
230
|
+
.optional()
|
|
231
|
+
.describe(
|
|
232
|
+
'Identifier of the message this document belongs to.',
|
|
233
|
+
),
|
|
234
|
+
mime: zod
|
|
235
|
+
.string()
|
|
236
|
+
.optional()
|
|
237
|
+
.describe('MIME type of the document.'),
|
|
238
|
+
name: zod
|
|
239
|
+
.string()
|
|
240
|
+
.optional()
|
|
241
|
+
.describe('Original file name.'),
|
|
242
|
+
size: zod
|
|
243
|
+
.string()
|
|
244
|
+
.optional()
|
|
245
|
+
.describe('File size in bytes.'),
|
|
246
|
+
url: zod
|
|
247
|
+
.string()
|
|
248
|
+
.optional()
|
|
249
|
+
.describe(
|
|
250
|
+
'Public signed URL for downloading the document.',
|
|
251
|
+
),
|
|
252
|
+
})
|
|
253
|
+
.describe(
|
|
254
|
+
'Document represents a file attachment\nassociated with a message.',
|
|
255
|
+
),
|
|
256
|
+
)
|
|
257
|
+
.optional()
|
|
258
|
+
.describe('List of document attachments.'),
|
|
259
|
+
edited_at: zod
|
|
260
|
+
.string()
|
|
261
|
+
.optional()
|
|
262
|
+
.describe(
|
|
263
|
+
'Message last update timestamp (Unix time, milliseconds).',
|
|
264
|
+
),
|
|
265
|
+
forward_origin: zod
|
|
266
|
+
.object({
|
|
267
|
+
kind: zod
|
|
268
|
+
.enum([
|
|
269
|
+
'FORWARD_ORIGIN_KIND_UNSPECIFIED',
|
|
270
|
+
'FORWARD_ORIGIN_KIND_INTERNAL',
|
|
271
|
+
'FORWARD_ORIGIN_KIND_EXTERNAL_USER',
|
|
272
|
+
'FORWARD_ORIGIN_KIND_EXTERNAL_HIDDEN_USER',
|
|
273
|
+
'FORWARD_ORIGIN_KIND_EXTERNAL_CHAT',
|
|
274
|
+
])
|
|
275
|
+
.default(
|
|
276
|
+
updatesGetUpdatesResponseThreadsItemDialogLastMsgForwardOriginKindDefault,
|
|
277
|
+
)
|
|
278
|
+
.describe(
|
|
279
|
+
'ForwardOriginKind tells the client how to label a forwarded message and\nwhether the origin points at anything addressable inside Webitel.\n\n - FORWARD_ORIGIN_KIND_INTERNAL: Forwarded inside Webitel: sender_id and source_message_id are set.\n - FORWARD_ORIGIN_KIND_EXTERNAL_USER: Forwarded into the chat from an external messenger, author named.\n - FORWARD_ORIGIN_KIND_EXTERNAL_HIDDEN_USER: Same, but the author chose to hide their account, so there is no name.\n - FORWARD_ORIGIN_KIND_EXTERNAL_CHAT: Origin is an external group or channel rather than a person.',
|
|
280
|
+
),
|
|
281
|
+
original_sent_at: zod
|
|
282
|
+
.string()
|
|
283
|
+
.optional()
|
|
284
|
+
.describe(
|
|
285
|
+
'When the original message was sent, Unix time in milliseconds.',
|
|
286
|
+
),
|
|
287
|
+
sender_id: zod
|
|
288
|
+
.string()
|
|
289
|
+
.optional()
|
|
290
|
+
.describe(
|
|
291
|
+
'Contact id of the original author. Empty unless kind is INTERNAL.',
|
|
292
|
+
),
|
|
293
|
+
sender_name: zod
|
|
294
|
+
.string()
|
|
295
|
+
.optional()
|
|
296
|
+
.describe(
|
|
297
|
+
'Display name of the original author — the "from whom" label.',
|
|
298
|
+
),
|
|
299
|
+
source_message_id: zod
|
|
300
|
+
.string()
|
|
301
|
+
.optional()
|
|
302
|
+
.describe(
|
|
303
|
+
'Source message this copy was made from. Empty unless kind is INTERNAL,\nand cleared if the source is later purged.',
|
|
304
|
+
),
|
|
305
|
+
})
|
|
306
|
+
.optional()
|
|
307
|
+
.describe(
|
|
308
|
+
'Set when this message is a forward. Never populated for a deleted\nmessage: the tombstone must not leak the origin name.',
|
|
309
|
+
),
|
|
310
|
+
id: zod
|
|
311
|
+
.string()
|
|
312
|
+
.optional()
|
|
313
|
+
.describe('Unique message identifier.'),
|
|
314
|
+
images: zod
|
|
315
|
+
.array(
|
|
316
|
+
zod
|
|
317
|
+
.object({
|
|
318
|
+
created_at: zod
|
|
319
|
+
.string()
|
|
320
|
+
.optional()
|
|
321
|
+
.describe(
|
|
322
|
+
'Creation timestamp (Unix time, milliseconds).',
|
|
323
|
+
),
|
|
324
|
+
file_id: zod
|
|
325
|
+
.string()
|
|
326
|
+
.optional()
|
|
327
|
+
.describe('File storage identifier.'),
|
|
328
|
+
height: zod
|
|
329
|
+
.int()
|
|
330
|
+
.optional()
|
|
331
|
+
.describe('Image height in pixels.'),
|
|
332
|
+
id: zod
|
|
333
|
+
.string()
|
|
334
|
+
.optional()
|
|
335
|
+
.describe('Image identifier.'),
|
|
336
|
+
message_id: zod
|
|
337
|
+
.string()
|
|
338
|
+
.optional()
|
|
339
|
+
.describe(
|
|
340
|
+
'Identifier of the message this message belongs to.',
|
|
341
|
+
),
|
|
342
|
+
mime: zod
|
|
343
|
+
.string()
|
|
344
|
+
.optional()
|
|
345
|
+
.describe('MIME type of the image.'),
|
|
346
|
+
url: zod
|
|
347
|
+
.string()
|
|
348
|
+
.optional()
|
|
349
|
+
.describe(
|
|
350
|
+
'Public signed URL for accessing the image.',
|
|
351
|
+
),
|
|
352
|
+
width: zod
|
|
353
|
+
.int()
|
|
354
|
+
.optional()
|
|
355
|
+
.describe('Image width in pixels.'),
|
|
356
|
+
})
|
|
357
|
+
.describe(
|
|
358
|
+
'Image represents an image attachment\nassociated with a message.',
|
|
359
|
+
),
|
|
360
|
+
)
|
|
361
|
+
.optional()
|
|
362
|
+
.describe('List of image attachments.'),
|
|
363
|
+
interactive: zod
|
|
364
|
+
.object({
|
|
365
|
+
documents: zod
|
|
366
|
+
.object({
|
|
367
|
+
documents: zod
|
|
368
|
+
.array(
|
|
369
|
+
zod
|
|
370
|
+
.object({
|
|
371
|
+
file_name: zod.string().optional(),
|
|
372
|
+
id: zod.string().optional(),
|
|
373
|
+
mime_type: zod.string().optional(),
|
|
374
|
+
size_bytes: zod.string().optional(),
|
|
375
|
+
url: zod.string().optional(),
|
|
376
|
+
})
|
|
377
|
+
.describe(
|
|
378
|
+
'Represents `Document` message with necessary fields\nto process it into frequently used `document`\nentity in messaging systems.',
|
|
379
|
+
),
|
|
380
|
+
)
|
|
381
|
+
.optional()
|
|
382
|
+
.describe(
|
|
383
|
+
'Documents to be attached to the header of interactive message.\nMax allowed documents: 10.',
|
|
384
|
+
),
|
|
385
|
+
})
|
|
386
|
+
.optional()
|
|
387
|
+
.describe('Document attachments header.'),
|
|
388
|
+
images: zod
|
|
389
|
+
.object({
|
|
390
|
+
images: zod
|
|
391
|
+
.array(
|
|
392
|
+
zod
|
|
393
|
+
.object({
|
|
394
|
+
id: zod.string().optional(),
|
|
395
|
+
link: zod.string().optional(),
|
|
396
|
+
mime_type: zod.string().optional(),
|
|
397
|
+
name: zod.string().optional(),
|
|
398
|
+
})
|
|
399
|
+
.describe(
|
|
400
|
+
'Represents `Image` entity with\nnecessary fields.',
|
|
401
|
+
),
|
|
402
|
+
)
|
|
403
|
+
.optional()
|
|
404
|
+
.describe(
|
|
405
|
+
'Images to be attached to the header of interactive message.\nMax allowed images: 10.',
|
|
406
|
+
),
|
|
407
|
+
})
|
|
408
|
+
.optional()
|
|
409
|
+
.describe('Images attachment header.'),
|
|
410
|
+
input_field_state: zod
|
|
411
|
+
.enum([
|
|
412
|
+
'INPUT_FIELD_STATE_UNSPECIFIED',
|
|
413
|
+
'INPUT_FIELD_STATE_REGULAR',
|
|
414
|
+
'INPUT_FIELD_STATE_MINIMIZED',
|
|
415
|
+
'INPUT_FIELD_STATE_HIDDEN',
|
|
416
|
+
])
|
|
417
|
+
.default(
|
|
418
|
+
updatesGetUpdatesResponseThreadsItemDialogLastMsgInteractiveInputFieldStateDefault,
|
|
419
|
+
)
|
|
420
|
+
.describe(
|
|
421
|
+
'Whether the recipient may still type while this menu is displayed.',
|
|
422
|
+
),
|
|
423
|
+
list_reply: zod
|
|
424
|
+
.object({
|
|
425
|
+
main_button_title: zod
|
|
426
|
+
.string()
|
|
427
|
+
.optional()
|
|
428
|
+
.describe(
|
|
429
|
+
'Title of the main button, that on-click show up list.',
|
|
430
|
+
),
|
|
431
|
+
sections: zod
|
|
432
|
+
.array(
|
|
433
|
+
zod
|
|
434
|
+
.object({
|
|
435
|
+
buttons: zod
|
|
436
|
+
.array(
|
|
437
|
+
zod
|
|
438
|
+
.object({
|
|
439
|
+
callback: zod
|
|
440
|
+
.object({
|
|
441
|
+
data: zod
|
|
442
|
+
.string()
|
|
443
|
+
.optional()
|
|
444
|
+
.describe(
|
|
445
|
+
'Opaque data payload passed back to the server upon interaction.',
|
|
446
|
+
),
|
|
447
|
+
})
|
|
448
|
+
.optional()
|
|
449
|
+
.describe(
|
|
450
|
+
'Triggers a backend event (callback) with associated metadata.',
|
|
451
|
+
),
|
|
452
|
+
id: zod
|
|
453
|
+
.string()
|
|
454
|
+
.optional()
|
|
455
|
+
.describe(
|
|
456
|
+
'Unique idempotent identifier for the button.\nUsed by the frontend to track state and prevent duplicate interactions.',
|
|
457
|
+
),
|
|
458
|
+
label: zod
|
|
459
|
+
.string()
|
|
460
|
+
.optional()
|
|
461
|
+
.describe(
|
|
462
|
+
'The human-readable label displayed on the button.',
|
|
463
|
+
),
|
|
464
|
+
metadata: zod
|
|
465
|
+
.looseObject({})
|
|
466
|
+
.optional()
|
|
467
|
+
.describe(
|
|
468
|
+
'Extensible metadata for UI/UX styling (e.g., "color", "theme", "size").\nUsage: Allows for future-proofing without breaking schema changes.',
|
|
469
|
+
),
|
|
470
|
+
request: zod
|
|
471
|
+
.object({
|
|
472
|
+
action: zod
|
|
473
|
+
.string()
|
|
474
|
+
.optional()
|
|
475
|
+
.describe(
|
|
476
|
+
'The specific action to be performed by the client application.',
|
|
477
|
+
),
|
|
478
|
+
})
|
|
479
|
+
.optional()
|
|
480
|
+
.describe(
|
|
481
|
+
'Requests sensitive information from the client (e.g., location or contact).',
|
|
482
|
+
),
|
|
483
|
+
url: zod
|
|
484
|
+
.object({
|
|
485
|
+
url: zod
|
|
486
|
+
.string()
|
|
487
|
+
.optional()
|
|
488
|
+
.describe(
|
|
489
|
+
'Must be a valid absolute URI (e.g., https://example.com).',
|
|
490
|
+
),
|
|
491
|
+
})
|
|
492
|
+
.optional()
|
|
493
|
+
.describe(
|
|
494
|
+
'Directs the user to an external web resource.',
|
|
495
|
+
),
|
|
496
|
+
})
|
|
497
|
+
.describe(
|
|
498
|
+
'Defines a single interactive element within the keyboard.\nEach button must have a unique identifier and a specific action type.',
|
|
499
|
+
),
|
|
500
|
+
)
|
|
501
|
+
.optional()
|
|
502
|
+
.describe(
|
|
503
|
+
'Collection of buttons within this section.\nMinimum of 1 button is required to prevent empty sections.',
|
|
504
|
+
),
|
|
505
|
+
section: zod
|
|
506
|
+
.string()
|
|
507
|
+
.optional()
|
|
508
|
+
.describe(
|
|
509
|
+
'The header text for this section. Must be concise and descriptive.',
|
|
510
|
+
),
|
|
511
|
+
})
|
|
512
|
+
.describe(
|
|
513
|
+
'Represents a row of buttons grouped under a specific logical section header.\nUseful for creating categorized menus or structured interactive interfaces.',
|
|
514
|
+
),
|
|
515
|
+
)
|
|
516
|
+
.optional()
|
|
517
|
+
.describe('List with sections with buttons.'),
|
|
518
|
+
})
|
|
519
|
+
.optional()
|
|
520
|
+
.describe(
|
|
521
|
+
'List reply with main list button text and sections with buttons.',
|
|
522
|
+
),
|
|
523
|
+
markup: zod
|
|
524
|
+
.object({
|
|
525
|
+
rows: zod
|
|
526
|
+
.array(
|
|
527
|
+
zod
|
|
528
|
+
.object({
|
|
529
|
+
buttons: zod
|
|
530
|
+
.array(
|
|
531
|
+
zod
|
|
532
|
+
.object({
|
|
533
|
+
callback: zod
|
|
534
|
+
.object({
|
|
535
|
+
data: zod
|
|
536
|
+
.string()
|
|
537
|
+
.optional()
|
|
538
|
+
.describe(
|
|
539
|
+
'Opaque data payload passed back to the server upon interaction.',
|
|
540
|
+
),
|
|
541
|
+
})
|
|
542
|
+
.optional()
|
|
543
|
+
.describe(
|
|
544
|
+
'Triggers a backend event (callback) with associated metadata.',
|
|
545
|
+
),
|
|
546
|
+
id: zod
|
|
547
|
+
.string()
|
|
548
|
+
.optional()
|
|
549
|
+
.describe(
|
|
550
|
+
'Unique idempotent identifier for the button.\nUsed by the frontend to track state and prevent duplicate interactions.',
|
|
551
|
+
),
|
|
552
|
+
label: zod
|
|
553
|
+
.string()
|
|
554
|
+
.optional()
|
|
555
|
+
.describe(
|
|
556
|
+
'The human-readable label displayed on the button.',
|
|
557
|
+
),
|
|
558
|
+
metadata: zod
|
|
559
|
+
.looseObject({})
|
|
560
|
+
.optional()
|
|
561
|
+
.describe(
|
|
562
|
+
'Extensible metadata for UI/UX styling (e.g., "color", "theme", "size").\nUsage: Allows for future-proofing without breaking schema changes.',
|
|
563
|
+
),
|
|
564
|
+
request: zod
|
|
565
|
+
.object({
|
|
566
|
+
action: zod
|
|
567
|
+
.string()
|
|
568
|
+
.optional()
|
|
569
|
+
.describe(
|
|
570
|
+
'The specific action to be performed by the client application.',
|
|
571
|
+
),
|
|
572
|
+
})
|
|
573
|
+
.optional()
|
|
574
|
+
.describe(
|
|
575
|
+
'Requests sensitive information from the client (e.g., location or contact).',
|
|
576
|
+
),
|
|
577
|
+
url: zod
|
|
578
|
+
.object({
|
|
579
|
+
url: zod
|
|
580
|
+
.string()
|
|
581
|
+
.optional()
|
|
582
|
+
.describe(
|
|
583
|
+
'Must be a valid absolute URI (e.g., https://example.com).',
|
|
584
|
+
),
|
|
585
|
+
})
|
|
586
|
+
.optional()
|
|
587
|
+
.describe(
|
|
588
|
+
'Directs the user to an external web resource.',
|
|
589
|
+
),
|
|
590
|
+
})
|
|
591
|
+
.describe(
|
|
592
|
+
'Defines a single interactive element within the keyboard.\nEach button must have a unique identifier and a specific action type.',
|
|
593
|
+
),
|
|
594
|
+
)
|
|
595
|
+
.optional()
|
|
596
|
+
.describe(
|
|
597
|
+
'Horizontal collection of buttons.\nCapped at 10 to ensure UI responsiveness and prevent overflow.',
|
|
598
|
+
),
|
|
599
|
+
})
|
|
600
|
+
.describe(
|
|
601
|
+
'A standard horizontal row of interactive buttons without a section header.',
|
|
602
|
+
),
|
|
603
|
+
)
|
|
604
|
+
.optional()
|
|
605
|
+
.describe('Rows of buttons matrix.'),
|
|
606
|
+
})
|
|
607
|
+
.optional()
|
|
608
|
+
.describe('Markup matrix with buttons.'),
|
|
609
|
+
placement: zod
|
|
610
|
+
.enum([
|
|
611
|
+
'MENU_PLACEMENT_UNSPECIFIED',
|
|
612
|
+
'MENU_PLACEMENT_INLINE',
|
|
613
|
+
'MENU_PLACEMENT_PERSISTENT',
|
|
614
|
+
])
|
|
615
|
+
.default(
|
|
616
|
+
updatesGetUpdatesResponseThreadsItemDialogLastMsgInteractivePlacementDefault,
|
|
617
|
+
)
|
|
618
|
+
.describe(
|
|
619
|
+
'Where the menu is rendered. Channels that only support one placement ignore it.',
|
|
620
|
+
),
|
|
621
|
+
single_use: zod
|
|
622
|
+
.boolean()
|
|
623
|
+
.optional()
|
|
624
|
+
.describe('Force to block user keyboard.'),
|
|
625
|
+
})
|
|
626
|
+
.optional()
|
|
627
|
+
.describe(
|
|
628
|
+
'Interactive represents a rich message with UI elements.',
|
|
629
|
+
),
|
|
630
|
+
location: zod
|
|
631
|
+
.object({
|
|
632
|
+
address: zod.string().optional(),
|
|
633
|
+
latitude: zod.number().optional(),
|
|
634
|
+
longitude: zod.number().optional(),
|
|
635
|
+
name: zod.string().optional(),
|
|
636
|
+
})
|
|
637
|
+
.optional(),
|
|
638
|
+
metadata: zod
|
|
639
|
+
.looseObject({})
|
|
640
|
+
.optional()
|
|
641
|
+
.describe(
|
|
642
|
+
'Arbitrary message metadata.\nCan contain structured data depending on message type.',
|
|
643
|
+
),
|
|
644
|
+
reacted_metadata: zod
|
|
645
|
+
.object({
|
|
646
|
+
button_code: zod
|
|
647
|
+
.string()
|
|
648
|
+
.optional()
|
|
649
|
+
.describe('Button identifier.'),
|
|
650
|
+
callback_data: zod
|
|
651
|
+
.string()
|
|
652
|
+
.optional()
|
|
653
|
+
.describe('Optional callback payload.'),
|
|
654
|
+
in_reply_to: zod
|
|
655
|
+
.string()
|
|
656
|
+
.optional()
|
|
657
|
+
.describe('Original message ID.'),
|
|
658
|
+
reacted_at: zod
|
|
659
|
+
.string()
|
|
660
|
+
.optional()
|
|
661
|
+
.describe(
|
|
662
|
+
'Unix time in milliseconds when callback button was clicked.',
|
|
663
|
+
),
|
|
664
|
+
reacted_by: zod
|
|
665
|
+
.object({
|
|
666
|
+
contact: zod
|
|
667
|
+
.object({
|
|
668
|
+
app_id: zod
|
|
669
|
+
.string()
|
|
670
|
+
.optional()
|
|
671
|
+
.describe(
|
|
672
|
+
'Identifier of the specific integration app or bot.',
|
|
673
|
+
),
|
|
674
|
+
created_at: zod
|
|
675
|
+
.string()
|
|
676
|
+
.optional()
|
|
677
|
+
.describe(
|
|
678
|
+
'Record creation timestamp (Unix Epoch in milliseconds).',
|
|
679
|
+
),
|
|
680
|
+
is_bot: zod
|
|
681
|
+
.boolean()
|
|
682
|
+
.optional()
|
|
683
|
+
.describe(
|
|
684
|
+
'Represents if usere is real person or automatic script.',
|
|
685
|
+
),
|
|
686
|
+
iss: zod
|
|
687
|
+
.string()
|
|
688
|
+
.optional()
|
|
689
|
+
.describe(
|
|
690
|
+
'Provider-specific unique identifier (Issuer ID).',
|
|
691
|
+
),
|
|
692
|
+
metadata: zod
|
|
693
|
+
.record(zod.string(), zod.string())
|
|
694
|
+
.optional()
|
|
695
|
+
.describe(
|
|
696
|
+
'Additional dynamic attributes provided by the messenger.',
|
|
697
|
+
),
|
|
698
|
+
name: zod
|
|
699
|
+
.string()
|
|
700
|
+
.optional()
|
|
701
|
+
.describe('Display name of the contact.'),
|
|
702
|
+
sub: zod
|
|
703
|
+
.string()
|
|
704
|
+
.optional()
|
|
705
|
+
.describe(
|
|
706
|
+
'Associated internal system subject/identifier.',
|
|
707
|
+
),
|
|
708
|
+
type: zod
|
|
709
|
+
.string()
|
|
710
|
+
.optional()
|
|
711
|
+
.describe(
|
|
712
|
+
"Channel type (e.g., 'webchat', 'telegram').",
|
|
713
|
+
),
|
|
714
|
+
updated_at: zod
|
|
715
|
+
.string()
|
|
716
|
+
.optional()
|
|
717
|
+
.describe(
|
|
718
|
+
'Last record update timestamp (Unix Epoch in milliseconds).',
|
|
719
|
+
),
|
|
720
|
+
username: zod
|
|
721
|
+
.string()
|
|
722
|
+
.optional()
|
|
723
|
+
.describe('Technical username or handle.'),
|
|
724
|
+
vias: zod
|
|
725
|
+
.array(
|
|
726
|
+
zod.object({
|
|
727
|
+
contact_id: zod.string().optional(),
|
|
728
|
+
created_at: zod.string().optional(),
|
|
729
|
+
disable: zod.boolean().optional(),
|
|
730
|
+
disable_reason: zod.string().optional(),
|
|
731
|
+
metadata: zod.looseObject({}).optional(),
|
|
732
|
+
updated_at: zod.string().optional(),
|
|
733
|
+
via: zod.string().optional(),
|
|
734
|
+
}),
|
|
735
|
+
)
|
|
736
|
+
.optional(),
|
|
737
|
+
})
|
|
738
|
+
.optional()
|
|
739
|
+
.describe(
|
|
740
|
+
'Contact represents an external messaging identity.',
|
|
741
|
+
),
|
|
742
|
+
id: zod.string().optional(),
|
|
743
|
+
permissions: zod
|
|
744
|
+
.object({
|
|
745
|
+
can_add_members: zod.boolean().optional(),
|
|
746
|
+
can_change_members_permissions: zod
|
|
747
|
+
.boolean()
|
|
748
|
+
.optional(),
|
|
749
|
+
can_change_thread_info: zod.boolean().optional(),
|
|
750
|
+
can_delete_messages: zod.boolean().optional(),
|
|
751
|
+
can_remove_members: zod.boolean().optional(),
|
|
752
|
+
can_send_messages: zod.boolean().optional(),
|
|
753
|
+
created_at: zod.string().optional(),
|
|
754
|
+
id: zod.string().optional(),
|
|
755
|
+
member_id: zod.string().optional(),
|
|
756
|
+
updated_at: zod.string().optional(),
|
|
757
|
+
})
|
|
758
|
+
.optional(),
|
|
759
|
+
role: zod
|
|
760
|
+
.enum([
|
|
761
|
+
'ROLE_UNSPECIFIED',
|
|
762
|
+
'ROLE_MEMBER',
|
|
763
|
+
'ROLE_ADMIN',
|
|
764
|
+
'ROLE_OWNER',
|
|
765
|
+
'ROLE_SUPERVISOR',
|
|
766
|
+
])
|
|
767
|
+
.default(
|
|
768
|
+
updatesGetUpdatesResponseThreadsItemDialogLastMsgReactedMetadataReactedByRoleDefault,
|
|
769
|
+
),
|
|
770
|
+
})
|
|
771
|
+
.optional()
|
|
772
|
+
.describe('User who clicked the button.'),
|
|
773
|
+
})
|
|
774
|
+
.optional()
|
|
775
|
+
.describe(
|
|
776
|
+
'Metadata for button reaction for interactive message.',
|
|
777
|
+
),
|
|
778
|
+
reactions: zod
|
|
779
|
+
.array(
|
|
780
|
+
zod
|
|
781
|
+
.object({
|
|
782
|
+
count: zod
|
|
783
|
+
.int()
|
|
784
|
+
.optional()
|
|
785
|
+
.describe(
|
|
786
|
+
'Number of members currently holding this reaction.',
|
|
787
|
+
),
|
|
788
|
+
emoji: zod
|
|
789
|
+
.string()
|
|
790
|
+
.optional()
|
|
791
|
+
.describe('Unicode emoji this reaction aggregates.'),
|
|
792
|
+
last_reacted_at: zod
|
|
793
|
+
.string()
|
|
794
|
+
.optional()
|
|
795
|
+
.describe(
|
|
796
|
+
'Unix time in milliseconds of the most recent reaction with this emoji.',
|
|
797
|
+
),
|
|
798
|
+
reacted_by_me: zod
|
|
799
|
+
.boolean()
|
|
800
|
+
.optional()
|
|
801
|
+
.describe(
|
|
802
|
+
'True when the requesting caller is one of the reactors.',
|
|
803
|
+
),
|
|
804
|
+
reactor_ids: zod
|
|
805
|
+
.array(zod.string())
|
|
806
|
+
.optional()
|
|
807
|
+
.describe(
|
|
808
|
+
'Capped sample of reactor contact ids (for UI); not necessarily all of them.',
|
|
809
|
+
),
|
|
810
|
+
})
|
|
811
|
+
.describe(
|
|
812
|
+
'MessageReaction is one emoji aggregate on a history message.',
|
|
813
|
+
),
|
|
814
|
+
)
|
|
815
|
+
.optional()
|
|
816
|
+
.describe(
|
|
817
|
+
'Emoji reactions currently held on the message, aggregated per emoji.',
|
|
818
|
+
),
|
|
819
|
+
reply_to: zod
|
|
820
|
+
.object({
|
|
821
|
+
attachment_address: zod.string().optional(),
|
|
822
|
+
attachment_kind: zod.string().optional(),
|
|
823
|
+
attachment_mime: zod.string().optional(),
|
|
824
|
+
attachment_name: zod.string().optional(),
|
|
825
|
+
body: zod.string().optional(),
|
|
826
|
+
created_at: zod.string().optional(),
|
|
827
|
+
is_deleted: zod.boolean().optional(),
|
|
828
|
+
message_id: zod.string().optional(),
|
|
829
|
+
sender: zod
|
|
830
|
+
.object({
|
|
831
|
+
contact: zod
|
|
832
|
+
.object({
|
|
833
|
+
app_id: zod
|
|
834
|
+
.string()
|
|
835
|
+
.optional()
|
|
836
|
+
.describe(
|
|
837
|
+
'Identifier of the specific integration app or bot.',
|
|
838
|
+
),
|
|
839
|
+
created_at: zod
|
|
840
|
+
.string()
|
|
841
|
+
.optional()
|
|
842
|
+
.describe(
|
|
843
|
+
'Record creation timestamp (Unix Epoch in milliseconds).',
|
|
844
|
+
),
|
|
845
|
+
is_bot: zod
|
|
846
|
+
.boolean()
|
|
847
|
+
.optional()
|
|
848
|
+
.describe(
|
|
849
|
+
'Represents if usere is real person or automatic script.',
|
|
850
|
+
),
|
|
851
|
+
iss: zod
|
|
852
|
+
.string()
|
|
853
|
+
.optional()
|
|
854
|
+
.describe(
|
|
855
|
+
'Provider-specific unique identifier (Issuer ID).',
|
|
856
|
+
),
|
|
857
|
+
metadata: zod
|
|
858
|
+
.record(zod.string(), zod.string())
|
|
859
|
+
.optional()
|
|
860
|
+
.describe(
|
|
861
|
+
'Additional dynamic attributes provided by the messenger.',
|
|
862
|
+
),
|
|
863
|
+
name: zod
|
|
864
|
+
.string()
|
|
865
|
+
.optional()
|
|
866
|
+
.describe('Display name of the contact.'),
|
|
867
|
+
sub: zod
|
|
868
|
+
.string()
|
|
869
|
+
.optional()
|
|
870
|
+
.describe(
|
|
871
|
+
'Associated internal system subject/identifier.',
|
|
872
|
+
),
|
|
873
|
+
type: zod
|
|
874
|
+
.string()
|
|
875
|
+
.optional()
|
|
876
|
+
.describe(
|
|
877
|
+
"Channel type (e.g., 'webchat', 'telegram').",
|
|
878
|
+
),
|
|
879
|
+
updated_at: zod
|
|
880
|
+
.string()
|
|
881
|
+
.optional()
|
|
882
|
+
.describe(
|
|
883
|
+
'Last record update timestamp (Unix Epoch in milliseconds).',
|
|
884
|
+
),
|
|
885
|
+
username: zod
|
|
886
|
+
.string()
|
|
887
|
+
.optional()
|
|
888
|
+
.describe('Technical username or handle.'),
|
|
889
|
+
vias: zod
|
|
890
|
+
.array(
|
|
891
|
+
zod.object({
|
|
892
|
+
contact_id: zod.string().optional(),
|
|
893
|
+
created_at: zod.string().optional(),
|
|
894
|
+
disable: zod.boolean().optional(),
|
|
895
|
+
disable_reason: zod.string().optional(),
|
|
896
|
+
metadata: zod.looseObject({}).optional(),
|
|
897
|
+
updated_at: zod.string().optional(),
|
|
898
|
+
via: zod.string().optional(),
|
|
899
|
+
}),
|
|
900
|
+
)
|
|
901
|
+
.optional(),
|
|
902
|
+
})
|
|
903
|
+
.optional()
|
|
904
|
+
.describe(
|
|
905
|
+
'Contact represents an external messaging identity.',
|
|
906
|
+
),
|
|
907
|
+
id: zod.string().optional(),
|
|
908
|
+
permissions: zod
|
|
909
|
+
.object({
|
|
910
|
+
can_add_members: zod.boolean().optional(),
|
|
911
|
+
can_change_members_permissions: zod
|
|
912
|
+
.boolean()
|
|
913
|
+
.optional(),
|
|
914
|
+
can_change_thread_info: zod.boolean().optional(),
|
|
915
|
+
can_delete_messages: zod.boolean().optional(),
|
|
916
|
+
can_remove_members: zod.boolean().optional(),
|
|
917
|
+
can_send_messages: zod.boolean().optional(),
|
|
918
|
+
created_at: zod.string().optional(),
|
|
919
|
+
id: zod.string().optional(),
|
|
920
|
+
member_id: zod.string().optional(),
|
|
921
|
+
updated_at: zod.string().optional(),
|
|
922
|
+
})
|
|
923
|
+
.optional(),
|
|
924
|
+
role: zod
|
|
925
|
+
.enum([
|
|
926
|
+
'ROLE_UNSPECIFIED',
|
|
927
|
+
'ROLE_MEMBER',
|
|
928
|
+
'ROLE_ADMIN',
|
|
929
|
+
'ROLE_OWNER',
|
|
930
|
+
'ROLE_SUPERVISOR',
|
|
931
|
+
])
|
|
932
|
+
.default(
|
|
933
|
+
updatesGetUpdatesResponseThreadsItemDialogLastMsgReplyToSenderRoleDefault,
|
|
934
|
+
),
|
|
935
|
+
})
|
|
936
|
+
.optional()
|
|
937
|
+
.describe(
|
|
938
|
+
'ThreadMember represents a thread participant\nwith optional type-specific settings.',
|
|
939
|
+
),
|
|
940
|
+
sender_id: zod.string().optional(),
|
|
941
|
+
type: zod
|
|
942
|
+
.string()
|
|
943
|
+
.optional()
|
|
944
|
+
.describe(
|
|
945
|
+
'Kind of the quoted message: text, document, image, system, interactive,\nlocation or contact.',
|
|
946
|
+
),
|
|
947
|
+
})
|
|
948
|
+
.optional(),
|
|
949
|
+
revision_count: zod
|
|
950
|
+
.int()
|
|
951
|
+
.optional()
|
|
952
|
+
.describe(
|
|
953
|
+
"Number of entries in the message's change history. Zero means the message\nwas never edited or deleted; otherwise GetMessageRevisions returns that\nmany entries.",
|
|
954
|
+
),
|
|
955
|
+
sender: zod
|
|
956
|
+
.object({
|
|
957
|
+
contact: zod
|
|
958
|
+
.object({
|
|
959
|
+
app_id: zod
|
|
960
|
+
.string()
|
|
961
|
+
.optional()
|
|
962
|
+
.describe(
|
|
963
|
+
'Identifier of the specific integration app or bot.',
|
|
964
|
+
),
|
|
965
|
+
created_at: zod
|
|
966
|
+
.string()
|
|
967
|
+
.optional()
|
|
968
|
+
.describe(
|
|
969
|
+
'Record creation timestamp (Unix Epoch in milliseconds).',
|
|
970
|
+
),
|
|
971
|
+
is_bot: zod
|
|
972
|
+
.boolean()
|
|
973
|
+
.optional()
|
|
974
|
+
.describe(
|
|
975
|
+
'Represents if usere is real person or automatic script.',
|
|
976
|
+
),
|
|
977
|
+
iss: zod
|
|
978
|
+
.string()
|
|
979
|
+
.optional()
|
|
980
|
+
.describe(
|
|
981
|
+
'Provider-specific unique identifier (Issuer ID).',
|
|
982
|
+
),
|
|
983
|
+
metadata: zod
|
|
984
|
+
.record(zod.string(), zod.string())
|
|
985
|
+
.optional()
|
|
986
|
+
.describe(
|
|
987
|
+
'Additional dynamic attributes provided by the messenger.',
|
|
988
|
+
),
|
|
989
|
+
name: zod
|
|
990
|
+
.string()
|
|
991
|
+
.optional()
|
|
992
|
+
.describe('Display name of the contact.'),
|
|
993
|
+
sub: zod
|
|
994
|
+
.string()
|
|
995
|
+
.optional()
|
|
996
|
+
.describe(
|
|
997
|
+
'Associated internal system subject/identifier.',
|
|
998
|
+
),
|
|
999
|
+
type: zod
|
|
1000
|
+
.string()
|
|
1001
|
+
.optional()
|
|
1002
|
+
.describe(
|
|
1003
|
+
"Channel type (e.g., 'webchat', 'telegram').",
|
|
1004
|
+
),
|
|
1005
|
+
updated_at: zod
|
|
1006
|
+
.string()
|
|
1007
|
+
.optional()
|
|
1008
|
+
.describe(
|
|
1009
|
+
'Last record update timestamp (Unix Epoch in milliseconds).',
|
|
1010
|
+
),
|
|
1011
|
+
username: zod
|
|
1012
|
+
.string()
|
|
1013
|
+
.optional()
|
|
1014
|
+
.describe('Technical username or handle.'),
|
|
1015
|
+
vias: zod
|
|
1016
|
+
.array(
|
|
1017
|
+
zod.object({
|
|
1018
|
+
contact_id: zod.string().optional(),
|
|
1019
|
+
created_at: zod.string().optional(),
|
|
1020
|
+
disable: zod.boolean().optional(),
|
|
1021
|
+
disable_reason: zod.string().optional(),
|
|
1022
|
+
metadata: zod.looseObject({}).optional(),
|
|
1023
|
+
updated_at: zod.string().optional(),
|
|
1024
|
+
via: zod.string().optional(),
|
|
1025
|
+
}),
|
|
1026
|
+
)
|
|
1027
|
+
.optional(),
|
|
1028
|
+
})
|
|
1029
|
+
.optional()
|
|
1030
|
+
.describe(
|
|
1031
|
+
'Contact represents an external messaging identity.',
|
|
1032
|
+
),
|
|
1033
|
+
id: zod.string().optional(),
|
|
1034
|
+
permissions: zod
|
|
1035
|
+
.object({
|
|
1036
|
+
can_add_members: zod.boolean().optional(),
|
|
1037
|
+
can_change_members_permissions: zod
|
|
1038
|
+
.boolean()
|
|
1039
|
+
.optional(),
|
|
1040
|
+
can_change_thread_info: zod.boolean().optional(),
|
|
1041
|
+
can_delete_messages: zod.boolean().optional(),
|
|
1042
|
+
can_remove_members: zod.boolean().optional(),
|
|
1043
|
+
can_send_messages: zod.boolean().optional(),
|
|
1044
|
+
created_at: zod.string().optional(),
|
|
1045
|
+
id: zod.string().optional(),
|
|
1046
|
+
member_id: zod.string().optional(),
|
|
1047
|
+
updated_at: zod.string().optional(),
|
|
1048
|
+
})
|
|
1049
|
+
.optional(),
|
|
1050
|
+
role: zod
|
|
1051
|
+
.enum([
|
|
1052
|
+
'ROLE_UNSPECIFIED',
|
|
1053
|
+
'ROLE_MEMBER',
|
|
1054
|
+
'ROLE_ADMIN',
|
|
1055
|
+
'ROLE_OWNER',
|
|
1056
|
+
'ROLE_SUPERVISOR',
|
|
1057
|
+
])
|
|
1058
|
+
.default(
|
|
1059
|
+
updatesGetUpdatesResponseThreadsItemDialogLastMsgSenderRoleDefault,
|
|
1060
|
+
),
|
|
1061
|
+
})
|
|
1062
|
+
.optional()
|
|
1063
|
+
.describe('Sender user aggregated information.'),
|
|
1064
|
+
seq: zod
|
|
1065
|
+
.string()
|
|
1066
|
+
.optional()
|
|
1067
|
+
.describe(
|
|
1068
|
+
'Per-thread monotonic sequence number, assigned on message creation.',
|
|
1069
|
+
),
|
|
1070
|
+
system: zod
|
|
1071
|
+
.object({
|
|
1072
|
+
message_id: zod
|
|
1073
|
+
.string()
|
|
1074
|
+
.optional()
|
|
1075
|
+
.describe(
|
|
1076
|
+
'ID of message for which system messages is binded.',
|
|
1077
|
+
),
|
|
1078
|
+
metadata: zod
|
|
1079
|
+
.looseObject({})
|
|
1080
|
+
.optional()
|
|
1081
|
+
.describe(
|
|
1082
|
+
'Represents additional metadata binded into system message.',
|
|
1083
|
+
),
|
|
1084
|
+
type: zod
|
|
1085
|
+
.string()
|
|
1086
|
+
.optional()
|
|
1087
|
+
.describe('Represents type of the message.'),
|
|
1088
|
+
})
|
|
1089
|
+
.optional()
|
|
1090
|
+
.describe('System message content.'),
|
|
1091
|
+
thread_id: zod
|
|
1092
|
+
.string()
|
|
1093
|
+
.optional()
|
|
1094
|
+
.describe('Identifier of the thread the message belongs to.'),
|
|
1095
|
+
type: zod.int().optional().describe('Message type identifier.'),
|
|
1096
|
+
})
|
|
1097
|
+
.optional()
|
|
1098
|
+
.describe('Last message of the linked thread.'),
|
|
1099
|
+
members: zod
|
|
1100
|
+
.array(
|
|
1101
|
+
zod
|
|
1102
|
+
.object({
|
|
1103
|
+
contact: zod
|
|
1104
|
+
.object({
|
|
1105
|
+
app_id: zod
|
|
1106
|
+
.string()
|
|
1107
|
+
.optional()
|
|
1108
|
+
.describe(
|
|
1109
|
+
'Identifier of the specific integration app or bot.',
|
|
1110
|
+
),
|
|
1111
|
+
created_at: zod
|
|
1112
|
+
.string()
|
|
1113
|
+
.optional()
|
|
1114
|
+
.describe(
|
|
1115
|
+
'Record creation timestamp (Unix Epoch in milliseconds).',
|
|
1116
|
+
),
|
|
1117
|
+
is_bot: zod
|
|
1118
|
+
.boolean()
|
|
1119
|
+
.optional()
|
|
1120
|
+
.describe(
|
|
1121
|
+
'Represents if usere is real person or automatic script.',
|
|
1122
|
+
),
|
|
1123
|
+
iss: zod
|
|
1124
|
+
.string()
|
|
1125
|
+
.optional()
|
|
1126
|
+
.describe(
|
|
1127
|
+
'Provider-specific unique identifier (Issuer ID).',
|
|
1128
|
+
),
|
|
1129
|
+
metadata: zod
|
|
1130
|
+
.record(zod.string(), zod.string())
|
|
1131
|
+
.optional()
|
|
1132
|
+
.describe(
|
|
1133
|
+
'Additional dynamic attributes provided by the messenger.',
|
|
1134
|
+
),
|
|
1135
|
+
name: zod
|
|
1136
|
+
.string()
|
|
1137
|
+
.optional()
|
|
1138
|
+
.describe('Display name of the contact.'),
|
|
1139
|
+
sub: zod
|
|
1140
|
+
.string()
|
|
1141
|
+
.optional()
|
|
1142
|
+
.describe(
|
|
1143
|
+
'Associated internal system subject/identifier.',
|
|
1144
|
+
),
|
|
1145
|
+
type: zod
|
|
1146
|
+
.string()
|
|
1147
|
+
.optional()
|
|
1148
|
+
.describe(
|
|
1149
|
+
"Channel type (e.g., 'webchat', 'telegram').",
|
|
1150
|
+
),
|
|
1151
|
+
updated_at: zod
|
|
1152
|
+
.string()
|
|
1153
|
+
.optional()
|
|
1154
|
+
.describe(
|
|
1155
|
+
'Last record update timestamp (Unix Epoch in milliseconds).',
|
|
1156
|
+
),
|
|
1157
|
+
username: zod
|
|
1158
|
+
.string()
|
|
1159
|
+
.optional()
|
|
1160
|
+
.describe('Technical username or handle.'),
|
|
1161
|
+
vias: zod
|
|
1162
|
+
.array(
|
|
1163
|
+
zod.object({
|
|
1164
|
+
contact_id: zod.string().optional(),
|
|
1165
|
+
created_at: zod.string().optional(),
|
|
1166
|
+
disable: zod.boolean().optional(),
|
|
1167
|
+
disable_reason: zod.string().optional(),
|
|
1168
|
+
metadata: zod.looseObject({}).optional(),
|
|
1169
|
+
updated_at: zod.string().optional(),
|
|
1170
|
+
via: zod.string().optional(),
|
|
1171
|
+
}),
|
|
1172
|
+
)
|
|
1173
|
+
.optional(),
|
|
1174
|
+
})
|
|
1175
|
+
.optional()
|
|
1176
|
+
.describe(
|
|
1177
|
+
'Contact represents an external messaging identity.',
|
|
1178
|
+
),
|
|
1179
|
+
id: zod.string().optional(),
|
|
1180
|
+
permissions: zod
|
|
1181
|
+
.object({
|
|
1182
|
+
can_add_members: zod.boolean().optional(),
|
|
1183
|
+
can_change_members_permissions: zod
|
|
1184
|
+
.boolean()
|
|
1185
|
+
.optional(),
|
|
1186
|
+
can_change_thread_info: zod.boolean().optional(),
|
|
1187
|
+
can_delete_messages: zod.boolean().optional(),
|
|
1188
|
+
can_remove_members: zod.boolean().optional(),
|
|
1189
|
+
can_send_messages: zod.boolean().optional(),
|
|
1190
|
+
created_at: zod.string().optional(),
|
|
1191
|
+
id: zod.string().optional(),
|
|
1192
|
+
member_id: zod.string().optional(),
|
|
1193
|
+
updated_at: zod.string().optional(),
|
|
1194
|
+
})
|
|
1195
|
+
.optional(),
|
|
1196
|
+
role: zod
|
|
1197
|
+
.enum([
|
|
1198
|
+
'ROLE_UNSPECIFIED',
|
|
1199
|
+
'ROLE_MEMBER',
|
|
1200
|
+
'ROLE_ADMIN',
|
|
1201
|
+
'ROLE_OWNER',
|
|
1202
|
+
'ROLE_SUPERVISOR',
|
|
1203
|
+
])
|
|
1204
|
+
.default(
|
|
1205
|
+
updatesGetUpdatesResponseThreadsItemDialogMembersItemRoleDefault,
|
|
1206
|
+
),
|
|
1207
|
+
})
|
|
1208
|
+
.describe(
|
|
1209
|
+
'ThreadMember represents a thread participant\nwith optional type-specific settings.',
|
|
1210
|
+
),
|
|
1211
|
+
)
|
|
1212
|
+
.optional()
|
|
1213
|
+
.describe('Detailed member information.'),
|
|
1214
|
+
read_states: zod
|
|
1215
|
+
.array(
|
|
1216
|
+
zod
|
|
1217
|
+
.object({
|
|
1218
|
+
delivered_up_to_seq: zod.string().optional(),
|
|
1219
|
+
member: zod
|
|
1220
|
+
.object({
|
|
1221
|
+
contact: zod
|
|
1222
|
+
.object({
|
|
1223
|
+
app_id: zod
|
|
1224
|
+
.string()
|
|
1225
|
+
.optional()
|
|
1226
|
+
.describe(
|
|
1227
|
+
'Identifier of the specific integration app or bot.',
|
|
1228
|
+
),
|
|
1229
|
+
created_at: zod
|
|
1230
|
+
.string()
|
|
1231
|
+
.optional()
|
|
1232
|
+
.describe(
|
|
1233
|
+
'Record creation timestamp (Unix Epoch in milliseconds).',
|
|
1234
|
+
),
|
|
1235
|
+
is_bot: zod
|
|
1236
|
+
.boolean()
|
|
1237
|
+
.optional()
|
|
1238
|
+
.describe(
|
|
1239
|
+
'Represents if usere is real person or automatic script.',
|
|
1240
|
+
),
|
|
1241
|
+
iss: zod
|
|
1242
|
+
.string()
|
|
1243
|
+
.optional()
|
|
1244
|
+
.describe(
|
|
1245
|
+
'Provider-specific unique identifier (Issuer ID).',
|
|
1246
|
+
),
|
|
1247
|
+
metadata: zod
|
|
1248
|
+
.record(zod.string(), zod.string())
|
|
1249
|
+
.optional()
|
|
1250
|
+
.describe(
|
|
1251
|
+
'Additional dynamic attributes provided by the messenger.',
|
|
1252
|
+
),
|
|
1253
|
+
name: zod
|
|
1254
|
+
.string()
|
|
1255
|
+
.optional()
|
|
1256
|
+
.describe('Display name of the contact.'),
|
|
1257
|
+
sub: zod
|
|
1258
|
+
.string()
|
|
1259
|
+
.optional()
|
|
1260
|
+
.describe(
|
|
1261
|
+
'Associated internal system subject/identifier.',
|
|
1262
|
+
),
|
|
1263
|
+
type: zod
|
|
1264
|
+
.string()
|
|
1265
|
+
.optional()
|
|
1266
|
+
.describe(
|
|
1267
|
+
"Channel type (e.g., 'webchat', 'telegram').",
|
|
1268
|
+
),
|
|
1269
|
+
updated_at: zod
|
|
1270
|
+
.string()
|
|
1271
|
+
.optional()
|
|
1272
|
+
.describe(
|
|
1273
|
+
'Last record update timestamp (Unix Epoch in milliseconds).',
|
|
1274
|
+
),
|
|
1275
|
+
username: zod
|
|
1276
|
+
.string()
|
|
1277
|
+
.optional()
|
|
1278
|
+
.describe('Technical username or handle.'),
|
|
1279
|
+
vias: zod
|
|
1280
|
+
.array(
|
|
1281
|
+
zod.object({
|
|
1282
|
+
contact_id: zod.string().optional(),
|
|
1283
|
+
created_at: zod.string().optional(),
|
|
1284
|
+
disable: zod.boolean().optional(),
|
|
1285
|
+
disable_reason: zod.string().optional(),
|
|
1286
|
+
metadata: zod.looseObject({}).optional(),
|
|
1287
|
+
updated_at: zod.string().optional(),
|
|
1288
|
+
via: zod.string().optional(),
|
|
1289
|
+
}),
|
|
1290
|
+
)
|
|
1291
|
+
.optional(),
|
|
1292
|
+
})
|
|
1293
|
+
.optional()
|
|
1294
|
+
.describe(
|
|
1295
|
+
'Contact represents an external messaging identity.',
|
|
1296
|
+
),
|
|
1297
|
+
id: zod.string().optional(),
|
|
1298
|
+
permissions: zod
|
|
1299
|
+
.object({
|
|
1300
|
+
can_add_members: zod.boolean().optional(),
|
|
1301
|
+
can_change_members_permissions: zod
|
|
1302
|
+
.boolean()
|
|
1303
|
+
.optional(),
|
|
1304
|
+
can_change_thread_info: zod.boolean().optional(),
|
|
1305
|
+
can_delete_messages: zod.boolean().optional(),
|
|
1306
|
+
can_remove_members: zod.boolean().optional(),
|
|
1307
|
+
can_send_messages: zod.boolean().optional(),
|
|
1308
|
+
created_at: zod.string().optional(),
|
|
1309
|
+
id: zod.string().optional(),
|
|
1310
|
+
member_id: zod.string().optional(),
|
|
1311
|
+
updated_at: zod.string().optional(),
|
|
1312
|
+
})
|
|
1313
|
+
.optional(),
|
|
1314
|
+
role: zod
|
|
1315
|
+
.enum([
|
|
1316
|
+
'ROLE_UNSPECIFIED',
|
|
1317
|
+
'ROLE_MEMBER',
|
|
1318
|
+
'ROLE_ADMIN',
|
|
1319
|
+
'ROLE_OWNER',
|
|
1320
|
+
'ROLE_SUPERVISOR',
|
|
1321
|
+
])
|
|
1322
|
+
.default(
|
|
1323
|
+
updatesGetUpdatesResponseThreadsItemDialogReadStatesItemMemberRoleDefault,
|
|
1324
|
+
),
|
|
1325
|
+
})
|
|
1326
|
+
.optional()
|
|
1327
|
+
.describe(
|
|
1328
|
+
"The member, in the same shape as history's sender; set by GetUpdates.",
|
|
1329
|
+
),
|
|
1330
|
+
member_id: zod.string().optional(),
|
|
1331
|
+
read_up_to_seq: zod.string().optional(),
|
|
1332
|
+
})
|
|
1333
|
+
.describe(
|
|
1334
|
+
"MemberReadState is one member's delivery/read horizon in a thread, as\nper-thread message seq (0 = nothing reached that state yet).",
|
|
1335
|
+
),
|
|
1336
|
+
)
|
|
1337
|
+
.optional()
|
|
1338
|
+
.describe(
|
|
1339
|
+
'Per-member read horizons (snapshot, matches GetUpdates model).\nClient derives inbox/outbox watermarks: own_last_read = inbox; MIN over others = outbox.',
|
|
1340
|
+
),
|
|
1341
|
+
settings: zod
|
|
1342
|
+
.object({
|
|
1343
|
+
created_at: zod
|
|
1344
|
+
.string()
|
|
1345
|
+
.optional()
|
|
1346
|
+
.describe('Creation timestamp (Unix time, milliseconds).'),
|
|
1347
|
+
domain_id: zod.int().optional().describe('Domain identifier.'),
|
|
1348
|
+
id: zod.string().optional().describe('Settings identifier.'),
|
|
1349
|
+
title: zod
|
|
1350
|
+
.string()
|
|
1351
|
+
.optional()
|
|
1352
|
+
.describe(
|
|
1353
|
+
'Custom title for the direct thread.\nUsually represents the display name of the conversation.',
|
|
1354
|
+
),
|
|
1355
|
+
updated_at: zod
|
|
1356
|
+
.string()
|
|
1357
|
+
.optional()
|
|
1358
|
+
.describe('Last update timestamp (Unix time, milliseconds).'),
|
|
1359
|
+
})
|
|
1360
|
+
.optional()
|
|
1361
|
+
.describe('User-specific settings for this thread.'),
|
|
1362
|
+
subject: zod
|
|
1363
|
+
.string()
|
|
1364
|
+
.optional()
|
|
1365
|
+
.describe('Thread subject or title.'),
|
|
1366
|
+
type: zod
|
|
1367
|
+
.enum([
|
|
1368
|
+
'UNKNOWN',
|
|
1369
|
+
'DIRECT',
|
|
1370
|
+
'GROUP',
|
|
1371
|
+
'CHANNEL',
|
|
1372
|
+
])
|
|
1373
|
+
.default(updatesGetUpdatesResponseThreadsItemDialogTypeDefault)
|
|
1374
|
+
.describe('Type of the thread.'),
|
|
1375
|
+
unread_count: zod
|
|
1376
|
+
.int()
|
|
1377
|
+
.optional()
|
|
1378
|
+
.describe(
|
|
1379
|
+
"Number of unread messages in this thread for the calling participant.\nCounts content messages not yet read; the caller's own messages and\nsystem messages are excluded.",
|
|
1380
|
+
),
|
|
1381
|
+
updated_at: zod
|
|
1382
|
+
.string()
|
|
1383
|
+
.optional()
|
|
1384
|
+
.describe('Last update timestamp (Unix time, milliseconds).'),
|
|
1385
|
+
updates_cursor: zod
|
|
1386
|
+
.string()
|
|
1387
|
+
.optional()
|
|
1388
|
+
.describe(
|
|
1389
|
+
'GetUpdates cursor read before this thread (set by Get; Search carries it on the response).',
|
|
1390
|
+
),
|
|
1391
|
+
variables: zod
|
|
1392
|
+
.object({
|
|
1393
|
+
thread_id: zod
|
|
1394
|
+
.string()
|
|
1395
|
+
.optional()
|
|
1396
|
+
.describe('Unique identifier for the thread.'),
|
|
1397
|
+
variables: zod
|
|
1398
|
+
.record(
|
|
1399
|
+
zod.string(),
|
|
1400
|
+
zod
|
|
1401
|
+
.object({
|
|
1402
|
+
set_at: zod
|
|
1403
|
+
.string()
|
|
1404
|
+
.optional()
|
|
1405
|
+
.describe(
|
|
1406
|
+
'Timestamp when the variable was set (Unix time, milliseconds).',
|
|
1407
|
+
),
|
|
1408
|
+
set_by: zod
|
|
1409
|
+
.object({
|
|
1410
|
+
app_id: zod
|
|
1411
|
+
.string()
|
|
1412
|
+
.optional()
|
|
1413
|
+
.describe(
|
|
1414
|
+
'Identifier of the specific integration app or bot.',
|
|
1415
|
+
),
|
|
1416
|
+
created_at: zod
|
|
1417
|
+
.string()
|
|
1418
|
+
.optional()
|
|
1419
|
+
.describe(
|
|
1420
|
+
'Record creation timestamp (Unix Epoch in milliseconds).',
|
|
1421
|
+
),
|
|
1422
|
+
is_bot: zod
|
|
1423
|
+
.boolean()
|
|
1424
|
+
.optional()
|
|
1425
|
+
.describe(
|
|
1426
|
+
'Represents if usere is real person or automatic script.',
|
|
1427
|
+
),
|
|
1428
|
+
iss: zod
|
|
1429
|
+
.string()
|
|
1430
|
+
.optional()
|
|
1431
|
+
.describe(
|
|
1432
|
+
'Provider-specific unique identifier (Issuer ID).',
|
|
1433
|
+
),
|
|
1434
|
+
metadata: zod
|
|
1435
|
+
.record(zod.string(), zod.string())
|
|
1436
|
+
.optional()
|
|
1437
|
+
.describe(
|
|
1438
|
+
'Additional dynamic attributes provided by the messenger.',
|
|
1439
|
+
),
|
|
1440
|
+
name: zod
|
|
1441
|
+
.string()
|
|
1442
|
+
.optional()
|
|
1443
|
+
.describe('Display name of the contact.'),
|
|
1444
|
+
sub: zod
|
|
1445
|
+
.string()
|
|
1446
|
+
.optional()
|
|
1447
|
+
.describe(
|
|
1448
|
+
'Associated internal system subject/identifier.',
|
|
1449
|
+
),
|
|
1450
|
+
type: zod
|
|
1451
|
+
.string()
|
|
1452
|
+
.optional()
|
|
1453
|
+
.describe(
|
|
1454
|
+
"Channel type (e.g., 'webchat', 'telegram').",
|
|
1455
|
+
),
|
|
1456
|
+
updated_at: zod
|
|
1457
|
+
.string()
|
|
1458
|
+
.optional()
|
|
1459
|
+
.describe(
|
|
1460
|
+
'Last record update timestamp (Unix Epoch in milliseconds).',
|
|
1461
|
+
),
|
|
1462
|
+
username: zod
|
|
1463
|
+
.string()
|
|
1464
|
+
.optional()
|
|
1465
|
+
.describe('Technical username or handle.'),
|
|
1466
|
+
vias: zod
|
|
1467
|
+
.array(
|
|
1468
|
+
zod.object({
|
|
1469
|
+
contact_id: zod.string().optional(),
|
|
1470
|
+
created_at: zod.string().optional(),
|
|
1471
|
+
disable: zod.boolean().optional(),
|
|
1472
|
+
disable_reason: zod.string().optional(),
|
|
1473
|
+
metadata: zod.looseObject({}).optional(),
|
|
1474
|
+
updated_at: zod.string().optional(),
|
|
1475
|
+
via: zod.string().optional(),
|
|
1476
|
+
}),
|
|
1477
|
+
)
|
|
1478
|
+
.optional(),
|
|
1479
|
+
})
|
|
1480
|
+
.optional()
|
|
1481
|
+
.describe('Contact who set the variable.'),
|
|
1482
|
+
value: zod
|
|
1483
|
+
.unknown()
|
|
1484
|
+
.optional()
|
|
1485
|
+
.describe(
|
|
1486
|
+
'Arbitrary structured value of the variable.\nSupports dynamic JSON-like content.',
|
|
1487
|
+
),
|
|
1488
|
+
})
|
|
1489
|
+
.describe(
|
|
1490
|
+
'VariableEntry represents a single variable value\nalong with metadata about who and when it was set.',
|
|
1491
|
+
),
|
|
1492
|
+
)
|
|
1493
|
+
.optional()
|
|
1494
|
+
.describe(
|
|
1495
|
+
'Key-value map of variables.\nKey is the variable name, value contains data and metadata.',
|
|
1496
|
+
),
|
|
1497
|
+
})
|
|
1498
|
+
.optional()
|
|
1499
|
+
.describe('Optional variables associated with the thread.'),
|
|
1500
|
+
})
|
|
1501
|
+
.optional()
|
|
1502
|
+
.describe(
|
|
1503
|
+
'The thread itself, set when it is new to the caller (created or joined since cursor).',
|
|
1504
|
+
),
|
|
1505
|
+
left: zod
|
|
1506
|
+
.boolean()
|
|
1507
|
+
.optional()
|
|
1508
|
+
.describe('The caller is no longer a member: drop the thread.'),
|
|
1509
|
+
member_changes: zod
|
|
1510
|
+
.array(
|
|
1511
|
+
zod.object({
|
|
1512
|
+
action: zod
|
|
1513
|
+
.enum([
|
|
1514
|
+
'THREAD_MEMBER_CHANGE_ACTION_UNSPECIFIED',
|
|
1515
|
+
'THREAD_MEMBER_CHANGE_ACTION_JOINED',
|
|
1516
|
+
'THREAD_MEMBER_CHANGE_ACTION_LEFT',
|
|
1517
|
+
])
|
|
1518
|
+
.default(
|
|
1519
|
+
updatesGetUpdatesResponseThreadsItemMemberChangesItemActionDefault,
|
|
1520
|
+
),
|
|
1521
|
+
by: zod
|
|
1522
|
+
.object({
|
|
1523
|
+
contact: zod
|
|
1524
|
+
.object({
|
|
1525
|
+
app_id: zod
|
|
1526
|
+
.string()
|
|
1527
|
+
.optional()
|
|
1528
|
+
.describe(
|
|
1529
|
+
'Identifier of the specific integration app or bot.',
|
|
1530
|
+
),
|
|
1531
|
+
created_at: zod
|
|
1532
|
+
.string()
|
|
1533
|
+
.optional()
|
|
1534
|
+
.describe(
|
|
1535
|
+
'Record creation timestamp (Unix Epoch in milliseconds).',
|
|
1536
|
+
),
|
|
1537
|
+
is_bot: zod
|
|
1538
|
+
.boolean()
|
|
1539
|
+
.optional()
|
|
1540
|
+
.describe(
|
|
1541
|
+
'Represents if usere is real person or automatic script.',
|
|
1542
|
+
),
|
|
1543
|
+
iss: zod
|
|
1544
|
+
.string()
|
|
1545
|
+
.optional()
|
|
1546
|
+
.describe(
|
|
1547
|
+
'Provider-specific unique identifier (Issuer ID).',
|
|
1548
|
+
),
|
|
1549
|
+
metadata: zod
|
|
1550
|
+
.record(zod.string(), zod.string())
|
|
1551
|
+
.optional()
|
|
1552
|
+
.describe(
|
|
1553
|
+
'Additional dynamic attributes provided by the messenger.',
|
|
1554
|
+
),
|
|
1555
|
+
name: zod
|
|
1556
|
+
.string()
|
|
1557
|
+
.optional()
|
|
1558
|
+
.describe('Display name of the contact.'),
|
|
1559
|
+
sub: zod
|
|
1560
|
+
.string()
|
|
1561
|
+
.optional()
|
|
1562
|
+
.describe(
|
|
1563
|
+
'Associated internal system subject/identifier.',
|
|
1564
|
+
),
|
|
1565
|
+
type: zod
|
|
1566
|
+
.string()
|
|
1567
|
+
.optional()
|
|
1568
|
+
.describe(
|
|
1569
|
+
"Channel type (e.g., 'webchat', 'telegram').",
|
|
1570
|
+
),
|
|
1571
|
+
updated_at: zod
|
|
1572
|
+
.string()
|
|
1573
|
+
.optional()
|
|
1574
|
+
.describe(
|
|
1575
|
+
'Last record update timestamp (Unix Epoch in milliseconds).',
|
|
1576
|
+
),
|
|
1577
|
+
username: zod
|
|
1578
|
+
.string()
|
|
1579
|
+
.optional()
|
|
1580
|
+
.describe('Technical username or handle.'),
|
|
1581
|
+
vias: zod
|
|
1582
|
+
.array(
|
|
1583
|
+
zod.object({
|
|
1584
|
+
contact_id: zod.string().optional(),
|
|
1585
|
+
created_at: zod.string().optional(),
|
|
1586
|
+
disable: zod.boolean().optional(),
|
|
1587
|
+
disable_reason: zod.string().optional(),
|
|
1588
|
+
metadata: zod.looseObject({}).optional(),
|
|
1589
|
+
updated_at: zod.string().optional(),
|
|
1590
|
+
via: zod.string().optional(),
|
|
1591
|
+
}),
|
|
1592
|
+
)
|
|
1593
|
+
.optional(),
|
|
1594
|
+
})
|
|
1595
|
+
.optional()
|
|
1596
|
+
.describe(
|
|
1597
|
+
'Contact represents an external messaging identity.',
|
|
1598
|
+
),
|
|
1599
|
+
id: zod.string().optional(),
|
|
1600
|
+
permissions: zod
|
|
1601
|
+
.object({
|
|
1602
|
+
can_add_members: zod.boolean().optional(),
|
|
1603
|
+
can_change_members_permissions: zod.boolean().optional(),
|
|
1604
|
+
can_change_thread_info: zod.boolean().optional(),
|
|
1605
|
+
can_delete_messages: zod.boolean().optional(),
|
|
1606
|
+
can_remove_members: zod.boolean().optional(),
|
|
1607
|
+
can_send_messages: zod.boolean().optional(),
|
|
1608
|
+
created_at: zod.string().optional(),
|
|
1609
|
+
id: zod.string().optional(),
|
|
1610
|
+
member_id: zod.string().optional(),
|
|
1611
|
+
updated_at: zod.string().optional(),
|
|
1612
|
+
})
|
|
1613
|
+
.optional(),
|
|
1614
|
+
role: zod
|
|
1615
|
+
.enum([
|
|
1616
|
+
'ROLE_UNSPECIFIED',
|
|
1617
|
+
'ROLE_MEMBER',
|
|
1618
|
+
'ROLE_ADMIN',
|
|
1619
|
+
'ROLE_OWNER',
|
|
1620
|
+
'ROLE_SUPERVISOR',
|
|
1621
|
+
])
|
|
1622
|
+
.default(
|
|
1623
|
+
updatesGetUpdatesResponseThreadsItemMemberChangesItemByRoleDefault,
|
|
1624
|
+
),
|
|
1625
|
+
})
|
|
1626
|
+
.optional()
|
|
1627
|
+
.describe('Who made the change.'),
|
|
1628
|
+
member: zod
|
|
1629
|
+
.object({
|
|
1630
|
+
contact: zod
|
|
1631
|
+
.object({
|
|
1632
|
+
app_id: zod
|
|
1633
|
+
.string()
|
|
1634
|
+
.optional()
|
|
1635
|
+
.describe(
|
|
1636
|
+
'Identifier of the specific integration app or bot.',
|
|
1637
|
+
),
|
|
1638
|
+
created_at: zod
|
|
1639
|
+
.string()
|
|
1640
|
+
.optional()
|
|
1641
|
+
.describe(
|
|
1642
|
+
'Record creation timestamp (Unix Epoch in milliseconds).',
|
|
1643
|
+
),
|
|
1644
|
+
is_bot: zod
|
|
1645
|
+
.boolean()
|
|
1646
|
+
.optional()
|
|
1647
|
+
.describe(
|
|
1648
|
+
'Represents if usere is real person or automatic script.',
|
|
1649
|
+
),
|
|
1650
|
+
iss: zod
|
|
1651
|
+
.string()
|
|
1652
|
+
.optional()
|
|
1653
|
+
.describe(
|
|
1654
|
+
'Provider-specific unique identifier (Issuer ID).',
|
|
1655
|
+
),
|
|
1656
|
+
metadata: zod
|
|
1657
|
+
.record(zod.string(), zod.string())
|
|
1658
|
+
.optional()
|
|
1659
|
+
.describe(
|
|
1660
|
+
'Additional dynamic attributes provided by the messenger.',
|
|
1661
|
+
),
|
|
1662
|
+
name: zod
|
|
1663
|
+
.string()
|
|
1664
|
+
.optional()
|
|
1665
|
+
.describe('Display name of the contact.'),
|
|
1666
|
+
sub: zod
|
|
1667
|
+
.string()
|
|
1668
|
+
.optional()
|
|
1669
|
+
.describe(
|
|
1670
|
+
'Associated internal system subject/identifier.',
|
|
1671
|
+
),
|
|
1672
|
+
type: zod
|
|
1673
|
+
.string()
|
|
1674
|
+
.optional()
|
|
1675
|
+
.describe(
|
|
1676
|
+
"Channel type (e.g., 'webchat', 'telegram').",
|
|
1677
|
+
),
|
|
1678
|
+
updated_at: zod
|
|
1679
|
+
.string()
|
|
1680
|
+
.optional()
|
|
1681
|
+
.describe(
|
|
1682
|
+
'Last record update timestamp (Unix Epoch in milliseconds).',
|
|
1683
|
+
),
|
|
1684
|
+
username: zod
|
|
1685
|
+
.string()
|
|
1686
|
+
.optional()
|
|
1687
|
+
.describe('Technical username or handle.'),
|
|
1688
|
+
vias: zod
|
|
1689
|
+
.array(
|
|
1690
|
+
zod.object({
|
|
1691
|
+
contact_id: zod.string().optional(),
|
|
1692
|
+
created_at: zod.string().optional(),
|
|
1693
|
+
disable: zod.boolean().optional(),
|
|
1694
|
+
disable_reason: zod.string().optional(),
|
|
1695
|
+
metadata: zod.looseObject({}).optional(),
|
|
1696
|
+
updated_at: zod.string().optional(),
|
|
1697
|
+
via: zod.string().optional(),
|
|
1698
|
+
}),
|
|
1699
|
+
)
|
|
1700
|
+
.optional(),
|
|
1701
|
+
})
|
|
1702
|
+
.optional()
|
|
1703
|
+
.describe(
|
|
1704
|
+
'Contact represents an external messaging identity.',
|
|
1705
|
+
),
|
|
1706
|
+
id: zod.string().optional(),
|
|
1707
|
+
permissions: zod
|
|
1708
|
+
.object({
|
|
1709
|
+
can_add_members: zod.boolean().optional(),
|
|
1710
|
+
can_change_members_permissions: zod.boolean().optional(),
|
|
1711
|
+
can_change_thread_info: zod.boolean().optional(),
|
|
1712
|
+
can_delete_messages: zod.boolean().optional(),
|
|
1713
|
+
can_remove_members: zod.boolean().optional(),
|
|
1714
|
+
can_send_messages: zod.boolean().optional(),
|
|
1715
|
+
created_at: zod.string().optional(),
|
|
1716
|
+
id: zod.string().optional(),
|
|
1717
|
+
member_id: zod.string().optional(),
|
|
1718
|
+
updated_at: zod.string().optional(),
|
|
1719
|
+
})
|
|
1720
|
+
.optional(),
|
|
1721
|
+
role: zod
|
|
1722
|
+
.enum([
|
|
1723
|
+
'ROLE_UNSPECIFIED',
|
|
1724
|
+
'ROLE_MEMBER',
|
|
1725
|
+
'ROLE_ADMIN',
|
|
1726
|
+
'ROLE_OWNER',
|
|
1727
|
+
'ROLE_SUPERVISOR',
|
|
1728
|
+
])
|
|
1729
|
+
.default(
|
|
1730
|
+
updatesGetUpdatesResponseThreadsItemMemberChangesItemMemberRoleDefault,
|
|
1731
|
+
),
|
|
1732
|
+
})
|
|
1733
|
+
.optional()
|
|
1734
|
+
.describe(
|
|
1735
|
+
'ThreadMember represents a thread participant\nwith optional type-specific settings.',
|
|
1736
|
+
),
|
|
1737
|
+
}),
|
|
1738
|
+
)
|
|
1739
|
+
.optional(),
|
|
1740
|
+
messages: zod
|
|
1741
|
+
.array(
|
|
1742
|
+
zod
|
|
1743
|
+
.object({
|
|
1744
|
+
body: zod.string().optional(),
|
|
1745
|
+
contact: zod
|
|
1746
|
+
.object({
|
|
1747
|
+
email: zod.string().optional(),
|
|
1748
|
+
name: zod.string().optional(),
|
|
1749
|
+
phone: zod.string().optional(),
|
|
1750
|
+
})
|
|
1751
|
+
.optional(),
|
|
1752
|
+
created_at: zod.string().optional(),
|
|
1753
|
+
documents: zod
|
|
1754
|
+
.array(
|
|
1755
|
+
zod
|
|
1756
|
+
.object({
|
|
1757
|
+
created_at: zod
|
|
1758
|
+
.string()
|
|
1759
|
+
.optional()
|
|
1760
|
+
.describe(
|
|
1761
|
+
'Creation timestamp (Unix time, milliseconds).',
|
|
1762
|
+
),
|
|
1763
|
+
file_id: zod
|
|
1764
|
+
.string()
|
|
1765
|
+
.optional()
|
|
1766
|
+
.describe('File storage identifier.'),
|
|
1767
|
+
id: zod
|
|
1768
|
+
.string()
|
|
1769
|
+
.optional()
|
|
1770
|
+
.describe('Document identifier.'),
|
|
1771
|
+
message_id: zod
|
|
1772
|
+
.string()
|
|
1773
|
+
.optional()
|
|
1774
|
+
.describe(
|
|
1775
|
+
'Identifier of the message this document belongs to.',
|
|
1776
|
+
),
|
|
1777
|
+
mime: zod
|
|
1778
|
+
.string()
|
|
1779
|
+
.optional()
|
|
1780
|
+
.describe('MIME type of the document.'),
|
|
1781
|
+
name: zod
|
|
1782
|
+
.string()
|
|
1783
|
+
.optional()
|
|
1784
|
+
.describe('Original file name.'),
|
|
1785
|
+
size: zod
|
|
1786
|
+
.string()
|
|
1787
|
+
.optional()
|
|
1788
|
+
.describe('File size in bytes.'),
|
|
1789
|
+
url: zod
|
|
1790
|
+
.string()
|
|
1791
|
+
.optional()
|
|
1792
|
+
.describe(
|
|
1793
|
+
'Public signed URL for downloading the document.',
|
|
1794
|
+
),
|
|
1795
|
+
})
|
|
1796
|
+
.describe(
|
|
1797
|
+
'Document represents a file attachment\nassociated with a message.',
|
|
1798
|
+
),
|
|
1799
|
+
)
|
|
1800
|
+
.optional(),
|
|
1801
|
+
edited_at: zod
|
|
1802
|
+
.string()
|
|
1803
|
+
.optional()
|
|
1804
|
+
.describe('Set when the message was edited.'),
|
|
1805
|
+
forward_origin: zod
|
|
1806
|
+
.object({
|
|
1807
|
+
kind: zod
|
|
1808
|
+
.enum([
|
|
1809
|
+
'FORWARD_ORIGIN_KIND_UNSPECIFIED',
|
|
1810
|
+
'FORWARD_ORIGIN_KIND_INTERNAL',
|
|
1811
|
+
'FORWARD_ORIGIN_KIND_EXTERNAL_USER',
|
|
1812
|
+
'FORWARD_ORIGIN_KIND_EXTERNAL_HIDDEN_USER',
|
|
1813
|
+
'FORWARD_ORIGIN_KIND_EXTERNAL_CHAT',
|
|
1814
|
+
])
|
|
1815
|
+
.default(
|
|
1816
|
+
updatesGetUpdatesResponseThreadsItemMessagesItemForwardOriginKindDefault,
|
|
1817
|
+
)
|
|
1818
|
+
.describe(
|
|
1819
|
+
'ForwardOriginKind tells the client how to label a forwarded message and\nwhether the origin points at anything addressable inside Webitel.\n\n - FORWARD_ORIGIN_KIND_INTERNAL: Forwarded inside Webitel: sender_id and source_message_id are set.\n - FORWARD_ORIGIN_KIND_EXTERNAL_USER: Forwarded into the chat from an external messenger, author named.\n - FORWARD_ORIGIN_KIND_EXTERNAL_HIDDEN_USER: Same, but the author chose to hide their account, so there is no name.\n - FORWARD_ORIGIN_KIND_EXTERNAL_CHAT: Origin is an external group or channel rather than a person.',
|
|
1820
|
+
),
|
|
1821
|
+
original_sent_at: zod
|
|
1822
|
+
.string()
|
|
1823
|
+
.optional()
|
|
1824
|
+
.describe(
|
|
1825
|
+
'When the original message was sent, Unix time in milliseconds.',
|
|
1826
|
+
),
|
|
1827
|
+
sender_id: zod
|
|
1828
|
+
.string()
|
|
1829
|
+
.optional()
|
|
1830
|
+
.describe(
|
|
1831
|
+
'Contact id of the original author. Empty unless kind is INTERNAL.',
|
|
1832
|
+
),
|
|
1833
|
+
sender_name: zod
|
|
1834
|
+
.string()
|
|
1835
|
+
.optional()
|
|
1836
|
+
.describe(
|
|
1837
|
+
'Display name of the original author — the "from whom" label.',
|
|
1838
|
+
),
|
|
1839
|
+
source_message_id: zod
|
|
1840
|
+
.string()
|
|
1841
|
+
.optional()
|
|
1842
|
+
.describe(
|
|
1843
|
+
'Source message this copy was made from. Empty unless kind is INTERNAL,\nand cleared if the source is later purged.',
|
|
1844
|
+
),
|
|
1845
|
+
})
|
|
1846
|
+
.optional()
|
|
1847
|
+
.describe(
|
|
1848
|
+
'ForwardOrigin is a snapshot of the original author taken at forward time.\nUnlike ReplyToMessage it carries no enriched ThreadMember: the original author\nis generally not a member of the chat the copy landed in, so sender_name is\nthe only label a client can rely on.',
|
|
1849
|
+
),
|
|
1850
|
+
id: zod.string().optional(),
|
|
1851
|
+
images: zod
|
|
1852
|
+
.array(
|
|
1853
|
+
zod
|
|
1854
|
+
.object({
|
|
1855
|
+
created_at: zod
|
|
1856
|
+
.string()
|
|
1857
|
+
.optional()
|
|
1858
|
+
.describe(
|
|
1859
|
+
'Creation timestamp (Unix time, milliseconds).',
|
|
1860
|
+
),
|
|
1861
|
+
file_id: zod
|
|
1862
|
+
.string()
|
|
1863
|
+
.optional()
|
|
1864
|
+
.describe('File storage identifier.'),
|
|
1865
|
+
height: zod
|
|
1866
|
+
.int()
|
|
1867
|
+
.optional()
|
|
1868
|
+
.describe('Image height in pixels.'),
|
|
1869
|
+
id: zod
|
|
1870
|
+
.string()
|
|
1871
|
+
.optional()
|
|
1872
|
+
.describe('Image identifier.'),
|
|
1873
|
+
message_id: zod
|
|
1874
|
+
.string()
|
|
1875
|
+
.optional()
|
|
1876
|
+
.describe(
|
|
1877
|
+
'Identifier of the message this message belongs to.',
|
|
1878
|
+
),
|
|
1879
|
+
mime: zod
|
|
1880
|
+
.string()
|
|
1881
|
+
.optional()
|
|
1882
|
+
.describe('MIME type of the image.'),
|
|
1883
|
+
url: zod
|
|
1884
|
+
.string()
|
|
1885
|
+
.optional()
|
|
1886
|
+
.describe(
|
|
1887
|
+
'Public signed URL for accessing the image.',
|
|
1888
|
+
),
|
|
1889
|
+
width: zod
|
|
1890
|
+
.int()
|
|
1891
|
+
.optional()
|
|
1892
|
+
.describe('Image width in pixels.'),
|
|
1893
|
+
})
|
|
1894
|
+
.describe(
|
|
1895
|
+
'Image represents an image attachment\nassociated with a message.',
|
|
1896
|
+
),
|
|
1897
|
+
)
|
|
1898
|
+
.optional(),
|
|
1899
|
+
interactive: zod
|
|
1900
|
+
.object({
|
|
1901
|
+
documents: zod
|
|
1902
|
+
.object({
|
|
1903
|
+
documents: zod
|
|
1904
|
+
.array(
|
|
1905
|
+
zod
|
|
1906
|
+
.object({
|
|
1907
|
+
file_name: zod.string().optional(),
|
|
1908
|
+
id: zod.string().optional(),
|
|
1909
|
+
mime_type: zod.string().optional(),
|
|
1910
|
+
size_bytes: zod.string().optional(),
|
|
1911
|
+
url: zod.string().optional(),
|
|
1912
|
+
})
|
|
1913
|
+
.describe(
|
|
1914
|
+
'Represents `Document` message with necessary fields\nto process it into frequently used `document`\nentity in messaging systems.',
|
|
1915
|
+
),
|
|
1916
|
+
)
|
|
1917
|
+
.optional()
|
|
1918
|
+
.describe(
|
|
1919
|
+
'Documents to be attached to the header of interactive message.\nMax allowed documents: 10.',
|
|
1920
|
+
),
|
|
1921
|
+
})
|
|
1922
|
+
.optional()
|
|
1923
|
+
.describe('Document attachments header.'),
|
|
1924
|
+
images: zod
|
|
1925
|
+
.object({
|
|
1926
|
+
images: zod
|
|
1927
|
+
.array(
|
|
1928
|
+
zod
|
|
1929
|
+
.object({
|
|
1930
|
+
id: zod.string().optional(),
|
|
1931
|
+
link: zod.string().optional(),
|
|
1932
|
+
mime_type: zod.string().optional(),
|
|
1933
|
+
name: zod.string().optional(),
|
|
1934
|
+
})
|
|
1935
|
+
.describe(
|
|
1936
|
+
'Represents `Image` entity with\nnecessary fields.',
|
|
1937
|
+
),
|
|
1938
|
+
)
|
|
1939
|
+
.optional()
|
|
1940
|
+
.describe(
|
|
1941
|
+
'Images to be attached to the header of interactive message.\nMax allowed images: 10.',
|
|
1942
|
+
),
|
|
1943
|
+
})
|
|
1944
|
+
.optional()
|
|
1945
|
+
.describe('Images attachment header.'),
|
|
1946
|
+
input_field_state: zod
|
|
1947
|
+
.enum([
|
|
1948
|
+
'INPUT_FIELD_STATE_UNSPECIFIED',
|
|
1949
|
+
'INPUT_FIELD_STATE_REGULAR',
|
|
1950
|
+
'INPUT_FIELD_STATE_MINIMIZED',
|
|
1951
|
+
'INPUT_FIELD_STATE_HIDDEN',
|
|
1952
|
+
])
|
|
1953
|
+
.default(
|
|
1954
|
+
updatesGetUpdatesResponseThreadsItemMessagesItemInteractiveInputFieldStateDefault,
|
|
1955
|
+
)
|
|
1956
|
+
.describe(
|
|
1957
|
+
'Whether the recipient may still type while this menu is displayed.',
|
|
1958
|
+
),
|
|
1959
|
+
list_reply: zod
|
|
1960
|
+
.object({
|
|
1961
|
+
main_button_title: zod
|
|
1962
|
+
.string()
|
|
1963
|
+
.optional()
|
|
1964
|
+
.describe(
|
|
1965
|
+
'Title of the main button, that on-click show up list.',
|
|
1966
|
+
),
|
|
1967
|
+
sections: zod
|
|
1968
|
+
.array(
|
|
1969
|
+
zod
|
|
1970
|
+
.object({
|
|
1971
|
+
buttons: zod
|
|
1972
|
+
.array(
|
|
1973
|
+
zod
|
|
1974
|
+
.object({
|
|
1975
|
+
callback: zod
|
|
1976
|
+
.object({
|
|
1977
|
+
data: zod
|
|
1978
|
+
.string()
|
|
1979
|
+
.optional()
|
|
1980
|
+
.describe(
|
|
1981
|
+
'Opaque data payload passed back to the server upon interaction.',
|
|
1982
|
+
),
|
|
1983
|
+
})
|
|
1984
|
+
.optional()
|
|
1985
|
+
.describe(
|
|
1986
|
+
'Triggers a backend event (callback) with associated metadata.',
|
|
1987
|
+
),
|
|
1988
|
+
id: zod
|
|
1989
|
+
.string()
|
|
1990
|
+
.optional()
|
|
1991
|
+
.describe(
|
|
1992
|
+
'Unique idempotent identifier for the button.\nUsed by the frontend to track state and prevent duplicate interactions.',
|
|
1993
|
+
),
|
|
1994
|
+
label: zod
|
|
1995
|
+
.string()
|
|
1996
|
+
.optional()
|
|
1997
|
+
.describe(
|
|
1998
|
+
'The human-readable label displayed on the button.',
|
|
1999
|
+
),
|
|
2000
|
+
metadata: zod
|
|
2001
|
+
.looseObject({})
|
|
2002
|
+
.optional()
|
|
2003
|
+
.describe(
|
|
2004
|
+
'Extensible metadata for UI/UX styling (e.g., "color", "theme", "size").\nUsage: Allows for future-proofing without breaking schema changes.',
|
|
2005
|
+
),
|
|
2006
|
+
request: zod
|
|
2007
|
+
.object({
|
|
2008
|
+
action: zod
|
|
2009
|
+
.string()
|
|
2010
|
+
.optional()
|
|
2011
|
+
.describe(
|
|
2012
|
+
'The specific action to be performed by the client application.',
|
|
2013
|
+
),
|
|
2014
|
+
})
|
|
2015
|
+
.optional()
|
|
2016
|
+
.describe(
|
|
2017
|
+
'Requests sensitive information from the client (e.g., location or contact).',
|
|
2018
|
+
),
|
|
2019
|
+
url: zod
|
|
2020
|
+
.object({
|
|
2021
|
+
url: zod
|
|
2022
|
+
.string()
|
|
2023
|
+
.optional()
|
|
2024
|
+
.describe(
|
|
2025
|
+
'Must be a valid absolute URI (e.g., https://example.com).',
|
|
2026
|
+
),
|
|
2027
|
+
})
|
|
2028
|
+
.optional()
|
|
2029
|
+
.describe(
|
|
2030
|
+
'Directs the user to an external web resource.',
|
|
2031
|
+
),
|
|
2032
|
+
})
|
|
2033
|
+
.describe(
|
|
2034
|
+
'Defines a single interactive element within the keyboard.\nEach button must have a unique identifier and a specific action type.',
|
|
2035
|
+
),
|
|
2036
|
+
)
|
|
2037
|
+
.optional()
|
|
2038
|
+
.describe(
|
|
2039
|
+
'Collection of buttons within this section.\nMinimum of 1 button is required to prevent empty sections.',
|
|
2040
|
+
),
|
|
2041
|
+
section: zod
|
|
2042
|
+
.string()
|
|
2043
|
+
.optional()
|
|
2044
|
+
.describe(
|
|
2045
|
+
'The header text for this section. Must be concise and descriptive.',
|
|
2046
|
+
),
|
|
2047
|
+
})
|
|
2048
|
+
.describe(
|
|
2049
|
+
'Represents a row of buttons grouped under a specific logical section header.\nUseful for creating categorized menus or structured interactive interfaces.',
|
|
2050
|
+
),
|
|
2051
|
+
)
|
|
2052
|
+
.optional()
|
|
2053
|
+
.describe('List with sections with buttons.'),
|
|
2054
|
+
})
|
|
2055
|
+
.optional()
|
|
2056
|
+
.describe(
|
|
2057
|
+
'List reply with main list button text and sections with buttons.',
|
|
2058
|
+
),
|
|
2059
|
+
markup: zod
|
|
2060
|
+
.object({
|
|
2061
|
+
rows: zod
|
|
2062
|
+
.array(
|
|
2063
|
+
zod
|
|
2064
|
+
.object({
|
|
2065
|
+
buttons: zod
|
|
2066
|
+
.array(
|
|
2067
|
+
zod
|
|
2068
|
+
.object({
|
|
2069
|
+
callback: zod
|
|
2070
|
+
.object({
|
|
2071
|
+
data: zod
|
|
2072
|
+
.string()
|
|
2073
|
+
.optional()
|
|
2074
|
+
.describe(
|
|
2075
|
+
'Opaque data payload passed back to the server upon interaction.',
|
|
2076
|
+
),
|
|
2077
|
+
})
|
|
2078
|
+
.optional()
|
|
2079
|
+
.describe(
|
|
2080
|
+
'Triggers a backend event (callback) with associated metadata.',
|
|
2081
|
+
),
|
|
2082
|
+
id: zod
|
|
2083
|
+
.string()
|
|
2084
|
+
.optional()
|
|
2085
|
+
.describe(
|
|
2086
|
+
'Unique idempotent identifier for the button.\nUsed by the frontend to track state and prevent duplicate interactions.',
|
|
2087
|
+
),
|
|
2088
|
+
label: zod
|
|
2089
|
+
.string()
|
|
2090
|
+
.optional()
|
|
2091
|
+
.describe(
|
|
2092
|
+
'The human-readable label displayed on the button.',
|
|
2093
|
+
),
|
|
2094
|
+
metadata: zod
|
|
2095
|
+
.looseObject({})
|
|
2096
|
+
.optional()
|
|
2097
|
+
.describe(
|
|
2098
|
+
'Extensible metadata for UI/UX styling (e.g., "color", "theme", "size").\nUsage: Allows for future-proofing without breaking schema changes.',
|
|
2099
|
+
),
|
|
2100
|
+
request: zod
|
|
2101
|
+
.object({
|
|
2102
|
+
action: zod
|
|
2103
|
+
.string()
|
|
2104
|
+
.optional()
|
|
2105
|
+
.describe(
|
|
2106
|
+
'The specific action to be performed by the client application.',
|
|
2107
|
+
),
|
|
2108
|
+
})
|
|
2109
|
+
.optional()
|
|
2110
|
+
.describe(
|
|
2111
|
+
'Requests sensitive information from the client (e.g., location or contact).',
|
|
2112
|
+
),
|
|
2113
|
+
url: zod
|
|
2114
|
+
.object({
|
|
2115
|
+
url: zod
|
|
2116
|
+
.string()
|
|
2117
|
+
.optional()
|
|
2118
|
+
.describe(
|
|
2119
|
+
'Must be a valid absolute URI (e.g., https://example.com).',
|
|
2120
|
+
),
|
|
2121
|
+
})
|
|
2122
|
+
.optional()
|
|
2123
|
+
.describe(
|
|
2124
|
+
'Directs the user to an external web resource.',
|
|
2125
|
+
),
|
|
2126
|
+
})
|
|
2127
|
+
.describe(
|
|
2128
|
+
'Defines a single interactive element within the keyboard.\nEach button must have a unique identifier and a specific action type.',
|
|
2129
|
+
),
|
|
2130
|
+
)
|
|
2131
|
+
.optional()
|
|
2132
|
+
.describe(
|
|
2133
|
+
'Horizontal collection of buttons.\nCapped at 10 to ensure UI responsiveness and prevent overflow.',
|
|
2134
|
+
),
|
|
2135
|
+
})
|
|
2136
|
+
.describe(
|
|
2137
|
+
'A standard horizontal row of interactive buttons without a section header.',
|
|
2138
|
+
),
|
|
2139
|
+
)
|
|
2140
|
+
.optional()
|
|
2141
|
+
.describe('Rows of buttons matrix.'),
|
|
2142
|
+
})
|
|
2143
|
+
.optional()
|
|
2144
|
+
.describe('Markup matrix with buttons.'),
|
|
2145
|
+
placement: zod
|
|
2146
|
+
.enum([
|
|
2147
|
+
'MENU_PLACEMENT_UNSPECIFIED',
|
|
2148
|
+
'MENU_PLACEMENT_INLINE',
|
|
2149
|
+
'MENU_PLACEMENT_PERSISTENT',
|
|
2150
|
+
])
|
|
2151
|
+
.default(
|
|
2152
|
+
updatesGetUpdatesResponseThreadsItemMessagesItemInteractivePlacementDefault,
|
|
2153
|
+
)
|
|
2154
|
+
.describe(
|
|
2155
|
+
'Where the menu is rendered. Channels that only support one placement ignore it.',
|
|
2156
|
+
),
|
|
2157
|
+
single_use: zod
|
|
2158
|
+
.boolean()
|
|
2159
|
+
.optional()
|
|
2160
|
+
.describe('Force to block user keyboard.'),
|
|
2161
|
+
})
|
|
2162
|
+
.optional()
|
|
2163
|
+
.describe(
|
|
2164
|
+
'Interactive represents a rich message with UI elements.',
|
|
2165
|
+
),
|
|
2166
|
+
location: zod
|
|
2167
|
+
.object({
|
|
2168
|
+
address: zod.string().optional(),
|
|
2169
|
+
latitude: zod.number().optional(),
|
|
2170
|
+
longitude: zod.number().optional(),
|
|
2171
|
+
name: zod.string().optional(),
|
|
2172
|
+
})
|
|
2173
|
+
.optional(),
|
|
2174
|
+
metadata: zod.looseObject({}).optional(),
|
|
2175
|
+
reactions: zod
|
|
2176
|
+
.array(
|
|
2177
|
+
zod
|
|
2178
|
+
.object({
|
|
2179
|
+
count: zod
|
|
2180
|
+
.int()
|
|
2181
|
+
.optional()
|
|
2182
|
+
.describe(
|
|
2183
|
+
'Number of members currently holding this reaction.',
|
|
2184
|
+
),
|
|
2185
|
+
emoji: zod
|
|
2186
|
+
.string()
|
|
2187
|
+
.optional()
|
|
2188
|
+
.describe('Unicode emoji this reaction aggregates.'),
|
|
2189
|
+
last_reacted_at: zod
|
|
2190
|
+
.string()
|
|
2191
|
+
.optional()
|
|
2192
|
+
.describe(
|
|
2193
|
+
'Unix time in milliseconds of the most recent reaction with this emoji.',
|
|
2194
|
+
),
|
|
2195
|
+
reacted_by_me: zod
|
|
2196
|
+
.boolean()
|
|
2197
|
+
.optional()
|
|
2198
|
+
.describe(
|
|
2199
|
+
'True when the requesting caller is one of the reactors.',
|
|
2200
|
+
),
|
|
2201
|
+
reactor_ids: zod
|
|
2202
|
+
.array(zod.string())
|
|
2203
|
+
.optional()
|
|
2204
|
+
.describe(
|
|
2205
|
+
'Capped sample of reactor contact ids (for UI); not necessarily all of them.',
|
|
2206
|
+
),
|
|
2207
|
+
})
|
|
2208
|
+
.describe(
|
|
2209
|
+
'MessageReaction is one emoji aggregate on a history message.',
|
|
2210
|
+
),
|
|
2211
|
+
)
|
|
2212
|
+
.optional(),
|
|
2213
|
+
reply_to: zod
|
|
2214
|
+
.object({
|
|
2215
|
+
attachment_address: zod.string().optional(),
|
|
2216
|
+
attachment_kind: zod.string().optional(),
|
|
2217
|
+
attachment_mime: zod.string().optional(),
|
|
2218
|
+
attachment_name: zod.string().optional(),
|
|
2219
|
+
body: zod.string().optional(),
|
|
2220
|
+
created_at: zod.string().optional(),
|
|
2221
|
+
is_deleted: zod.boolean().optional(),
|
|
2222
|
+
message_id: zod.string().optional(),
|
|
2223
|
+
sender: zod
|
|
2224
|
+
.object({
|
|
2225
|
+
contact: zod
|
|
2226
|
+
.object({
|
|
2227
|
+
app_id: zod
|
|
2228
|
+
.string()
|
|
2229
|
+
.optional()
|
|
2230
|
+
.describe(
|
|
2231
|
+
'Identifier of the specific integration app or bot.',
|
|
2232
|
+
),
|
|
2233
|
+
created_at: zod
|
|
2234
|
+
.string()
|
|
2235
|
+
.optional()
|
|
2236
|
+
.describe(
|
|
2237
|
+
'Record creation timestamp (Unix Epoch in milliseconds).',
|
|
2238
|
+
),
|
|
2239
|
+
is_bot: zod
|
|
2240
|
+
.boolean()
|
|
2241
|
+
.optional()
|
|
2242
|
+
.describe(
|
|
2243
|
+
'Represents if usere is real person or automatic script.',
|
|
2244
|
+
),
|
|
2245
|
+
iss: zod
|
|
2246
|
+
.string()
|
|
2247
|
+
.optional()
|
|
2248
|
+
.describe(
|
|
2249
|
+
'Provider-specific unique identifier (Issuer ID).',
|
|
2250
|
+
),
|
|
2251
|
+
metadata: zod
|
|
2252
|
+
.record(zod.string(), zod.string())
|
|
2253
|
+
.optional()
|
|
2254
|
+
.describe(
|
|
2255
|
+
'Additional dynamic attributes provided by the messenger.',
|
|
2256
|
+
),
|
|
2257
|
+
name: zod
|
|
2258
|
+
.string()
|
|
2259
|
+
.optional()
|
|
2260
|
+
.describe('Display name of the contact.'),
|
|
2261
|
+
sub: zod
|
|
2262
|
+
.string()
|
|
2263
|
+
.optional()
|
|
2264
|
+
.describe(
|
|
2265
|
+
'Associated internal system subject/identifier.',
|
|
2266
|
+
),
|
|
2267
|
+
type: zod
|
|
2268
|
+
.string()
|
|
2269
|
+
.optional()
|
|
2270
|
+
.describe(
|
|
2271
|
+
"Channel type (e.g., 'webchat', 'telegram').",
|
|
2272
|
+
),
|
|
2273
|
+
updated_at: zod
|
|
2274
|
+
.string()
|
|
2275
|
+
.optional()
|
|
2276
|
+
.describe(
|
|
2277
|
+
'Last record update timestamp (Unix Epoch in milliseconds).',
|
|
2278
|
+
),
|
|
2279
|
+
username: zod
|
|
2280
|
+
.string()
|
|
2281
|
+
.optional()
|
|
2282
|
+
.describe('Technical username or handle.'),
|
|
2283
|
+
vias: zod
|
|
2284
|
+
.array(
|
|
2285
|
+
zod.object({
|
|
2286
|
+
contact_id: zod.string().optional(),
|
|
2287
|
+
created_at: zod.string().optional(),
|
|
2288
|
+
disable: zod.boolean().optional(),
|
|
2289
|
+
disable_reason: zod.string().optional(),
|
|
2290
|
+
metadata: zod.looseObject({}).optional(),
|
|
2291
|
+
updated_at: zod.string().optional(),
|
|
2292
|
+
via: zod.string().optional(),
|
|
2293
|
+
}),
|
|
2294
|
+
)
|
|
2295
|
+
.optional(),
|
|
2296
|
+
})
|
|
2297
|
+
.optional()
|
|
2298
|
+
.describe(
|
|
2299
|
+
'Contact represents an external messaging identity.',
|
|
2300
|
+
),
|
|
2301
|
+
id: zod.string().optional(),
|
|
2302
|
+
permissions: zod
|
|
2303
|
+
.object({
|
|
2304
|
+
can_add_members: zod.boolean().optional(),
|
|
2305
|
+
can_change_members_permissions: zod
|
|
2306
|
+
.boolean()
|
|
2307
|
+
.optional(),
|
|
2308
|
+
can_change_thread_info: zod.boolean().optional(),
|
|
2309
|
+
can_delete_messages: zod.boolean().optional(),
|
|
2310
|
+
can_remove_members: zod.boolean().optional(),
|
|
2311
|
+
can_send_messages: zod.boolean().optional(),
|
|
2312
|
+
created_at: zod.string().optional(),
|
|
2313
|
+
id: zod.string().optional(),
|
|
2314
|
+
member_id: zod.string().optional(),
|
|
2315
|
+
updated_at: zod.string().optional(),
|
|
2316
|
+
})
|
|
2317
|
+
.optional(),
|
|
2318
|
+
role: zod
|
|
2319
|
+
.enum([
|
|
2320
|
+
'ROLE_UNSPECIFIED',
|
|
2321
|
+
'ROLE_MEMBER',
|
|
2322
|
+
'ROLE_ADMIN',
|
|
2323
|
+
'ROLE_OWNER',
|
|
2324
|
+
'ROLE_SUPERVISOR',
|
|
2325
|
+
])
|
|
2326
|
+
.default(
|
|
2327
|
+
updatesGetUpdatesResponseThreadsItemMessagesItemReplyToSenderRoleDefault,
|
|
2328
|
+
),
|
|
2329
|
+
})
|
|
2330
|
+
.optional()
|
|
2331
|
+
.describe(
|
|
2332
|
+
'ThreadMember represents a thread participant\nwith optional type-specific settings.',
|
|
2333
|
+
),
|
|
2334
|
+
sender_id: zod.string().optional(),
|
|
2335
|
+
type: zod
|
|
2336
|
+
.string()
|
|
2337
|
+
.optional()
|
|
2338
|
+
.describe(
|
|
2339
|
+
'Kind of the quoted message: text, document, image, system, interactive,\nlocation or contact.',
|
|
2340
|
+
),
|
|
2341
|
+
})
|
|
2342
|
+
.optional(),
|
|
2343
|
+
sender: zod
|
|
2344
|
+
.object({
|
|
2345
|
+
contact: zod
|
|
2346
|
+
.object({
|
|
2347
|
+
app_id: zod
|
|
2348
|
+
.string()
|
|
2349
|
+
.optional()
|
|
2350
|
+
.describe(
|
|
2351
|
+
'Identifier of the specific integration app or bot.',
|
|
2352
|
+
),
|
|
2353
|
+
created_at: zod
|
|
2354
|
+
.string()
|
|
2355
|
+
.optional()
|
|
2356
|
+
.describe(
|
|
2357
|
+
'Record creation timestamp (Unix Epoch in milliseconds).',
|
|
2358
|
+
),
|
|
2359
|
+
is_bot: zod
|
|
2360
|
+
.boolean()
|
|
2361
|
+
.optional()
|
|
2362
|
+
.describe(
|
|
2363
|
+
'Represents if usere is real person or automatic script.',
|
|
2364
|
+
),
|
|
2365
|
+
iss: zod
|
|
2366
|
+
.string()
|
|
2367
|
+
.optional()
|
|
2368
|
+
.describe(
|
|
2369
|
+
'Provider-specific unique identifier (Issuer ID).',
|
|
2370
|
+
),
|
|
2371
|
+
metadata: zod
|
|
2372
|
+
.record(zod.string(), zod.string())
|
|
2373
|
+
.optional()
|
|
2374
|
+
.describe(
|
|
2375
|
+
'Additional dynamic attributes provided by the messenger.',
|
|
2376
|
+
),
|
|
2377
|
+
name: zod
|
|
2378
|
+
.string()
|
|
2379
|
+
.optional()
|
|
2380
|
+
.describe('Display name of the contact.'),
|
|
2381
|
+
sub: zod
|
|
2382
|
+
.string()
|
|
2383
|
+
.optional()
|
|
2384
|
+
.describe(
|
|
2385
|
+
'Associated internal system subject/identifier.',
|
|
2386
|
+
),
|
|
2387
|
+
type: zod
|
|
2388
|
+
.string()
|
|
2389
|
+
.optional()
|
|
2390
|
+
.describe(
|
|
2391
|
+
"Channel type (e.g., 'webchat', 'telegram').",
|
|
2392
|
+
),
|
|
2393
|
+
updated_at: zod
|
|
2394
|
+
.string()
|
|
2395
|
+
.optional()
|
|
2396
|
+
.describe(
|
|
2397
|
+
'Last record update timestamp (Unix Epoch in milliseconds).',
|
|
2398
|
+
),
|
|
2399
|
+
username: zod
|
|
2400
|
+
.string()
|
|
2401
|
+
.optional()
|
|
2402
|
+
.describe('Technical username or handle.'),
|
|
2403
|
+
vias: zod
|
|
2404
|
+
.array(
|
|
2405
|
+
zod.object({
|
|
2406
|
+
contact_id: zod.string().optional(),
|
|
2407
|
+
created_at: zod.string().optional(),
|
|
2408
|
+
disable: zod.boolean().optional(),
|
|
2409
|
+
disable_reason: zod.string().optional(),
|
|
2410
|
+
metadata: zod.looseObject({}).optional(),
|
|
2411
|
+
updated_at: zod.string().optional(),
|
|
2412
|
+
via: zod.string().optional(),
|
|
2413
|
+
}),
|
|
2414
|
+
)
|
|
2415
|
+
.optional(),
|
|
2416
|
+
})
|
|
2417
|
+
.optional()
|
|
2418
|
+
.describe(
|
|
2419
|
+
'Contact represents an external messaging identity.',
|
|
2420
|
+
),
|
|
2421
|
+
id: zod.string().optional(),
|
|
2422
|
+
permissions: zod
|
|
2423
|
+
.object({
|
|
2424
|
+
can_add_members: zod.boolean().optional(),
|
|
2425
|
+
can_change_members_permissions: zod
|
|
2426
|
+
.boolean()
|
|
2427
|
+
.optional(),
|
|
2428
|
+
can_change_thread_info: zod.boolean().optional(),
|
|
2429
|
+
can_delete_messages: zod.boolean().optional(),
|
|
2430
|
+
can_remove_members: zod.boolean().optional(),
|
|
2431
|
+
can_send_messages: zod.boolean().optional(),
|
|
2432
|
+
created_at: zod.string().optional(),
|
|
2433
|
+
id: zod.string().optional(),
|
|
2434
|
+
member_id: zod.string().optional(),
|
|
2435
|
+
updated_at: zod.string().optional(),
|
|
2436
|
+
})
|
|
2437
|
+
.optional(),
|
|
2438
|
+
role: zod
|
|
2439
|
+
.enum([
|
|
2440
|
+
'ROLE_UNSPECIFIED',
|
|
2441
|
+
'ROLE_MEMBER',
|
|
2442
|
+
'ROLE_ADMIN',
|
|
2443
|
+
'ROLE_OWNER',
|
|
2444
|
+
'ROLE_SUPERVISOR',
|
|
2445
|
+
])
|
|
2446
|
+
.default(
|
|
2447
|
+
updatesGetUpdatesResponseThreadsItemMessagesItemSenderRoleDefault,
|
|
2448
|
+
),
|
|
2449
|
+
})
|
|
2450
|
+
.optional()
|
|
2451
|
+
.describe(
|
|
2452
|
+
'ThreadMember represents a thread participant\nwith optional type-specific settings.',
|
|
2453
|
+
),
|
|
2454
|
+
seq: zod.string().optional(),
|
|
2455
|
+
system: zod
|
|
2456
|
+
.object({
|
|
2457
|
+
message_id: zod
|
|
2458
|
+
.string()
|
|
2459
|
+
.optional()
|
|
2460
|
+
.describe(
|
|
2461
|
+
'ID of message for which system messages is binded.',
|
|
2462
|
+
),
|
|
2463
|
+
metadata: zod
|
|
2464
|
+
.looseObject({})
|
|
2465
|
+
.optional()
|
|
2466
|
+
.describe(
|
|
2467
|
+
'Represents additional metadata binded into system message.',
|
|
2468
|
+
),
|
|
2469
|
+
type: zod
|
|
2470
|
+
.string()
|
|
2471
|
+
.optional()
|
|
2472
|
+
.describe('Represents type of the message.'),
|
|
2473
|
+
})
|
|
2474
|
+
.optional()
|
|
2475
|
+
.describe(
|
|
2476
|
+
'System represents domain structure for system event messages.',
|
|
2477
|
+
),
|
|
2478
|
+
type: zod.int().optional(),
|
|
2479
|
+
})
|
|
2480
|
+
.describe(
|
|
2481
|
+
'UpdatedMessage is what a client needs to render or re-render a message bubble.',
|
|
2482
|
+
),
|
|
2483
|
+
)
|
|
2484
|
+
.optional()
|
|
2485
|
+
.describe(
|
|
2486
|
+
'New or changed messages in their current state; upsert by id.',
|
|
2487
|
+
),
|
|
2488
|
+
read_states: zod
|
|
2489
|
+
.array(
|
|
2490
|
+
zod
|
|
2491
|
+
.object({
|
|
2492
|
+
delivered_up_to_seq: zod.string().optional(),
|
|
2493
|
+
member: zod
|
|
2494
|
+
.object({
|
|
2495
|
+
contact: zod
|
|
2496
|
+
.object({
|
|
2497
|
+
app_id: zod
|
|
2498
|
+
.string()
|
|
2499
|
+
.optional()
|
|
2500
|
+
.describe(
|
|
2501
|
+
'Identifier of the specific integration app or bot.',
|
|
2502
|
+
),
|
|
2503
|
+
created_at: zod
|
|
2504
|
+
.string()
|
|
2505
|
+
.optional()
|
|
2506
|
+
.describe(
|
|
2507
|
+
'Record creation timestamp (Unix Epoch in milliseconds).',
|
|
2508
|
+
),
|
|
2509
|
+
is_bot: zod
|
|
2510
|
+
.boolean()
|
|
2511
|
+
.optional()
|
|
2512
|
+
.describe(
|
|
2513
|
+
'Represents if usere is real person or automatic script.',
|
|
2514
|
+
),
|
|
2515
|
+
iss: zod
|
|
2516
|
+
.string()
|
|
2517
|
+
.optional()
|
|
2518
|
+
.describe(
|
|
2519
|
+
'Provider-specific unique identifier (Issuer ID).',
|
|
2520
|
+
),
|
|
2521
|
+
metadata: zod
|
|
2522
|
+
.record(zod.string(), zod.string())
|
|
2523
|
+
.optional()
|
|
2524
|
+
.describe(
|
|
2525
|
+
'Additional dynamic attributes provided by the messenger.',
|
|
2526
|
+
),
|
|
2527
|
+
name: zod
|
|
2528
|
+
.string()
|
|
2529
|
+
.optional()
|
|
2530
|
+
.describe('Display name of the contact.'),
|
|
2531
|
+
sub: zod
|
|
2532
|
+
.string()
|
|
2533
|
+
.optional()
|
|
2534
|
+
.describe(
|
|
2535
|
+
'Associated internal system subject/identifier.',
|
|
2536
|
+
),
|
|
2537
|
+
type: zod
|
|
2538
|
+
.string()
|
|
2539
|
+
.optional()
|
|
2540
|
+
.describe(
|
|
2541
|
+
"Channel type (e.g., 'webchat', 'telegram').",
|
|
2542
|
+
),
|
|
2543
|
+
updated_at: zod
|
|
2544
|
+
.string()
|
|
2545
|
+
.optional()
|
|
2546
|
+
.describe(
|
|
2547
|
+
'Last record update timestamp (Unix Epoch in milliseconds).',
|
|
2548
|
+
),
|
|
2549
|
+
username: zod
|
|
2550
|
+
.string()
|
|
2551
|
+
.optional()
|
|
2552
|
+
.describe('Technical username or handle.'),
|
|
2553
|
+
vias: zod
|
|
2554
|
+
.array(
|
|
2555
|
+
zod.object({
|
|
2556
|
+
contact_id: zod.string().optional(),
|
|
2557
|
+
created_at: zod.string().optional(),
|
|
2558
|
+
disable: zod.boolean().optional(),
|
|
2559
|
+
disable_reason: zod.string().optional(),
|
|
2560
|
+
metadata: zod.looseObject({}).optional(),
|
|
2561
|
+
updated_at: zod.string().optional(),
|
|
2562
|
+
via: zod.string().optional(),
|
|
2563
|
+
}),
|
|
2564
|
+
)
|
|
2565
|
+
.optional(),
|
|
2566
|
+
})
|
|
2567
|
+
.optional()
|
|
2568
|
+
.describe(
|
|
2569
|
+
'Contact represents an external messaging identity.',
|
|
2570
|
+
),
|
|
2571
|
+
id: zod.string().optional(),
|
|
2572
|
+
permissions: zod
|
|
2573
|
+
.object({
|
|
2574
|
+
can_add_members: zod.boolean().optional(),
|
|
2575
|
+
can_change_members_permissions: zod
|
|
2576
|
+
.boolean()
|
|
2577
|
+
.optional(),
|
|
2578
|
+
can_change_thread_info: zod.boolean().optional(),
|
|
2579
|
+
can_delete_messages: zod.boolean().optional(),
|
|
2580
|
+
can_remove_members: zod.boolean().optional(),
|
|
2581
|
+
can_send_messages: zod.boolean().optional(),
|
|
2582
|
+
created_at: zod.string().optional(),
|
|
2583
|
+
id: zod.string().optional(),
|
|
2584
|
+
member_id: zod.string().optional(),
|
|
2585
|
+
updated_at: zod.string().optional(),
|
|
2586
|
+
})
|
|
2587
|
+
.optional(),
|
|
2588
|
+
role: zod
|
|
2589
|
+
.enum([
|
|
2590
|
+
'ROLE_UNSPECIFIED',
|
|
2591
|
+
'ROLE_MEMBER',
|
|
2592
|
+
'ROLE_ADMIN',
|
|
2593
|
+
'ROLE_OWNER',
|
|
2594
|
+
'ROLE_SUPERVISOR',
|
|
2595
|
+
])
|
|
2596
|
+
.default(
|
|
2597
|
+
updatesGetUpdatesResponseThreadsItemReadStatesItemMemberRoleDefault,
|
|
2598
|
+
),
|
|
2599
|
+
})
|
|
2600
|
+
.optional()
|
|
2601
|
+
.describe(
|
|
2602
|
+
"The member, in the same shape as history's sender; set by GetUpdates.",
|
|
2603
|
+
),
|
|
2604
|
+
member_id: zod.string().optional(),
|
|
2605
|
+
read_up_to_seq: zod.string().optional(),
|
|
2606
|
+
})
|
|
2607
|
+
.describe(
|
|
2608
|
+
"MemberReadState is one member's delivery/read horizon in a thread, as\nper-thread message seq (0 = nothing reached that state yet).",
|
|
2609
|
+
),
|
|
2610
|
+
)
|
|
2611
|
+
.optional()
|
|
2612
|
+
.describe('Delivery/read horizons in message seq.'),
|
|
2613
|
+
thread_id: zod.string().optional(),
|
|
2614
|
+
top_message: zod
|
|
2615
|
+
.object({
|
|
2616
|
+
body: zod.string().optional(),
|
|
2617
|
+
contact: zod
|
|
2618
|
+
.object({
|
|
2619
|
+
email: zod.string().optional(),
|
|
2620
|
+
name: zod.string().optional(),
|
|
2621
|
+
phone: zod.string().optional(),
|
|
2622
|
+
})
|
|
2623
|
+
.optional(),
|
|
2624
|
+
created_at: zod.string().optional(),
|
|
2625
|
+
documents: zod
|
|
2626
|
+
.array(
|
|
2627
|
+
zod
|
|
2628
|
+
.object({
|
|
2629
|
+
created_at: zod
|
|
2630
|
+
.string()
|
|
2631
|
+
.optional()
|
|
2632
|
+
.describe(
|
|
2633
|
+
'Creation timestamp (Unix time, milliseconds).',
|
|
2634
|
+
),
|
|
2635
|
+
file_id: zod
|
|
2636
|
+
.string()
|
|
2637
|
+
.optional()
|
|
2638
|
+
.describe('File storage identifier.'),
|
|
2639
|
+
id: zod
|
|
2640
|
+
.string()
|
|
2641
|
+
.optional()
|
|
2642
|
+
.describe('Document identifier.'),
|
|
2643
|
+
message_id: zod
|
|
2644
|
+
.string()
|
|
2645
|
+
.optional()
|
|
2646
|
+
.describe(
|
|
2647
|
+
'Identifier of the message this document belongs to.',
|
|
2648
|
+
),
|
|
2649
|
+
mime: zod
|
|
2650
|
+
.string()
|
|
2651
|
+
.optional()
|
|
2652
|
+
.describe('MIME type of the document.'),
|
|
2653
|
+
name: zod
|
|
2654
|
+
.string()
|
|
2655
|
+
.optional()
|
|
2656
|
+
.describe('Original file name.'),
|
|
2657
|
+
size: zod
|
|
2658
|
+
.string()
|
|
2659
|
+
.optional()
|
|
2660
|
+
.describe('File size in bytes.'),
|
|
2661
|
+
url: zod
|
|
2662
|
+
.string()
|
|
2663
|
+
.optional()
|
|
2664
|
+
.describe(
|
|
2665
|
+
'Public signed URL for downloading the document.',
|
|
2666
|
+
),
|
|
2667
|
+
})
|
|
2668
|
+
.describe(
|
|
2669
|
+
'Document represents a file attachment\nassociated with a message.',
|
|
2670
|
+
),
|
|
2671
|
+
)
|
|
2672
|
+
.optional(),
|
|
2673
|
+
edited_at: zod
|
|
2674
|
+
.string()
|
|
2675
|
+
.optional()
|
|
2676
|
+
.describe('Set when the message was edited.'),
|
|
2677
|
+
forward_origin: zod
|
|
2678
|
+
.object({
|
|
2679
|
+
kind: zod
|
|
2680
|
+
.enum([
|
|
2681
|
+
'FORWARD_ORIGIN_KIND_UNSPECIFIED',
|
|
2682
|
+
'FORWARD_ORIGIN_KIND_INTERNAL',
|
|
2683
|
+
'FORWARD_ORIGIN_KIND_EXTERNAL_USER',
|
|
2684
|
+
'FORWARD_ORIGIN_KIND_EXTERNAL_HIDDEN_USER',
|
|
2685
|
+
'FORWARD_ORIGIN_KIND_EXTERNAL_CHAT',
|
|
2686
|
+
])
|
|
2687
|
+
.default(
|
|
2688
|
+
updatesGetUpdatesResponseThreadsItemTopMessageForwardOriginKindDefault,
|
|
2689
|
+
)
|
|
2690
|
+
.describe(
|
|
2691
|
+
'ForwardOriginKind tells the client how to label a forwarded message and\nwhether the origin points at anything addressable inside Webitel.\n\n - FORWARD_ORIGIN_KIND_INTERNAL: Forwarded inside Webitel: sender_id and source_message_id are set.\n - FORWARD_ORIGIN_KIND_EXTERNAL_USER: Forwarded into the chat from an external messenger, author named.\n - FORWARD_ORIGIN_KIND_EXTERNAL_HIDDEN_USER: Same, but the author chose to hide their account, so there is no name.\n - FORWARD_ORIGIN_KIND_EXTERNAL_CHAT: Origin is an external group or channel rather than a person.',
|
|
2692
|
+
),
|
|
2693
|
+
original_sent_at: zod
|
|
2694
|
+
.string()
|
|
2695
|
+
.optional()
|
|
2696
|
+
.describe(
|
|
2697
|
+
'When the original message was sent, Unix time in milliseconds.',
|
|
2698
|
+
),
|
|
2699
|
+
sender_id: zod
|
|
2700
|
+
.string()
|
|
2701
|
+
.optional()
|
|
2702
|
+
.describe(
|
|
2703
|
+
'Contact id of the original author. Empty unless kind is INTERNAL.',
|
|
2704
|
+
),
|
|
2705
|
+
sender_name: zod
|
|
2706
|
+
.string()
|
|
2707
|
+
.optional()
|
|
2708
|
+
.describe(
|
|
2709
|
+
'Display name of the original author — the "from whom" label.',
|
|
2710
|
+
),
|
|
2711
|
+
source_message_id: zod
|
|
2712
|
+
.string()
|
|
2713
|
+
.optional()
|
|
2714
|
+
.describe(
|
|
2715
|
+
'Source message this copy was made from. Empty unless kind is INTERNAL,\nand cleared if the source is later purged.',
|
|
2716
|
+
),
|
|
2717
|
+
})
|
|
2718
|
+
.optional()
|
|
2719
|
+
.describe(
|
|
2720
|
+
'ForwardOrigin is a snapshot of the original author taken at forward time.\nUnlike ReplyToMessage it carries no enriched ThreadMember: the original author\nis generally not a member of the chat the copy landed in, so sender_name is\nthe only label a client can rely on.',
|
|
2721
|
+
),
|
|
2722
|
+
id: zod.string().optional(),
|
|
2723
|
+
images: zod
|
|
2724
|
+
.array(
|
|
2725
|
+
zod
|
|
2726
|
+
.object({
|
|
2727
|
+
created_at: zod
|
|
2728
|
+
.string()
|
|
2729
|
+
.optional()
|
|
2730
|
+
.describe(
|
|
2731
|
+
'Creation timestamp (Unix time, milliseconds).',
|
|
2732
|
+
),
|
|
2733
|
+
file_id: zod
|
|
2734
|
+
.string()
|
|
2735
|
+
.optional()
|
|
2736
|
+
.describe('File storage identifier.'),
|
|
2737
|
+
height: zod
|
|
2738
|
+
.int()
|
|
2739
|
+
.optional()
|
|
2740
|
+
.describe('Image height in pixels.'),
|
|
2741
|
+
id: zod.string().optional().describe('Image identifier.'),
|
|
2742
|
+
message_id: zod
|
|
2743
|
+
.string()
|
|
2744
|
+
.optional()
|
|
2745
|
+
.describe(
|
|
2746
|
+
'Identifier of the message this message belongs to.',
|
|
2747
|
+
),
|
|
2748
|
+
mime: zod
|
|
2749
|
+
.string()
|
|
2750
|
+
.optional()
|
|
2751
|
+
.describe('MIME type of the image.'),
|
|
2752
|
+
url: zod
|
|
2753
|
+
.string()
|
|
2754
|
+
.optional()
|
|
2755
|
+
.describe('Public signed URL for accessing the image.'),
|
|
2756
|
+
width: zod
|
|
2757
|
+
.int()
|
|
2758
|
+
.optional()
|
|
2759
|
+
.describe('Image width in pixels.'),
|
|
2760
|
+
})
|
|
2761
|
+
.describe(
|
|
2762
|
+
'Image represents an image attachment\nassociated with a message.',
|
|
2763
|
+
),
|
|
2764
|
+
)
|
|
2765
|
+
.optional(),
|
|
2766
|
+
interactive: zod
|
|
2767
|
+
.object({
|
|
2768
|
+
documents: zod
|
|
2769
|
+
.object({
|
|
2770
|
+
documents: zod
|
|
2771
|
+
.array(
|
|
2772
|
+
zod
|
|
2773
|
+
.object({
|
|
2774
|
+
file_name: zod.string().optional(),
|
|
2775
|
+
id: zod.string().optional(),
|
|
2776
|
+
mime_type: zod.string().optional(),
|
|
2777
|
+
size_bytes: zod.string().optional(),
|
|
2778
|
+
url: zod.string().optional(),
|
|
2779
|
+
})
|
|
2780
|
+
.describe(
|
|
2781
|
+
'Represents `Document` message with necessary fields\nto process it into frequently used `document`\nentity in messaging systems.',
|
|
2782
|
+
),
|
|
2783
|
+
)
|
|
2784
|
+
.optional()
|
|
2785
|
+
.describe(
|
|
2786
|
+
'Documents to be attached to the header of interactive message.\nMax allowed documents: 10.',
|
|
2787
|
+
),
|
|
2788
|
+
})
|
|
2789
|
+
.optional()
|
|
2790
|
+
.describe('Document attachments header.'),
|
|
2791
|
+
images: zod
|
|
2792
|
+
.object({
|
|
2793
|
+
images: zod
|
|
2794
|
+
.array(
|
|
2795
|
+
zod
|
|
2796
|
+
.object({
|
|
2797
|
+
id: zod.string().optional(),
|
|
2798
|
+
link: zod.string().optional(),
|
|
2799
|
+
mime_type: zod.string().optional(),
|
|
2800
|
+
name: zod.string().optional(),
|
|
2801
|
+
})
|
|
2802
|
+
.describe(
|
|
2803
|
+
'Represents `Image` entity with\nnecessary fields.',
|
|
2804
|
+
),
|
|
2805
|
+
)
|
|
2806
|
+
.optional()
|
|
2807
|
+
.describe(
|
|
2808
|
+
'Images to be attached to the header of interactive message.\nMax allowed images: 10.',
|
|
2809
|
+
),
|
|
2810
|
+
})
|
|
2811
|
+
.optional()
|
|
2812
|
+
.describe('Images attachment header.'),
|
|
2813
|
+
input_field_state: zod
|
|
2814
|
+
.enum([
|
|
2815
|
+
'INPUT_FIELD_STATE_UNSPECIFIED',
|
|
2816
|
+
'INPUT_FIELD_STATE_REGULAR',
|
|
2817
|
+
'INPUT_FIELD_STATE_MINIMIZED',
|
|
2818
|
+
'INPUT_FIELD_STATE_HIDDEN',
|
|
2819
|
+
])
|
|
2820
|
+
.default(
|
|
2821
|
+
updatesGetUpdatesResponseThreadsItemTopMessageInteractiveInputFieldStateDefault,
|
|
2822
|
+
)
|
|
2823
|
+
.describe(
|
|
2824
|
+
'Whether the recipient may still type while this menu is displayed.',
|
|
2825
|
+
),
|
|
2826
|
+
list_reply: zod
|
|
2827
|
+
.object({
|
|
2828
|
+
main_button_title: zod
|
|
2829
|
+
.string()
|
|
2830
|
+
.optional()
|
|
2831
|
+
.describe(
|
|
2832
|
+
'Title of the main button, that on-click show up list.',
|
|
2833
|
+
),
|
|
2834
|
+
sections: zod
|
|
2835
|
+
.array(
|
|
2836
|
+
zod
|
|
2837
|
+
.object({
|
|
2838
|
+
buttons: zod
|
|
2839
|
+
.array(
|
|
2840
|
+
zod
|
|
2841
|
+
.object({
|
|
2842
|
+
callback: zod
|
|
2843
|
+
.object({
|
|
2844
|
+
data: zod
|
|
2845
|
+
.string()
|
|
2846
|
+
.optional()
|
|
2847
|
+
.describe(
|
|
2848
|
+
'Opaque data payload passed back to the server upon interaction.',
|
|
2849
|
+
),
|
|
2850
|
+
})
|
|
2851
|
+
.optional()
|
|
2852
|
+
.describe(
|
|
2853
|
+
'Triggers a backend event (callback) with associated metadata.',
|
|
2854
|
+
),
|
|
2855
|
+
id: zod
|
|
2856
|
+
.string()
|
|
2857
|
+
.optional()
|
|
2858
|
+
.describe(
|
|
2859
|
+
'Unique idempotent identifier for the button.\nUsed by the frontend to track state and prevent duplicate interactions.',
|
|
2860
|
+
),
|
|
2861
|
+
label: zod
|
|
2862
|
+
.string()
|
|
2863
|
+
.optional()
|
|
2864
|
+
.describe(
|
|
2865
|
+
'The human-readable label displayed on the button.',
|
|
2866
|
+
),
|
|
2867
|
+
metadata: zod
|
|
2868
|
+
.looseObject({})
|
|
2869
|
+
.optional()
|
|
2870
|
+
.describe(
|
|
2871
|
+
'Extensible metadata for UI/UX styling (e.g., "color", "theme", "size").\nUsage: Allows for future-proofing without breaking schema changes.',
|
|
2872
|
+
),
|
|
2873
|
+
request: zod
|
|
2874
|
+
.object({
|
|
2875
|
+
action: zod
|
|
2876
|
+
.string()
|
|
2877
|
+
.optional()
|
|
2878
|
+
.describe(
|
|
2879
|
+
'The specific action to be performed by the client application.',
|
|
2880
|
+
),
|
|
2881
|
+
})
|
|
2882
|
+
.optional()
|
|
2883
|
+
.describe(
|
|
2884
|
+
'Requests sensitive information from the client (e.g., location or contact).',
|
|
2885
|
+
),
|
|
2886
|
+
url: zod
|
|
2887
|
+
.object({
|
|
2888
|
+
url: zod
|
|
2889
|
+
.string()
|
|
2890
|
+
.optional()
|
|
2891
|
+
.describe(
|
|
2892
|
+
'Must be a valid absolute URI (e.g., https://example.com).',
|
|
2893
|
+
),
|
|
2894
|
+
})
|
|
2895
|
+
.optional()
|
|
2896
|
+
.describe(
|
|
2897
|
+
'Directs the user to an external web resource.',
|
|
2898
|
+
),
|
|
2899
|
+
})
|
|
2900
|
+
.describe(
|
|
2901
|
+
'Defines a single interactive element within the keyboard.\nEach button must have a unique identifier and a specific action type.',
|
|
2902
|
+
),
|
|
2903
|
+
)
|
|
2904
|
+
.optional()
|
|
2905
|
+
.describe(
|
|
2906
|
+
'Collection of buttons within this section.\nMinimum of 1 button is required to prevent empty sections.',
|
|
2907
|
+
),
|
|
2908
|
+
section: zod
|
|
2909
|
+
.string()
|
|
2910
|
+
.optional()
|
|
2911
|
+
.describe(
|
|
2912
|
+
'The header text for this section. Must be concise and descriptive.',
|
|
2913
|
+
),
|
|
2914
|
+
})
|
|
2915
|
+
.describe(
|
|
2916
|
+
'Represents a row of buttons grouped under a specific logical section header.\nUseful for creating categorized menus or structured interactive interfaces.',
|
|
2917
|
+
),
|
|
2918
|
+
)
|
|
2919
|
+
.optional()
|
|
2920
|
+
.describe('List with sections with buttons.'),
|
|
2921
|
+
})
|
|
2922
|
+
.optional()
|
|
2923
|
+
.describe(
|
|
2924
|
+
'List reply with main list button text and sections with buttons.',
|
|
2925
|
+
),
|
|
2926
|
+
markup: zod
|
|
2927
|
+
.object({
|
|
2928
|
+
rows: zod
|
|
2929
|
+
.array(
|
|
2930
|
+
zod
|
|
2931
|
+
.object({
|
|
2932
|
+
buttons: zod
|
|
2933
|
+
.array(
|
|
2934
|
+
zod
|
|
2935
|
+
.object({
|
|
2936
|
+
callback: zod
|
|
2937
|
+
.object({
|
|
2938
|
+
data: zod
|
|
2939
|
+
.string()
|
|
2940
|
+
.optional()
|
|
2941
|
+
.describe(
|
|
2942
|
+
'Opaque data payload passed back to the server upon interaction.',
|
|
2943
|
+
),
|
|
2944
|
+
})
|
|
2945
|
+
.optional()
|
|
2946
|
+
.describe(
|
|
2947
|
+
'Triggers a backend event (callback) with associated metadata.',
|
|
2948
|
+
),
|
|
2949
|
+
id: zod
|
|
2950
|
+
.string()
|
|
2951
|
+
.optional()
|
|
2952
|
+
.describe(
|
|
2953
|
+
'Unique idempotent identifier for the button.\nUsed by the frontend to track state and prevent duplicate interactions.',
|
|
2954
|
+
),
|
|
2955
|
+
label: zod
|
|
2956
|
+
.string()
|
|
2957
|
+
.optional()
|
|
2958
|
+
.describe(
|
|
2959
|
+
'The human-readable label displayed on the button.',
|
|
2960
|
+
),
|
|
2961
|
+
metadata: zod
|
|
2962
|
+
.looseObject({})
|
|
2963
|
+
.optional()
|
|
2964
|
+
.describe(
|
|
2965
|
+
'Extensible metadata for UI/UX styling (e.g., "color", "theme", "size").\nUsage: Allows for future-proofing without breaking schema changes.',
|
|
2966
|
+
),
|
|
2967
|
+
request: zod
|
|
2968
|
+
.object({
|
|
2969
|
+
action: zod
|
|
2970
|
+
.string()
|
|
2971
|
+
.optional()
|
|
2972
|
+
.describe(
|
|
2973
|
+
'The specific action to be performed by the client application.',
|
|
2974
|
+
),
|
|
2975
|
+
})
|
|
2976
|
+
.optional()
|
|
2977
|
+
.describe(
|
|
2978
|
+
'Requests sensitive information from the client (e.g., location or contact).',
|
|
2979
|
+
),
|
|
2980
|
+
url: zod
|
|
2981
|
+
.object({
|
|
2982
|
+
url: zod
|
|
2983
|
+
.string()
|
|
2984
|
+
.optional()
|
|
2985
|
+
.describe(
|
|
2986
|
+
'Must be a valid absolute URI (e.g., https://example.com).',
|
|
2987
|
+
),
|
|
2988
|
+
})
|
|
2989
|
+
.optional()
|
|
2990
|
+
.describe(
|
|
2991
|
+
'Directs the user to an external web resource.',
|
|
2992
|
+
),
|
|
2993
|
+
})
|
|
2994
|
+
.describe(
|
|
2995
|
+
'Defines a single interactive element within the keyboard.\nEach button must have a unique identifier and a specific action type.',
|
|
2996
|
+
),
|
|
2997
|
+
)
|
|
2998
|
+
.optional()
|
|
2999
|
+
.describe(
|
|
3000
|
+
'Horizontal collection of buttons.\nCapped at 10 to ensure UI responsiveness and prevent overflow.',
|
|
3001
|
+
),
|
|
3002
|
+
})
|
|
3003
|
+
.describe(
|
|
3004
|
+
'A standard horizontal row of interactive buttons without a section header.',
|
|
3005
|
+
),
|
|
3006
|
+
)
|
|
3007
|
+
.optional()
|
|
3008
|
+
.describe('Rows of buttons matrix.'),
|
|
3009
|
+
})
|
|
3010
|
+
.optional()
|
|
3011
|
+
.describe('Markup matrix with buttons.'),
|
|
3012
|
+
placement: zod
|
|
3013
|
+
.enum([
|
|
3014
|
+
'MENU_PLACEMENT_UNSPECIFIED',
|
|
3015
|
+
'MENU_PLACEMENT_INLINE',
|
|
3016
|
+
'MENU_PLACEMENT_PERSISTENT',
|
|
3017
|
+
])
|
|
3018
|
+
.default(
|
|
3019
|
+
updatesGetUpdatesResponseThreadsItemTopMessageInteractivePlacementDefault,
|
|
3020
|
+
)
|
|
3021
|
+
.describe(
|
|
3022
|
+
'Where the menu is rendered. Channels that only support one placement ignore it.',
|
|
3023
|
+
),
|
|
3024
|
+
single_use: zod
|
|
3025
|
+
.boolean()
|
|
3026
|
+
.optional()
|
|
3027
|
+
.describe('Force to block user keyboard.'),
|
|
3028
|
+
})
|
|
3029
|
+
.optional()
|
|
3030
|
+
.describe(
|
|
3031
|
+
'Interactive represents a rich message with UI elements.',
|
|
3032
|
+
),
|
|
3033
|
+
location: zod
|
|
3034
|
+
.object({
|
|
3035
|
+
address: zod.string().optional(),
|
|
3036
|
+
latitude: zod.number().optional(),
|
|
3037
|
+
longitude: zod.number().optional(),
|
|
3038
|
+
name: zod.string().optional(),
|
|
3039
|
+
})
|
|
3040
|
+
.optional(),
|
|
3041
|
+
metadata: zod.looseObject({}).optional(),
|
|
3042
|
+
reactions: zod
|
|
3043
|
+
.array(
|
|
3044
|
+
zod
|
|
3045
|
+
.object({
|
|
3046
|
+
count: zod
|
|
3047
|
+
.int()
|
|
3048
|
+
.optional()
|
|
3049
|
+
.describe(
|
|
3050
|
+
'Number of members currently holding this reaction.',
|
|
3051
|
+
),
|
|
3052
|
+
emoji: zod
|
|
3053
|
+
.string()
|
|
3054
|
+
.optional()
|
|
3055
|
+
.describe('Unicode emoji this reaction aggregates.'),
|
|
3056
|
+
last_reacted_at: zod
|
|
3057
|
+
.string()
|
|
3058
|
+
.optional()
|
|
3059
|
+
.describe(
|
|
3060
|
+
'Unix time in milliseconds of the most recent reaction with this emoji.',
|
|
3061
|
+
),
|
|
3062
|
+
reacted_by_me: zod
|
|
3063
|
+
.boolean()
|
|
3064
|
+
.optional()
|
|
3065
|
+
.describe(
|
|
3066
|
+
'True when the requesting caller is one of the reactors.',
|
|
3067
|
+
),
|
|
3068
|
+
reactor_ids: zod
|
|
3069
|
+
.array(zod.string())
|
|
3070
|
+
.optional()
|
|
3071
|
+
.describe(
|
|
3072
|
+
'Capped sample of reactor contact ids (for UI); not necessarily all of them.',
|
|
3073
|
+
),
|
|
3074
|
+
})
|
|
3075
|
+
.describe(
|
|
3076
|
+
'MessageReaction is one emoji aggregate on a history message.',
|
|
3077
|
+
),
|
|
3078
|
+
)
|
|
3079
|
+
.optional(),
|
|
3080
|
+
reply_to: zod
|
|
3081
|
+
.object({
|
|
3082
|
+
attachment_address: zod.string().optional(),
|
|
3083
|
+
attachment_kind: zod.string().optional(),
|
|
3084
|
+
attachment_mime: zod.string().optional(),
|
|
3085
|
+
attachment_name: zod.string().optional(),
|
|
3086
|
+
body: zod.string().optional(),
|
|
3087
|
+
created_at: zod.string().optional(),
|
|
3088
|
+
is_deleted: zod.boolean().optional(),
|
|
3089
|
+
message_id: zod.string().optional(),
|
|
3090
|
+
sender: zod
|
|
3091
|
+
.object({
|
|
3092
|
+
contact: zod
|
|
3093
|
+
.object({
|
|
3094
|
+
app_id: zod
|
|
3095
|
+
.string()
|
|
3096
|
+
.optional()
|
|
3097
|
+
.describe(
|
|
3098
|
+
'Identifier of the specific integration app or bot.',
|
|
3099
|
+
),
|
|
3100
|
+
created_at: zod
|
|
3101
|
+
.string()
|
|
3102
|
+
.optional()
|
|
3103
|
+
.describe(
|
|
3104
|
+
'Record creation timestamp (Unix Epoch in milliseconds).',
|
|
3105
|
+
),
|
|
3106
|
+
is_bot: zod
|
|
3107
|
+
.boolean()
|
|
3108
|
+
.optional()
|
|
3109
|
+
.describe(
|
|
3110
|
+
'Represents if usere is real person or automatic script.',
|
|
3111
|
+
),
|
|
3112
|
+
iss: zod
|
|
3113
|
+
.string()
|
|
3114
|
+
.optional()
|
|
3115
|
+
.describe(
|
|
3116
|
+
'Provider-specific unique identifier (Issuer ID).',
|
|
3117
|
+
),
|
|
3118
|
+
metadata: zod
|
|
3119
|
+
.record(zod.string(), zod.string())
|
|
3120
|
+
.optional()
|
|
3121
|
+
.describe(
|
|
3122
|
+
'Additional dynamic attributes provided by the messenger.',
|
|
3123
|
+
),
|
|
3124
|
+
name: zod
|
|
3125
|
+
.string()
|
|
3126
|
+
.optional()
|
|
3127
|
+
.describe('Display name of the contact.'),
|
|
3128
|
+
sub: zod
|
|
3129
|
+
.string()
|
|
3130
|
+
.optional()
|
|
3131
|
+
.describe(
|
|
3132
|
+
'Associated internal system subject/identifier.',
|
|
3133
|
+
),
|
|
3134
|
+
type: zod
|
|
3135
|
+
.string()
|
|
3136
|
+
.optional()
|
|
3137
|
+
.describe(
|
|
3138
|
+
"Channel type (e.g., 'webchat', 'telegram').",
|
|
3139
|
+
),
|
|
3140
|
+
updated_at: zod
|
|
3141
|
+
.string()
|
|
3142
|
+
.optional()
|
|
3143
|
+
.describe(
|
|
3144
|
+
'Last record update timestamp (Unix Epoch in milliseconds).',
|
|
3145
|
+
),
|
|
3146
|
+
username: zod
|
|
3147
|
+
.string()
|
|
3148
|
+
.optional()
|
|
3149
|
+
.describe('Technical username or handle.'),
|
|
3150
|
+
vias: zod
|
|
3151
|
+
.array(
|
|
3152
|
+
zod.object({
|
|
3153
|
+
contact_id: zod.string().optional(),
|
|
3154
|
+
created_at: zod.string().optional(),
|
|
3155
|
+
disable: zod.boolean().optional(),
|
|
3156
|
+
disable_reason: zod.string().optional(),
|
|
3157
|
+
metadata: zod.looseObject({}).optional(),
|
|
3158
|
+
updated_at: zod.string().optional(),
|
|
3159
|
+
via: zod.string().optional(),
|
|
3160
|
+
}),
|
|
3161
|
+
)
|
|
3162
|
+
.optional(),
|
|
3163
|
+
})
|
|
3164
|
+
.optional()
|
|
3165
|
+
.describe(
|
|
3166
|
+
'Contact represents an external messaging identity.',
|
|
3167
|
+
),
|
|
3168
|
+
id: zod.string().optional(),
|
|
3169
|
+
permissions: zod
|
|
3170
|
+
.object({
|
|
3171
|
+
can_add_members: zod.boolean().optional(),
|
|
3172
|
+
can_change_members_permissions: zod
|
|
3173
|
+
.boolean()
|
|
3174
|
+
.optional(),
|
|
3175
|
+
can_change_thread_info: zod.boolean().optional(),
|
|
3176
|
+
can_delete_messages: zod.boolean().optional(),
|
|
3177
|
+
can_remove_members: zod.boolean().optional(),
|
|
3178
|
+
can_send_messages: zod.boolean().optional(),
|
|
3179
|
+
created_at: zod.string().optional(),
|
|
3180
|
+
id: zod.string().optional(),
|
|
3181
|
+
member_id: zod.string().optional(),
|
|
3182
|
+
updated_at: zod.string().optional(),
|
|
3183
|
+
})
|
|
3184
|
+
.optional(),
|
|
3185
|
+
role: zod
|
|
3186
|
+
.enum([
|
|
3187
|
+
'ROLE_UNSPECIFIED',
|
|
3188
|
+
'ROLE_MEMBER',
|
|
3189
|
+
'ROLE_ADMIN',
|
|
3190
|
+
'ROLE_OWNER',
|
|
3191
|
+
'ROLE_SUPERVISOR',
|
|
3192
|
+
])
|
|
3193
|
+
.default(
|
|
3194
|
+
updatesGetUpdatesResponseThreadsItemTopMessageReplyToSenderRoleDefault,
|
|
3195
|
+
),
|
|
3196
|
+
})
|
|
3197
|
+
.optional()
|
|
3198
|
+
.describe(
|
|
3199
|
+
'ThreadMember represents a thread participant\nwith optional type-specific settings.',
|
|
3200
|
+
),
|
|
3201
|
+
sender_id: zod.string().optional(),
|
|
3202
|
+
type: zod
|
|
3203
|
+
.string()
|
|
3204
|
+
.optional()
|
|
3205
|
+
.describe(
|
|
3206
|
+
'Kind of the quoted message: text, document, image, system, interactive,\nlocation or contact.',
|
|
3207
|
+
),
|
|
3208
|
+
})
|
|
3209
|
+
.optional(),
|
|
3210
|
+
sender: zod
|
|
3211
|
+
.object({
|
|
3212
|
+
contact: zod
|
|
3213
|
+
.object({
|
|
3214
|
+
app_id: zod
|
|
3215
|
+
.string()
|
|
3216
|
+
.optional()
|
|
3217
|
+
.describe(
|
|
3218
|
+
'Identifier of the specific integration app or bot.',
|
|
3219
|
+
),
|
|
3220
|
+
created_at: zod
|
|
3221
|
+
.string()
|
|
3222
|
+
.optional()
|
|
3223
|
+
.describe(
|
|
3224
|
+
'Record creation timestamp (Unix Epoch in milliseconds).',
|
|
3225
|
+
),
|
|
3226
|
+
is_bot: zod
|
|
3227
|
+
.boolean()
|
|
3228
|
+
.optional()
|
|
3229
|
+
.describe(
|
|
3230
|
+
'Represents if usere is real person or automatic script.',
|
|
3231
|
+
),
|
|
3232
|
+
iss: zod
|
|
3233
|
+
.string()
|
|
3234
|
+
.optional()
|
|
3235
|
+
.describe(
|
|
3236
|
+
'Provider-specific unique identifier (Issuer ID).',
|
|
3237
|
+
),
|
|
3238
|
+
metadata: zod
|
|
3239
|
+
.record(zod.string(), zod.string())
|
|
3240
|
+
.optional()
|
|
3241
|
+
.describe(
|
|
3242
|
+
'Additional dynamic attributes provided by the messenger.',
|
|
3243
|
+
),
|
|
3244
|
+
name: zod
|
|
3245
|
+
.string()
|
|
3246
|
+
.optional()
|
|
3247
|
+
.describe('Display name of the contact.'),
|
|
3248
|
+
sub: zod
|
|
3249
|
+
.string()
|
|
3250
|
+
.optional()
|
|
3251
|
+
.describe(
|
|
3252
|
+
'Associated internal system subject/identifier.',
|
|
3253
|
+
),
|
|
3254
|
+
type: zod
|
|
3255
|
+
.string()
|
|
3256
|
+
.optional()
|
|
3257
|
+
.describe("Channel type (e.g., 'webchat', 'telegram')."),
|
|
3258
|
+
updated_at: zod
|
|
3259
|
+
.string()
|
|
3260
|
+
.optional()
|
|
3261
|
+
.describe(
|
|
3262
|
+
'Last record update timestamp (Unix Epoch in milliseconds).',
|
|
3263
|
+
),
|
|
3264
|
+
username: zod
|
|
3265
|
+
.string()
|
|
3266
|
+
.optional()
|
|
3267
|
+
.describe('Technical username or handle.'),
|
|
3268
|
+
vias: zod
|
|
3269
|
+
.array(
|
|
3270
|
+
zod.object({
|
|
3271
|
+
contact_id: zod.string().optional(),
|
|
3272
|
+
created_at: zod.string().optional(),
|
|
3273
|
+
disable: zod.boolean().optional(),
|
|
3274
|
+
disable_reason: zod.string().optional(),
|
|
3275
|
+
metadata: zod.looseObject({}).optional(),
|
|
3276
|
+
updated_at: zod.string().optional(),
|
|
3277
|
+
via: zod.string().optional(),
|
|
3278
|
+
}),
|
|
3279
|
+
)
|
|
3280
|
+
.optional(),
|
|
3281
|
+
})
|
|
3282
|
+
.optional()
|
|
3283
|
+
.describe(
|
|
3284
|
+
'Contact represents an external messaging identity.',
|
|
3285
|
+
),
|
|
3286
|
+
id: zod.string().optional(),
|
|
3287
|
+
permissions: zod
|
|
3288
|
+
.object({
|
|
3289
|
+
can_add_members: zod.boolean().optional(),
|
|
3290
|
+
can_change_members_permissions: zod.boolean().optional(),
|
|
3291
|
+
can_change_thread_info: zod.boolean().optional(),
|
|
3292
|
+
can_delete_messages: zod.boolean().optional(),
|
|
3293
|
+
can_remove_members: zod.boolean().optional(),
|
|
3294
|
+
can_send_messages: zod.boolean().optional(),
|
|
3295
|
+
created_at: zod.string().optional(),
|
|
3296
|
+
id: zod.string().optional(),
|
|
3297
|
+
member_id: zod.string().optional(),
|
|
3298
|
+
updated_at: zod.string().optional(),
|
|
3299
|
+
})
|
|
3300
|
+
.optional(),
|
|
3301
|
+
role: zod
|
|
3302
|
+
.enum([
|
|
3303
|
+
'ROLE_UNSPECIFIED',
|
|
3304
|
+
'ROLE_MEMBER',
|
|
3305
|
+
'ROLE_ADMIN',
|
|
3306
|
+
'ROLE_OWNER',
|
|
3307
|
+
'ROLE_SUPERVISOR',
|
|
3308
|
+
])
|
|
3309
|
+
.default(
|
|
3310
|
+
updatesGetUpdatesResponseThreadsItemTopMessageSenderRoleDefault,
|
|
3311
|
+
),
|
|
3312
|
+
})
|
|
3313
|
+
.optional()
|
|
3314
|
+
.describe(
|
|
3315
|
+
'ThreadMember represents a thread participant\nwith optional type-specific settings.',
|
|
3316
|
+
),
|
|
3317
|
+
seq: zod.string().optional(),
|
|
3318
|
+
system: zod
|
|
3319
|
+
.object({
|
|
3320
|
+
message_id: zod
|
|
3321
|
+
.string()
|
|
3322
|
+
.optional()
|
|
3323
|
+
.describe(
|
|
3324
|
+
'ID of message for which system messages is binded.',
|
|
3325
|
+
),
|
|
3326
|
+
metadata: zod
|
|
3327
|
+
.looseObject({})
|
|
3328
|
+
.optional()
|
|
3329
|
+
.describe(
|
|
3330
|
+
'Represents additional metadata binded into system message.',
|
|
3331
|
+
),
|
|
3332
|
+
type: zod
|
|
3333
|
+
.string()
|
|
3334
|
+
.optional()
|
|
3335
|
+
.describe('Represents type of the message.'),
|
|
3336
|
+
})
|
|
3337
|
+
.optional()
|
|
3338
|
+
.describe(
|
|
3339
|
+
'System represents domain structure for system event messages.',
|
|
3340
|
+
),
|
|
3341
|
+
type: zod.int().optional(),
|
|
3342
|
+
})
|
|
3343
|
+
.optional()
|
|
3344
|
+
.describe('Newest message for the list preview; set with dialog.'),
|
|
3345
|
+
unread_count: zod.string().optional(),
|
|
3346
|
+
}),
|
|
3347
|
+
)
|
|
3348
|
+
.optional()
|
|
3349
|
+
.describe('Only threads that changed.'),
|
|
3350
|
+
});
|