@palbase/web 2.0.0 → 2.0.1
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/{analytics-facade-ovP0pF2P.d.cts → analytics-facade-ChlBRcLZ.d.cts} +13 -4
- package/dist/{analytics-facade-DMtGDGfd.d.ts → analytics-facade-G0il4NrT.d.ts} +13 -4
- package/dist/{chunk-V6VTX65P.js → chunk-AIPUO4QX.js} +52 -24
- package/dist/chunk-AIPUO4QX.js.map +1 -0
- package/dist/gen/cli.cjs +4 -5
- package/dist/gen/cli.cjs.map +1 -1
- package/dist/gen/cli.js +4 -5
- package/dist/gen/cli.js.map +1 -1
- package/dist/index.cjs +51 -23
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +1 -1
- package/dist/internal.cjs +51 -23
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +4 -4
- package/dist/internal.d.ts +4 -4
- package/dist/internal.js +1 -1
- package/dist/next/client.cjs +51 -23
- package/dist/next/client.cjs.map +1 -1
- package/dist/next/client.js +1 -1
- package/dist/next/index.cjs +51 -23
- package/dist/next/index.cjs.map +1 -1
- package/dist/next/index.d.cts +3 -3
- package/dist/next/index.d.ts +3 -3
- package/dist/next/index.js +1 -1
- package/dist/{pb-DDM_mCQB.d.cts → pb-B_6o5p79.d.cts} +1 -1
- package/dist/{pb-CvpcQero.d.ts → pb-nPBhqhJr.d.ts} +1 -1
- package/dist/react/index.cjs +1 -1
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +2 -2
- package/dist/react/index.d.ts +2 -2
- package/dist/react/index.js +1 -1
- package/package.json +3 -3
- package/dist/chunk-V6VTX65P.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { f as AnalyticsProperties, g as AuthChangeEvent, h as AuthState, i as AuthSuccess, A as AuthUser, j as Call, k as CallChangeCallback, l as CallParticipant, m as CallState, C as Chat, n as ChatBackend, o as ChatDraft, p as ChatKind, b as ChatMember, c as ChatMessage, q as ChatMessageKind, r as ChatRole, s as ChatState, t as CommsPrefs, F as FlagsView, M as MagicLinkResult, u as MentionRange, v as MessageDirection, N as NotifyScope, O as OAuthExchangeResult, w as PalbeAnalytics, x as PalbeAuth, y as PalbeCalls, P as PalbeConfig, z as PalbeFlags, B as PalbeMessaging, D as PalbeOAuthConfig, E as PalbeRealtime, G as PresenceState, H as RealtimeChannel, R as RealtimeConnectionState, I as RealtimeHandler, a as RealtimePayload, J as RealtimeStatus, K as RealtimeStatusSnapshot, L as RealtimeSubscription, Q as ResolvedMention, S as ResolvedReply, T as SentReceipt, U as UnreadView, V as Unsubscribe } from './analytics-facade-
|
|
1
|
+
export { f as AnalyticsProperties, g as AuthChangeEvent, h as AuthState, i as AuthSuccess, A as AuthUser, j as Call, k as CallChangeCallback, l as CallParticipant, m as CallState, C as Chat, n as ChatBackend, o as ChatDraft, p as ChatKind, b as ChatMember, c as ChatMessage, q as ChatMessageKind, r as ChatRole, s as ChatState, t as CommsPrefs, F as FlagsView, M as MagicLinkResult, u as MentionRange, v as MessageDirection, N as NotifyScope, O as OAuthExchangeResult, w as PalbeAnalytics, x as PalbeAuth, y as PalbeCalls, P as PalbeConfig, z as PalbeFlags, B as PalbeMessaging, D as PalbeOAuthConfig, E as PalbeRealtime, G as PresenceState, H as RealtimeChannel, R as RealtimeConnectionState, I as RealtimeHandler, a as RealtimePayload, J as RealtimeStatus, K as RealtimeStatusSnapshot, L as RealtimeSubscription, Q as ResolvedMention, S as ResolvedReply, T as SentReceipt, U as UnreadView, V as Unsubscribe } from './analytics-facade-ChlBRcLZ.cjs';
|
|
2
2
|
export { B as BackendError, a as BackendErrorKind, F as FieldError, i as isBackendError } from './errors-fDoNdTrJ.cjs';
|
|
3
|
-
export { C as CallOptions, P as PB, U as UploadOptions, a as UploadProgress, p as pb } from './pb-
|
|
3
|
+
export { C as CallOptions, P as PB, U as UploadOptions, a as UploadProgress, p as pb } from './pb-B_6o5p79.cjs';
|
|
4
4
|
export { P as PersistedSession, S as SessionStorageAdapter, l as localStorageSessionStorage, m as memorySessionStorage } from './storage-BPaeSG8K.cjs';
|
|
5
|
-
export { F as FlagValue } from './pooled-flags-
|
|
5
|
+
export { F as FlagValue } from './pooled-flags-4GtDtsiu.js';
|
|
6
6
|
import 'livekit-client';
|
|
7
7
|
|
|
8
8
|
/* tslint:disable */
|
|
@@ -207,6 +207,6 @@ interface MlsGlue {
|
|
|
207
207
|
*/
|
|
208
208
|
declare function initMls(): Promise<MlsGlue>;
|
|
209
209
|
|
|
210
|
-
declare const VERSION = "2.0.
|
|
210
|
+
declare const VERSION = "2.0.1";
|
|
211
211
|
|
|
212
212
|
export { VERSION, initMls };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { f as AnalyticsProperties, g as AuthChangeEvent, h as AuthState, i as AuthSuccess, A as AuthUser, j as Call, k as CallChangeCallback, l as CallParticipant, m as CallState, C as Chat, n as ChatBackend, o as ChatDraft, p as ChatKind, b as ChatMember, c as ChatMessage, q as ChatMessageKind, r as ChatRole, s as ChatState, t as CommsPrefs, F as FlagsView, M as MagicLinkResult, u as MentionRange, v as MessageDirection, N as NotifyScope, O as OAuthExchangeResult, w as PalbeAnalytics, x as PalbeAuth, y as PalbeCalls, P as PalbeConfig, z as PalbeFlags, B as PalbeMessaging, D as PalbeOAuthConfig, E as PalbeRealtime, G as PresenceState, H as RealtimeChannel, R as RealtimeConnectionState, I as RealtimeHandler, a as RealtimePayload, J as RealtimeStatus, K as RealtimeStatusSnapshot, L as RealtimeSubscription, Q as ResolvedMention, S as ResolvedReply, T as SentReceipt, U as UnreadView, V as Unsubscribe } from './analytics-facade-
|
|
1
|
+
export { f as AnalyticsProperties, g as AuthChangeEvent, h as AuthState, i as AuthSuccess, A as AuthUser, j as Call, k as CallChangeCallback, l as CallParticipant, m as CallState, C as Chat, n as ChatBackend, o as ChatDraft, p as ChatKind, b as ChatMember, c as ChatMessage, q as ChatMessageKind, r as ChatRole, s as ChatState, t as CommsPrefs, F as FlagsView, M as MagicLinkResult, u as MentionRange, v as MessageDirection, N as NotifyScope, O as OAuthExchangeResult, w as PalbeAnalytics, x as PalbeAuth, y as PalbeCalls, P as PalbeConfig, z as PalbeFlags, B as PalbeMessaging, D as PalbeOAuthConfig, E as PalbeRealtime, G as PresenceState, H as RealtimeChannel, R as RealtimeConnectionState, I as RealtimeHandler, a as RealtimePayload, J as RealtimeStatus, K as RealtimeStatusSnapshot, L as RealtimeSubscription, Q as ResolvedMention, S as ResolvedReply, T as SentReceipt, U as UnreadView, V as Unsubscribe } from './analytics-facade-G0il4NrT.js';
|
|
2
2
|
export { B as BackendError, a as BackendErrorKind, F as FieldError, i as isBackendError } from './errors-fDoNdTrJ.js';
|
|
3
|
-
export { C as CallOptions, P as PB, U as UploadOptions, a as UploadProgress, p as pb } from './pb-
|
|
3
|
+
export { C as CallOptions, P as PB, U as UploadOptions, a as UploadProgress, p as pb } from './pb-nPBhqhJr.js';
|
|
4
4
|
export { P as PersistedSession, S as SessionStorageAdapter, l as localStorageSessionStorage, m as memorySessionStorage } from './storage-BPaeSG8K.js';
|
|
5
|
-
export { F as FlagValue } from './pooled-flags-
|
|
5
|
+
export { F as FlagValue } from './pooled-flags-4GtDtsiu.js';
|
|
6
6
|
import 'livekit-client';
|
|
7
7
|
|
|
8
8
|
/* tslint:disable */
|
|
@@ -207,6 +207,6 @@ interface MlsGlue {
|
|
|
207
207
|
*/
|
|
208
208
|
declare function initMls(): Promise<MlsGlue>;
|
|
209
209
|
|
|
210
|
-
declare const VERSION = "2.0.
|
|
210
|
+
declare const VERSION = "2.0.1";
|
|
211
211
|
|
|
212
212
|
export { VERSION, initMls };
|
package/dist/index.js
CHANGED
package/dist/internal.cjs
CHANGED
|
@@ -1992,6 +1992,19 @@ var PalbeCalls = class {
|
|
|
1992
1992
|
|
|
1993
1993
|
// ../modules/flags/dist/index.js
|
|
1994
1994
|
var FLAG_NAME_RE = /^[a-zA-Z0-9_-]+$/;
|
|
1995
|
+
function flagEnabled(value) {
|
|
1996
|
+
if (typeof value === "boolean") return value;
|
|
1997
|
+
return value != null && value !== 0 && value !== "";
|
|
1998
|
+
}
|
|
1999
|
+
function flagVariant(value) {
|
|
2000
|
+
return typeof value === "string" ? { name: value } : null;
|
|
2001
|
+
}
|
|
2002
|
+
function mapResponse(res, fn) {
|
|
2003
|
+
if (res.error || res.data == null) {
|
|
2004
|
+
return { ...res, data: null };
|
|
2005
|
+
}
|
|
2006
|
+
return { ...res, data: fn(res.data) };
|
|
2007
|
+
}
|
|
1995
2008
|
var FlagsClient = class {
|
|
1996
2009
|
httpClient;
|
|
1997
2010
|
getCurrentUserId;
|
|
@@ -2011,10 +2024,11 @@ var FlagsClient = class {
|
|
|
2011
2024
|
`Invalid flag name: "${flagName}". Flag names must match ${FLAG_NAME_RE.source}`
|
|
2012
2025
|
);
|
|
2013
2026
|
}
|
|
2014
|
-
const
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2027
|
+
const res = await this.httpClient.request(
|
|
2028
|
+
"GET",
|
|
2029
|
+
this.mergedPath(context)
|
|
2030
|
+
);
|
|
2031
|
+
return mapResponse(res, (snap) => flagEnabled(snap.values?.[flagName]));
|
|
2018
2032
|
}
|
|
2019
2033
|
async getVariant(flagName, context) {
|
|
2020
2034
|
if (!FLAG_NAME_RE.test(flagName)) {
|
|
@@ -2022,16 +2036,29 @@ var FlagsClient = class {
|
|
|
2022
2036
|
`Invalid flag name: "${flagName}". Flag names must match ${FLAG_NAME_RE.source}`
|
|
2023
2037
|
);
|
|
2024
2038
|
}
|
|
2025
|
-
const
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2039
|
+
const res = await this.httpClient.request(
|
|
2040
|
+
"GET",
|
|
2041
|
+
this.mergedPath(context)
|
|
2042
|
+
);
|
|
2043
|
+
if (res.error || res.data == null) {
|
|
2044
|
+
return { ...res, data: null };
|
|
2045
|
+
}
|
|
2046
|
+
return { ...res, data: flagVariant(res.data.values?.[flagName]) };
|
|
2029
2047
|
}
|
|
2030
2048
|
async getAll(context) {
|
|
2031
|
-
const
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2049
|
+
const res = await this.httpClient.request(
|
|
2050
|
+
"GET",
|
|
2051
|
+
this.mergedPath(context)
|
|
2052
|
+
);
|
|
2053
|
+
return mapResponse(res, (snap) => {
|
|
2054
|
+
const values = snap.values ?? {};
|
|
2055
|
+
return Object.keys(values).map((name) => {
|
|
2056
|
+
const value = values[name];
|
|
2057
|
+
const flag = { name, enabled: flagEnabled(value) };
|
|
2058
|
+
if (typeof value === "string") flag.variant = { name: value };
|
|
2059
|
+
return flag;
|
|
2060
|
+
});
|
|
2061
|
+
});
|
|
2035
2062
|
}
|
|
2036
2063
|
/**
|
|
2037
2064
|
* Cold-start read: the full merged flag set for the current auth identity.
|
|
@@ -2130,15 +2157,16 @@ var FlagsClient = class {
|
|
|
2130
2157
|
}
|
|
2131
2158
|
};
|
|
2132
2159
|
}
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2160
|
+
/**
|
|
2161
|
+
* Resolve the merged-read path for a context. With `context.userId` present the
|
|
2162
|
+
* read targets that specific user's merged view (`/v1/user-flags/users/{id}`, a
|
|
2163
|
+
* privileged cross-user read); otherwise the current auth user's view
|
|
2164
|
+
* (`/v1/user-flags`). `context.properties` has no server-side targeting support
|
|
2165
|
+
* in the user-flags module and is ignored.
|
|
2166
|
+
*/
|
|
2167
|
+
mergedPath(context) {
|
|
2168
|
+
const uid = context?.userId;
|
|
2169
|
+
return uid ? `/v1/user-flags/users/${encodeURIComponent(uid)}` : "/v1/user-flags";
|
|
2142
2170
|
}
|
|
2143
2171
|
};
|
|
2144
2172
|
var DEFAULT_POLL_MS = 3e4;
|
|
@@ -2600,7 +2628,7 @@ var PalbeFlags = class {
|
|
|
2600
2628
|
*
|
|
2601
2629
|
* DEVIATION from iOS sync-cache parity: the platform does not propagate
|
|
2602
2630
|
* variant metadata into the user-flags snapshot/delta cache, so this is an
|
|
2603
|
-
* ASYNC transport read (`GET /v1/flags
|
|
2631
|
+
* ASYNC transport read (derived from `GET /v1/user-flags`), not a cache lookup.
|
|
2604
2632
|
*/
|
|
2605
2633
|
async getVariant(key) {
|
|
2606
2634
|
let res;
|
|
@@ -8940,7 +8968,7 @@ function defaultSessionStorage(key) {
|
|
|
8940
8968
|
}
|
|
8941
8969
|
|
|
8942
8970
|
// src/version.ts
|
|
8943
|
-
var VERSION = "2.0.
|
|
8971
|
+
var VERSION = "2.0.1";
|
|
8944
8972
|
|
|
8945
8973
|
// src/runtime.ts
|
|
8946
8974
|
function buildRuntime(config) {
|