mirror of
https://github.com/bitinflow/rerun-encoder.git
synced 2026-03-13 13:46:00 +00:00
first commit
This commit is contained in:
66
shared/schema.d.ts
vendored
Normal file
66
shared/schema.d.ts
vendored
Normal file
@@ -0,0 +1,66 @@
|
||||
/**
|
||||
* User structure
|
||||
*/
|
||||
export interface User {
|
||||
id: string
|
||||
name: string
|
||||
avatar_url: string
|
||||
config: {
|
||||
storage_limit: number
|
||||
videos_limit: number
|
||||
storage_used: number
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Oauth2 credential structure including user information
|
||||
*/
|
||||
export interface Credentials {
|
||||
access_token: string
|
||||
token_type: string
|
||||
expires_in: string
|
||||
state: string
|
||||
expires_at: string
|
||||
user: User
|
||||
}
|
||||
|
||||
/**
|
||||
* File structure for user settings
|
||||
* Which is stored in %APPDATA%/rerun-manager/encoder.json
|
||||
*/
|
||||
export interface Settings {
|
||||
version?: string // version of the settings schema (diff will force a reset)
|
||||
credentials?: Credentials | null,
|
||||
endpoint?: string | null,
|
||||
}
|
||||
|
||||
export interface VerifiedGame {
|
||||
id: number
|
||||
name: string
|
||||
publisher: string | null
|
||||
notes: string | null
|
||||
supported: boolean
|
||||
requires_optimization: boolean
|
||||
executables: Array<string>
|
||||
image_url: string | null
|
||||
}
|
||||
|
||||
export interface EncoderOptions {
|
||||
publishOnComplete: boolean;
|
||||
title: string
|
||||
}
|
||||
|
||||
export interface EncoderListeners {
|
||||
onStart: (id) => void;
|
||||
onProgress: (id, progress: number) => void;
|
||||
onUploadProgress: (id, progress: number) => void;
|
||||
onUploadComplete: (id, video: Video) => void;
|
||||
onError: (id, error: string) => void;
|
||||
}
|
||||
|
||||
export interface Video {
|
||||
id: string;
|
||||
upload_url?: string;
|
||||
title: string;
|
||||
status: 'created' | 'uploaded'
|
||||
}
|
||||
Reference in New Issue
Block a user