@leemour/max-cli 0.12.0 → 0.14.0
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/README.md +92 -19
- package/dist/bot/auth.d.ts +23 -0
- package/dist/bot/auth.d.ts.map +1 -0
- package/dist/bot/auth.js +36 -0
- package/dist/bot/auth.js.map +1 -0
- package/dist/bot/client.d.ts +20 -0
- package/dist/bot/client.d.ts.map +1 -0
- package/dist/bot/client.js +91 -0
- package/dist/bot/client.js.map +1 -0
- package/dist/bot/generated/manifest.d.ts +3 -0
- package/dist/bot/generated/manifest.d.ts.map +1 -0
- package/dist/bot/generated/manifest.js +1232 -0
- package/dist/bot/generated/manifest.js.map +1 -0
- package/dist/bot/generated/schemas.d.ts +271 -0
- package/dist/bot/generated/schemas.d.ts.map +1 -0
- package/dist/bot/generated/schemas.js +869 -0
- package/dist/bot/generated/schemas.js.map +1 -0
- package/dist/bot/generated/types.d.ts +1088 -0
- package/dist/bot/generated/types.d.ts.map +1 -0
- package/dist/bot/generated/types.js +5 -0
- package/dist/bot/generated/types.js.map +1 -0
- package/dist/bot/input.d.ts +10 -0
- package/dist/bot/input.d.ts.map +1 -0
- package/dist/bot/input.js +88 -0
- package/dist/bot/input.js.map +1 -0
- package/dist/bot/map.d.ts +11 -0
- package/dist/bot/map.d.ts.map +1 -0
- package/dist/bot/map.js +76 -0
- package/dist/bot/map.js.map +1 -0
- package/dist/bot/permissions.d.ts +14 -0
- package/dist/bot/permissions.d.ts.map +1 -0
- package/dist/bot/permissions.js +53 -0
- package/dist/bot/permissions.js.map +1 -0
- package/dist/bot/registry.d.ts +27 -0
- package/dist/bot/registry.d.ts.map +1 -0
- package/dist/bot/registry.js +68 -0
- package/dist/bot/registry.js.map +1 -0
- package/dist/bot/russian-trusted-root.d.ts +8 -0
- package/dist/bot/russian-trusted-root.d.ts.map +1 -0
- package/dist/bot/russian-trusted-root.js +41 -0
- package/dist/bot/russian-trusted-root.js.map +1 -0
- package/dist/bot/transport.d.ts +41 -0
- package/dist/bot/transport.d.ts.map +1 -0
- package/dist/bot/transport.js +200 -0
- package/dist/bot/transport.js.map +1 -0
- package/dist/client.d.ts +32 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +174 -18
- package/dist/client.js.map +1 -1
- package/dist/commands/bot-context.d.ts +21 -0
- package/dist/commands/bot-context.d.ts.map +1 -0
- package/dist/commands/bot-context.js +59 -0
- package/dist/commands/bot-context.js.map +1 -0
- package/dist/commands/bot-reads.d.ts +7 -0
- package/dist/commands/bot-reads.d.ts.map +1 -0
- package/dist/commands/bot-reads.js +103 -0
- package/dist/commands/bot-reads.js.map +1 -0
- package/dist/commands/bot-sends.d.ts +12 -0
- package/dist/commands/bot-sends.d.ts.map +1 -0
- package/dist/commands/bot-sends.js +225 -0
- package/dist/commands/bot-sends.js.map +1 -0
- package/dist/commands/bot.d.ts +3 -0
- package/dist/commands/bot.d.ts.map +1 -0
- package/dist/commands/bot.js +145 -0
- package/dist/commands/bot.js.map +1 -0
- package/dist/commands/chats.d.ts.map +1 -1
- package/dist/commands/chats.js +65 -1
- package/dist/commands/chats.js.map +1 -1
- package/dist/commands/context.d.ts +10 -1
- package/dist/commands/context.d.ts.map +1 -1
- package/dist/commands/context.js.map +1 -1
- package/dist/commands/doctor.d.ts +6 -0
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +57 -7
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/mcp.d.ts +24 -0
- package/dist/commands/mcp.d.ts.map +1 -1
- package/dist/commands/mcp.js +80 -14
- package/dist/commands/mcp.js.map +1 -1
- package/dist/commands/models.d.ts.map +1 -1
- package/dist/commands/models.js +13 -2
- package/dist/commands/models.js.map +1 -1
- package/dist/commands/review.d.ts +8 -0
- package/dist/commands/review.d.ts.map +1 -0
- package/dist/commands/review.js +96 -0
- package/dist/commands/review.js.map +1 -0
- package/dist/commands/rules.d.ts +7 -0
- package/dist/commands/rules.d.ts.map +1 -0
- package/dist/commands/rules.js +69 -0
- package/dist/commands/rules.js.map +1 -0
- package/dist/diagnose.d.ts +19 -1
- package/dist/diagnose.d.ts.map +1 -1
- package/dist/diagnose.js +37 -1
- package/dist/diagnose.js.map +1 -1
- package/dist/domain/map.d.ts +6 -1
- package/dist/domain/map.d.ts.map +1 -1
- package/dist/domain/map.js +34 -1
- package/dist/domain/map.js.map +1 -1
- package/dist/domain/models.d.ts +79 -0
- package/dist/domain/models.d.ts.map +1 -1
- package/dist/domain/models.js.map +1 -1
- package/dist/generated/operations.generated.d.ts +3 -1
- package/dist/generated/operations.generated.d.ts.map +1 -1
- package/dist/install.d.ts +43 -0
- package/dist/install.d.ts.map +1 -0
- package/dist/install.js +142 -0
- package/dist/install.js.map +1 -0
- package/dist/mcp/prompts.d.ts.map +1 -1
- package/dist/mcp/prompts.js +28 -0
- package/dist/mcp/prompts.js.map +1 -1
- package/dist/mcp/tools.d.ts.map +1 -1
- package/dist/mcp/tools.js +39 -1
- package/dist/mcp/tools.js.map +1 -1
- package/dist/moderation/rules.d.ts +56 -0
- package/dist/moderation/rules.d.ts.map +1 -0
- package/dist/moderation/rules.js +138 -0
- package/dist/moderation/rules.js.map +1 -0
- package/dist/online.d.ts +23 -0
- package/dist/online.d.ts.map +1 -0
- package/dist/online.js +87 -0
- package/dist/online.js.map +1 -0
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js +20 -3
- package/dist/program.js.map +1 -1
- package/dist/protocol/connection.d.ts.map +1 -1
- package/dist/protocol/connection.js +12 -1
- package/dist/protocol/connection.js.map +1 -1
- package/dist/report.d.ts.map +1 -1
- package/dist/report.js +13 -2
- package/dist/report.js.map +1 -1
- package/dist/review.d.ts +41 -0
- package/dist/review.d.ts.map +1 -0
- package/dist/review.js +111 -0
- package/dist/review.js.map +1 -0
- package/dist/spec/operations/chats.d.ts +4 -1
- package/dist/spec/operations/chats.d.ts.map +1 -1
- package/dist/spec/operations/chats.js +10 -4
- package/dist/spec/operations/chats.js.map +1 -1
- package/dist/transcribe/index.d.ts +1 -0
- package/dist/transcribe/index.d.ts.map +1 -1
- package/dist/transcribe/index.js +8 -4
- package/dist/transcribe/index.js.map +1 -1
- package/dist/transcribe/speech.d.ts.map +1 -1
- package/dist/transcribe/speech.js +2 -0
- package/dist/transcribe/speech.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +14 -6
- package/skills/max-cli/SKILL.md +26 -1
|
@@ -0,0 +1,869 @@
|
|
|
1
|
+
// GENERATED. DO NOT EDIT.
|
|
2
|
+
// Source: spec/bot/schema.yaml
|
|
3
|
+
// Run: pnpm bot:generate
|
|
4
|
+
import { int64, integer, number, unique } from "@leemour/cli-core/codegen/runtime";
|
|
5
|
+
import * as v from "valibot";
|
|
6
|
+
export const Bigint = int64();
|
|
7
|
+
export const UserId = int64();
|
|
8
|
+
export const ChatId = int64();
|
|
9
|
+
export const MessageId = v.pipe(v.string(), v.minLength(1));
|
|
10
|
+
export const Url = v.string();
|
|
11
|
+
export const SubscriptionUrl = v.string();
|
|
12
|
+
export const User = v.looseObject({
|
|
13
|
+
user_id: v.lazy(() => UserId),
|
|
14
|
+
first_name: v.string(),
|
|
15
|
+
last_name: v.optional(v.nullable(v.string())),
|
|
16
|
+
username: v.optional(v.nullable(v.string())),
|
|
17
|
+
is_bot: v.boolean(),
|
|
18
|
+
last_activity_time: v.optional(v.nullable(int64())),
|
|
19
|
+
});
|
|
20
|
+
export const UserWithPhoto = v.looseObject({
|
|
21
|
+
user_id: v.lazy(() => UserId),
|
|
22
|
+
first_name: v.string(),
|
|
23
|
+
last_name: v.optional(v.nullable(v.string())),
|
|
24
|
+
username: v.optional(v.nullable(v.string())),
|
|
25
|
+
is_bot: v.boolean(),
|
|
26
|
+
last_activity_time: v.optional(v.nullable(int64())),
|
|
27
|
+
description: v.optional(v.nullable(v.pipe(v.string(), v.maxLength(16000)))),
|
|
28
|
+
avatar_url: v.optional(v.nullable(v.string())),
|
|
29
|
+
full_avatar_url: v.optional(v.nullable(v.string())),
|
|
30
|
+
});
|
|
31
|
+
export const BotInfo = v.looseObject({
|
|
32
|
+
user_id: v.lazy(() => UserId),
|
|
33
|
+
first_name: v.string(),
|
|
34
|
+
last_name: v.optional(v.nullable(v.string())),
|
|
35
|
+
username: v.optional(v.nullable(v.string())),
|
|
36
|
+
is_bot: v.boolean(),
|
|
37
|
+
last_activity_time: v.optional(v.nullable(int64())),
|
|
38
|
+
description: v.optional(v.nullable(v.pipe(v.string(), v.maxLength(16000)))),
|
|
39
|
+
avatar_url: v.optional(v.nullable(v.string())),
|
|
40
|
+
full_avatar_url: v.optional(v.nullable(v.string())),
|
|
41
|
+
commands: v.optional(v.nullable(v.pipe(v.array(v.lazy(() => BotCommand)), v.maxLength(32)))),
|
|
42
|
+
});
|
|
43
|
+
export const BotCommandsInfo = v.looseObject({
|
|
44
|
+
commands: v.optional(v.nullable(v.pipe(v.array(v.lazy(() => BotCommand)), v.maxLength(32)))),
|
|
45
|
+
});
|
|
46
|
+
export const BotCommandsPatch = v.looseObject({
|
|
47
|
+
commands: v.optional(v.pipe(v.array(v.lazy(() => BotCommand)), v.maxLength(32))),
|
|
48
|
+
});
|
|
49
|
+
export const BotCommand = v.looseObject({
|
|
50
|
+
name: v.pipe(v.string(), v.minLength(1), v.maxLength(64)),
|
|
51
|
+
description: v.optional(v.nullable(v.pipe(v.string(), v.minLength(1), v.maxLength(128)))),
|
|
52
|
+
});
|
|
53
|
+
export const Chat = v.looseObject({
|
|
54
|
+
chat_id: v.lazy(() => ChatId),
|
|
55
|
+
type: v.lazy(() => ChatType),
|
|
56
|
+
status: v.lazy(() => ChatStatus),
|
|
57
|
+
title: v.optional(v.nullable(v.string())),
|
|
58
|
+
icon: v.optional(v.nullable(v.lazy(() => Image))),
|
|
59
|
+
last_event_time: int64(),
|
|
60
|
+
participants_count: integer(),
|
|
61
|
+
owner_id: v.optional(v.nullable(v.lazy(() => UserId))),
|
|
62
|
+
participants: v.optional(v.nullable(v.record(v.string(), int64()))),
|
|
63
|
+
is_public: v.boolean(),
|
|
64
|
+
link: v.optional(v.nullable(v.string())),
|
|
65
|
+
description: v.optional(v.nullable(v.string())),
|
|
66
|
+
dialog_with_user: v.optional(v.nullable(v.lazy(() => UserWithPhoto))),
|
|
67
|
+
messages_count: v.optional(v.nullable(integer())),
|
|
68
|
+
pinned_message: v.optional(v.nullable(v.lazy(() => Message))),
|
|
69
|
+
});
|
|
70
|
+
export const ChatType = v.picklist(["dialog", "chat", "channel"]);
|
|
71
|
+
export const ChatStatus = v.picklist([
|
|
72
|
+
"active",
|
|
73
|
+
"removed",
|
|
74
|
+
"left",
|
|
75
|
+
"closed",
|
|
76
|
+
"suspended",
|
|
77
|
+
]);
|
|
78
|
+
export const ChatList = v.looseObject({
|
|
79
|
+
chats: v.array(v.lazy(() => Chat)),
|
|
80
|
+
marker: v.optional(v.nullable(int64())),
|
|
81
|
+
});
|
|
82
|
+
export const ChatPatch = v.looseObject({
|
|
83
|
+
icon: v.optional(v.nullable(v.lazy(() => PhotoAttachmentRequestPayload))),
|
|
84
|
+
title: v.optional(v.nullable(v.pipe(v.string(), v.minLength(1), v.maxLength(200)))),
|
|
85
|
+
description: v.optional(v.nullable(v.pipe(v.string(), v.maxLength(16000)))),
|
|
86
|
+
pin: v.optional(v.nullable(v.string())),
|
|
87
|
+
notify: v.optional(v.nullable(v.boolean())),
|
|
88
|
+
});
|
|
89
|
+
export const ChatMember = v.looseObject({
|
|
90
|
+
user_id: v.lazy(() => UserId),
|
|
91
|
+
first_name: v.string(),
|
|
92
|
+
last_name: v.optional(v.nullable(v.string())),
|
|
93
|
+
username: v.optional(v.nullable(v.string())),
|
|
94
|
+
is_bot: v.boolean(),
|
|
95
|
+
last_activity_time: v.optional(v.nullable(int64())),
|
|
96
|
+
description: v.optional(v.nullable(v.pipe(v.string(), v.maxLength(16000)))),
|
|
97
|
+
avatar_url: v.optional(v.nullable(v.string())),
|
|
98
|
+
full_avatar_url: v.optional(v.nullable(v.string())),
|
|
99
|
+
last_access_time: int64(),
|
|
100
|
+
is_owner: v.boolean(),
|
|
101
|
+
is_admin: v.boolean(),
|
|
102
|
+
join_time: int64(),
|
|
103
|
+
permissions: v.optional(v.nullable(v.pipe(v.array(v.lazy(() => ChatAdminPermission)), v.check((items) => unique(items), "items must be unique")))),
|
|
104
|
+
alias: v.optional(v.nullable(v.string())),
|
|
105
|
+
});
|
|
106
|
+
export const ChatAdminPermission = v.picklist([
|
|
107
|
+
"read_all_messages",
|
|
108
|
+
"add_remove_members",
|
|
109
|
+
"add_admins",
|
|
110
|
+
"change_chat_info",
|
|
111
|
+
"pin_message",
|
|
112
|
+
"edit_link",
|
|
113
|
+
"write",
|
|
114
|
+
"edit",
|
|
115
|
+
"delete",
|
|
116
|
+
"can_call",
|
|
117
|
+
"view_stats",
|
|
118
|
+
]);
|
|
119
|
+
export const ChatMembersList = v.looseObject({
|
|
120
|
+
members: v.array(v.lazy(() => ChatMember)),
|
|
121
|
+
marker: v.optional(v.nullable(int64())),
|
|
122
|
+
});
|
|
123
|
+
export const Image = v.looseObject({
|
|
124
|
+
url: v.string(),
|
|
125
|
+
});
|
|
126
|
+
export const Subscription = v.looseObject({
|
|
127
|
+
url: v.string(),
|
|
128
|
+
time: int64(),
|
|
129
|
+
update_types: v.optional(v.nullable(v.pipe(v.array(v.pipe(v.string(), v.minLength(1))), v.check((items) => unique(items), "items must be unique")))),
|
|
130
|
+
});
|
|
131
|
+
export const Recipient = v.looseObject({
|
|
132
|
+
chat_id: v.optional(v.nullable(v.lazy(() => ChatId))),
|
|
133
|
+
chat_type: v.lazy(() => ChatType),
|
|
134
|
+
user_id: v.optional(v.nullable(v.lazy(() => UserId))),
|
|
135
|
+
post_id: v.optional(v.nullable(v.lazy(() => MessageId))),
|
|
136
|
+
});
|
|
137
|
+
export const Message = v.looseObject({
|
|
138
|
+
sender: v.optional(v.nullable(v.lazy(() => User))),
|
|
139
|
+
recipient: v.lazy(() => Recipient),
|
|
140
|
+
timestamp: int64(),
|
|
141
|
+
link: v.optional(v.nullable(v.lazy(() => LinkedMessage))),
|
|
142
|
+
body: v.lazy(() => MessageBody),
|
|
143
|
+
stat: v.optional(v.nullable(v.lazy(() => MessageStat))),
|
|
144
|
+
url: v.optional(v.nullable(v.string())),
|
|
145
|
+
});
|
|
146
|
+
export const CommentMessage = v.looseObject({
|
|
147
|
+
sender: v.optional(v.nullable(v.lazy(() => User))),
|
|
148
|
+
recipient: v.lazy(() => Recipient),
|
|
149
|
+
timestamp: int64(),
|
|
150
|
+
link: v.optional(v.nullable(v.lazy(() => CommentLinkedMessage))),
|
|
151
|
+
body: v.lazy(() => CommentMessageBody),
|
|
152
|
+
stat: v.optional(v.nullable(v.lazy(() => MessageStat))),
|
|
153
|
+
});
|
|
154
|
+
export const MessageStat = v.looseObject({
|
|
155
|
+
views: integer(),
|
|
156
|
+
});
|
|
157
|
+
export const MessageBody = v.looseObject({
|
|
158
|
+
mid: v.lazy(() => MessageId),
|
|
159
|
+
seq: int64(),
|
|
160
|
+
text: v.optional(v.nullable(v.string())),
|
|
161
|
+
attachments: v.optional(v.nullable(v.array(v.lazy(() => Attachment)))),
|
|
162
|
+
markup: v.optional(v.nullable(v.array(v.lazy(() => MarkupElement)))),
|
|
163
|
+
});
|
|
164
|
+
export const CommentMessageBody = v.looseObject({
|
|
165
|
+
mid: v.lazy(() => MessageId),
|
|
166
|
+
seq: int64(),
|
|
167
|
+
text: v.optional(v.nullable(v.string())),
|
|
168
|
+
markup: v.optional(v.nullable(v.array(v.lazy(() => MarkupElement)))),
|
|
169
|
+
});
|
|
170
|
+
export const MessageList = v.looseObject({
|
|
171
|
+
messages: v.array(v.lazy(() => Message)),
|
|
172
|
+
});
|
|
173
|
+
export const CommentMessageList = v.looseObject({
|
|
174
|
+
messages: v.array(v.lazy(() => CommentMessage)),
|
|
175
|
+
});
|
|
176
|
+
export const TextFormat = v.picklist(["markdown", "html"]);
|
|
177
|
+
export const NewMessageBody = v.looseObject({
|
|
178
|
+
text: v.optional(v.nullable(v.pipe(v.string(), v.maxLength(4000)))),
|
|
179
|
+
attachments: v.optional(v.nullable(v.array(v.lazy(() => AttachmentRequest)))),
|
|
180
|
+
link: v.optional(v.nullable(v.lazy(() => NewMessageLink))),
|
|
181
|
+
notify: v.optional(v.boolean()),
|
|
182
|
+
format: v.optional(v.nullable(v.lazy(() => TextFormat))),
|
|
183
|
+
});
|
|
184
|
+
export const NewCommentBody = v.looseObject({
|
|
185
|
+
text: v.optional(v.nullable(v.pipe(v.string(), v.maxLength(4000)))),
|
|
186
|
+
link: v.optional(v.nullable(v.lazy(() => NewMessageLink))),
|
|
187
|
+
format: v.optional(v.nullable(v.lazy(() => TextFormat))),
|
|
188
|
+
});
|
|
189
|
+
export const NewMessageLink = v.looseObject({
|
|
190
|
+
type: v.lazy(() => MessageLinkType),
|
|
191
|
+
mid: v.lazy(() => MessageId),
|
|
192
|
+
});
|
|
193
|
+
export const LinkedMessage = v.looseObject({
|
|
194
|
+
type: v.lazy(() => MessageLinkType),
|
|
195
|
+
sender: v.optional(v.nullable(v.lazy(() => User))),
|
|
196
|
+
chat_id: v.optional(v.lazy(() => ChatId)),
|
|
197
|
+
message: v.lazy(() => MessageBody),
|
|
198
|
+
});
|
|
199
|
+
export const CommentLinkedMessage = v.looseObject({
|
|
200
|
+
type: v.lazy(() => MessageLinkType),
|
|
201
|
+
sender: v.optional(v.nullable(v.lazy(() => User))),
|
|
202
|
+
chat_id: v.optional(v.lazy(() => ChatId)),
|
|
203
|
+
message: v.lazy(() => CommentMessageBody),
|
|
204
|
+
});
|
|
205
|
+
export const SendMessageResult = v.looseObject({
|
|
206
|
+
message: v.lazy(() => Message),
|
|
207
|
+
});
|
|
208
|
+
export const SendCommentResult = v.looseObject({
|
|
209
|
+
message: v.lazy(() => CommentMessage),
|
|
210
|
+
});
|
|
211
|
+
export const Attachment = v.union([
|
|
212
|
+
v.lazy(() => PhotoAttachment),
|
|
213
|
+
v.lazy(() => VideoAttachment),
|
|
214
|
+
v.lazy(() => AudioAttachment),
|
|
215
|
+
v.lazy(() => FileAttachment),
|
|
216
|
+
v.lazy(() => StickerAttachment),
|
|
217
|
+
v.lazy(() => ContactAttachment),
|
|
218
|
+
v.lazy(() => InlineKeyboardAttachment),
|
|
219
|
+
v.lazy(() => ShareAttachment),
|
|
220
|
+
v.lazy(() => LocationAttachment),
|
|
221
|
+
]);
|
|
222
|
+
export const PhotoAttachment = v.looseObject({
|
|
223
|
+
type: v.literal("image"),
|
|
224
|
+
payload: v.lazy(() => PhotoAttachmentPayload),
|
|
225
|
+
});
|
|
226
|
+
export const PhotoAttachmentPayload = v.looseObject({
|
|
227
|
+
photo_id: int64(),
|
|
228
|
+
token: v.string(),
|
|
229
|
+
url: v.string(),
|
|
230
|
+
});
|
|
231
|
+
export const VideoAttachment = v.looseObject({
|
|
232
|
+
type: v.literal("video"),
|
|
233
|
+
payload: v.lazy(() => MediaAttachmentPayload),
|
|
234
|
+
thumbnail: v.optional(v.nullable(v.lazy(() => VideoThumbnail))),
|
|
235
|
+
width: v.optional(v.nullable(integer())),
|
|
236
|
+
height: v.optional(v.nullable(integer())),
|
|
237
|
+
duration: v.optional(v.nullable(integer())),
|
|
238
|
+
});
|
|
239
|
+
export const VideoThumbnail = v.looseObject({
|
|
240
|
+
url: v.string(),
|
|
241
|
+
});
|
|
242
|
+
export const VideoUrls = v.looseObject({
|
|
243
|
+
mp4_1080: v.optional(v.nullable(v.string())),
|
|
244
|
+
mp4_720: v.optional(v.nullable(v.string())),
|
|
245
|
+
mp4_480: v.optional(v.nullable(v.string())),
|
|
246
|
+
mp4_360: v.optional(v.nullable(v.string())),
|
|
247
|
+
mp4_240: v.optional(v.nullable(v.string())),
|
|
248
|
+
mp4_144: v.optional(v.nullable(v.string())),
|
|
249
|
+
hls: v.optional(v.nullable(v.string())),
|
|
250
|
+
});
|
|
251
|
+
export const VideoAttachmentDetails = v.looseObject({
|
|
252
|
+
token: v.string(),
|
|
253
|
+
urls: v.optional(v.nullable(v.lazy(() => VideoUrls))),
|
|
254
|
+
thumbnail: v.optional(v.nullable(v.lazy(() => PhotoAttachmentPayload))),
|
|
255
|
+
width: integer(),
|
|
256
|
+
height: integer(),
|
|
257
|
+
duration: integer(),
|
|
258
|
+
});
|
|
259
|
+
export const AudioAttachment = v.looseObject({
|
|
260
|
+
type: v.literal("audio"),
|
|
261
|
+
payload: v.lazy(() => MediaAttachmentPayload),
|
|
262
|
+
transcription: v.optional(v.nullable(v.string())),
|
|
263
|
+
});
|
|
264
|
+
export const FileAttachment = v.looseObject({
|
|
265
|
+
type: v.literal("file"),
|
|
266
|
+
payload: v.lazy(() => FileAttachmentPayload),
|
|
267
|
+
filename: v.string(),
|
|
268
|
+
size: int64(),
|
|
269
|
+
});
|
|
270
|
+
export const AttachmentPayload = v.looseObject({
|
|
271
|
+
url: v.string(),
|
|
272
|
+
});
|
|
273
|
+
export const MediaAttachmentPayload = v.looseObject({
|
|
274
|
+
url: v.string(),
|
|
275
|
+
token: v.string(),
|
|
276
|
+
});
|
|
277
|
+
export const FileAttachmentPayload = v.looseObject({
|
|
278
|
+
url: v.string(),
|
|
279
|
+
token: v.string(),
|
|
280
|
+
});
|
|
281
|
+
export const ContactAttachment = v.looseObject({
|
|
282
|
+
type: v.literal("contact"),
|
|
283
|
+
payload: v.lazy(() => ContactAttachmentPayload),
|
|
284
|
+
});
|
|
285
|
+
export const ContactAttachmentPayload = v.looseObject({
|
|
286
|
+
vcf_info: v.optional(v.nullable(v.string())),
|
|
287
|
+
hash: v.optional(v.nullable(v.string())),
|
|
288
|
+
max_info: v.optional(v.nullable(v.lazy(() => User))),
|
|
289
|
+
});
|
|
290
|
+
export const StickerAttachmentPayload = v.looseObject({
|
|
291
|
+
url: v.string(),
|
|
292
|
+
code: v.string(),
|
|
293
|
+
});
|
|
294
|
+
export const StickerAttachment = v.looseObject({
|
|
295
|
+
type: v.literal("sticker"),
|
|
296
|
+
payload: v.lazy(() => StickerAttachmentPayload),
|
|
297
|
+
width: integer(),
|
|
298
|
+
height: integer(),
|
|
299
|
+
});
|
|
300
|
+
export const ShareAttachmentPayload = v.looseObject({
|
|
301
|
+
url: v.optional(v.nullable(v.pipe(v.string(), v.minLength(1)))),
|
|
302
|
+
token: v.optional(v.nullable(v.string())),
|
|
303
|
+
});
|
|
304
|
+
export const ShareAttachment = v.looseObject({
|
|
305
|
+
type: v.literal("share"),
|
|
306
|
+
payload: v.lazy(() => ShareAttachmentPayload),
|
|
307
|
+
title: v.optional(v.nullable(v.string())),
|
|
308
|
+
description: v.optional(v.nullable(v.string())),
|
|
309
|
+
image_url: v.optional(v.nullable(v.string())),
|
|
310
|
+
});
|
|
311
|
+
export const LocationAttachment = v.looseObject({
|
|
312
|
+
type: v.literal("location"),
|
|
313
|
+
latitude: number(),
|
|
314
|
+
longitude: number(),
|
|
315
|
+
});
|
|
316
|
+
export const InlineKeyboardAttachment = v.looseObject({
|
|
317
|
+
type: v.literal("inline_keyboard"),
|
|
318
|
+
payload: v.lazy(() => Keyboard),
|
|
319
|
+
});
|
|
320
|
+
export const Keyboard = v.looseObject({
|
|
321
|
+
buttons: v.array(v.array(v.lazy(() => Button))),
|
|
322
|
+
});
|
|
323
|
+
export const Button = v.union([
|
|
324
|
+
v.lazy(() => CallbackButton),
|
|
325
|
+
v.lazy(() => LinkButton),
|
|
326
|
+
v.lazy(() => RequestGeoLocationButton),
|
|
327
|
+
v.lazy(() => RequestContactButton),
|
|
328
|
+
v.lazy(() => MessageButton),
|
|
329
|
+
v.lazy(() => OpenAppButton),
|
|
330
|
+
v.lazy(() => ClipboardButton),
|
|
331
|
+
]);
|
|
332
|
+
export const CallbackButton = v.looseObject({
|
|
333
|
+
type: v.literal("callback"),
|
|
334
|
+
text: v.pipe(v.string(), v.minLength(1), v.maxLength(128)),
|
|
335
|
+
payload: v.pipe(v.string(), v.maxLength(1024)),
|
|
336
|
+
});
|
|
337
|
+
export const LinkButton = v.looseObject({
|
|
338
|
+
type: v.literal("link"),
|
|
339
|
+
text: v.pipe(v.string(), v.minLength(1), v.maxLength(128)),
|
|
340
|
+
url: v.pipe(v.string(), v.maxLength(2048)),
|
|
341
|
+
});
|
|
342
|
+
export const MessageButton = v.looseObject({
|
|
343
|
+
type: v.literal("message"),
|
|
344
|
+
text: v.pipe(v.string(), v.minLength(1), v.maxLength(128)),
|
|
345
|
+
});
|
|
346
|
+
export const RequestContactButton = v.looseObject({
|
|
347
|
+
type: v.literal("request_contact"),
|
|
348
|
+
text: v.pipe(v.string(), v.minLength(1), v.maxLength(128)),
|
|
349
|
+
});
|
|
350
|
+
export const RequestGeoLocationButton = v.looseObject({
|
|
351
|
+
type: v.literal("request_geo_location"),
|
|
352
|
+
text: v.pipe(v.string(), v.minLength(1), v.maxLength(128)),
|
|
353
|
+
quick: v.optional(v.boolean()),
|
|
354
|
+
});
|
|
355
|
+
export const OpenAppButton = v.looseObject({
|
|
356
|
+
type: v.literal("open_app"),
|
|
357
|
+
text: v.pipe(v.string(), v.minLength(1), v.maxLength(128)),
|
|
358
|
+
payload: v.optional(v.nullable(v.pipe(v.string(), v.maxLength(512), v.regex(/^[\w-]*$/)))),
|
|
359
|
+
web_app: v.string(),
|
|
360
|
+
contact_id: v.optional(v.nullable(v.lazy(() => UserId))),
|
|
361
|
+
});
|
|
362
|
+
export const ClipboardButton = v.looseObject({
|
|
363
|
+
type: v.literal("clipboard"),
|
|
364
|
+
text: v.pipe(v.string(), v.minLength(1), v.maxLength(128)),
|
|
365
|
+
payload: v.pipe(v.string(), v.maxLength(1024)),
|
|
366
|
+
});
|
|
367
|
+
export const MessageLinkType = v.picklist(["forward", "reply"]);
|
|
368
|
+
export const AttachmentRequest = v.union([
|
|
369
|
+
v.lazy(() => PhotoAttachmentRequest),
|
|
370
|
+
v.lazy(() => VideoAttachmentRequest),
|
|
371
|
+
v.lazy(() => AudioAttachmentRequest),
|
|
372
|
+
v.lazy(() => FileAttachmentRequest),
|
|
373
|
+
v.lazy(() => StickerAttachmentRequest),
|
|
374
|
+
v.lazy(() => ContactAttachmentRequest),
|
|
375
|
+
v.lazy(() => InlineKeyboardAttachmentRequest),
|
|
376
|
+
v.lazy(() => LocationAttachmentRequest),
|
|
377
|
+
v.lazy(() => ShareAttachmentRequest),
|
|
378
|
+
]);
|
|
379
|
+
export const PhotoAttachmentRequest = v.looseObject({
|
|
380
|
+
type: v.literal("image"),
|
|
381
|
+
payload: v.lazy(() => PhotoAttachmentRequestPayload),
|
|
382
|
+
});
|
|
383
|
+
export const PhotoAttachmentRequestPayload = v.looseObject({
|
|
384
|
+
url: v.optional(v.nullable(v.pipe(v.string(), v.minLength(1)))),
|
|
385
|
+
token: v.optional(v.nullable(v.string())),
|
|
386
|
+
photos: v.optional(v.nullable(v.record(v.string(), v.lazy(() => PhotoToken)))),
|
|
387
|
+
});
|
|
388
|
+
export const PhotoToken = v.looseObject({
|
|
389
|
+
token: v.string(),
|
|
390
|
+
});
|
|
391
|
+
export const VideoAttachmentRequest = v.looseObject({
|
|
392
|
+
type: v.literal("video"),
|
|
393
|
+
payload: v.lazy(() => UploadedInfo),
|
|
394
|
+
});
|
|
395
|
+
export const AudioAttachmentRequest = v.looseObject({
|
|
396
|
+
type: v.literal("audio"),
|
|
397
|
+
payload: v.lazy(() => UploadedInfo),
|
|
398
|
+
});
|
|
399
|
+
export const UploadedInfo = v.looseObject({
|
|
400
|
+
token: v.optional(v.string()),
|
|
401
|
+
});
|
|
402
|
+
export const FileAttachmentRequest = v.looseObject({
|
|
403
|
+
type: v.literal("file"),
|
|
404
|
+
payload: v.lazy(() => UploadedInfo),
|
|
405
|
+
});
|
|
406
|
+
export const UploadType = v.picklist(["image", "video", "audio", "file"]);
|
|
407
|
+
export const ContactAttachmentRequest = v.looseObject({
|
|
408
|
+
type: v.literal("contact"),
|
|
409
|
+
payload: v.lazy(() => ContactAttachmentRequestPayload),
|
|
410
|
+
});
|
|
411
|
+
export const ContactAttachmentRequestPayload = v.looseObject({
|
|
412
|
+
name: v.optional(v.nullable(v.string())),
|
|
413
|
+
contact_id: v.optional(v.nullable(v.lazy(() => UserId))),
|
|
414
|
+
vcf_info: v.optional(v.nullable(v.string())),
|
|
415
|
+
vcf_phone: v.optional(v.nullable(v.string())),
|
|
416
|
+
});
|
|
417
|
+
export const StickerAttachmentRequest = v.looseObject({
|
|
418
|
+
type: v.literal("sticker"),
|
|
419
|
+
payload: v.lazy(() => StickerAttachmentRequestPayload),
|
|
420
|
+
});
|
|
421
|
+
export const StickerAttachmentRequestPayload = v.looseObject({
|
|
422
|
+
code: v.string(),
|
|
423
|
+
});
|
|
424
|
+
export const InlineKeyboardAttachmentRequest = v.looseObject({
|
|
425
|
+
type: v.literal("inline_keyboard"),
|
|
426
|
+
payload: v.lazy(() => InlineKeyboardAttachmentRequestPayload),
|
|
427
|
+
});
|
|
428
|
+
export const InlineKeyboardAttachmentRequestPayload = v.looseObject({
|
|
429
|
+
buttons: v.pipe(v.array(v.array(v.lazy(() => Button))), v.minLength(1)),
|
|
430
|
+
});
|
|
431
|
+
export const LocationAttachmentRequest = v.looseObject({
|
|
432
|
+
type: v.literal("location"),
|
|
433
|
+
latitude: number(),
|
|
434
|
+
longitude: number(),
|
|
435
|
+
});
|
|
436
|
+
export const ShareAttachmentRequest = v.looseObject({
|
|
437
|
+
type: v.literal("share"),
|
|
438
|
+
payload: v.lazy(() => ShareAttachmentPayload),
|
|
439
|
+
});
|
|
440
|
+
export const MarkupElement = v.union([
|
|
441
|
+
v.lazy(() => StrongMarkup),
|
|
442
|
+
v.lazy(() => EmphasizedMarkup),
|
|
443
|
+
v.lazy(() => MonospacedMarkup),
|
|
444
|
+
v.lazy(() => LinkMarkup),
|
|
445
|
+
v.lazy(() => StrikethroughMarkup),
|
|
446
|
+
v.lazy(() => UnderlineMarkup),
|
|
447
|
+
v.lazy(() => UserMentionMarkup),
|
|
448
|
+
v.lazy(() => HeadingMarkup),
|
|
449
|
+
v.lazy(() => HighlightedMarkup),
|
|
450
|
+
v.lazy(() => QuoteMarkup),
|
|
451
|
+
]);
|
|
452
|
+
export const StrongMarkup = v.looseObject({
|
|
453
|
+
type: v.literal("strong"),
|
|
454
|
+
from: integer(),
|
|
455
|
+
length: integer(),
|
|
456
|
+
});
|
|
457
|
+
export const EmphasizedMarkup = v.looseObject({
|
|
458
|
+
type: v.literal("emphasized"),
|
|
459
|
+
from: integer(),
|
|
460
|
+
length: integer(),
|
|
461
|
+
});
|
|
462
|
+
export const MonospacedMarkup = v.looseObject({
|
|
463
|
+
type: v.literal("monospaced"),
|
|
464
|
+
from: integer(),
|
|
465
|
+
length: integer(),
|
|
466
|
+
});
|
|
467
|
+
export const LinkMarkup = v.looseObject({
|
|
468
|
+
type: v.literal("link"),
|
|
469
|
+
from: integer(),
|
|
470
|
+
length: integer(),
|
|
471
|
+
url: v.pipe(v.string(), v.minLength(1), v.maxLength(2048)),
|
|
472
|
+
});
|
|
473
|
+
export const StrikethroughMarkup = v.looseObject({
|
|
474
|
+
type: v.literal("strikethrough"),
|
|
475
|
+
from: integer(),
|
|
476
|
+
length: integer(),
|
|
477
|
+
});
|
|
478
|
+
export const UnderlineMarkup = v.looseObject({
|
|
479
|
+
type: v.literal("underline"),
|
|
480
|
+
from: integer(),
|
|
481
|
+
length: integer(),
|
|
482
|
+
});
|
|
483
|
+
export const HeadingMarkup = v.looseObject({
|
|
484
|
+
type: v.literal("heading"),
|
|
485
|
+
from: integer(),
|
|
486
|
+
length: integer(),
|
|
487
|
+
});
|
|
488
|
+
export const UserMentionMarkup = v.looseObject({
|
|
489
|
+
type: v.literal("user_mention"),
|
|
490
|
+
from: integer(),
|
|
491
|
+
length: integer(),
|
|
492
|
+
user_link: v.optional(v.nullable(v.string())),
|
|
493
|
+
user_id: v.optional(v.nullable(v.lazy(() => UserId))),
|
|
494
|
+
});
|
|
495
|
+
export const HighlightedMarkup = v.looseObject({
|
|
496
|
+
type: v.literal("highlighted"),
|
|
497
|
+
from: integer(),
|
|
498
|
+
length: integer(),
|
|
499
|
+
});
|
|
500
|
+
export const QuoteMarkup = v.looseObject({
|
|
501
|
+
type: v.literal("quote"),
|
|
502
|
+
from: integer(),
|
|
503
|
+
length: integer(),
|
|
504
|
+
});
|
|
505
|
+
export const SubscriptionRequestBody = v.looseObject({
|
|
506
|
+
url: v.lazy(() => SubscriptionUrl),
|
|
507
|
+
secret: v.optional(v.pipe(v.string(), v.minLength(5), v.maxLength(256), v.regex(/^[\w-]+$/))),
|
|
508
|
+
update_types: v.optional(v.pipe(v.array(v.string()), v.check((items) => unique(items), "items must be unique"))),
|
|
509
|
+
});
|
|
510
|
+
export const GetSubscriptionsResult = v.looseObject({
|
|
511
|
+
subscriptions: v.array(v.lazy(() => Subscription)),
|
|
512
|
+
});
|
|
513
|
+
export const SimpleQueryResult = v.looseObject({
|
|
514
|
+
success: v.boolean(),
|
|
515
|
+
message: v.optional(v.string()),
|
|
516
|
+
});
|
|
517
|
+
export const PinMessageBody = v.looseObject({
|
|
518
|
+
message_id: v.lazy(() => MessageId),
|
|
519
|
+
notify: v.optional(v.nullable(v.boolean())),
|
|
520
|
+
});
|
|
521
|
+
export const GetPinnedMessageResult = v.looseObject({
|
|
522
|
+
message: v.optional(v.nullable(v.lazy(() => Message))),
|
|
523
|
+
});
|
|
524
|
+
export const Callback = v.looseObject({
|
|
525
|
+
timestamp: int64(),
|
|
526
|
+
callback_id: v.string(),
|
|
527
|
+
payload: v.optional(v.string()),
|
|
528
|
+
user: v.lazy(() => User),
|
|
529
|
+
});
|
|
530
|
+
export const CallbackAnswer = v.looseObject({
|
|
531
|
+
message: v.optional(v.nullable(v.lazy(() => NewMessageBody))),
|
|
532
|
+
notification: v.optional(v.nullable(v.string())),
|
|
533
|
+
});
|
|
534
|
+
export const ApiError = v.looseObject({
|
|
535
|
+
error: v.optional(v.string()),
|
|
536
|
+
code: v.string(),
|
|
537
|
+
message: v.string(),
|
|
538
|
+
});
|
|
539
|
+
export const UploadEndpoint = v.looseObject({
|
|
540
|
+
url: v.string(),
|
|
541
|
+
token: v.optional(v.nullable(v.string())),
|
|
542
|
+
});
|
|
543
|
+
export const UserIdsList = v.looseObject({
|
|
544
|
+
user_ids: v.pipe(v.array(v.lazy(() => UserId)), v.maxLength(100)),
|
|
545
|
+
});
|
|
546
|
+
export const ActionRequestBody = v.looseObject({
|
|
547
|
+
action: v.lazy(() => SenderAction),
|
|
548
|
+
});
|
|
549
|
+
export const ChatAdminsList = v.looseObject({
|
|
550
|
+
admins: v.array(v.lazy(() => ChatAdmin)),
|
|
551
|
+
});
|
|
552
|
+
export const ChatAdmin = v.looseObject({
|
|
553
|
+
user_id: v.lazy(() => UserId),
|
|
554
|
+
permissions: v.pipe(v.array(v.lazy(() => ChatAdminPermission)), v.check((items) => unique(items), "items must be unique")),
|
|
555
|
+
alias: v.optional(v.nullable(v.string())),
|
|
556
|
+
});
|
|
557
|
+
export const SenderAction = v.picklist([
|
|
558
|
+
"typing_on",
|
|
559
|
+
"sending_photo",
|
|
560
|
+
"sending_video",
|
|
561
|
+
"sending_audio",
|
|
562
|
+
"sending_file",
|
|
563
|
+
"mark_seen",
|
|
564
|
+
]);
|
|
565
|
+
export const UpdateList = v.looseObject({
|
|
566
|
+
updates: v.array(v.lazy(() => Update)),
|
|
567
|
+
marker: v.optional(v.nullable(int64())),
|
|
568
|
+
});
|
|
569
|
+
export const Update = v.union([
|
|
570
|
+
v.lazy(() => MessageCreatedUpdate),
|
|
571
|
+
v.lazy(() => MessageCallbackUpdate),
|
|
572
|
+
v.lazy(() => MessageEditedUpdate),
|
|
573
|
+
v.lazy(() => MessageRemovedUpdate),
|
|
574
|
+
v.lazy(() => CommentCreatedUpdate),
|
|
575
|
+
v.lazy(() => CommentEditedUpdate),
|
|
576
|
+
v.lazy(() => CommentRemovedUpdate),
|
|
577
|
+
v.lazy(() => BotAddedToChatUpdate),
|
|
578
|
+
v.lazy(() => BotRemovedFromChatUpdate),
|
|
579
|
+
v.lazy(() => UserAddedToChatUpdate),
|
|
580
|
+
v.lazy(() => UserRemovedFromChatUpdate),
|
|
581
|
+
v.lazy(() => BotStartedUpdate),
|
|
582
|
+
v.lazy(() => BotStoppedUpdate),
|
|
583
|
+
v.lazy(() => DialogClearedUpdate),
|
|
584
|
+
v.lazy(() => DialogRemovedUpdate),
|
|
585
|
+
v.lazy(() => DialogMutedUpdate),
|
|
586
|
+
v.lazy(() => DialogUnmutedUpdate),
|
|
587
|
+
v.lazy(() => ChatTitleChangedUpdate),
|
|
588
|
+
v.lazy(() => BotAdminPermissionsChangedUpdate),
|
|
589
|
+
]);
|
|
590
|
+
export const MessageCallbackUpdate = v.looseObject({
|
|
591
|
+
update_type: v.literal("message_callback"),
|
|
592
|
+
timestamp: int64(),
|
|
593
|
+
callback: v.lazy(() => Callback),
|
|
594
|
+
message: v.optional(v.nullable(v.lazy(() => Message))),
|
|
595
|
+
user_locale: v.optional(v.nullable(v.string())),
|
|
596
|
+
});
|
|
597
|
+
export const MessageCreatedUpdate = v.looseObject({
|
|
598
|
+
update_type: v.literal("message_created"),
|
|
599
|
+
timestamp: int64(),
|
|
600
|
+
message: v.lazy(() => Message),
|
|
601
|
+
user_locale: v.optional(v.nullable(v.string())),
|
|
602
|
+
});
|
|
603
|
+
export const MessageRemovedUpdate = v.looseObject({
|
|
604
|
+
update_type: v.literal("message_removed"),
|
|
605
|
+
timestamp: int64(),
|
|
606
|
+
message_id: v.lazy(() => MessageId),
|
|
607
|
+
chat_id: v.lazy(() => ChatId),
|
|
608
|
+
user_id: v.lazy(() => UserId),
|
|
609
|
+
});
|
|
610
|
+
export const MessageEditedUpdate = v.looseObject({
|
|
611
|
+
update_type: v.literal("message_edited"),
|
|
612
|
+
timestamp: int64(),
|
|
613
|
+
message: v.lazy(() => Message),
|
|
614
|
+
});
|
|
615
|
+
export const CommentCreatedUpdate = v.looseObject({
|
|
616
|
+
update_type: v.literal("comment_created"),
|
|
617
|
+
timestamp: int64(),
|
|
618
|
+
message: v.lazy(() => Message),
|
|
619
|
+
});
|
|
620
|
+
export const CommentRemovedUpdate = v.looseObject({
|
|
621
|
+
update_type: v.literal("comment_removed"),
|
|
622
|
+
timestamp: int64(),
|
|
623
|
+
message_id: v.lazy(() => MessageId),
|
|
624
|
+
chat_id: v.lazy(() => ChatId),
|
|
625
|
+
user_id: v.lazy(() => UserId),
|
|
626
|
+
post_id: v.lazy(() => MessageId),
|
|
627
|
+
});
|
|
628
|
+
export const CommentEditedUpdate = v.looseObject({
|
|
629
|
+
update_type: v.literal("comment_edited"),
|
|
630
|
+
timestamp: int64(),
|
|
631
|
+
message: v.lazy(() => Message),
|
|
632
|
+
});
|
|
633
|
+
export const BotAddedToChatUpdate = v.looseObject({
|
|
634
|
+
update_type: v.literal("bot_added"),
|
|
635
|
+
timestamp: int64(),
|
|
636
|
+
chat_id: v.lazy(() => ChatId),
|
|
637
|
+
user: v.lazy(() => User),
|
|
638
|
+
is_channel: v.boolean(),
|
|
639
|
+
});
|
|
640
|
+
export const BotRemovedFromChatUpdate = v.looseObject({
|
|
641
|
+
update_type: v.literal("bot_removed"),
|
|
642
|
+
timestamp: int64(),
|
|
643
|
+
chat_id: v.lazy(() => ChatId),
|
|
644
|
+
user: v.lazy(() => User),
|
|
645
|
+
is_channel: v.boolean(),
|
|
646
|
+
});
|
|
647
|
+
export const UserAddedToChatUpdate = v.looseObject({
|
|
648
|
+
update_type: v.literal("user_added"),
|
|
649
|
+
timestamp: int64(),
|
|
650
|
+
chat_id: v.lazy(() => ChatId),
|
|
651
|
+
user: v.lazy(() => User),
|
|
652
|
+
inviter_id: v.optional(v.nullable(v.lazy(() => UserId))),
|
|
653
|
+
is_channel: v.boolean(),
|
|
654
|
+
});
|
|
655
|
+
export const UserRemovedFromChatUpdate = v.looseObject({
|
|
656
|
+
update_type: v.literal("user_removed"),
|
|
657
|
+
timestamp: int64(),
|
|
658
|
+
chat_id: v.lazy(() => ChatId),
|
|
659
|
+
user: v.lazy(() => User),
|
|
660
|
+
admin_id: v.optional(v.lazy(() => UserId)),
|
|
661
|
+
is_channel: v.boolean(),
|
|
662
|
+
});
|
|
663
|
+
export const BotStartedUpdate = v.looseObject({
|
|
664
|
+
update_type: v.literal("bot_started"),
|
|
665
|
+
timestamp: int64(),
|
|
666
|
+
chat_id: v.lazy(() => ChatId),
|
|
667
|
+
user: v.lazy(() => User),
|
|
668
|
+
payload: v.optional(v.nullable(v.pipe(v.string(), v.maxLength(512)))),
|
|
669
|
+
user_locale: v.optional(v.string()),
|
|
670
|
+
});
|
|
671
|
+
export const BotStoppedUpdate = v.looseObject({
|
|
672
|
+
update_type: v.literal("bot_stopped"),
|
|
673
|
+
timestamp: int64(),
|
|
674
|
+
chat_id: v.lazy(() => ChatId),
|
|
675
|
+
user: v.lazy(() => User),
|
|
676
|
+
user_locale: v.optional(v.string()),
|
|
677
|
+
});
|
|
678
|
+
export const DialogClearedUpdate = v.looseObject({
|
|
679
|
+
update_type: v.literal("dialog_cleared"),
|
|
680
|
+
timestamp: int64(),
|
|
681
|
+
chat_id: v.lazy(() => ChatId),
|
|
682
|
+
user: v.lazy(() => User),
|
|
683
|
+
user_locale: v.optional(v.string()),
|
|
684
|
+
});
|
|
685
|
+
export const DialogRemovedUpdate = v.looseObject({
|
|
686
|
+
update_type: v.literal("dialog_removed"),
|
|
687
|
+
timestamp: int64(),
|
|
688
|
+
chat_id: v.lazy(() => ChatId),
|
|
689
|
+
user: v.lazy(() => User),
|
|
690
|
+
user_locale: v.optional(v.string()),
|
|
691
|
+
});
|
|
692
|
+
export const DialogMutedUpdate = v.looseObject({
|
|
693
|
+
update_type: v.literal("dialog_muted"),
|
|
694
|
+
timestamp: int64(),
|
|
695
|
+
chat_id: v.lazy(() => ChatId),
|
|
696
|
+
user: v.lazy(() => User),
|
|
697
|
+
muted_until: int64(),
|
|
698
|
+
user_locale: v.optional(v.string()),
|
|
699
|
+
});
|
|
700
|
+
export const DialogUnmutedUpdate = v.looseObject({
|
|
701
|
+
update_type: v.literal("dialog_unmuted"),
|
|
702
|
+
timestamp: int64(),
|
|
703
|
+
chat_id: v.lazy(() => ChatId),
|
|
704
|
+
user: v.lazy(() => User),
|
|
705
|
+
user_locale: v.optional(v.string()),
|
|
706
|
+
});
|
|
707
|
+
export const ChatTitleChangedUpdate = v.looseObject({
|
|
708
|
+
update_type: v.literal("chat_title_changed"),
|
|
709
|
+
timestamp: int64(),
|
|
710
|
+
chat_id: v.lazy(() => ChatId),
|
|
711
|
+
user: v.lazy(() => User),
|
|
712
|
+
title: v.string(),
|
|
713
|
+
});
|
|
714
|
+
export const BotAdminPermissionsChangedUpdate = v.looseObject({
|
|
715
|
+
update_type: v.literal("bot_admin_permissions_changed"),
|
|
716
|
+
timestamp: int64(),
|
|
717
|
+
chat_id: v.lazy(() => ChatId),
|
|
718
|
+
user_id: v.lazy(() => UserId),
|
|
719
|
+
bot_id: v.lazy(() => UserId),
|
|
720
|
+
is_channel: v.boolean(),
|
|
721
|
+
is_admin: v.boolean(),
|
|
722
|
+
permissions: v.optional(v.nullable(v.pipe(v.array(v.lazy(() => ChatAdminPermission)), v.check((items) => unique(items), "items must be unique")))),
|
|
723
|
+
});
|
|
724
|
+
export const ModifyMembersResult = v.looseObject({
|
|
725
|
+
success: v.boolean(),
|
|
726
|
+
message: v.optional(v.string()),
|
|
727
|
+
failed_user_ids: v.optional(v.nullable(v.pipe(v.array(v.lazy(() => UserId)), v.check((items) => unique(items), "items must be unique")))),
|
|
728
|
+
failed_user_details: v.optional(v.nullable(v.array(v.lazy(() => FailedUserDetails)))),
|
|
729
|
+
});
|
|
730
|
+
export const FailedUserDetails = v.looseObject({
|
|
731
|
+
error_code: v.string(),
|
|
732
|
+
user_ids: v.array(v.lazy(() => UserId)),
|
|
733
|
+
});
|
|
734
|
+
export const schemas = {
|
|
735
|
+
Bigint,
|
|
736
|
+
UserId,
|
|
737
|
+
ChatId,
|
|
738
|
+
MessageId,
|
|
739
|
+
Url,
|
|
740
|
+
SubscriptionUrl,
|
|
741
|
+
User,
|
|
742
|
+
UserWithPhoto,
|
|
743
|
+
BotInfo,
|
|
744
|
+
BotCommandsInfo,
|
|
745
|
+
BotCommandsPatch,
|
|
746
|
+
BotCommand,
|
|
747
|
+
Chat,
|
|
748
|
+
ChatType,
|
|
749
|
+
ChatStatus,
|
|
750
|
+
ChatList,
|
|
751
|
+
ChatPatch,
|
|
752
|
+
ChatMember,
|
|
753
|
+
ChatAdminPermission,
|
|
754
|
+
ChatMembersList,
|
|
755
|
+
Image,
|
|
756
|
+
Subscription,
|
|
757
|
+
Recipient,
|
|
758
|
+
Message,
|
|
759
|
+
CommentMessage,
|
|
760
|
+
MessageStat,
|
|
761
|
+
MessageBody,
|
|
762
|
+
CommentMessageBody,
|
|
763
|
+
MessageList,
|
|
764
|
+
CommentMessageList,
|
|
765
|
+
TextFormat,
|
|
766
|
+
NewMessageBody,
|
|
767
|
+
NewCommentBody,
|
|
768
|
+
NewMessageLink,
|
|
769
|
+
LinkedMessage,
|
|
770
|
+
CommentLinkedMessage,
|
|
771
|
+
SendMessageResult,
|
|
772
|
+
SendCommentResult,
|
|
773
|
+
Attachment,
|
|
774
|
+
PhotoAttachment,
|
|
775
|
+
PhotoAttachmentPayload,
|
|
776
|
+
VideoAttachment,
|
|
777
|
+
VideoThumbnail,
|
|
778
|
+
VideoUrls,
|
|
779
|
+
VideoAttachmentDetails,
|
|
780
|
+
AudioAttachment,
|
|
781
|
+
FileAttachment,
|
|
782
|
+
AttachmentPayload,
|
|
783
|
+
MediaAttachmentPayload,
|
|
784
|
+
FileAttachmentPayload,
|
|
785
|
+
ContactAttachment,
|
|
786
|
+
ContactAttachmentPayload,
|
|
787
|
+
StickerAttachmentPayload,
|
|
788
|
+
StickerAttachment,
|
|
789
|
+
ShareAttachmentPayload,
|
|
790
|
+
ShareAttachment,
|
|
791
|
+
LocationAttachment,
|
|
792
|
+
InlineKeyboardAttachment,
|
|
793
|
+
Keyboard,
|
|
794
|
+
Button,
|
|
795
|
+
CallbackButton,
|
|
796
|
+
LinkButton,
|
|
797
|
+
MessageButton,
|
|
798
|
+
RequestContactButton,
|
|
799
|
+
RequestGeoLocationButton,
|
|
800
|
+
OpenAppButton,
|
|
801
|
+
ClipboardButton,
|
|
802
|
+
MessageLinkType,
|
|
803
|
+
AttachmentRequest,
|
|
804
|
+
PhotoAttachmentRequest,
|
|
805
|
+
PhotoAttachmentRequestPayload,
|
|
806
|
+
PhotoToken,
|
|
807
|
+
VideoAttachmentRequest,
|
|
808
|
+
AudioAttachmentRequest,
|
|
809
|
+
UploadedInfo,
|
|
810
|
+
FileAttachmentRequest,
|
|
811
|
+
UploadType,
|
|
812
|
+
ContactAttachmentRequest,
|
|
813
|
+
ContactAttachmentRequestPayload,
|
|
814
|
+
StickerAttachmentRequest,
|
|
815
|
+
StickerAttachmentRequestPayload,
|
|
816
|
+
InlineKeyboardAttachmentRequest,
|
|
817
|
+
InlineKeyboardAttachmentRequestPayload,
|
|
818
|
+
LocationAttachmentRequest,
|
|
819
|
+
ShareAttachmentRequest,
|
|
820
|
+
MarkupElement,
|
|
821
|
+
StrongMarkup,
|
|
822
|
+
EmphasizedMarkup,
|
|
823
|
+
MonospacedMarkup,
|
|
824
|
+
LinkMarkup,
|
|
825
|
+
StrikethroughMarkup,
|
|
826
|
+
UnderlineMarkup,
|
|
827
|
+
HeadingMarkup,
|
|
828
|
+
UserMentionMarkup,
|
|
829
|
+
HighlightedMarkup,
|
|
830
|
+
QuoteMarkup,
|
|
831
|
+
SubscriptionRequestBody,
|
|
832
|
+
GetSubscriptionsResult,
|
|
833
|
+
SimpleQueryResult,
|
|
834
|
+
PinMessageBody,
|
|
835
|
+
GetPinnedMessageResult,
|
|
836
|
+
Callback,
|
|
837
|
+
CallbackAnswer,
|
|
838
|
+
ApiError,
|
|
839
|
+
UploadEndpoint,
|
|
840
|
+
UserIdsList,
|
|
841
|
+
ActionRequestBody,
|
|
842
|
+
ChatAdminsList,
|
|
843
|
+
ChatAdmin,
|
|
844
|
+
SenderAction,
|
|
845
|
+
UpdateList,
|
|
846
|
+
Update,
|
|
847
|
+
MessageCallbackUpdate,
|
|
848
|
+
MessageCreatedUpdate,
|
|
849
|
+
MessageRemovedUpdate,
|
|
850
|
+
MessageEditedUpdate,
|
|
851
|
+
CommentCreatedUpdate,
|
|
852
|
+
CommentRemovedUpdate,
|
|
853
|
+
CommentEditedUpdate,
|
|
854
|
+
BotAddedToChatUpdate,
|
|
855
|
+
BotRemovedFromChatUpdate,
|
|
856
|
+
UserAddedToChatUpdate,
|
|
857
|
+
UserRemovedFromChatUpdate,
|
|
858
|
+
BotStartedUpdate,
|
|
859
|
+
BotStoppedUpdate,
|
|
860
|
+
DialogClearedUpdate,
|
|
861
|
+
DialogRemovedUpdate,
|
|
862
|
+
DialogMutedUpdate,
|
|
863
|
+
DialogUnmutedUpdate,
|
|
864
|
+
ChatTitleChangedUpdate,
|
|
865
|
+
BotAdminPermissionsChangedUpdate,
|
|
866
|
+
ModifyMembersResult,
|
|
867
|
+
FailedUserDetails,
|
|
868
|
+
};
|
|
869
|
+
//# sourceMappingURL=schemas.js.map
|