@persistica/flux-mesh 0.0.21 → 0.0.23
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/package.json
CHANGED
package/src/auth/auth.d.ts
CHANGED
|
@@ -19,6 +19,14 @@ export type TTokenPayloadJWT = string & {
|
|
|
19
19
|
* @returns { string } The signed JWT string
|
|
20
20
|
*/
|
|
21
21
|
export declare const generateToken: (payload: TTokenPayload, expiresIn?: number) => string;
|
|
22
|
+
/**
|
|
23
|
+
* Normalizes the authority claim to the string form used throughout mesh.
|
|
24
|
+
*
|
|
25
|
+
* Authorities may return either a ready-made string token or a structured
|
|
26
|
+
* payload object. Structured claims are serialized here so the WebSocket auth
|
|
27
|
+
* payload and downstream channel logic keep receiving a string.
|
|
28
|
+
*/
|
|
29
|
+
export declare const normalizeAuthorityClaimOrThrow: (claim: unknown) => string;
|
|
22
30
|
/**
|
|
23
31
|
* Verifies a JWT token and returns the payload or throws if invalid.
|
|
24
32
|
*
|
|
@@ -4,10 +4,10 @@ export declare const MAX_CHANNEL_MEMBERS_BY_SUBSCRIPTION_TYPE: {
|
|
|
4
4
|
[key in TSubscription_S]: number;
|
|
5
5
|
};
|
|
6
6
|
export declare const MAX_CHANNEL_MEMBERS: number;
|
|
7
|
-
export declare const normalizeSubscriptionType: (subscriptionType?:
|
|
8
|
-
export declare const resolveSubscriptionTypeOrDefault: (subscriptionType?:
|
|
9
|
-
export declare const readMaxChannelMembers: (subscriptionType?:
|
|
10
|
-
export declare const readSubscriptionTypeFromClaim: (claim?:
|
|
7
|
+
export declare const normalizeSubscriptionType: (subscriptionType?: unknown) => TSubscription_S | undefined;
|
|
8
|
+
export declare const resolveSubscriptionTypeOrDefault: (subscriptionType?: unknown) => TSubscription_S;
|
|
9
|
+
export declare const readMaxChannelMembers: (subscriptionType?: unknown) => number;
|
|
10
|
+
export declare const readSubscriptionTypeFromClaim: (claim?: unknown) => TSubscription_S | undefined;
|
|
11
11
|
export declare const canChannelHaveMoreMembers: (memberCount: number, subscriptionType?: TSubscription_S) => boolean;
|
|
12
12
|
export declare class NetworkChannelManager {
|
|
13
13
|
private readonly _globalChannelPubsub;
|