@squidcloud/client 1.0.101 → 1.0.103
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/cjs/index.js +48968 -12
- package/dist/common/src/application.schemas.d.ts +66 -1
- package/dist/common/src/application.types.d.ts +32 -76
- package/dist/common/src/index.d.ts +2 -0
- package/dist/common/src/integrations/ai_assistant.types.d.ts +5 -11
- package/dist/common/src/integrations/api.types.d.ts +5 -5
- package/dist/common/src/integrations/database.types.d.ts +3 -8
- package/dist/common/src/integrations/index.d.ts +27 -4
- package/dist/common/src/query/base-query-builder.d.ts +1 -50
- package/dist/common/src/query/index.d.ts +1 -0
- package/dist/common/src/query/pagination.d.ts +44 -0
- package/dist/common/src/query.types.d.ts +5 -0
- package/dist/common/src/utils/global.utils.d.ts +1 -0
- package/dist/common/src/websocket.impl.d.ts +21 -0
- package/dist/esm/index.js +48888 -12
- package/dist/typescript-client/src/client-id.service.d.ts +2 -0
- package/dist/typescript-client/src/data.manager.d.ts +0 -1
- package/dist/typescript-client/src/distributed-lock.manager.d.ts +2 -5
- package/dist/typescript-client/src/rpc.manager.d.ts +1 -2
- package/dist/typescript-client/src/socket.manager.d.ts +4 -1
- package/package.json +2 -2
- package/dist/cjs/index.js.LICENSE.txt +0 -10
- package/dist/esm/index.js.LICENSE.txt +0 -10
|
@@ -13,6 +13,7 @@ export declare class ClientIdService {
|
|
|
13
13
|
private readonly destructManager;
|
|
14
14
|
private readonly clientTooOldSubject;
|
|
15
15
|
private readonly clientIdSubject;
|
|
16
|
+
private readonly isTenant;
|
|
16
17
|
constructor(destructManager: DestructManager);
|
|
17
18
|
observeClientId(): Observable<ClientId>;
|
|
18
19
|
observeClientTooOld(): Observable<void>;
|
|
@@ -22,4 +23,5 @@ export declare class ClientIdService {
|
|
|
22
23
|
observeClientReadyToBeRegenerated(): Observable<void>;
|
|
23
24
|
getClientId(): ClientId;
|
|
24
25
|
isClientTooOld(): boolean;
|
|
26
|
+
private generateClientId;
|
|
25
27
|
}
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
2
|
/** A handler for a distributed lock that can be released. */
|
|
3
3
|
export interface DistributedLock {
|
|
4
|
-
/**
|
|
5
|
-
|
|
6
|
-
* @returns A promise that resolves when the lock is released.
|
|
7
|
-
*/
|
|
8
|
-
release(): Promise<void>;
|
|
4
|
+
/** Releases the lock. */
|
|
5
|
+
release(): void;
|
|
9
6
|
/**
|
|
10
7
|
* Whether the lock has been released.
|
|
11
8
|
* @returns True if the lock has been released.
|
|
@@ -8,12 +8,11 @@ export declare class RpcManager {
|
|
|
8
8
|
private readonly appId;
|
|
9
9
|
private readonly socketManager;
|
|
10
10
|
private readonly destructManager;
|
|
11
|
-
private readonly headers;
|
|
12
11
|
private readonly authManager;
|
|
13
12
|
private readonly clientIdService;
|
|
14
13
|
private readonly staticHeaders;
|
|
15
14
|
private readonly onGoingRpcCounter;
|
|
16
|
-
constructor(region: SupportedSquidRegion, appId: string, socketManager: SocketManager, destructManager: DestructManager, headers: Record<string, string
|
|
15
|
+
constructor(region: SupportedSquidRegion, appId: string, socketManager: SocketManager, destructManager: DestructManager, headers: Record<string, string> | undefined, authManager: AuthManager, clientIdService: ClientIdService);
|
|
17
16
|
awaitAllSettled(): Promise<void>;
|
|
18
17
|
setStaticHeader(key: string, value: string): void;
|
|
19
18
|
deleteStaticHeader(key: string): void;
|
|
@@ -16,6 +16,7 @@ export declare class SocketManager {
|
|
|
16
16
|
private readonly seenMessageIds;
|
|
17
17
|
private socket;
|
|
18
18
|
private firstConnection;
|
|
19
|
+
private destructSubject;
|
|
19
20
|
/**
|
|
20
21
|
* On a client disconnecting, we wait for a bit to see if the client reconnects,
|
|
21
22
|
* if no reconnect happens within the timeout, we consider the client to be too old.
|
|
@@ -23,11 +24,13 @@ export declare class SocketManager {
|
|
|
23
24
|
* Note: we make this a function so that we can easily override it in tests.
|
|
24
25
|
*/
|
|
25
26
|
private clientTooOldThreshold;
|
|
26
|
-
constructor(clientIdService: ClientIdService, region: SupportedSquidRegion, appId: string, messageNotificationWrapper: (fn: () => any) => any, destructManager: DestructManager,
|
|
27
|
+
constructor(clientIdService: ClientIdService, region: SupportedSquidRegion, appId: string, messageNotificationWrapper: (fn: () => any) => any, destructManager: DestructManager, authManager: AuthManager);
|
|
27
28
|
observeNotifications<T extends MessageToClient>(): Observable<T>;
|
|
28
29
|
observeConnectionReady(): Observable<boolean>;
|
|
29
30
|
sendMessage(message: MessageFromClient): void;
|
|
30
31
|
private connect;
|
|
32
|
+
private onConnectionReady;
|
|
33
|
+
private onMessage;
|
|
31
34
|
private setupMessageAcknowledgments;
|
|
32
35
|
private destruct;
|
|
33
36
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@squidcloud/client",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.103",
|
|
4
4
|
"description": "A typescript implementation of the Squid client",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@supercharge/promise-pool": "^2.3.2",
|
|
38
38
|
"cross-fetch": "^3.1.5",
|
|
39
39
|
"lodash": "^4.17.21",
|
|
40
|
-
"
|
|
40
|
+
"ws": "^8.13.0"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
43
|
"rxjs": ">=7.5.7 <8.0.0"
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Lodash <https://lodash.com/>
|
|
4
|
-
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
5
|
-
* Released under MIT license <https://lodash.com/license>
|
|
6
|
-
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
7
|
-
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Lodash <https://lodash.com/>
|
|
4
|
-
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
5
|
-
* Released under MIT license <https://lodash.com/license>
|
|
6
|
-
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
7
|
-
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */
|