@saebyn/glowing-telegram-types 0.1.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/package.json +17 -0
- package/src/types.ts +340 -0
package/package.json
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@saebyn/glowing-telegram-types",
|
|
3
|
+
"license": "AGPL-3.0-only",
|
|
4
|
+
"version": "0.1.0",
|
|
5
|
+
"main": "src/types.ts",
|
|
6
|
+
"files": [
|
|
7
|
+
"src/types.ts"
|
|
8
|
+
],
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/saebyn/glowing-telegram.git",
|
|
12
|
+
"directory": "types"
|
|
13
|
+
},
|
|
14
|
+
"devDependencies": {
|
|
15
|
+
"quicktype": "23"
|
|
16
|
+
}
|
|
17
|
+
}
|
package/src/types.ts
ADDED
|
@@ -0,0 +1,340 @@
|
|
|
1
|
+
export interface AccessTokenResponse {
|
|
2
|
+
access_token: string;
|
|
3
|
+
broadcaster_id: string;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export interface AuthorizationURLResponse {
|
|
7
|
+
url: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface CutList {
|
|
11
|
+
/**
|
|
12
|
+
* List of input media sources
|
|
13
|
+
*/
|
|
14
|
+
inputMedia: InputMedia[];
|
|
15
|
+
/**
|
|
16
|
+
* Ordered media sections to form the output timeline sequence
|
|
17
|
+
*/
|
|
18
|
+
outputTrack: OutputTrack[];
|
|
19
|
+
/**
|
|
20
|
+
* One or more overlay tracks
|
|
21
|
+
*/
|
|
22
|
+
overlayTracks?: OverlayTrack[];
|
|
23
|
+
/**
|
|
24
|
+
* Schema version
|
|
25
|
+
*/
|
|
26
|
+
version: "1.0.0";
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface InputMedia {
|
|
30
|
+
/**
|
|
31
|
+
* Path of the media
|
|
32
|
+
*/
|
|
33
|
+
s3Location: string;
|
|
34
|
+
/**
|
|
35
|
+
* Start/end frames to select
|
|
36
|
+
*/
|
|
37
|
+
sections: Section[];
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface Section {
|
|
41
|
+
/**
|
|
42
|
+
* End frame is exclusive
|
|
43
|
+
*/
|
|
44
|
+
endFrame: number;
|
|
45
|
+
startFrame: number;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface OutputTrack {
|
|
49
|
+
/**
|
|
50
|
+
* Index of the media source
|
|
51
|
+
*/
|
|
52
|
+
mediaIndex: number;
|
|
53
|
+
/**
|
|
54
|
+
* Index of the section in the media source
|
|
55
|
+
*/
|
|
56
|
+
sectionIndex: number;
|
|
57
|
+
/**
|
|
58
|
+
* Transition to apply at the start of the section
|
|
59
|
+
*/
|
|
60
|
+
transitionIn?: TransitionInObject;
|
|
61
|
+
/**
|
|
62
|
+
* Transition to apply at the end of the section
|
|
63
|
+
*/
|
|
64
|
+
transitionOut?: TransitionOutObject;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Transition to apply at the start of the section
|
|
69
|
+
*
|
|
70
|
+
* Transition to apply at the start or end of a media section
|
|
71
|
+
*/
|
|
72
|
+
export interface TransitionInObject {
|
|
73
|
+
/**
|
|
74
|
+
* Duration of the transition in frames, relative to the start/end of the section
|
|
75
|
+
*/
|
|
76
|
+
duration: number;
|
|
77
|
+
/**
|
|
78
|
+
* Transition type
|
|
79
|
+
*/
|
|
80
|
+
type: TransitionInType;
|
|
81
|
+
[property: string]: unknown;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Transition type
|
|
86
|
+
*/
|
|
87
|
+
export type TransitionInType = "fade" | "cut";
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Transition to apply at the end of the section
|
|
91
|
+
*
|
|
92
|
+
* Transition to apply at the start of the section
|
|
93
|
+
*
|
|
94
|
+
* Transition to apply at the start or end of a media section
|
|
95
|
+
*/
|
|
96
|
+
export interface TransitionOutObject {
|
|
97
|
+
/**
|
|
98
|
+
* Duration of the transition in frames, relative to the start/end of the section
|
|
99
|
+
*/
|
|
100
|
+
duration: number;
|
|
101
|
+
/**
|
|
102
|
+
* Transition type
|
|
103
|
+
*/
|
|
104
|
+
type: TransitionInType;
|
|
105
|
+
[property: string]: unknown;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export interface OverlayTrack {
|
|
109
|
+
/**
|
|
110
|
+
* Index of the media source
|
|
111
|
+
*/
|
|
112
|
+
mediaIndex: number;
|
|
113
|
+
/**
|
|
114
|
+
* Index of the section in the media source
|
|
115
|
+
*/
|
|
116
|
+
sectionIndex: number;
|
|
117
|
+
/**
|
|
118
|
+
* Start frame on the overlay track
|
|
119
|
+
*/
|
|
120
|
+
startFrame: number;
|
|
121
|
+
/**
|
|
122
|
+
* X position of the overlay
|
|
123
|
+
*/
|
|
124
|
+
x?: number;
|
|
125
|
+
/**
|
|
126
|
+
* Y position of the overlay
|
|
127
|
+
*/
|
|
128
|
+
y?: number;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export interface Episode {
|
|
132
|
+
description?: string;
|
|
133
|
+
id: string;
|
|
134
|
+
stream_id?: string;
|
|
135
|
+
title?: string;
|
|
136
|
+
tracks?: Track[];
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export interface Track {
|
|
140
|
+
end: string;
|
|
141
|
+
start: string;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export interface IDOnly {
|
|
145
|
+
id: string;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
export interface Profile {
|
|
149
|
+
id: string;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
export interface Series {
|
|
153
|
+
category?: number;
|
|
154
|
+
created_at: string;
|
|
155
|
+
description?: string;
|
|
156
|
+
end_date?: string;
|
|
157
|
+
end_time?: string;
|
|
158
|
+
id: string;
|
|
159
|
+
is_active?: boolean;
|
|
160
|
+
max_episode_order_index?: number;
|
|
161
|
+
notify_subscribers?: boolean;
|
|
162
|
+
playlist_id?: string;
|
|
163
|
+
prep_notes?: string;
|
|
164
|
+
recurrence?: Recurrence;
|
|
165
|
+
skips?: Skip[];
|
|
166
|
+
start_date?: string;
|
|
167
|
+
start_time?: string;
|
|
168
|
+
stream_count?: number;
|
|
169
|
+
stream_title_template?: string;
|
|
170
|
+
tags?: string[];
|
|
171
|
+
thumbnail_url?: string;
|
|
172
|
+
timezone?: string;
|
|
173
|
+
title: string;
|
|
174
|
+
twitch_category?: TwitchCategory;
|
|
175
|
+
updated_at?: string;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
export interface Recurrence {
|
|
179
|
+
days: Day[];
|
|
180
|
+
interval: number;
|
|
181
|
+
type: "weekly";
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
export type Day = "sunday" | "monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday";
|
|
185
|
+
|
|
186
|
+
export interface Skip {
|
|
187
|
+
date: string;
|
|
188
|
+
reason: string;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
export interface TwitchCategory {
|
|
192
|
+
box_art_url?: string;
|
|
193
|
+
id: string;
|
|
194
|
+
name: string;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
export interface SimpleChatMessage {
|
|
198
|
+
content: string;
|
|
199
|
+
role: Role;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
export type Role = "system" | "user" | "assistant" | "function" | "tool";
|
|
203
|
+
|
|
204
|
+
export interface Stream {
|
|
205
|
+
created_at?: string;
|
|
206
|
+
description?: string;
|
|
207
|
+
duration?: number;
|
|
208
|
+
has_episodes?: boolean;
|
|
209
|
+
id: string;
|
|
210
|
+
prefix?: string;
|
|
211
|
+
series_id?: string;
|
|
212
|
+
stream_date?: string;
|
|
213
|
+
stream_platform?: string;
|
|
214
|
+
thumbnail_url?: string;
|
|
215
|
+
title?: string;
|
|
216
|
+
updated_at?: string;
|
|
217
|
+
video_clip_count?: number;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
export interface StreamIngestionRequest {
|
|
221
|
+
initialPrompt: string;
|
|
222
|
+
initialSummary: string;
|
|
223
|
+
streamId: string;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
export interface TwitchAuthRequest {
|
|
227
|
+
redirect_uri: string;
|
|
228
|
+
scopes: string[];
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
export interface TwitchCallbackRequest {
|
|
232
|
+
code: string;
|
|
233
|
+
scope: string[];
|
|
234
|
+
state: string;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
export interface TwitchCallbackResponse {
|
|
238
|
+
/**
|
|
239
|
+
* The URL to redirect the client to after the authorization flow is complete.
|
|
240
|
+
*/
|
|
241
|
+
url: string;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
export interface VideoClip {
|
|
245
|
+
/**
|
|
246
|
+
* The path to the audio file extracted from the video clip.
|
|
247
|
+
*/
|
|
248
|
+
audio?: string;
|
|
249
|
+
id: string;
|
|
250
|
+
/**
|
|
251
|
+
* The S3 key of the video clip.
|
|
252
|
+
*/
|
|
253
|
+
key: string;
|
|
254
|
+
/**
|
|
255
|
+
* A list of paths to images that are keyframes in the video clip.
|
|
256
|
+
*/
|
|
257
|
+
keyframes?: string[];
|
|
258
|
+
metadata?: Metadata;
|
|
259
|
+
/**
|
|
260
|
+
* The list of detected silence intervals in the video clip.
|
|
261
|
+
*/
|
|
262
|
+
silence?: Silence[];
|
|
263
|
+
/**
|
|
264
|
+
* The start time of the video clip in the context of the stream in seconds.
|
|
265
|
+
*/
|
|
266
|
+
start_time?: number;
|
|
267
|
+
stream_id?: string;
|
|
268
|
+
summary?: Summary;
|
|
269
|
+
transcription?: Transcription;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
export interface Metadata {
|
|
273
|
+
format?: Format;
|
|
274
|
+
[property: string]: unknown;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
export interface Format {
|
|
278
|
+
/**
|
|
279
|
+
* The duration of the video clip in seconds.
|
|
280
|
+
*/
|
|
281
|
+
duration?: number;
|
|
282
|
+
[property: string]: unknown;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
export interface Silence {
|
|
286
|
+
end?: number;
|
|
287
|
+
start?: number;
|
|
288
|
+
[property: string]: unknown;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
export interface Summary {
|
|
292
|
+
attentions?: Attention[];
|
|
293
|
+
highlights?: Highlight[];
|
|
294
|
+
keywords?: string[];
|
|
295
|
+
summary_context?: string;
|
|
296
|
+
summary_main_discussion?: string;
|
|
297
|
+
title?: string;
|
|
298
|
+
transcription_errors?: TranscriptionError[];
|
|
299
|
+
[property: string]: unknown;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
export interface Attention {
|
|
303
|
+
description?: string;
|
|
304
|
+
reasoning?: string;
|
|
305
|
+
timestamp_end?: number;
|
|
306
|
+
timestamp_start?: number;
|
|
307
|
+
[property: string]: unknown;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
export interface Highlight {
|
|
311
|
+
description?: string;
|
|
312
|
+
reasoning?: string;
|
|
313
|
+
timestamp_end?: number;
|
|
314
|
+
timestamp_start?: number;
|
|
315
|
+
[property: string]: unknown;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
export interface TranscriptionError {
|
|
319
|
+
description?: string;
|
|
320
|
+
reasoning?: string;
|
|
321
|
+
timestamp_start?: number;
|
|
322
|
+
[property: string]: unknown;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
export interface Transcription {
|
|
326
|
+
language: string;
|
|
327
|
+
segments: TranscriptSegment[];
|
|
328
|
+
text: string;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
export interface TranscriptSegment {
|
|
332
|
+
avg_logprob: number;
|
|
333
|
+
compression_ratio: number;
|
|
334
|
+
end: number;
|
|
335
|
+
no_speech_prob: number;
|
|
336
|
+
start: number;
|
|
337
|
+
temperature: number;
|
|
338
|
+
text: string;
|
|
339
|
+
tokens: number[];
|
|
340
|
+
}
|