@vitia.ai/secure-api-client-vue 0.1.3 → 0.1.5
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/dist/index.cjs +7 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +17 -4
- package/dist/index.mjs +674 -596
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -26,18 +26,27 @@ export declare class Notifications {
|
|
|
26
26
|
private _shouldReconnect;
|
|
27
27
|
private _reconnectAttempt;
|
|
28
28
|
private _connectPromise?;
|
|
29
|
+
private chunkBuffers;
|
|
29
30
|
constructor(client: SecureApiClient);
|
|
31
|
+
private executeWithRetry;
|
|
30
32
|
private scheduleReconnect;
|
|
31
33
|
close(): void;
|
|
32
34
|
connect(): Promise<void>;
|
|
33
35
|
generateRandomString: (length: number) => string;
|
|
34
|
-
|
|
36
|
+
private distributeMessage;
|
|
37
|
+
unsubscribe(eventType: EventType, eventValue: string, label: string): void;
|
|
35
38
|
unlisten(label: string): void;
|
|
36
|
-
|
|
39
|
+
subscribe(eventType: EventType, eventValue: string, fn: (msg: any) => void, label?: string): () => void;
|
|
37
40
|
onMessage(fn: (msg: any) => void, label?: string): () => void;
|
|
38
41
|
disconnect(): void;
|
|
39
42
|
}
|
|
40
43
|
|
|
44
|
+
export declare interface PagingState {
|
|
45
|
+
pages: any[];
|
|
46
|
+
count: number;
|
|
47
|
+
total: number;
|
|
48
|
+
}
|
|
49
|
+
|
|
41
50
|
export declare const SDK_CLIENT: unique symbol;
|
|
42
51
|
|
|
43
52
|
export declare const SdkPlugin: {
|
|
@@ -52,6 +61,7 @@ export declare class SecureApiClient {
|
|
|
52
61
|
private session;
|
|
53
62
|
private serverPublicKeyPem;
|
|
54
63
|
private clientIdentityKeyPromise;
|
|
64
|
+
pagingBuffer: Record<string, PagingState>;
|
|
55
65
|
notifications: Notifications;
|
|
56
66
|
constructor(config: SecureApiClientConfig);
|
|
57
67
|
private loadPersistedSession;
|
|
@@ -63,8 +73,10 @@ export declare class SecureApiClient {
|
|
|
63
73
|
getSession(): Readonly<SessionState>;
|
|
64
74
|
private encryptBody;
|
|
65
75
|
private signRequest;
|
|
66
|
-
get<T = any>(path: string): Promise<T>;
|
|
67
|
-
post<T = any>(path: string, body: any): Promise<T>;
|
|
76
|
+
get<T = any>(path: string, extraHeaders?: object, raw?: boolean): Promise<T>;
|
|
77
|
+
post<T = any>(path: string, body: any, extraHeaders?: object): Promise<T>;
|
|
78
|
+
get_all_pages_async(path: string, callback?: (pages: any[]) => void, extraHeaders?: object): Promise<void>;
|
|
79
|
+
get_all_pages_sync(path: string, extraHeaders?: object): Promise<any[]>;
|
|
68
80
|
ensureSession(): Promise<void>;
|
|
69
81
|
extendHandshake(): Promise<void>;
|
|
70
82
|
decryptAndVerify(msg: any): Promise<any>;
|
|
@@ -75,6 +87,7 @@ export declare class SecureApiClient {
|
|
|
75
87
|
expiresAt: any;
|
|
76
88
|
refreshToken: any;
|
|
77
89
|
}>;
|
|
90
|
+
logout(): Promise<void>;
|
|
78
91
|
refresh(): Promise<{
|
|
79
92
|
accessToken: any;
|
|
80
93
|
tokenType: any;
|