@wirecat/cli-core 0.399.0 → 0.401.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.
Files changed (259) hide show
  1. package/CHANGELOG.md +111 -0
  2. package/README.md +1 -1
  3. package/dist/analysis/consents.d.ts +11 -6
  4. package/dist/analysis/consents.js +5 -2
  5. package/dist/cli/bot/mcp.js +2 -1
  6. package/dist/cli/bot/store.js +1 -1
  7. package/dist/cli/config-command.js +20 -1
  8. package/dist/cli/context.d.ts +2 -0
  9. package/dist/cli/context.js +1 -1
  10. package/dist/cli/effects.d.ts +4 -1
  11. package/dist/cli/effects.js +10 -2
  12. package/dist/cli/index.d.ts +3 -2
  13. package/dist/cli/index.js +3 -2
  14. package/dist/cli/json-fields.js +12 -1
  15. package/dist/cli/meeting-evidence-answer.d.ts +46 -0
  16. package/dist/cli/meeting-evidence-answer.js +22 -0
  17. package/dist/cli/meeting-preparation-answer.js +1 -13
  18. package/dist/cli/messenger/account-command.js +15 -6
  19. package/dist/cli/messenger/account-profile-query.d.ts +2 -0
  20. package/dist/cli/messenger/account-profile-query.js +13 -0
  21. package/dist/cli/messenger/account-sessions-command.js +1 -2
  22. package/dist/cli/messenger/admin-commands.js +12 -12
  23. package/dist/cli/messenger/admin-contacts-command.js +6 -3
  24. package/dist/cli/messenger/admin-folders-command.js +5 -5
  25. package/dist/cli/messenger/admin-moderation-command.js +4 -4
  26. package/dist/cli/messenger/admin-statistics-command.js +6 -14
  27. package/dist/cli/messenger/analysis-consents-query.d.ts +5 -0
  28. package/dist/cli/messenger/analysis-consents-query.js +20 -0
  29. package/dist/cli/messenger/archive-commands.js +3 -3
  30. package/dist/cli/messenger/attachments-command.js +3 -0
  31. package/dist/cli/messenger/backfill-command.js +5 -4
  32. package/dist/cli/messenger/chat-queries.d.ts +1 -0
  33. package/dist/cli/messenger/chat-queries.js +12 -2
  34. package/dist/cli/messenger/chats-command.js +2 -2
  35. package/dist/cli/messenger/chats-documents-command.js +7 -5
  36. package/dist/cli/messenger/chats-members-command.js +7 -3
  37. package/dist/cli/messenger/chats-read-command.js +1 -1
  38. package/dist/cli/messenger/chats-tracking-command.js +14 -6
  39. package/dist/cli/messenger/contacts-command.js +9 -5
  40. package/dist/cli/messenger/conversations-command.js +20 -16
  41. package/dist/cli/messenger/doctor-command.js +4 -1
  42. package/dist/cli/messenger/document-links-query.d.ts +2 -0
  43. package/dist/cli/messenger/document-links-query.js +9 -0
  44. package/dist/cli/messenger/download-command.js +1 -0
  45. package/dist/cli/messenger/flood-command.d.ts +2 -2
  46. package/dist/cli/messenger/flood-command.js +3 -3
  47. package/dist/cli/messenger/gaps-command.js +2 -2
  48. package/dist/cli/messenger/guard-commands.js +35 -13
  49. package/dist/cli/messenger/images-command.js +1 -0
  50. package/dist/cli/messenger/media-archive-command.js +2 -0
  51. package/dist/cli/messenger/media-archive-move-command.js +1 -0
  52. package/dist/cli/messenger/media-archive-timer-command.js +1 -1
  53. package/dist/cli/messenger/mentions-command.js +15 -2
  54. package/dist/cli/messenger/message-writes.d.ts +192 -2
  55. package/dist/cli/messenger/message-writes.js +6 -2
  56. package/dist/cli/messenger/messages-command.js +2 -0
  57. package/dist/cli/messenger/messages-delete-command.js +1 -0
  58. package/dist/cli/messenger/messages-edit-command.js +1 -0
  59. package/dist/cli/messenger/messages-evidence-command.js +3 -1
  60. package/dist/cli/messenger/messages-forward-command.js +1 -0
  61. package/dist/cli/messenger/messages-pin-command.js +3 -0
  62. package/dist/cli/messenger/messages-send-command.js +10 -6
  63. package/dist/cli/messenger/metadata-command.js +6 -1
  64. package/dist/cli/messenger/models-command.js +10 -5
  65. package/dist/cli/messenger/polls-command.js +4 -0
  66. package/dist/cli/messenger/private-people-command.js +3 -3
  67. package/dist/cli/messenger/rankings-command.js +6 -11
  68. package/dist/cli/messenger/reactions-command.js +2 -0
  69. package/dist/cli/messenger/recipients-query.d.ts +5 -0
  70. package/dist/cli/messenger/recipients-query.js +18 -0
  71. package/dist/cli/messenger/records-command.js +13 -8
  72. package/dist/cli/messenger/review.js +1 -1
  73. package/dist/cli/messenger/schedule-command.js +2 -2
  74. package/dist/cli/messenger/search-answers.js +2 -0
  75. package/dist/cli/messenger/search-command.js +3 -1
  76. package/dist/cli/messenger/searches-command.js +5 -1
  77. package/dist/cli/messenger/sends-query.d.ts +5 -0
  78. package/dist/cli/messenger/sends-query.js +33 -0
  79. package/dist/cli/messenger/serve-command.js +1 -0
  80. package/dist/cli/messenger/server-command.js +0 -3
  81. package/dist/cli/messenger/statistics-query.d.ts +14 -0
  82. package/dist/cli/messenger/statistics-query.js +143 -0
  83. package/dist/cli/messenger/stats-command.js +5 -5
  84. package/dist/cli/messenger/store-maintenance-command.js +10 -10
  85. package/dist/cli/messenger/stored.js +4 -1
  86. package/dist/cli/messenger/tags-command.js +7 -1
  87. package/dist/cli/messenger/tasks-command.js +57 -14
  88. package/dist/cli/messenger/transcribe-command.js +1 -0
  89. package/dist/cli/messenger/watch-answers.d.ts +6 -0
  90. package/dist/cli/messenger/watch-answers.js +69 -0
  91. package/dist/cli/messenger/watch-command.d.ts +1 -1
  92. package/dist/cli/messenger/watch-command.js +56 -7
  93. package/dist/cli/program.js +5 -1
  94. package/dist/cli/runs/command.js +25 -38
  95. package/dist/cli/runs/query.d.ts +5 -0
  96. package/dist/cli/runs/query.js +32 -0
  97. package/dist/cli/runs/search-command.d.ts +4 -0
  98. package/dist/cli/runs/search-command.js +27 -0
  99. package/dist/cli/runs/search-query.d.ts +4 -0
  100. package/dist/cli/runs/search-query.js +50 -0
  101. package/dist/cli/runs/search.d.ts +2 -1
  102. package/dist/cli/runs/search.js +6 -6
  103. package/dist/documents/index.d.ts +1 -0
  104. package/dist/documents/index.js +1 -0
  105. package/dist/domain/attachments.js +9 -1
  106. package/dist/domain/rankings-options.js +3 -3
  107. package/dist/entities/account-change.d.ts +89 -0
  108. package/dist/entities/account-change.js +20 -0
  109. package/dist/entities/account-profile.d.ts +7 -0
  110. package/dist/entities/account-profile.js +8 -0
  111. package/dist/entities/analysis-consent.d.ts +9 -0
  112. package/dist/entities/analysis-consent.js +4 -0
  113. package/dist/entities/attachment-results.d.ts +96 -0
  114. package/dist/entities/attachment-results.js +31 -0
  115. package/dist/entities/batch-result.d.ts +27 -0
  116. package/dist/entities/batch-result.js +18 -0
  117. package/dist/entities/chat-admin.d.ts +234 -0
  118. package/dist/entities/chat-admin.js +84 -0
  119. package/dist/entities/chat-change.d.ts +25 -0
  120. package/dist/entities/chat-change.js +11 -0
  121. package/dist/entities/chat-metadata.d.ts +34 -0
  122. package/dist/entities/chat-metadata.js +15 -0
  123. package/dist/entities/chat-moderation.d.ts +44 -0
  124. package/dist/entities/chat-moderation.js +37 -0
  125. package/dist/entities/chat-tracking.d.ts +26 -0
  126. package/dist/entities/chat-tracking.js +23 -0
  127. package/dist/entities/contact-activity.d.ts +52 -0
  128. package/dist/entities/contact-activity.js +42 -0
  129. package/dist/entities/contact-context.d.ts +1568 -0
  130. package/dist/entities/contact-context.js +191 -0
  131. package/dist/entities/contact-write.d.ts +22 -0
  132. package/dist/entities/contact-write.js +6 -0
  133. package/dist/entities/conversation-preparation.d.ts +63 -0
  134. package/dist/entities/conversation-preparation.js +23 -0
  135. package/dist/entities/conversation-results.d.ts +567 -0
  136. package/dist/entities/conversation-results.js +94 -0
  137. package/dist/entities/document-link.d.ts +13 -0
  138. package/dist/entities/document-link.js +11 -0
  139. package/dist/entities/extraction-report.d.ts +95 -0
  140. package/dist/entities/extraction-report.js +34 -0
  141. package/dist/entities/hit.d.ts +4 -0
  142. package/dist/entities/hit.js +4 -0
  143. package/dist/entities/image-embedding.d.ts +9 -0
  144. package/dist/entities/image-embedding.js +10 -0
  145. package/dist/entities/index.d.ts +8284 -1921
  146. package/dist/entities/index.js +178 -3
  147. package/dist/entities/listener.d.ts +2150 -0
  148. package/dist/entities/listener.js +46 -0
  149. package/dist/entities/media-archive.d.ts +43 -0
  150. package/dist/entities/media-archive.js +32 -0
  151. package/dist/entities/meeting-evidence.d.ts +86 -0
  152. package/dist/entities/meeting-evidence.js +25 -0
  153. package/dist/entities/meeting-preparation-parts.d.ts +14 -0
  154. package/dist/entities/meeting-preparation-parts.js +15 -13
  155. package/dist/entities/meeting-task-proposal.d.ts +14 -0
  156. package/dist/entities/meeting-task-proposal.js +19 -0
  157. package/dist/entities/meeting.d.ts +1 -1
  158. package/dist/entities/meeting.js +1 -1
  159. package/dist/entities/mention.d.ts +63 -0
  160. package/dist/entities/mention.js +44 -0
  161. package/dist/entities/message-change.d.ts +19 -0
  162. package/dist/entities/message-change.js +6 -0
  163. package/dist/entities/message-context.d.ts +617 -0
  164. package/dist/entities/message-context.js +20 -0
  165. package/dist/entities/message-read.d.ts +73 -0
  166. package/dist/entities/message-read.js +58 -0
  167. package/dist/entities/message-transfer.d.ts +379 -0
  168. package/dist/entities/message-transfer.js +83 -0
  169. package/dist/entities/message-write.d.ts +378 -0
  170. package/dist/entities/message-write.js +10 -0
  171. package/dist/entities/model-key.d.ts +14 -0
  172. package/dist/entities/model-key.js +10 -0
  173. package/dist/entities/poll.d.ts +40 -0
  174. package/dist/entities/poll.js +16 -0
  175. package/dist/entities/private-contact.d.ts +10 -0
  176. package/dist/entities/private-contact.js +4 -0
  177. package/dist/entities/reaction-change.d.ts +7 -0
  178. package/dist/entities/reaction-change.js +8 -0
  179. package/dist/entities/recipient.d.ts +29 -0
  180. package/dist/entities/recipient.js +11 -0
  181. package/dist/entities/recorded-run.d.ts +103 -0
  182. package/dist/entities/recorded-run.js +44 -0
  183. package/dist/entities/saved-search.d.ts +4 -0
  184. package/dist/entities/saved-search.js +2 -0
  185. package/dist/entities/send-attempt.d.ts +31 -0
  186. package/dist/entities/send-attempt.js +29 -0
  187. package/dist/entities/store-maintenance.d.ts +319 -0
  188. package/dist/entities/store-maintenance.js +145 -0
  189. package/dist/entities/store-records.d.ts +442 -0
  190. package/dist/entities/store-records.js +99 -0
  191. package/dist/entities/tag-change.d.ts +74 -0
  192. package/dist/entities/tag-change.js +31 -0
  193. package/dist/entities/task-pair.d.ts +31 -0
  194. package/dist/entities/task-pair.js +23 -0
  195. package/dist/entities/task-results.d.ts +524 -0
  196. package/dist/entities/task-results.js +142 -0
  197. package/dist/errors/reasons.js +3 -0
  198. package/dist/mcp/agent.d.ts +3 -1
  199. package/dist/mcp/agent.js +17 -10
  200. package/dist/mcp/bot/server.d.ts +2 -0
  201. package/dist/mcp/bot/server.js +1 -0
  202. package/dist/mcp/server.js +3 -1
  203. package/dist/mcp/tools/attachments.js +1 -0
  204. package/dist/meetings/cli/index.js +4 -2
  205. package/dist/meetings/cli/passage.js +1 -0
  206. package/dist/meetings/index.d.ts +2 -1
  207. package/dist/meetings/index.js +1 -0
  208. package/dist/meetings/links.d.ts +16 -0
  209. package/dist/meetings/read-answers.d.ts +185 -0
  210. package/dist/meetings/read-answers.js +213 -0
  211. package/dist/ports/messenger.d.ts +10 -1
  212. package/dist/runs/run.d.ts +10 -2
  213. package/dist/runs/run.js +11 -3
  214. package/dist/sends/guard.d.ts +1 -1
  215. package/dist/sends/guard.js +9 -5
  216. package/dist/sends/journal.d.ts +9 -2
  217. package/dist/sends/journal.js +9 -2
  218. package/dist/sends/permissions.d.ts +5 -1
  219. package/dist/sends/permissions.js +42 -2
  220. package/dist/sends/recipients.d.ts +8 -0
  221. package/dist/sends/recipients.js +9 -0
  222. package/dist/sends/upload.d.ts +4 -4
  223. package/dist/sends/upload.js +24 -20
  224. package/dist/services/admin-statistics.js +3 -3
  225. package/dist/services/chat-documents.d.ts +1 -0
  226. package/dist/services/chat-documents.js +9 -3
  227. package/dist/services/chats.d.ts +1 -1
  228. package/dist/services/chats.js +5 -2
  229. package/dist/services/documents/mirrors.d.ts +98 -0
  230. package/dist/services/documents/mirrors.js +144 -0
  231. package/dist/services/meeting-links.d.ts +2 -17
  232. package/dist/services/messages.js +1 -0
  233. package/dist/services/search-all-meetings.js +21 -8
  234. package/dist/services/task-rules.d.ts +1 -1
  235. package/dist/services/tasks.d.ts +2 -2
  236. package/dist/services/tasks.js +1 -1
  237. package/dist/store/exports.d.ts +1 -1
  238. package/dist/store/exports.js +1 -1
  239. package/dist/store/messages.d.ts +3 -1
  240. package/dist/store/messages.js +2 -2
  241. package/dist/store/roster.d.ts +4 -1
  242. package/dist/store/roster.js +2 -2
  243. package/dist/store/sqlite/chats.d.ts +12 -0
  244. package/dist/store/sqlite/chats.js +1 -0
  245. package/dist/store/sqlite/document-links.d.ts +1 -1
  246. package/dist/store/sqlite/document-links.js +5 -5
  247. package/dist/store/sqlite/drizzle/bun.js +3 -3
  248. package/dist/store/sqlite/drizzle/bun.js.map +1 -1
  249. package/dist/store/sqlite/drizzle/core.js +2 -2
  250. package/dist/store/sqlite/drizzle/core.js.map +1 -1
  251. package/dist/store/sqlite/drizzle/node.js +3 -3
  252. package/dist/store/sqlite/drizzle/node.js.map +1 -1
  253. package/dist/store/sqlite/drizzle/{shared-O7CTKP45.js → shared-HKXF6HKX.js} +57 -57
  254. package/dist/store/sqlite/drizzle/{shared-O7CTKP45.js.map → shared-HKXF6HKX.js.map} +1 -1
  255. package/dist/store/sqlite/involvements.js +2 -1
  256. package/dist/store/sqlite/roster.d.ts +2 -1
  257. package/dist/store/sqlite/roster.js +3 -2
  258. package/package.json +2 -2
  259. package/parity.json +14 -69
