easyproctor-hml 2.7.10 → 2.7.12

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.
@@ -1,39 +0,0 @@
1
- import { BackendService } from "../backend/BackendService";
2
- import { ChunkStorageService } from "./ChunkStorageService";
3
- export interface BackgroundUploadConfig {
4
- pollInterval?: number;
5
- maxRetries?: number;
6
- baseRetryDelay?: number;
7
- cleanAfterUpload?: boolean;
8
- }
9
- export declare class BackgroundUploadService {
10
- private readonly config;
11
- private readonly chunkStorage;
12
- private readonly backend;
13
- private readonly proctoringId;
14
- private readonly token;
15
- private pollTimer;
16
- private isProcessing;
17
- private isRunning;
18
- private retryCount;
19
- private sessionUrl;
20
- private currentOffset;
21
- private totalBytesPurged;
22
- private readonly STORAGE_KEY_PREFIX;
23
- private readonly GCS_CHUNK_SIZE;
24
- onChunkUploaded?: (chunkId: number, chunkIndex: number) => void;
25
- onUploadError?: (chunkId: number, error: any) => void;
26
- constructor(proctoringId: string, token: string, backend: BackendService, chunkStorage: ChunkStorageService, config?: BackgroundUploadConfig);
27
- private loadSessionState;
28
- private saveSessionState;
29
- private clearSessionState;
30
- start(): void;
31
- stop(): void;
32
- flush(): Promise<void>;
33
- private syncOffset;
34
- private processQueue;
35
- private static concatArrayBuffers;
36
- private uploadData;
37
- static recoverPendingUploads(backend: BackendService, token: string): Promise<string[]>;
38
- private sleep;
39
- }
@@ -1,26 +0,0 @@
1
- export interface VideoChunk {
2
- id?: number;
3
- proctoringId: string;
4
- chunkIndex: number;
5
- arrayBuffer: ArrayBuffer;
6
- timestamp: number;
7
- uploaded: number;
8
- mimeType: string;
9
- }
10
- export declare class ChunkStorageService {
11
- private static readonly DB_NAME;
12
- private static readonly DB_VERSION;
13
- private static readonly STORE_NAME;
14
- private db;
15
- private static detachedArrayBufferCopy;
16
- connect(): Promise<IDBDatabase>;
17
- saveChunk(chunk: Omit<VideoChunk, "id">): Promise<number>;
18
- getPendingChunks(proctoringId: string): Promise<VideoChunk[]>;
19
- getAllChunks(proctoringId: string): Promise<VideoChunk[]>;
20
- deleteChunkIds(chunkIds: number[]): Promise<void>;
21
- clearUploadedChunks(proctoringId: string): Promise<void>;
22
- clearAllChunks(proctoringId: string): Promise<void>;
23
- hasAnyPendingChunks(): Promise<boolean>;
24
- getPendingProctoringIds(): Promise<string[]>;
25
- close(): void;
26
- }