forked from denoland/std
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
63 lines (56 loc) · 1.25 KB
/
Copy pathtypes.ts
File metadata and controls
63 lines (56 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
export interface Env {
BOT_TOKEN: string;
OWNER_ID: string;
DB_PATH: string;
}
export interface ButtonInput {
label: string;
url: string;
}
export interface Destination {
id: number;
chat_id: string;
title: string;
type: "channel" | "group";
added_at: number;
}
export interface PostRecord {
id: number;
label: string;
text: string;
created_at: number;
}
export interface ScheduledPost {
id: number;
text: string;
buttons_json: string | null;
destinations: string; // JSON string array of chat ids
publish_at: number;
status: "pending" | "published" | "failed";
created_at: number;
}
export interface UserRecord {
user_id: string;
username: string | null;
status: "pending" | "approved" | "declined";
requested_at: number;
decided_at: number | null;
}
export interface UserState {
user_id: string;
step: string;
data_json: string;
updated_at: number;
}
// Multi-step owner workflows tracked in user_state.step
export type OwnerStep =
| "idle"
| "compose_post_text"
| "compose_post_button_label"
| "compose_post_button_url"
| "compose_post_pick_destinations"
| "add_destination_wait_forward"
| "schedule_pick_time"
| "edit_button_pick_post"
| "edit_button_pick_button"
| "edit_button_new_url";