@@ -0,0 +1,234 @@
1
+ import * as v from "valibot";
2
+ /** Administrative receipts retain their raw group card, distinct from a formatted chats show item. */
3
+ export declare const chatGroupChange: v.UnionSchema<[v.StrictObjectSchema<{
4
+ readonly operation_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
5
+ readonly chat: v.StrictObjectSchema<{
6
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
7
+ readonly title: v.NullableSchema<v.StringSchema<undefined>, undefined>;
8
+ readonly kind: v.PicklistSchema<["dialog", "group", "channel", "saved", "unknown"], undefined>;
9
+ readonly unread_count: v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
10
+ readonly unread_mentions: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
11
+ readonly last_message_at: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, "an ISO 8601 time in UTC">, v.EndsWithAction<string, "Z", "an ISO 8601 time in UTC, ending in `Z`">]>, undefined>;
12
+ readonly participants_count: v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
13
+ readonly muted: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
14
+ readonly archived: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
15
+ readonly marked_unread: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
16
+ readonly membership_state: v.OptionalSchema<v.PicklistSchema<["joined", "left", "public", "imported", "archived", "external"], undefined>, undefined>;
17
+ readonly scope: v.OptionalSchema<v.PicklistSchema<["personal", "work"], undefined>, undefined>;
18
+ readonly provider_metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
19
+ readonly parent_chat_id: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>, undefined>;
20
+ readonly muted_until: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, "an ISO 8601 time in UTC">, v.EndsWithAction<string, "Z", "an ISO 8601 time in UTC, ending in `Z`">]>, undefined>, undefined>;
21
+ readonly description: v.NullableSchema<v.StringSchema<undefined>, undefined>;
22
+ readonly link: v.NullableSchema<v.StringSchema<undefined>, undefined>;
23
+ readonly settings: v.StrictObjectSchema<{
24
+ readonly join_approval: v.OptionalSchema<v.NullableSchema<v.BooleanSchema<undefined>, undefined>, undefined>;
25
+ readonly only_admins_send: v.OptionalSchema<v.NullableSchema<v.BooleanSchema<undefined>, undefined>, undefined>;
26
+ readonly only_admins_edit_info: v.OptionalSchema<v.NullableSchema<v.BooleanSchema<undefined>, undefined>, undefined>;
27
+ readonly disappearing_seconds: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, undefined>;
28
+ readonly all_can_pin: v.NullableSchema<v.BooleanSchema<undefined>, undefined>;
29
+ readonly only_admins_add: v.NullableSchema<v.BooleanSchema<undefined>, undefined>;
30
+ readonly only_admins_call: v.NullableSchema<v.BooleanSchema<undefined>, undefined>;
31
+ readonly only_owner_edits_info: v.NullableSchema<v.BooleanSchema<undefined>, undefined>;
32
+ readonly members_see_link: v.NullableSchema<v.BooleanSchema<undefined>, undefined>;
33
+ }, undefined>;
34
+ }, undefined>;
35
+ }, undefined>, v.StrictObjectSchema<{
36
+ readonly operation_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
37
+ readonly requested: v.LiteralSchema<true, undefined>;
38
+ }, undefined>], undefined>;
39
+ export declare const chatInspection: v.StrictObjectSchema<{
40
+ readonly kind: v.PicklistSchema<["dialog", "group", "channel", "saved", "unknown"], undefined>;
41
+ readonly title: v.NullableSchema<v.StringSchema<undefined>, undefined>;
42
+ readonly id: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;
43
+ readonly username: v.NullableSchema<v.StringSchema<undefined>, undefined>;
44
+ readonly participants_count: v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
45
+ readonly description: v.NullableSchema<v.StringSchema<undefined>, undefined>;
46
+ readonly member: v.NullableSchema<v.BooleanSchema<undefined>, undefined>;
47
+ readonly approval_needed: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
48
+ }, undefined>;
49
+ export declare const chatSender: v.StrictObjectSchema<{
50
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
51
+ readonly title: v.StringSchema<undefined>;
52
+ readonly kind: v.PicklistSchema<["self", "channel", "group"], undefined>;
53
+ readonly premium_required: v.BooleanSchema<undefined>;
54
+ readonly default: v.BooleanSchema<undefined>;
55
+ }, undefined>;
56
+ export declare const chatRead: v.StrictObjectSchema<{
57
+ readonly operation_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
58
+ readonly chat_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
59
+ readonly until: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;
60
+ readonly thread_id: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;
61
+ }, undefined>;
62
+ export declare const chatMembersFetch: v.StrictObjectSchema<{
63
+ readonly chat_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
64
+ readonly joined: v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;
65
+ readonly gone: v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;
66
+ readonly changed: v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;
67
+ readonly read: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
68
+ readonly participants: v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
69
+ readonly complete: v.BooleanSchema<undefined>;
70
+ readonly more: v.BooleanSchema<undefined>;
71
+ readonly tracked: v.BooleanSchema<undefined>;
72
+ }, undefined>;
73
+ export declare const chatMembersChange: v.UnionSchema<[v.StrictObjectSchema<{
74
+ readonly operation_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
75
+ readonly chat_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
76
+ readonly added: v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;
77
+ readonly not_added: v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;
78
+ }, undefined>, v.StrictObjectSchema<{
79
+ readonly operation_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
80
+ readonly chat_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
81
+ readonly removed: v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;
82
+ }, undefined>], undefined>;
83
+ export declare const chatInvite: v.StrictObjectSchema<{
84
+ readonly chat_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
85
+ readonly title: v.NullableSchema<v.StringSchema<undefined>, undefined>;
86
+ readonly link: v.StringSchema<undefined>;
87
+ }, undefined>;
88
+ export declare const chatInviteChange: v.StrictObjectSchema<{
89
+ readonly link: v.StringSchema<undefined>;
90
+ readonly approval: v.BooleanSchema<undefined>;
91
+ readonly expires_at: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, "an ISO 8601 time in UTC">, v.EndsWithAction<string, "Z", "an ISO 8601 time in UTC, ending in `Z`">]>, undefined>;
92
+ readonly max_uses: v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
93
+ readonly primary: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
94
+ readonly revoked: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
95
+ readonly operation_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
96
+ readonly chat_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
97
+ readonly pending: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
98
+ readonly joined: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
99
+ }, undefined>;
100
+ export declare const chatRequestChange: v.UnionSchema<[v.StrictObjectSchema<{
101
+ readonly operation_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
102
+ readonly chat_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
103
+ readonly person_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
104
+ readonly accepted: v.BooleanSchema<undefined>;
105
+ readonly already: v.BooleanSchema<undefined>;
106
+ }, undefined>, v.StrictObjectSchema<{
107
+ readonly chat_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
108
+ readonly accepted: v.BooleanSchema<undefined>;
109
+ readonly counted: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
110
+ readonly operation_id: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;
111
+ }, undefined>], undefined>;
112
+ export declare const chatAdminChange: v.StrictObjectSchema<{
113
+ readonly operation_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
114
+ readonly chat_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
115
+ readonly person_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
116
+ readonly rights: v.OptionalSchema<v.ArraySchema<v.PicklistSchema<["read", "members", "admins", "info", "pin", "link", "post", "edit", "delete"], undefined>, undefined>, undefined>;
117
+ }, undefined>;
118
+ export declare const chatFolderChange: v.StrictObjectSchema<{
119
+ readonly operation_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
120
+ readonly folder: Omit<v.StrictObjectSchema<{
121
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
122
+ readonly title: v.StringSchema<undefined>;
123
+ readonly chat_ids: v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;
124
+ readonly emoji: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
125
+ readonly include: v.OptionalSchema<v.ArraySchema<v.PicklistSchema<["contacts", "non-contacts", "groups", "channels", "bots"], undefined>, undefined>, undefined>;
126
+ readonly skip: v.OptionalSchema<v.ArraySchema<v.PicklistSchema<["muted", "read", "archived"], undefined>, undefined>, undefined>;
127
+ readonly excluded_chat_ids: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>, undefined>;
128
+ readonly pinned_chat_ids: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>, undefined>;
129
+ readonly chats: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
130
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
131
+ readonly title: v.NullableSchema<v.StringSchema<undefined>, undefined>;
132
+ readonly kind: v.NullableSchema<v.PicklistSchema<["dialog", "group", "channel", "saved", "unknown"], undefined>, undefined>;
133
+ }, undefined>, undefined>, undefined>;
134
+ readonly pinned_chats: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
135
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
136
+ readonly title: v.NullableSchema<v.StringSchema<undefined>, undefined>;
137
+ readonly kind: v.NullableSchema<v.PicklistSchema<["dialog", "group", "channel", "saved", "unknown"], undefined>, undefined>;
138
+ }, undefined>, undefined>, undefined>;
139
+ readonly excluded_chats: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
140
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
141
+ readonly title: v.NullableSchema<v.StringSchema<undefined>, undefined>;
142
+ readonly kind: v.NullableSchema<v.PicklistSchema<["dialog", "group", "channel", "saved", "unknown"], undefined>, undefined>;
143
+ }, undefined>, undefined>, undefined>;
144
+ }, undefined>, "entries" | "~run" | "~standard" | "~types"> & {
145
+ readonly entries: Omit<{
146
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
147
+ readonly title: v.StringSchema<undefined>;
148
+ readonly chat_ids: v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;
149
+ readonly emoji: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
150
+ readonly include: v.OptionalSchema<v.ArraySchema<v.PicklistSchema<["contacts", "non-contacts", "groups", "channels", "bots"], undefined>, undefined>, undefined>;
151
+ readonly skip: v.OptionalSchema<v.ArraySchema<v.PicklistSchema<["muted", "read", "archived"], undefined>, undefined>, undefined>;
152
+ readonly excluded_chat_ids: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>, undefined>;
153
+ readonly pinned_chat_ids: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>, undefined>;
154
+ readonly chats: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
155
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
156
+ readonly title: v.NullableSchema<v.StringSchema<undefined>, undefined>;
157
+ readonly kind: v.NullableSchema<v.PicklistSchema<["dialog", "group", "channel", "saved", "unknown"], undefined>, undefined>;
158
+ }, undefined>, undefined>, undefined>;
159
+ readonly pinned_chats: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
160
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
161
+ readonly title: v.NullableSchema<v.StringSchema<undefined>, undefined>;
162
+ readonly kind: v.NullableSchema<v.PicklistSchema<["dialog", "group", "channel", "saved", "unknown"], undefined>, undefined>;
163
+ }, undefined>, undefined>, undefined>;
164
+ readonly excluded_chats: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
165
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
166
+ readonly title: v.NullableSchema<v.StringSchema<undefined>, undefined>;
167
+ readonly kind: v.NullableSchema<v.PicklistSchema<["dialog", "group", "channel", "saved", "unknown"], undefined>, undefined>;
168
+ }, undefined>, undefined>, undefined>;
169
+ }, "chats" | "excluded_chats" | "pinned_chats">;
170
+ readonly "~standard": v.StandardProps<{
171
+ id: string;
172
+ title: string;
173
+ chat_ids: string[];
174
+ emoji?: string | undefined;
175
+ include?: ("bots" | "channels" | "contacts" | "groups" | "non-contacts")[] | undefined;
176
+ skip?: ("archived" | "muted" | "read")[] | undefined;
177
+ excluded_chat_ids?: string[] | undefined;
178
+ pinned_chat_ids?: string[] | undefined;
179
+ }, {
180
+ id: string;
181
+ title: string;
182
+ chat_ids: string[];
183
+ emoji?: string | undefined;
184
+ include?: ("bots" | "channels" | "contacts" | "groups" | "non-contacts")[] | undefined;
185
+ skip?: ("archived" | "muted" | "read")[] | undefined;
186
+ excluded_chat_ids?: string[] | undefined;
187
+ pinned_chat_ids?: string[] | undefined;
188
+ }>;
189
+ readonly "~run": (dataset: v.UnknownDataset, config: v.Config<v.BaseIssue<unknown>>) => v.OutputDataset<{
190
+ id: string;
191
+ title: string;
192
+ chat_ids: string[];
193
+ emoji?: string | undefined;
194
+ include?: ("bots" | "channels" | "contacts" | "groups" | "non-contacts")[] | undefined;
195
+ skip?: ("archived" | "muted" | "read")[] | undefined;
196
+ excluded_chat_ids?: string[] | undefined;
197
+ pinned_chat_ids?: string[] | undefined;
198
+ }, v.ArrayIssue | v.MinLengthIssue<string, 1> | v.PicklistIssue | v.StrictObjectIssue | v.StringIssue>;
199
+ readonly "~types"?: {
200
+ readonly input: {
201
+ id: string;
202
+ title: string;
203
+ chat_ids: string[];
204
+ emoji?: string | undefined;
205
+ include?: ("bots" | "channels" | "contacts" | "groups" | "non-contacts")[] | undefined;
206
+ skip?: ("archived" | "muted" | "read")[] | undefined;
207
+ excluded_chat_ids?: string[] | undefined;
208
+ pinned_chat_ids?: string[] | undefined;
209
+ };
210
+ readonly output: {
211
+ id: string;
212
+ title: string;
213
+ chat_ids: string[];
214
+ emoji?: string | undefined;
215
+ include?: ("bots" | "channels" | "contacts" | "groups" | "non-contacts")[] | undefined;
216
+ skip?: ("archived" | "muted" | "read")[] | undefined;
217
+ excluded_chat_ids?: string[] | undefined;
218
+ pinned_chat_ids?: string[] | undefined;
219
+ };
220
+ readonly issue: v.ArrayIssue | v.MinLengthIssue<string, 1> | v.PicklistIssue | v.StrictObjectIssue | v.StringIssue;
221
+ } | undefined;
222
+ };
223
+ }, undefined>;
224
+ export declare const chatFolderRemoval: v.StrictObjectSchema<{
225
+ readonly operation_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
226
+ readonly folder_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
227
+ }, undefined>;
228
+ export declare const chatFolderOrder: v.StrictObjectSchema<{
229
+ readonly operation_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
230
+ readonly folders: v.ArraySchema<v.StrictObjectSchema<{
231
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
232
+ readonly title: v.StringSchema<undefined>;
233
+ }, undefined>, undefined>;
234
+ }, undefined>;
@@ -0,0 +1,84 @@
1
+ import * as v from "valibot";
2
+ import { chat } from "./chat.js";
3
+ import { count, id, text, time } from "./fields.js";
4
+ import { folder } from "./folder.js";
5
+ import { inviteLink } from "./invite-link.js";
6
+ const operated = { operation_id: id, chat_id: id };
7
+ const group = v.strictObject({
8
+ ...v.omit(chat, ["ref", "provider", "account", "invite_link", "members"]).entries,
9
+ parent_chat_id: v.optional(v.nullable(id)),
10
+ muted_until: v.optional(v.nullable(time)),
11
+ description: v.nullable(text),
12
+ link: v.nullable(text),
13
+ settings: v.strictObject({
14
+ ...v.unwrap(chat.entries.settings).entries,
15
+ all_can_pin: v.nullable(v.boolean()),
16
+ only_admins_add: v.nullable(v.boolean()),
17
+ only_admins_call: v.nullable(v.boolean()),
18
+ only_owner_edits_info: v.nullable(v.boolean()),
19
+ members_see_link: v.nullable(v.boolean()),
20
+ }),
21
+ });
22
+ /** Administrative receipts retain their raw group card, distinct from a formatted chats show item. */
23
+ export const chatGroupChange = v.union([
24
+ v.strictObject({ operation_id: id, chat: group }),
25
+ v.strictObject({ operation_id: id, requested: v.literal(true) }),
26
+ ]);
27
+ export const chatInspection = v.strictObject({
28
+ kind: chat.entries.kind,
29
+ title: v.nullable(text),
30
+ id: v.nullable(id),
31
+ username: v.nullable(text),
32
+ participants_count: v.nullable(count),
33
+ description: v.nullable(text),
34
+ member: v.nullable(v.boolean()),
35
+ approval_needed: v.optional(v.boolean()),
36
+ });
37
+ export const chatSender = v.strictObject({
38
+ id,
39
+ title: text,
40
+ kind: v.picklist(["self", "channel", "group"]),
41
+ premium_required: v.boolean(),
42
+ default: v.boolean(),
43
+ });
44
+ export const chatRead = v.strictObject({ ...operated, until: v.nullable(id), thread_id: v.optional(id) });
45
+ export const chatMembersFetch = v.strictObject({
46
+ chat_id: id,
47
+ joined: v.array(id),
48
+ gone: v.array(id),
49
+ changed: v.array(id),
50
+ read: count,
51
+ participants: v.nullable(count),
52
+ complete: v.boolean(),
53
+ more: v.boolean(),
54
+ tracked: v.boolean(),
55
+ });
56
+ export const chatMembersChange = v.union([
57
+ v.strictObject({ ...operated, added: v.array(id), not_added: v.array(id) }),
58
+ v.strictObject({ ...operated, removed: v.array(id) }),
59
+ ]);
60
+ export const chatInvite = v.strictObject({ chat_id: id, title: v.nullable(text), link: text });
61
+ export const chatInviteChange = v.strictObject({
62
+ ...operated,
63
+ ...v.omit(inviteLink, ["pending_count", "joined_count"]).entries,
64
+ pending: v.optional(count),
65
+ joined: v.optional(count),
66
+ });
67
+ export const chatRequestChange = v.union([
68
+ v.strictObject({ ...operated, person_id: id, accepted: v.boolean(), already: v.boolean() }),
69
+ v.strictObject({ chat_id: id, accepted: v.boolean(), counted: count, operation_id: v.optional(id) }),
70
+ ]);
71
+ export const chatAdminChange = v.strictObject({
72
+ ...operated,
73
+ person_id: id,
74
+ rights: v.optional(v.array(v.picklist(["read", "members", "admins", "info", "pin", "link", "post", "edit", "delete"]))),
75
+ });
76
+ export const chatFolderChange = v.strictObject({
77
+ operation_id: id,
78
+ folder: v.omit(folder, ["chats", "pinned_chats", "excluded_chats"]),
79
+ });
80
+ export const chatFolderRemoval = v.strictObject({ operation_id: id, folder_id: id });
81
+ export const chatFolderOrder = v.strictObject({
82
+ operation_id: id,
83
+ folders: v.array(v.strictObject({ id, title: text })),
84
+ });
@@ -0,0 +1,25 @@
1
+ import * as v from "valibot";
2
+ export declare const chatRemoval: v.StrictObjectSchema<{
3
+ operation_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
4
+ chat_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
5
+ }, undefined>;
6
+ export declare const chatMuting: v.StrictObjectSchema<{
7
+ readonly operation_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
8
+ readonly chat_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
9
+ readonly muted_until: v.NullableSchema<v.UnionSchema<[v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, "an ISO 8601 time in UTC">, v.EndsWithAction<string, "Z", "an ISO 8601 time in UTC, ending in `Z`">]>, v.LiteralSchema<"forever", undefined>], undefined>, undefined>;
10
+ }, undefined>;
11
+ export declare const chatArchive: v.StrictObjectSchema<{
12
+ readonly operation_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
13
+ readonly chat_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
14
+ readonly archived: v.BooleanSchema<undefined>;
15
+ }, undefined>;
16
+ export declare const chatPin: v.StrictObjectSchema<{
17
+ readonly operation_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
18
+ readonly chat_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
19
+ readonly pinned: v.BooleanSchema<undefined>;
20
+ }, undefined>;
21
+ export declare const chatUnread: v.StrictObjectSchema<{
22
+ readonly operation_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
23
+ readonly chat_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
24
+ readonly unread: v.LiteralSchema<true, undefined>;
25
+ }, undefined>;
@@ -0,0 +1,11 @@
1
+ import * as v from "valibot";
2
+ import { id, time } from "./fields.js";
3
+ const operated = { operation_id: id, chat_id: id };
4
+ export const chatRemoval = v.strictObject(operated);
5
+ export const chatMuting = v.strictObject({
6
+ ...operated,
7
+ muted_until: v.nullable(v.union([time, v.literal("forever")])),
8
+ });
9
+ export const chatArchive = v.strictObject({ ...operated, archived: v.boolean() });
10
+ export const chatPin = v.strictObject({ ...operated, pinned: v.boolean() });
11
+ export const chatUnread = v.strictObject({ ...operated, unread: v.literal(true) });
@@ -0,0 +1,34 @@
1
+ import * as v from "valibot";
2
+ export declare const chatMetadata: v.StrictObjectSchema<{
3
+ readonly chat_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
4
+ readonly title: v.NullableSchema<v.StringSchema<undefined>, undefined>;
5
+ readonly username: v.NullableSchema<v.StringSchema<undefined>, undefined>;
6
+ readonly description: v.NullableSchema<v.StringSchema<undefined>, undefined>;
7
+ readonly fetched_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, "an ISO 8601 time in UTC">, v.EndsWithAction<string, "Z", "an ISO 8601 time in UTC, ending in `Z`">]>;
8
+ }, undefined>;
9
+ export declare const cachedChatMetadata: v.StrictObjectSchema<{
10
+ readonly chat_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
11
+ readonly metadata: v.NullableSchema<v.StrictObjectSchema<{
12
+ readonly chat_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
13
+ readonly title: v.NullableSchema<v.StringSchema<undefined>, undefined>;
14
+ readonly username: v.NullableSchema<v.StringSchema<undefined>, undefined>;
15
+ readonly description: v.NullableSchema<v.StringSchema<undefined>, undefined>;
16
+ readonly fetched_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, "an ISO 8601 time in UTC">, v.EndsWithAction<string, "Z", "an ISO 8601 time in UTC, ending in `Z`">]>;
17
+ }, undefined>, undefined>;
18
+ }, undefined>;
19
+ export declare const chatMetadataRefresh: v.StrictObjectSchema<{
20
+ readonly chats: v.ArraySchema<v.UnionSchema<[v.StrictObjectSchema<{
21
+ readonly chat_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
22
+ readonly title: v.NullableSchema<v.StringSchema<undefined>, undefined>;
23
+ readonly username: v.NullableSchema<v.StringSchema<undefined>, undefined>;
24
+ readonly description: v.NullableSchema<v.StringSchema<undefined>, undefined>;
25
+ readonly fetched_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, "an ISO 8601 time in UTC">, v.EndsWithAction<string, "Z", "an ISO 8601 time in UTC, ending in `Z`">]>;
26
+ }, undefined>, v.StrictObjectSchema<{
27
+ readonly chat_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
28
+ readonly error: v.StrictObjectSchema<{
29
+ readonly code: v.StringSchema<undefined>;
30
+ readonly message: v.StringSchema<undefined>;
31
+ }, undefined>;
32
+ }, undefined>], undefined>, undefined>;
33
+ readonly has_more: v.BooleanSchema<undefined>;
34
+ }, undefined>;
@@ -0,0 +1,15 @@
1
+ import * as v from "valibot";
2
+ import { id, text, time } from "./fields.js";
3
+ export const chatMetadata = v.strictObject({
4
+ chat_id: id,
5
+ title: v.nullable(text),
6
+ username: v.nullable(text),
7
+ description: v.nullable(text),
8
+ fetched_at: time,
9
+ });
10
+ export const cachedChatMetadata = v.strictObject({ chat_id: id, metadata: v.nullable(chatMetadata) });
11
+ const failedChatMetadata = v.strictObject({ chat_id: id, error: v.strictObject({ code: text, message: text }) });
12
+ export const chatMetadataRefresh = v.strictObject({
13
+ chats: v.array(v.union([chatMetadata, failedChatMetadata])),
14
+ has_more: v.boolean(),
15
+ });
@@ -0,0 +1,44 @@
1
+ import * as v from "valibot";
2
+ export declare const chatRules: v.StrictObjectSchema<{
3
+ readonly chat_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
4
+ readonly title: v.NullableSchema<v.StringSchema<undefined>, undefined>;
5
+ readonly file: v.StringSchema<undefined>;
6
+ readonly saved: v.BooleanSchema<undefined>;
7
+ readonly rules: v.StrictObjectSchema<{
8
+ readonly title: v.NullableSchema<v.StringSchema<undefined>, undefined>;
9
+ readonly trusted: v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;
10
+ readonly blocked: v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;
11
+ readonly blocked_names: v.ArraySchema<v.StringSchema<undefined>, undefined>;
12
+ readonly links: v.PicklistSchema<["report", "delete", "remove"], undefined>;
13
+ readonly invites: v.PicklistSchema<["report", "delete", "remove"], undefined>;
14
+ readonly forwards: v.PicklistSchema<["report", "delete", "remove"], undefined>;
15
+ readonly blocked_people: v.PicklistSchema<["report", "delete", "remove"], undefined>;
16
+ readonly flood: v.StrictObjectSchema<{
17
+ readonly messages: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
18
+ readonly minutes: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
19
+ readonly action: v.PicklistSchema<["report", "delete", "remove"], undefined>;
20
+ }, undefined>;
21
+ readonly new_account: v.StrictObjectSchema<{
22
+ readonly days: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
23
+ readonly action: v.PicklistSchema<["report", "remove"], undefined>;
24
+ }, undefined>;
25
+ readonly consent: v.StrictObjectSchema<{
26
+ readonly delete: v.PicklistSchema<["deny", "readonly", "ask", "allow"], undefined>;
27
+ readonly remove: v.PicklistSchema<["deny", "readonly", "ask", "allow"], undefined>;
28
+ }, undefined>;
29
+ }, undefined>;
30
+ }, undefined>;
31
+ export declare const chatModeration: v.StrictObjectSchema<{
32
+ readonly chat_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
33
+ readonly rows: v.ArraySchema<v.StrictObjectSchema<{
34
+ readonly kind: v.PicklistSchema<["message", "member"], undefined>;
35
+ readonly rule: v.PicklistSchema<["blocked", "invites", "links", "forwards", "flood", "newAccount"], undefined>;
36
+ readonly person_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
37
+ readonly person_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
38
+ readonly message_id: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;
39
+ readonly action: v.PicklistSchema<["report", "delete", "remove"], undefined>;
40
+ readonly outcome: v.PicklistSchema<["reported", "done", "planned", "forbidden", "declined", "refused", "failed", "skipped"], undefined>;
41
+ readonly reason: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
42
+ readonly command: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
43
+ }, undefined>, undefined>;
44
+ }, undefined>;
@@ -0,0 +1,37 @@
1
+ import * as v from "valibot";
2
+ import { count, id, text } from "./fields.js";
3
+ const action = v.picklist(["report", "delete", "remove"]);
4
+ const level = v.picklist(["deny", "readonly", "ask", "allow"]);
5
+ export const chatRules = v.strictObject({
6
+ chat_id: id,
7
+ title: v.nullable(text),
8
+ file: text,
9
+ saved: v.boolean(),
10
+ rules: v.strictObject({
11
+ title: v.nullable(text),
12
+ trusted: v.array(id),
13
+ blocked: v.array(id),
14
+ blocked_names: v.array(text),
15
+ links: action,
16
+ invites: action,
17
+ forwards: action,
18
+ blocked_people: action,
19
+ flood: v.strictObject({ messages: count, minutes: count, action }),
20
+ new_account: v.strictObject({ days: count, action: v.picklist(["report", "remove"]) }),
21
+ consent: v.strictObject({ delete: level, remove: level }),
22
+ }),
23
+ });
24
+ export const chatModeration = v.strictObject({
25
+ chat_id: id,
26
+ rows: v.array(v.strictObject({
27
+ kind: v.picklist(["message", "member"]),
28
+ rule: v.picklist(["blocked", "invites", "links", "forwards", "flood", "newAccount"]),
29
+ person_id: id,
30
+ person_name: v.nullable(text),
31
+ message_id: v.optional(id),
32
+ action,
33
+ outcome: v.picklist(["reported", "done", "planned", "forbidden", "declined", "refused", "failed", "skipped"]),
34
+ reason: v.optional(text),
35
+ command: v.optional(text),
36
+ })),
37
+ });
@@ -0,0 +1,26 @@
1
+ import * as v from "valibot";
2
+ export declare const trackedChat: v.StrictObjectSchema<{
3
+ readonly chat_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
4
+ readonly title: v.NullableSchema<v.StringSchema<undefined>, undefined>;
5
+ readonly tracked_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, "an ISO 8601 time in UTC">, v.EndsWithAction<string, "Z", "an ISO 8601 time in UTC, ending in `Z`">]>;
6
+ readonly last_count: v.NullableSchema<v.StrictObjectSchema<{
7
+ readonly day: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoDateAction<string, undefined>]>;
8
+ readonly participants: v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
9
+ readonly listed: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
10
+ readonly complete: v.BooleanSchema<undefined>;
11
+ }, undefined>, undefined>;
12
+ }, undefined>;
13
+ export declare const trackedChatHistory: v.StrictObjectSchema<{
14
+ readonly chat_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
15
+ readonly tracked_at: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, "an ISO 8601 time in UTC">, v.EndsWithAction<string, "Z", "an ISO 8601 time in UTC, ending in `Z`">]>, undefined>;
16
+ readonly counts: v.ArraySchema<v.StrictObjectSchema<{
17
+ readonly day: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoDateAction<string, undefined>]>;
18
+ readonly participants: v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
19
+ readonly listed: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
20
+ readonly complete: v.BooleanSchema<undefined>;
21
+ }, undefined>, undefined>;
22
+ }, undefined>;
23
+ export declare const chatTracking: v.StrictObjectSchema<{
24
+ readonly chat_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
25
+ readonly tracked: v.BooleanSchema<undefined>;
26
+ }, undefined>;
@@ -0,0 +1,23 @@
1
+ import * as v from "valibot";
2
+ import { count, id, text, time } from "./fields.js";
3
+ const memberCount = v.strictObject({
4
+ day: v.pipe(text, v.isoDate()),
5
+ participants: v.nullable(count),
6
+ listed: count,
7
+ complete: v.boolean(),
8
+ });
9
+ export const trackedChat = v.strictObject({
10
+ chat_id: id,
11
+ title: v.nullable(text),
12
+ tracked_at: time,
13
+ last_count: v.nullable(memberCount),
14
+ });
15
+ export const trackedChatHistory = v.strictObject({
16
+ chat_id: id,
17
+ tracked_at: v.nullable(time),
18
+ counts: v.array(memberCount),
19
+ });
20
+ export const chatTracking = v.strictObject({
21
+ chat_id: id,
22
+ tracked: v.boolean(),
23
+ });
@@ -0,0 +1,52 @@
1
+ import * as v from "valibot";
2
+ export declare const linkedPerson: v.StrictObjectSchema<{
3
+ readonly uid: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
4
+ readonly name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
5
+ readonly identities: v.ArraySchema<v.StrictObjectSchema<{
6
+ readonly provider: v.StringSchema<undefined>;
7
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
8
+ readonly name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
9
+ readonly username: v.NullableSchema<v.StringSchema<undefined>, undefined>;
10
+ readonly is_bot: v.NullableSchema<v.BooleanSchema<undefined>, undefined>;
11
+ readonly accounts: v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;
12
+ readonly method: v.StringSchema<undefined>;
13
+ readonly linked_by: v.StringSchema<undefined>;
14
+ readonly linked_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, "an ISO 8601 time in UTC">, v.EndsWithAction<string, "Z", "an ISO 8601 time in UTC, ending in `Z`">]>;
15
+ }, undefined>, undefined>;
16
+ }, undefined>;
17
+ export declare const contactActivity: v.StrictObjectSchema<{
18
+ readonly at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, "an ISO 8601 time in UTC">, v.EndsWithAction<string, "Z", "an ISO 8601 time in UTC, ending in `Z`">]>;
19
+ readonly subject: v.StringSchema<undefined>;
20
+ readonly subject_id: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
21
+ readonly role: v.StringSchema<undefined>;
22
+ readonly scope: v.StringSchema<undefined>;
23
+ readonly provider: v.NullableSchema<v.StringSchema<undefined>, undefined>;
24
+ readonly account: v.NullableSchema<v.StringSchema<undefined>, undefined>;
25
+ readonly chat_id: v.NullableSchema<v.StringSchema<undefined>, undefined>;
26
+ readonly locator: v.NullableSchema<v.StringSchema<undefined>, undefined>;
27
+ readonly project_id: v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
28
+ }, undefined>;
29
+ export declare const contactCheck: v.StrictObjectSchema<{
30
+ readonly person: v.StrictObjectSchema<{
31
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
32
+ readonly name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
33
+ readonly username: v.NullableSchema<v.StringSchema<undefined>, undefined>;
34
+ readonly provider: v.StringSchema<undefined>;
35
+ }, undefined>;
36
+ readonly score: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
37
+ readonly reasons: v.ArraySchema<v.StrictObjectSchema<{
38
+ readonly reason: v.PicklistSchema<import("../botcheck/reasons.js").BotReason[], undefined>;
39
+ readonly weight: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
40
+ readonly source: v.StringSchema<undefined>;
41
+ readonly detail: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
42
+ }, undefined>, undefined>;
43
+ readonly registries: v.ArraySchema<v.StrictObjectSchema<{
44
+ readonly name: v.PicklistSchema<["cas", "lols"], undefined>;
45
+ readonly answer: v.PicklistSchema<["listed", "clean", "unknown"], undefined>;
46
+ readonly checked_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, "an ISO 8601 time in UTC">, v.EndsWithAction<string, "Z", "an ISO 8601 time in UTC, ending in `Z`">]>;
47
+ readonly detail: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
48
+ readonly reasons: v.OptionalSchema<v.ArraySchema<v.PicklistSchema<["cas_banned", "lols_banned", "lols_scammer"], undefined>, undefined>, undefined>;
49
+ }, undefined>, undefined>;
50
+ readonly unknown: v.ArraySchema<v.PicklistSchema<import("../botcheck/reasons.js").BotReason[], undefined>, undefined>;
51
+ readonly checked_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, "an ISO 8601 time in UTC">, v.EndsWithAction<string, "Z", "an ISO 8601 time in UTC, ending in `Z`">]>;
52
+ }, undefined>;