.
This commit is contained in:
1 parent
db60190e19
commit
843e6435cc
9 files changed
+663
-7
No files matched your search
@@ -222,6 +222,48 @@ export interface AutoReservationState {
|
||||
timeline?: AutoReservationTimeline
|
||||
}
|
||||
|
||||
export interface SalvoAttemptInput {
|
||||
offsetMs: number
|
||||
captchaToken: string
|
||||
captchaSolvedAtMs: number
|
||||
}
|
||||
|
||||
export interface AutoSalvoConfig {
|
||||
baseRequest: Omit<ReservationRequest, 'captchaToken'>
|
||||
targetServerTimeMs: number
|
||||
userOffsetMs: number
|
||||
attempts: SalvoAttemptInput[]
|
||||
stopOnSuccess: boolean
|
||||
}
|
||||
|
||||
export interface AutoSalvoAttempt {
|
||||
index: number
|
||||
offsetMs: number
|
||||
effectiveTargetServerMs: number
|
||||
plannedSendAtMs?: number
|
||||
actualSendAtMs?: number
|
||||
arrivalErrorMs?: number
|
||||
rttMs?: number
|
||||
httpStatus?: number
|
||||
status: 'pending' | 'firing' | 'succeeded' | 'failed' | 'skipped'
|
||||
message?: string
|
||||
reservationNum?: string
|
||||
}
|
||||
|
||||
export interface AutoSalvoState {
|
||||
status: 'idle' | 'armed' | 'firing' | 'succeeded' | 'failed' | 'cancelled'
|
||||
targetServerTimeMs?: number
|
||||
userOffsetMs?: number
|
||||
armedAtMs?: number
|
||||
stopOnSuccess: boolean
|
||||
snapshot?: AutoReservationSnapshot
|
||||
attempts: AutoSalvoAttempt[]
|
||||
succeededIndex?: number
|
||||
warning?: string
|
||||
message?: string
|
||||
result?: ReservationResult
|
||||
}
|
||||
|
||||
export interface ReservationApi {
|
||||
getBranches(): Promise<Branch[]>
|
||||
getThemes(branchNum: number): Promise<Theme[]>
|
||||
@@ -240,4 +282,8 @@ export interface ReservationApi {
|
||||
disarmAutoReservation(): Promise<AutoReservationState>
|
||||
getAutoReservationState(): Promise<AutoReservationState>
|
||||
subscribeAutoState(listener: (state: AutoReservationState) => void): () => void
|
||||
armAutoSalvo(config: AutoSalvoConfig): Promise<AutoSalvoState>
|
||||
disarmAutoSalvo(): Promise<AutoSalvoState>
|
||||
getAutoSalvoState(): Promise<AutoSalvoState>
|
||||
subscribeAutoSalvo(listener: (state: AutoSalvoState) => void): () => void
|
||||
}
|
||||
Reference in new issue
Block a user