@socketsecurity/sdk 3.1.3 → 3.3.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/CHANGELOG.md +51 -3
- package/README.md +5 -129
- package/dist/constants.d.ts +4 -1
- package/dist/file-upload.d.ts +7 -8
- package/dist/http-client.d.ts +31 -27
- package/dist/index.d.ts +4 -4
- package/dist/index.js +2964 -22582
- package/dist/promise-queue.d.ts +9 -9
- package/dist/socket-sdk-class.d.ts +556 -172
- package/dist/testing.d.ts +9 -9
- package/dist/testing.js +0 -1
- package/dist/types-strict.d.ts +180 -144
- package/dist/types.d.ts +71 -12
- package/dist/utils.d.ts +61 -0
- package/package.json +14 -5
- package/types/api.d.ts +2690 -234
package/dist/promise-queue.d.ts
CHANGED
|
@@ -9,27 +9,27 @@ export declare class PromiseQueue {
|
|
|
9
9
|
* @param maxQueueLength - Maximum queue size (older tasks are dropped if exceeded)
|
|
10
10
|
*/
|
|
11
11
|
constructor(maxConcurrency: number, maxQueueLength?: number | undefined);
|
|
12
|
+
private runNext;
|
|
13
|
+
/**
|
|
14
|
+
* Get the number of tasks currently running
|
|
15
|
+
*/
|
|
16
|
+
get activeCount(): number;
|
|
12
17
|
/**
|
|
13
18
|
* Add a task to the queue
|
|
14
19
|
* @param fn - Async function to execute
|
|
15
20
|
* @returns Promise that resolves with the function's result
|
|
16
21
|
*/
|
|
17
22
|
add<T>(fn: () => Promise<T>): Promise<T>;
|
|
18
|
-
private runNext;
|
|
19
23
|
/**
|
|
20
|
-
*
|
|
24
|
+
* Clear all pending tasks from the queue (does not affect running tasks)
|
|
21
25
|
*/
|
|
22
|
-
|
|
26
|
+
clear(): void;
|
|
23
27
|
/**
|
|
24
|
-
*
|
|
28
|
+
* Wait for all queued and running tasks to complete
|
|
25
29
|
*/
|
|
26
|
-
|
|
30
|
+
onIdle(): Promise<void>;
|
|
27
31
|
/**
|
|
28
32
|
* Get the number of tasks waiting in the queue
|
|
29
33
|
*/
|
|
30
34
|
get pendingCount(): number;
|
|
31
|
-
/**
|
|
32
|
-
* Clear all pending tasks from the queue (does not affect running tasks)
|
|
33
|
-
*/
|
|
34
|
-
clear(): void;
|
|
35
35
|
}
|