@lunora/client 1.0.0-alpha.14 → 1.0.0-alpha.16
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/auth/index.d.mts +1 -1
- package/dist/auth/index.d.ts +1 -1
- package/dist/index.d.mts +5 -16
- package/dist/index.d.ts +5 -16
- package/dist/index.mjs +2 -2
- package/dist/packem_shared/CONFLICT_ERROR_CODE-B8gQ8tyU.mjs +33 -0
- package/dist/packem_shared/{LunoraClient-DEEhIPi_.mjs → LunoraClient-Zb_AVP5H.mjs} +77 -1
- package/dist/packem_shared/{createServerClient-DgJaS1_M.mjs → createServerClient-CFrM8ZQO.mjs} +1 -1
- package/dist/packem_shared/{lunora-client.d-DTwbfUWF.d.ts → lunora-client.d-CPMaTnsC.d.mts} +108 -4
- package/dist/packem_shared/{lunora-client.d-DTwbfUWF.d.mts → lunora-client.d-CPMaTnsC.d.ts} +108 -4
- package/dist/packem_shared/{preload.d-BEp0JJeu.d.mts → preload.d-Bl3z1rPo.d.mts} +1 -1
- package/dist/packem_shared/{preload.d-CK2IYf5B.d.ts → preload.d-DH0CqSxy.d.ts} +1 -1
- package/dist/query/index.d.mts +2 -2
- package/dist/query/index.d.ts +2 -2
- package/dist/ssr/index.d.mts +3 -3
- package/dist/ssr/index.d.ts +3 -3
- package/dist/ssr/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/packem_shared/CONFLICT_ERROR_CODE-aUdVbEDw.mjs +0 -4
package/dist/auth/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { U as User, L as LunoraClient } from "../packem_shared/lunora-client.d-
|
|
1
|
+
import { U as User, L as LunoraClient } from "../packem_shared/lunora-client.d-CPMaTnsC.mjs";
|
|
2
2
|
import '@lunora/runtime';
|
|
3
3
|
interface IdentityStore {
|
|
4
4
|
/** Read the current resolved user, or `null` when signed out / not yet resolved. */
|
package/dist/auth/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { U as User, L as LunoraClient } from "../packem_shared/lunora-client.d-
|
|
1
|
+
import { U as User, L as LunoraClient } from "../packem_shared/lunora-client.d-CPMaTnsC.js";
|
|
2
2
|
import '@lunora/runtime';
|
|
3
3
|
interface IdentityStore {
|
|
4
4
|
/** Read the current resolved user, or `null` when signed out / not yet resolved. */
|
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { c as PersistenceAdapter, B as BookmarkStorage, F as FunctionReference, A as ArgsOf, M as MutationCallOptions, R as ReturnOf, O as OfflineQueueOptions, Q as QueryCacheAdapter, d as ReconnectOptions } from "./packem_shared/lunora-client.d-
|
|
2
|
-
export { type e as BatchSlot, type
|
|
3
|
-
export { p as preloadQuery, a as preloadedQueryResult } from "./packem_shared/preload.d-
|
|
4
|
-
export type { AuthCapabilities, AuthImpersonation, AuthPage, AuthSession, AuthUser, CronJobInfo, VectorIndexSummary, VectorQueryMatch } from '@lunora/runtime';
|
|
1
|
+
import { c as PersistenceAdapter, B as BookmarkStorage, F as FunctionReference, A as ArgsOf, M as MutationCallOptions, R as ReturnOf, O as OfflineQueueOptions, Q as QueryCacheAdapter, d as ReconnectOptions } from "./packem_shared/lunora-client.d-CPMaTnsC.mjs";
|
|
2
|
+
export { type e as BatchSlot, C as CONFLICT_ERROR_CODE, type f as CachedQuery, type g as ClientMessage, type h as ClientShapeSubscribeMessage, type i as ClientShapeUnsubscribeMessage, type j as ConnectionStatus, D as DEFAULT_MAX_BUFFER, type k as FunctionArgumentDescriptor, type l as FunctionDescriptor, type G as GlobalFacetResult, type m as GlobalFacetValue, type n as GlobalFilterClause, type o as GlobalTableInfo, type p as GlobalTablePage, L as LunoraClient, type q as LunoraClientError, type r as LunoraClientOptions, type s as LunoraErrorCode, type t as MutationSettledEvent, type u as OptimisticLocalStore, type v as OptimisticUpdate, type w as OutboxMutation, type x as OutboxSink, type y as PersistedMutation, type P as Preloaded, type z as RowOp, type E as RpcEnvelope, type H as RpcResponseBody, type I as ScheduleRecord, type J as SchedulerPoolStatus, type K as SchedulerStatus, type N as ServerMessage, type T as ServerPokeEndMessage, type V as ServerPokePartMessage, type W as ServerPokeStartMessage, type X as ShardTrafficEntry, type Y as ShardTrafficResult, type Z as StorageListPage, type _ as StorageObject, type $ as StreamHandle, type a0 as StreamIterable, type a1 as SubscriptionCallback, type S as SubscriptionError, type b as SubscriptionErrorCallback, a2 as SubscriptionRegistry, type a3 as SubscriptionState, type a4 as SyncWatermark, type a as Unsubscribe, type U as User, type a5 as WorkflowInstanceAction, type a6 as WorkflowInstanceDetail, type a7 as WorkflowInstancePage, type a8 as WorkflowInstanceStatus, type a9 as WorkflowInstanceSummary, type aa as WorkflowStepDetail, ab as createLocalStore, ac as createStream, ad as getErrorCode, ae as getRetryAfterMs, af as isConflictError, ag as isForbiddenError, ah as isRateLimitedError, ai as isUnauthorizedError } from "./packem_shared/lunora-client.d-CPMaTnsC.mjs";
|
|
3
|
+
export { p as preloadQuery, a as preloadedQueryResult } from "./packem_shared/preload.d-Bl3z1rPo.mjs";
|
|
4
|
+
export type { AuthCapabilities, AuthImpersonation, AuthPage, AuthSession, AuthUser, CronJobInfo, KvKeyEntry, KvKeyListResult, KvNamespaceSummary, KvValueResult, VectorIndexSummary, VectorQueryMatch } from '@lunora/runtime';
|
|
5
5
|
/**
|
|
6
6
|
* The slice of React Native's `AsyncStorage` (or any async key/value store —
|
|
7
7
|
* Expo `SecureStore`, a wrapped `localForage`, an in-memory map in tests) this
|
|
@@ -95,17 +95,6 @@ declare const isMutationDelta: (value: unknown) => value is MutationDelta;
|
|
|
95
95
|
* when an `insert`/`update` delta carries no `row` to splice in.
|
|
96
96
|
*/
|
|
97
97
|
declare const applyDelta: (current: unknown, delta: MutationDelta) => undefined | unknown[];
|
|
98
|
-
/** Error code the server uses for optimistic-concurrency conflicts (HTTP 409). */
|
|
99
|
-
declare const CONFLICT_ERROR_CODE = "CONFLICT";
|
|
100
|
-
/**
|
|
101
|
-
* Whether an unknown rejection is an optimistic-concurrency conflict — the
|
|
102
|
-
* server lost a write race and the caller should refetch and retry (or surface
|
|
103
|
-
* the conflict). Structural check on the `code` property the client attaches
|
|
104
|
-
* when decoding the worker's `{ error: { code, message } }` envelope.
|
|
105
|
-
*/
|
|
106
|
-
declare const isConflictError: (error: unknown) => error is Error & {
|
|
107
|
-
code: "CONFLICT";
|
|
108
|
-
};
|
|
109
98
|
/** The single transport method a mutation runner needs — narrowed so adapters can test against a stub. */
|
|
110
99
|
interface MutationCapableClient<F extends FunctionReference> {
|
|
111
100
|
mutation: (function_: F, args: ArgsOf<F>, options?: MutationCallOptions<unknown, unknown, ArgsOf<F>>) => Promise<ReturnOf<F>>;
|
|
@@ -409,4 +398,4 @@ interface ReconnectCalculator {
|
|
|
409
398
|
reset: () => void;
|
|
410
399
|
}
|
|
411
400
|
declare const createReconnect: (options?: ReconnectOptions, random?: () => number) => ReconnectCalculator;
|
|
412
|
-
export { type ArgsOf, type AsyncStorageLike, type AsyncStoragePersistenceOptions, type BookmarkStorage,
|
|
401
|
+
export { type ArgsOf, type AsyncStorageLike, type AsyncStoragePersistenceOptions, type BookmarkStorage, type FunctionReference, type IndexedDbPersistenceOptions, type IndexedDbQueryCacheOptions, type MutationCallOptions, type MutationDelta, type MutationRunnerSinks, type MutatorHandle, type MutatorRunnerSinks, type MutatorTransaction, OfflineQueue, type OfflineQueueOptions, type PersistenceAdapter, type QueryCacheAdapter, type QueuedMutation, type ReconnectCalculator, type ReconnectOptions, type ReturnOf, applyDelta, createAsyncStoragePersistence, createInMemoryBookmarkStorage, createInMemoryPersistence, createInMemoryQueryCache, createIndexedDbPersistence, createIndexedDbQueryCache, createMutationRunner, createMutatorRunner, createReconnect, isMutationDelta, queryCacheKey };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { c as PersistenceAdapter, B as BookmarkStorage, F as FunctionReference, A as ArgsOf, M as MutationCallOptions, R as ReturnOf, O as OfflineQueueOptions, Q as QueryCacheAdapter, d as ReconnectOptions } from "./packem_shared/lunora-client.d-
|
|
2
|
-
export { type e as BatchSlot, type
|
|
3
|
-
export { p as preloadQuery, a as preloadedQueryResult } from "./packem_shared/preload.d-
|
|
4
|
-
export type { AuthCapabilities, AuthImpersonation, AuthPage, AuthSession, AuthUser, CronJobInfo, VectorIndexSummary, VectorQueryMatch } from '@lunora/runtime';
|
|
1
|
+
import { c as PersistenceAdapter, B as BookmarkStorage, F as FunctionReference, A as ArgsOf, M as MutationCallOptions, R as ReturnOf, O as OfflineQueueOptions, Q as QueryCacheAdapter, d as ReconnectOptions } from "./packem_shared/lunora-client.d-CPMaTnsC.js";
|
|
2
|
+
export { type e as BatchSlot, C as CONFLICT_ERROR_CODE, type f as CachedQuery, type g as ClientMessage, type h as ClientShapeSubscribeMessage, type i as ClientShapeUnsubscribeMessage, type j as ConnectionStatus, D as DEFAULT_MAX_BUFFER, type k as FunctionArgumentDescriptor, type l as FunctionDescriptor, type G as GlobalFacetResult, type m as GlobalFacetValue, type n as GlobalFilterClause, type o as GlobalTableInfo, type p as GlobalTablePage, L as LunoraClient, type q as LunoraClientError, type r as LunoraClientOptions, type s as LunoraErrorCode, type t as MutationSettledEvent, type u as OptimisticLocalStore, type v as OptimisticUpdate, type w as OutboxMutation, type x as OutboxSink, type y as PersistedMutation, type P as Preloaded, type z as RowOp, type E as RpcEnvelope, type H as RpcResponseBody, type I as ScheduleRecord, type J as SchedulerPoolStatus, type K as SchedulerStatus, type N as ServerMessage, type T as ServerPokeEndMessage, type V as ServerPokePartMessage, type W as ServerPokeStartMessage, type X as ShardTrafficEntry, type Y as ShardTrafficResult, type Z as StorageListPage, type _ as StorageObject, type $ as StreamHandle, type a0 as StreamIterable, type a1 as SubscriptionCallback, type S as SubscriptionError, type b as SubscriptionErrorCallback, a2 as SubscriptionRegistry, type a3 as SubscriptionState, type a4 as SyncWatermark, type a as Unsubscribe, type U as User, type a5 as WorkflowInstanceAction, type a6 as WorkflowInstanceDetail, type a7 as WorkflowInstancePage, type a8 as WorkflowInstanceStatus, type a9 as WorkflowInstanceSummary, type aa as WorkflowStepDetail, ab as createLocalStore, ac as createStream, ad as getErrorCode, ae as getRetryAfterMs, af as isConflictError, ag as isForbiddenError, ah as isRateLimitedError, ai as isUnauthorizedError } from "./packem_shared/lunora-client.d-CPMaTnsC.js";
|
|
3
|
+
export { p as preloadQuery, a as preloadedQueryResult } from "./packem_shared/preload.d-DH0CqSxy.js";
|
|
4
|
+
export type { AuthCapabilities, AuthImpersonation, AuthPage, AuthSession, AuthUser, CronJobInfo, KvKeyEntry, KvKeyListResult, KvNamespaceSummary, KvValueResult, VectorIndexSummary, VectorQueryMatch } from '@lunora/runtime';
|
|
5
5
|
/**
|
|
6
6
|
* The slice of React Native's `AsyncStorage` (or any async key/value store —
|
|
7
7
|
* Expo `SecureStore`, a wrapped `localForage`, an in-memory map in tests) this
|
|
@@ -95,17 +95,6 @@ declare const isMutationDelta: (value: unknown) => value is MutationDelta;
|
|
|
95
95
|
* when an `insert`/`update` delta carries no `row` to splice in.
|
|
96
96
|
*/
|
|
97
97
|
declare const applyDelta: (current: unknown, delta: MutationDelta) => undefined | unknown[];
|
|
98
|
-
/** Error code the server uses for optimistic-concurrency conflicts (HTTP 409). */
|
|
99
|
-
declare const CONFLICT_ERROR_CODE = "CONFLICT";
|
|
100
|
-
/**
|
|
101
|
-
* Whether an unknown rejection is an optimistic-concurrency conflict — the
|
|
102
|
-
* server lost a write race and the caller should refetch and retry (or surface
|
|
103
|
-
* the conflict). Structural check on the `code` property the client attaches
|
|
104
|
-
* when decoding the worker's `{ error: { code, message } }` envelope.
|
|
105
|
-
*/
|
|
106
|
-
declare const isConflictError: (error: unknown) => error is Error & {
|
|
107
|
-
code: "CONFLICT";
|
|
108
|
-
};
|
|
109
98
|
/** The single transport method a mutation runner needs — narrowed so adapters can test against a stub. */
|
|
110
99
|
interface MutationCapableClient<F extends FunctionReference> {
|
|
111
100
|
mutation: (function_: F, args: ArgsOf<F>, options?: MutationCallOptions<unknown, unknown, ArgsOf<F>>) => Promise<ReturnOf<F>>;
|
|
@@ -409,4 +398,4 @@ interface ReconnectCalculator {
|
|
|
409
398
|
reset: () => void;
|
|
410
399
|
}
|
|
411
400
|
declare const createReconnect: (options?: ReconnectOptions, random?: () => number) => ReconnectCalculator;
|
|
412
|
-
export { type ArgsOf, type AsyncStorageLike, type AsyncStoragePersistenceOptions, type BookmarkStorage,
|
|
401
|
+
export { type ArgsOf, type AsyncStorageLike, type AsyncStoragePersistenceOptions, type BookmarkStorage, type FunctionReference, type IndexedDbPersistenceOptions, type IndexedDbQueryCacheOptions, type MutationCallOptions, type MutationDelta, type MutationRunnerSinks, type MutatorHandle, type MutatorRunnerSinks, type MutatorTransaction, OfflineQueue, type OfflineQueueOptions, type PersistenceAdapter, type QueryCacheAdapter, type QueuedMutation, type ReconnectCalculator, type ReconnectOptions, type ReturnOf, applyDelta, createAsyncStoragePersistence, createInMemoryBookmarkStorage, createInMemoryPersistence, createInMemoryQueryCache, createIndexedDbPersistence, createIndexedDbQueryCache, createMutationRunner, createMutatorRunner, createReconnect, isMutationDelta, queryCacheKey };
|
package/dist/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export { createAsyncStoragePersistence } from './packem_shared/createAsyncStoragePersistence-1Z5BZ8RC.mjs';
|
|
2
2
|
export { default as createInMemoryBookmarkStorage } from './packem_shared/createInMemoryBookmarkStorage-BoN7a7TH.mjs';
|
|
3
3
|
export { applyDelta, isMutationDelta } from './packem_shared/applyDelta-4jFGTPA3.mjs';
|
|
4
|
-
export { CONFLICT_ERROR_CODE, isConflictError } from './packem_shared/CONFLICT_ERROR_CODE-
|
|
4
|
+
export { CONFLICT_ERROR_CODE, getErrorCode, getRetryAfterMs, isConflictError, isForbiddenError, isRateLimitedError, isUnauthorizedError } from './packem_shared/CONFLICT_ERROR_CODE-B8gQ8tyU.mjs';
|
|
5
5
|
export { c as createLocalStore } from './packem_shared/local-store-BNgN3Dw3.mjs';
|
|
6
|
-
export { LunoraClient } from './packem_shared/LunoraClient-
|
|
6
|
+
export { LunoraClient } from './packem_shared/LunoraClient-Zb_AVP5H.mjs';
|
|
7
7
|
export { createMutationRunner } from './packem_shared/createMutationRunner-BqsavzvG.mjs';
|
|
8
8
|
export { createMutatorRunner } from './packem_shared/createMutatorRunner-BETvCd0p.mjs';
|
|
9
9
|
export { O as OfflineQueue } from './packem_shared/offline-queue-B9vfdSqp.mjs';
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
const LUNORA_ERROR_CODES = [
|
|
2
|
+
"BAD_REQUEST",
|
|
3
|
+
"CONFLICT",
|
|
4
|
+
"COUNT_RLS_UNSUPPORTED",
|
|
5
|
+
"FORBIDDEN",
|
|
6
|
+
"INTERNAL_SERVER_ERROR",
|
|
7
|
+
"MASK_UNSUPPORTED",
|
|
8
|
+
"NOT_FOUND",
|
|
9
|
+
"NOT_IMPLEMENTED",
|
|
10
|
+
"RELATION_PREDICATE_UNSUPPORTED",
|
|
11
|
+
"TOO_MANY_REQUESTS",
|
|
12
|
+
"UNAUTHORIZED",
|
|
13
|
+
"UNPROCESSABLE"
|
|
14
|
+
];
|
|
15
|
+
const KNOWN_ERROR_CODES = new Set(LUNORA_ERROR_CODES);
|
|
16
|
+
const CONFLICT_ERROR_CODE = "CONFLICT";
|
|
17
|
+
const isConflictError = (error) => error instanceof Error && error.code === CONFLICT_ERROR_CODE;
|
|
18
|
+
const isForbiddenError = (error) => error instanceof Error && error.code === "FORBIDDEN";
|
|
19
|
+
const isUnauthorizedError = (error) => error instanceof Error && error.code === "UNAUTHORIZED";
|
|
20
|
+
const isRateLimitedError = (error) => error instanceof Error && error.code === "TOO_MANY_REQUESTS";
|
|
21
|
+
const getErrorCode = (error) => {
|
|
22
|
+
if (!(error instanceof Error)) {
|
|
23
|
+
return void 0;
|
|
24
|
+
}
|
|
25
|
+
const { code } = error;
|
|
26
|
+
return typeof code === "string" && KNOWN_ERROR_CODES.has(code) ? code : void 0;
|
|
27
|
+
};
|
|
28
|
+
const getRetryAfterMs = (error) => {
|
|
29
|
+
const value = error?.data?.retryAfterMs;
|
|
30
|
+
return typeof value === "number" && Number.isFinite(value) ? value : void 0;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export { CONFLICT_ERROR_CODE, getErrorCode, getRetryAfterMs, isConflictError, isForbiddenError, isRateLimitedError, isUnauthorizedError };
|
|
@@ -182,7 +182,14 @@ const decodeWire = (value, depth = 0) => {
|
|
|
182
182
|
if (error.name !== name) {
|
|
183
183
|
Object.defineProperty(error, "name", { configurable: true, value: name, writable: true });
|
|
184
184
|
}
|
|
185
|
-
|
|
185
|
+
const props = decodeWire(value[4], depth + 1);
|
|
186
|
+
for (const key of Object.keys(props)) {
|
|
187
|
+
if (key === UNSAFE_KEY) {
|
|
188
|
+
Object.defineProperty(error, key, { configurable: true, enumerable: true, value: props[key], writable: true });
|
|
189
|
+
} else {
|
|
190
|
+
error[key] = props[key];
|
|
191
|
+
}
|
|
192
|
+
}
|
|
186
193
|
if (value.length > 5) {
|
|
187
194
|
Object.defineProperty(error, "cause", { configurable: true, value: decodeWire(value[5], depth + 1), writable: true });
|
|
188
195
|
}
|
|
@@ -298,6 +305,9 @@ const GLOBAL_TABLE_PATH = "/_lunora/admin/global/table";
|
|
|
298
305
|
const GLOBAL_FACET_PATH = "/_lunora/admin/global/facet";
|
|
299
306
|
const VECTOR_INDEXES_PATH = "/_lunora/admin/vector/indexes";
|
|
300
307
|
const VECTOR_QUERY_PATH = "/_lunora/admin/vector/query";
|
|
308
|
+
const KV_NAMESPACES_PATH = "/_lunora/admin/kv/namespaces";
|
|
309
|
+
const KV_KEYS_PATH = "/_lunora/admin/kv/keys";
|
|
310
|
+
const KV_VALUE_PATH = "/_lunora/admin/kv/value";
|
|
301
311
|
const AUTH_USERS_PATH = "/_lunora/admin/auth/users";
|
|
302
312
|
const AUTH_SESSIONS_PATH = "/_lunora/admin/auth/sessions";
|
|
303
313
|
const AUTH_CREATE_USER_PATH = "/_lunora/admin/auth/users/create";
|
|
@@ -1562,6 +1572,72 @@ class LunoraClient {
|
|
|
1562
1572
|
const body = await this.adminFetch(VECTOR_QUERY_PATH, "POST", options);
|
|
1563
1573
|
return body.matches ?? [];
|
|
1564
1574
|
}
|
|
1575
|
+
// --- KV namespace admin -------------------------------------------------
|
|
1576
|
+
/**
|
|
1577
|
+
* List the worker's registered Workers KV namespaces (binding names). Hits
|
|
1578
|
+
* the admin-gated `GET /_lunora/admin/kv/namespaces` endpoint — the worker
|
|
1579
|
+
* must be built with a `kvIntrospector` and `adminToken`. Powers the
|
|
1580
|
+
* studio's KV browser.
|
|
1581
|
+
*/
|
|
1582
|
+
async listKvNamespaces() {
|
|
1583
|
+
if (this.closed) {
|
|
1584
|
+
throw new Error("LunoraClient is closed");
|
|
1585
|
+
}
|
|
1586
|
+
const body = await this.adminFetch(KV_NAMESPACES_PATH, "GET");
|
|
1587
|
+
return body.namespaces ?? [];
|
|
1588
|
+
}
|
|
1589
|
+
/**
|
|
1590
|
+
* List keys in a KV namespace, optionally filtered by `prefix` and
|
|
1591
|
+
* paginated via `cursor`. Hits the admin-gated
|
|
1592
|
+
* `GET /_lunora/admin/kv/keys` endpoint.
|
|
1593
|
+
*/
|
|
1594
|
+
async listKvKeys(options) {
|
|
1595
|
+
if (this.closed) {
|
|
1596
|
+
throw new Error("LunoraClient is closed");
|
|
1597
|
+
}
|
|
1598
|
+
const path = withQuery(KV_KEYS_PATH, {
|
|
1599
|
+
cursor: options.cursor,
|
|
1600
|
+
limit: options.limit,
|
|
1601
|
+
namespace: options.namespace,
|
|
1602
|
+
prefix: options.prefix
|
|
1603
|
+
});
|
|
1604
|
+
return await this.adminFetch(path, "GET");
|
|
1605
|
+
}
|
|
1606
|
+
/**
|
|
1607
|
+
* Read a KV value (as text) and its metadata. Hits the admin-gated
|
|
1608
|
+
* `GET /_lunora/admin/kv/value` endpoint. Returns `{ value: null, metadata: null }`
|
|
1609
|
+
* when the key is absent.
|
|
1610
|
+
*/
|
|
1611
|
+
async getKvValue(options) {
|
|
1612
|
+
if (this.closed) {
|
|
1613
|
+
throw new Error("LunoraClient is closed");
|
|
1614
|
+
}
|
|
1615
|
+
const path = withQuery(KV_VALUE_PATH, { key: options.key, namespace: options.namespace });
|
|
1616
|
+
return await this.adminFetch(path, "GET");
|
|
1617
|
+
}
|
|
1618
|
+
/**
|
|
1619
|
+
* Write a string value to a KV namespace. Accepts an absolute `expiration`
|
|
1620
|
+
* (Unix seconds) or a relative `expirationTtl`, plus optional `metadata` —
|
|
1621
|
+
* re-send the loaded values on edit so a save preserves rather than clears
|
|
1622
|
+
* them. Hits the admin-gated `PUT /_lunora/admin/kv/value` endpoint.
|
|
1623
|
+
*/
|
|
1624
|
+
async putKvValue(options) {
|
|
1625
|
+
if (this.closed) {
|
|
1626
|
+
throw new Error("LunoraClient is closed");
|
|
1627
|
+
}
|
|
1628
|
+
await this.adminFetch(KV_VALUE_PATH, "PUT", options);
|
|
1629
|
+
}
|
|
1630
|
+
/**
|
|
1631
|
+
* Delete a key from a KV namespace. No-op when the key is absent. Hits the
|
|
1632
|
+
* admin-gated `DELETE /_lunora/admin/kv/value` endpoint.
|
|
1633
|
+
*/
|
|
1634
|
+
async deleteKvKey(options) {
|
|
1635
|
+
if (this.closed) {
|
|
1636
|
+
throw new Error("LunoraClient is closed");
|
|
1637
|
+
}
|
|
1638
|
+
const path = withQuery(KV_VALUE_PATH, { key: options.key, namespace: options.namespace });
|
|
1639
|
+
await this.adminFetch(path, "DELETE");
|
|
1640
|
+
}
|
|
1565
1641
|
// --- Auth admin ---------------------------------------------------------
|
|
1566
1642
|
/**
|
|
1567
1643
|
* List authenticated users, paged and optionally searched / filtered / sorted.
|
|
@@ -1,4 +1,59 @@
|
|
|
1
|
-
import { CronJobInfo, VectorIndexSummary, VectorQueryMatch, AuthUser, AuthPage, AuthImpersonation, AuthCapabilities, AuthSession } from '@lunora/runtime';
|
|
1
|
+
import { CronJobInfo, VectorIndexSummary, VectorQueryMatch, KvNamespaceSummary, KvKeyListResult, KvValueResult, AuthUser, AuthPage, AuthImpersonation, AuthCapabilities, AuthSession } from '@lunora/runtime';
|
|
2
|
+
/**
|
|
3
|
+
* The machine-readable error codes a client can observe on a failed
|
|
4
|
+
* RPC/batch/subscription. Mirrors the server's `CODE_STATUS` keys
|
|
5
|
+
* (`@lunora/server`'s `error.ts`) by hand — the client is framework-neutral and
|
|
6
|
+
* must never import the server package (wrong dependency direction / would pull
|
|
7
|
+
* the server into the browser bundle). Keep this list in sync when a server code
|
|
8
|
+
* is added or removed (see the drift-guard note in the plan/maintenance docs).
|
|
9
|
+
*/
|
|
10
|
+
declare const LUNORA_ERROR_CODES: readonly ["BAD_REQUEST", "CONFLICT", "COUNT_RLS_UNSUPPORTED", "FORBIDDEN", "INTERNAL_SERVER_ERROR", "MASK_UNSUPPORTED", "NOT_FOUND", "NOT_IMPLEMENTED", "RELATION_PREDICATE_UNSUPPORTED", "TOO_MANY_REQUESTS", "UNAUTHORIZED", "UNPROCESSABLE"];
|
|
11
|
+
/** A machine-readable error `code` the client may observe. Mirror of the server's `LunoraErrorCode`. */
|
|
12
|
+
type LunoraErrorCode = (typeof LUNORA_ERROR_CODES)[number];
|
|
13
|
+
/** Error code the server uses for optimistic-concurrency conflicts (HTTP 409). */
|
|
14
|
+
declare const CONFLICT_ERROR_CODE = "CONFLICT";
|
|
15
|
+
/**
|
|
16
|
+
* Whether an unknown rejection is an optimistic-concurrency conflict — the
|
|
17
|
+
* server lost a write race and the caller should refetch and retry (or surface
|
|
18
|
+
* the conflict). Structural check on the `code` property the client attaches
|
|
19
|
+
* when decoding the worker's `{ error: { code, message } }` envelope.
|
|
20
|
+
*/
|
|
21
|
+
declare const isConflictError: (error: unknown) => error is Error & {
|
|
22
|
+
code: "CONFLICT";
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Whether a rejection is an RLS/policy denial (`FORBIDDEN`, HTTP 403) — the
|
|
26
|
+
* caller is authenticated but not permitted to read/write the row. The most
|
|
27
|
+
* common per-call error a UI must handle in an RLS-first app.
|
|
28
|
+
*/
|
|
29
|
+
declare const isForbiddenError: (error: unknown) => error is Error & {
|
|
30
|
+
code: "FORBIDDEN";
|
|
31
|
+
};
|
|
32
|
+
/** Whether a rejection is an authentication failure (`UNAUTHORIZED`, HTTP 401) — no/invalid identity. */
|
|
33
|
+
declare const isUnauthorizedError: (error: unknown) => error is Error & {
|
|
34
|
+
code: "UNAUTHORIZED";
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Whether a rejection is a rate-limit denial (`TOO_MANY_REQUESTS`, HTTP 429).
|
|
38
|
+
* The retry hint (if the server sent one) is read with {@link getRetryAfterMs}.
|
|
39
|
+
*/
|
|
40
|
+
declare const isRateLimitedError: (error: unknown) => error is Error & {
|
|
41
|
+
code: "TOO_MANY_REQUESTS";
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Read the server's machine-readable `code` off a rejection, narrowed to the
|
|
45
|
+
* known {@link LunoraErrorCode} union. Returns `undefined` for a non-`Error`, a
|
|
46
|
+
* missing code, or an unrecognized code string (forward-compat server codes read
|
|
47
|
+
* as `undefined` here rather than being falsely narrowed).
|
|
48
|
+
*/
|
|
49
|
+
declare const getErrorCode: (error: unknown) => LunoraErrorCode | undefined;
|
|
50
|
+
/**
|
|
51
|
+
* Read the rate-limit retry hint (`data.retryAfterMs`) off a
|
|
52
|
+
* `TOO_MANY_REQUESTS` rejection without hand-casting the `unknown` `data`
|
|
53
|
+
* payload. Returns the finite millisecond value the server sent, or `undefined`
|
|
54
|
+
* when absent/non-numeric. Pair with {@link isRateLimitedError}.
|
|
55
|
+
*/
|
|
56
|
+
declare const getRetryAfterMs: (error: unknown) => number | undefined;
|
|
2
57
|
/** The registered function kinds a {@link FunctionReference} can describe. `stream` is a query that yields multiple frames over the WS. */
|
|
3
58
|
type FunctionKind = "action" | "mutation" | "query" | "stream";
|
|
4
59
|
/**
|
|
@@ -1152,9 +1207,9 @@ interface SyncWatermark {
|
|
|
1152
1207
|
checkpoint?: number;
|
|
1153
1208
|
mutationId?: number;
|
|
1154
1209
|
}
|
|
1155
|
-
/** An `Error` carrying the server's machine-readable `code` and (for a `LunoraError`) structured `data`. The client's public error contract for RPC/batch failures. */
|
|
1210
|
+
/** An `Error` carrying the server's machine-readable `code` and (for a `LunoraError`) structured `data`. The client's public error contract for RPC/batch failures. The `(string & {})` arm keeps forward-compat/unknown server codes assignable without losing autocomplete on the known {@link LunoraErrorCode} union. */
|
|
1156
1211
|
type LunoraClientError = Error & {
|
|
1157
|
-
code?: string;
|
|
1212
|
+
code?: LunoraErrorCode | (string & {});
|
|
1158
1213
|
data?: unknown;
|
|
1159
1214
|
};
|
|
1160
1215
|
/** One demuxed result slot of a {@link LunoraClient.batch} call (plan 088). */
|
|
@@ -1810,6 +1865,55 @@ declare class LunoraClient {
|
|
|
1810
1865
|
topK?: number;
|
|
1811
1866
|
}): Promise<VectorQueryMatch[]>;
|
|
1812
1867
|
/**
|
|
1868
|
+
* List the worker's registered Workers KV namespaces (binding names). Hits
|
|
1869
|
+
* the admin-gated `GET /_lunora/admin/kv/namespaces` endpoint — the worker
|
|
1870
|
+
* must be built with a `kvIntrospector` and `adminToken`. Powers the
|
|
1871
|
+
* studio's KV browser.
|
|
1872
|
+
*/
|
|
1873
|
+
listKvNamespaces(): Promise<KvNamespaceSummary[]>;
|
|
1874
|
+
/**
|
|
1875
|
+
* List keys in a KV namespace, optionally filtered by `prefix` and
|
|
1876
|
+
* paginated via `cursor`. Hits the admin-gated
|
|
1877
|
+
* `GET /_lunora/admin/kv/keys` endpoint.
|
|
1878
|
+
*/
|
|
1879
|
+
listKvKeys(options: {
|
|
1880
|
+
cursor?: string;
|
|
1881
|
+
limit?: number;
|
|
1882
|
+
namespace: string;
|
|
1883
|
+
prefix?: string;
|
|
1884
|
+
}): Promise<KvKeyListResult>;
|
|
1885
|
+
/**
|
|
1886
|
+
* Read a KV value (as text) and its metadata. Hits the admin-gated
|
|
1887
|
+
* `GET /_lunora/admin/kv/value` endpoint. Returns `{ value: null, metadata: null }`
|
|
1888
|
+
* when the key is absent.
|
|
1889
|
+
*/
|
|
1890
|
+
getKvValue(options: {
|
|
1891
|
+
key: string;
|
|
1892
|
+
namespace: string;
|
|
1893
|
+
}): Promise<KvValueResult>;
|
|
1894
|
+
/**
|
|
1895
|
+
* Write a string value to a KV namespace. Accepts an absolute `expiration`
|
|
1896
|
+
* (Unix seconds) or a relative `expirationTtl`, plus optional `metadata` —
|
|
1897
|
+
* re-send the loaded values on edit so a save preserves rather than clears
|
|
1898
|
+
* them. Hits the admin-gated `PUT /_lunora/admin/kv/value` endpoint.
|
|
1899
|
+
*/
|
|
1900
|
+
putKvValue(options: {
|
|
1901
|
+
expiration?: number;
|
|
1902
|
+
expirationTtl?: number;
|
|
1903
|
+
key: string;
|
|
1904
|
+
metadata?: unknown;
|
|
1905
|
+
namespace: string;
|
|
1906
|
+
value: string;
|
|
1907
|
+
}): Promise<void>;
|
|
1908
|
+
/**
|
|
1909
|
+
* Delete a key from a KV namespace. No-op when the key is absent. Hits the
|
|
1910
|
+
* admin-gated `DELETE /_lunora/admin/kv/value` endpoint.
|
|
1911
|
+
*/
|
|
1912
|
+
deleteKvKey(options: {
|
|
1913
|
+
key: string;
|
|
1914
|
+
namespace: string;
|
|
1915
|
+
}): Promise<void>;
|
|
1916
|
+
/**
|
|
1813
1917
|
* List authenticated users, paged and optionally searched / filtered / sorted.
|
|
1814
1918
|
* Hits the admin-gated `GET /_lunora/admin/auth/users` endpoint — the worker
|
|
1815
1919
|
* must be built with an `authAdmin` and `adminToken`. Powers the studio's
|
|
@@ -2308,4 +2412,4 @@ declare class LunoraClient {
|
|
|
2308
2412
|
*/
|
|
2309
2413
|
private settleReplayBatchSlots;
|
|
2310
2414
|
}
|
|
2311
|
-
export {
|
|
2415
|
+
export { StreamHandle as $, ArgsOf as A, BookmarkStorage as B, CONFLICT_ERROR_CODE as C, DEFAULT_MAX_BUFFER as D, RpcEnvelope as E, FunctionReference as F, GlobalFacetResult as G, RpcResponseBody as H, ScheduleRecord as I, SchedulerPoolStatus as J, SchedulerStatus as K, LunoraClient as L, MutationCallOptions as M, ServerMessage as N, OfflineQueueOptions as O, Preloaded as P, QueryCacheAdapter as Q, ReturnOf as R, SubscriptionError as S, ServerPokeEndMessage as T, User as U, ServerPokePartMessage as V, ServerPokeStartMessage as W, ShardTrafficEntry as X, ShardTrafficResult as Y, StorageListPage as Z, StorageObject as _, Unsubscribe as a, StreamIterable as a0, SubscriptionCallback as a1, SubscriptionRegistry as a2, SubscriptionState as a3, SyncWatermark as a4, WorkflowInstanceAction as a5, WorkflowInstanceDetail as a6, WorkflowInstancePage as a7, WorkflowInstanceStatus as a8, WorkflowInstanceSummary as a9, WorkflowStepDetail as aa, createLocalStore as ab, createStream as ac, getErrorCode as ad, getRetryAfterMs as ae, isConflictError as af, isForbiddenError as ag, isRateLimitedError as ah, isUnauthorizedError as ai, SubscriptionErrorCallback as b, PersistenceAdapter as c, ReconnectOptions as d, BatchSlot as e, CachedQuery as f, ClientMessage as g, ClientShapeSubscribeMessage as h, ClientShapeUnsubscribeMessage as i, ConnectionStatus as j, FunctionArgumentDescriptor as k, FunctionDescriptor as l, GlobalFacetValue as m, GlobalFilterClause as n, GlobalTableInfo as o, GlobalTablePage as p, LunoraClientError as q, LunoraClientOptions as r, LunoraErrorCode as s, MutationSettledEvent as t, OptimisticLocalStore as u, OptimisticUpdate as v, OutboxMutation as w, OutboxSink as x, PersistedMutation as y, RowOp as z };
|
|
@@ -1,4 +1,59 @@
|
|
|
1
|
-
import { CronJobInfo, VectorIndexSummary, VectorQueryMatch, AuthUser, AuthPage, AuthImpersonation, AuthCapabilities, AuthSession } from '@lunora/runtime';
|
|
1
|
+
import { CronJobInfo, VectorIndexSummary, VectorQueryMatch, KvNamespaceSummary, KvKeyListResult, KvValueResult, AuthUser, AuthPage, AuthImpersonation, AuthCapabilities, AuthSession } from '@lunora/runtime';
|
|
2
|
+
/**
|
|
3
|
+
* The machine-readable error codes a client can observe on a failed
|
|
4
|
+
* RPC/batch/subscription. Mirrors the server's `CODE_STATUS` keys
|
|
5
|
+
* (`@lunora/server`'s `error.ts`) by hand — the client is framework-neutral and
|
|
6
|
+
* must never import the server package (wrong dependency direction / would pull
|
|
7
|
+
* the server into the browser bundle). Keep this list in sync when a server code
|
|
8
|
+
* is added or removed (see the drift-guard note in the plan/maintenance docs).
|
|
9
|
+
*/
|
|
10
|
+
declare const LUNORA_ERROR_CODES: readonly ["BAD_REQUEST", "CONFLICT", "COUNT_RLS_UNSUPPORTED", "FORBIDDEN", "INTERNAL_SERVER_ERROR", "MASK_UNSUPPORTED", "NOT_FOUND", "NOT_IMPLEMENTED", "RELATION_PREDICATE_UNSUPPORTED", "TOO_MANY_REQUESTS", "UNAUTHORIZED", "UNPROCESSABLE"];
|
|
11
|
+
/** A machine-readable error `code` the client may observe. Mirror of the server's `LunoraErrorCode`. */
|
|
12
|
+
type LunoraErrorCode = (typeof LUNORA_ERROR_CODES)[number];
|
|
13
|
+
/** Error code the server uses for optimistic-concurrency conflicts (HTTP 409). */
|
|
14
|
+
declare const CONFLICT_ERROR_CODE = "CONFLICT";
|
|
15
|
+
/**
|
|
16
|
+
* Whether an unknown rejection is an optimistic-concurrency conflict — the
|
|
17
|
+
* server lost a write race and the caller should refetch and retry (or surface
|
|
18
|
+
* the conflict). Structural check on the `code` property the client attaches
|
|
19
|
+
* when decoding the worker's `{ error: { code, message } }` envelope.
|
|
20
|
+
*/
|
|
21
|
+
declare const isConflictError: (error: unknown) => error is Error & {
|
|
22
|
+
code: "CONFLICT";
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Whether a rejection is an RLS/policy denial (`FORBIDDEN`, HTTP 403) — the
|
|
26
|
+
* caller is authenticated but not permitted to read/write the row. The most
|
|
27
|
+
* common per-call error a UI must handle in an RLS-first app.
|
|
28
|
+
*/
|
|
29
|
+
declare const isForbiddenError: (error: unknown) => error is Error & {
|
|
30
|
+
code: "FORBIDDEN";
|
|
31
|
+
};
|
|
32
|
+
/** Whether a rejection is an authentication failure (`UNAUTHORIZED`, HTTP 401) — no/invalid identity. */
|
|
33
|
+
declare const isUnauthorizedError: (error: unknown) => error is Error & {
|
|
34
|
+
code: "UNAUTHORIZED";
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Whether a rejection is a rate-limit denial (`TOO_MANY_REQUESTS`, HTTP 429).
|
|
38
|
+
* The retry hint (if the server sent one) is read with {@link getRetryAfterMs}.
|
|
39
|
+
*/
|
|
40
|
+
declare const isRateLimitedError: (error: unknown) => error is Error & {
|
|
41
|
+
code: "TOO_MANY_REQUESTS";
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Read the server's machine-readable `code` off a rejection, narrowed to the
|
|
45
|
+
* known {@link LunoraErrorCode} union. Returns `undefined` for a non-`Error`, a
|
|
46
|
+
* missing code, or an unrecognized code string (forward-compat server codes read
|
|
47
|
+
* as `undefined` here rather than being falsely narrowed).
|
|
48
|
+
*/
|
|
49
|
+
declare const getErrorCode: (error: unknown) => LunoraErrorCode | undefined;
|
|
50
|
+
/**
|
|
51
|
+
* Read the rate-limit retry hint (`data.retryAfterMs`) off a
|
|
52
|
+
* `TOO_MANY_REQUESTS` rejection without hand-casting the `unknown` `data`
|
|
53
|
+
* payload. Returns the finite millisecond value the server sent, or `undefined`
|
|
54
|
+
* when absent/non-numeric. Pair with {@link isRateLimitedError}.
|
|
55
|
+
*/
|
|
56
|
+
declare const getRetryAfterMs: (error: unknown) => number | undefined;
|
|
2
57
|
/** The registered function kinds a {@link FunctionReference} can describe. `stream` is a query that yields multiple frames over the WS. */
|
|
3
58
|
type FunctionKind = "action" | "mutation" | "query" | "stream";
|
|
4
59
|
/**
|
|
@@ -1152,9 +1207,9 @@ interface SyncWatermark {
|
|
|
1152
1207
|
checkpoint?: number;
|
|
1153
1208
|
mutationId?: number;
|
|
1154
1209
|
}
|
|
1155
|
-
/** An `Error` carrying the server's machine-readable `code` and (for a `LunoraError`) structured `data`. The client's public error contract for RPC/batch failures. */
|
|
1210
|
+
/** An `Error` carrying the server's machine-readable `code` and (for a `LunoraError`) structured `data`. The client's public error contract for RPC/batch failures. The `(string & {})` arm keeps forward-compat/unknown server codes assignable without losing autocomplete on the known {@link LunoraErrorCode} union. */
|
|
1156
1211
|
type LunoraClientError = Error & {
|
|
1157
|
-
code?: string;
|
|
1212
|
+
code?: LunoraErrorCode | (string & {});
|
|
1158
1213
|
data?: unknown;
|
|
1159
1214
|
};
|
|
1160
1215
|
/** One demuxed result slot of a {@link LunoraClient.batch} call (plan 088). */
|
|
@@ -1810,6 +1865,55 @@ declare class LunoraClient {
|
|
|
1810
1865
|
topK?: number;
|
|
1811
1866
|
}): Promise<VectorQueryMatch[]>;
|
|
1812
1867
|
/**
|
|
1868
|
+
* List the worker's registered Workers KV namespaces (binding names). Hits
|
|
1869
|
+
* the admin-gated `GET /_lunora/admin/kv/namespaces` endpoint — the worker
|
|
1870
|
+
* must be built with a `kvIntrospector` and `adminToken`. Powers the
|
|
1871
|
+
* studio's KV browser.
|
|
1872
|
+
*/
|
|
1873
|
+
listKvNamespaces(): Promise<KvNamespaceSummary[]>;
|
|
1874
|
+
/**
|
|
1875
|
+
* List keys in a KV namespace, optionally filtered by `prefix` and
|
|
1876
|
+
* paginated via `cursor`. Hits the admin-gated
|
|
1877
|
+
* `GET /_lunora/admin/kv/keys` endpoint.
|
|
1878
|
+
*/
|
|
1879
|
+
listKvKeys(options: {
|
|
1880
|
+
cursor?: string;
|
|
1881
|
+
limit?: number;
|
|
1882
|
+
namespace: string;
|
|
1883
|
+
prefix?: string;
|
|
1884
|
+
}): Promise<KvKeyListResult>;
|
|
1885
|
+
/**
|
|
1886
|
+
* Read a KV value (as text) and its metadata. Hits the admin-gated
|
|
1887
|
+
* `GET /_lunora/admin/kv/value` endpoint. Returns `{ value: null, metadata: null }`
|
|
1888
|
+
* when the key is absent.
|
|
1889
|
+
*/
|
|
1890
|
+
getKvValue(options: {
|
|
1891
|
+
key: string;
|
|
1892
|
+
namespace: string;
|
|
1893
|
+
}): Promise<KvValueResult>;
|
|
1894
|
+
/**
|
|
1895
|
+
* Write a string value to a KV namespace. Accepts an absolute `expiration`
|
|
1896
|
+
* (Unix seconds) or a relative `expirationTtl`, plus optional `metadata` —
|
|
1897
|
+
* re-send the loaded values on edit so a save preserves rather than clears
|
|
1898
|
+
* them. Hits the admin-gated `PUT /_lunora/admin/kv/value` endpoint.
|
|
1899
|
+
*/
|
|
1900
|
+
putKvValue(options: {
|
|
1901
|
+
expiration?: number;
|
|
1902
|
+
expirationTtl?: number;
|
|
1903
|
+
key: string;
|
|
1904
|
+
metadata?: unknown;
|
|
1905
|
+
namespace: string;
|
|
1906
|
+
value: string;
|
|
1907
|
+
}): Promise<void>;
|
|
1908
|
+
/**
|
|
1909
|
+
* Delete a key from a KV namespace. No-op when the key is absent. Hits the
|
|
1910
|
+
* admin-gated `DELETE /_lunora/admin/kv/value` endpoint.
|
|
1911
|
+
*/
|
|
1912
|
+
deleteKvKey(options: {
|
|
1913
|
+
key: string;
|
|
1914
|
+
namespace: string;
|
|
1915
|
+
}): Promise<void>;
|
|
1916
|
+
/**
|
|
1813
1917
|
* List authenticated users, paged and optionally searched / filtered / sorted.
|
|
1814
1918
|
* Hits the admin-gated `GET /_lunora/admin/auth/users` endpoint — the worker
|
|
1815
1919
|
* must be built with an `authAdmin` and `adminToken`. Powers the studio's
|
|
@@ -2308,4 +2412,4 @@ declare class LunoraClient {
|
|
|
2308
2412
|
*/
|
|
2309
2413
|
private settleReplayBatchSlots;
|
|
2310
2414
|
}
|
|
2311
|
-
export {
|
|
2415
|
+
export { StreamHandle as $, ArgsOf as A, BookmarkStorage as B, CONFLICT_ERROR_CODE as C, DEFAULT_MAX_BUFFER as D, RpcEnvelope as E, FunctionReference as F, GlobalFacetResult as G, RpcResponseBody as H, ScheduleRecord as I, SchedulerPoolStatus as J, SchedulerStatus as K, LunoraClient as L, MutationCallOptions as M, ServerMessage as N, OfflineQueueOptions as O, Preloaded as P, QueryCacheAdapter as Q, ReturnOf as R, SubscriptionError as S, ServerPokeEndMessage as T, User as U, ServerPokePartMessage as V, ServerPokeStartMessage as W, ShardTrafficEntry as X, ShardTrafficResult as Y, StorageListPage as Z, StorageObject as _, Unsubscribe as a, StreamIterable as a0, SubscriptionCallback as a1, SubscriptionRegistry as a2, SubscriptionState as a3, SyncWatermark as a4, WorkflowInstanceAction as a5, WorkflowInstanceDetail as a6, WorkflowInstancePage as a7, WorkflowInstanceStatus as a8, WorkflowInstanceSummary as a9, WorkflowStepDetail as aa, createLocalStore as ab, createStream as ac, getErrorCode as ad, getRetryAfterMs as ae, isConflictError as af, isForbiddenError as ag, isRateLimitedError as ah, isUnauthorizedError as ai, SubscriptionErrorCallback as b, PersistenceAdapter as c, ReconnectOptions as d, BatchSlot as e, CachedQuery as f, ClientMessage as g, ClientShapeSubscribeMessage as h, ClientShapeUnsubscribeMessage as i, ConnectionStatus as j, FunctionArgumentDescriptor as k, FunctionDescriptor as l, GlobalFacetValue as m, GlobalFilterClause as n, GlobalTableInfo as o, GlobalTablePage as p, LunoraClientError as q, LunoraClientOptions as r, LunoraErrorCode as s, MutationSettledEvent as t, OptimisticLocalStore as u, OptimisticUpdate as v, OutboxMutation as w, OutboxSink as x, PersistedMutation as y, RowOp as z };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as FunctionReference, L as LunoraClient, A as ArgsOf, R as ReturnOf, P as Preloaded } from "./lunora-client.d-
|
|
1
|
+
import { F as FunctionReference, L as LunoraClient, A as ArgsOf, R as ReturnOf, P as Preloaded } from "./lunora-client.d-CPMaTnsC.mjs";
|
|
2
2
|
/**
|
|
3
3
|
* Run a query once on the server (during SSR) and capture its result in a
|
|
4
4
|
* serializable {@link Preloaded} token. Embed the token in the rendered HTML and
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as FunctionReference, L as LunoraClient, A as ArgsOf, R as ReturnOf, P as Preloaded } from "./lunora-client.d-
|
|
1
|
+
import { F as FunctionReference, L as LunoraClient, A as ArgsOf, R as ReturnOf, P as Preloaded } from "./lunora-client.d-CPMaTnsC.js";
|
|
2
2
|
/**
|
|
3
3
|
* Run a query once on the server (during SSR) and capture its result in a
|
|
4
4
|
* serializable {@link Preloaded} token. Embed the token in the rendered HTML and
|
package/dist/query/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as SubscriptionError, F as FunctionReference, A as ArgsOf, R as ReturnOf, L as LunoraClient, a as Unsubscribe } from "../packem_shared/lunora-client.d-
|
|
2
|
-
export type { b as SubscriptionErrorCallback } from "../packem_shared/lunora-client.d-
|
|
1
|
+
import { S as SubscriptionError, F as FunctionReference, A as ArgsOf, R as ReturnOf, L as LunoraClient, a as Unsubscribe } from "../packem_shared/lunora-client.d-CPMaTnsC.mjs";
|
|
2
|
+
export type { b as SubscriptionErrorCallback } from "../packem_shared/lunora-client.d-CPMaTnsC.mjs";
|
|
3
3
|
import '@lunora/runtime';
|
|
4
4
|
/**
|
|
5
5
|
* The sentinel a framework adapter resolves its reactive args to when it wants
|
package/dist/query/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as SubscriptionError, F as FunctionReference, A as ArgsOf, R as ReturnOf, L as LunoraClient, a as Unsubscribe } from "../packem_shared/lunora-client.d-
|
|
2
|
-
export type { b as SubscriptionErrorCallback } from "../packem_shared/lunora-client.d-
|
|
1
|
+
import { S as SubscriptionError, F as FunctionReference, A as ArgsOf, R as ReturnOf, L as LunoraClient, a as Unsubscribe } from "../packem_shared/lunora-client.d-CPMaTnsC.js";
|
|
2
|
+
export type { b as SubscriptionErrorCallback } from "../packem_shared/lunora-client.d-CPMaTnsC.js";
|
|
3
3
|
import '@lunora/runtime';
|
|
4
4
|
/**
|
|
5
5
|
* The sentinel a framework adapter resolves its reactive args to when it wants
|
package/dist/ssr/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { P as Preloaded, L as LunoraClient } from "../packem_shared/lunora-client.d-
|
|
2
|
-
export type { A as ArgsOf, F as FunctionReference, R as ReturnOf } from "../packem_shared/lunora-client.d-
|
|
3
|
-
export { p as preloadQuery, a as preloadedQueryResult } from "../packem_shared/preload.d-
|
|
1
|
+
import { P as Preloaded, L as LunoraClient } from "../packem_shared/lunora-client.d-CPMaTnsC.mjs";
|
|
2
|
+
export type { A as ArgsOf, F as FunctionReference, R as ReturnOf } from "../packem_shared/lunora-client.d-CPMaTnsC.mjs";
|
|
3
|
+
export { p as preloadQuery, a as preloadedQueryResult } from "../packem_shared/preload.d-Bl3z1rPo.mjs";
|
|
4
4
|
import '@lunora/runtime';
|
|
5
5
|
/**
|
|
6
6
|
* Structural shape of a better-auth `getSession` call's resolved value.
|
package/dist/ssr/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { P as Preloaded, L as LunoraClient } from "../packem_shared/lunora-client.d-
|
|
2
|
-
export type { A as ArgsOf, F as FunctionReference, R as ReturnOf } from "../packem_shared/lunora-client.d-
|
|
3
|
-
export { p as preloadQuery, a as preloadedQueryResult } from "../packem_shared/preload.d-
|
|
1
|
+
import { P as Preloaded, L as LunoraClient } from "../packem_shared/lunora-client.d-CPMaTnsC.js";
|
|
2
|
+
export type { A as ArgsOf, F as FunctionReference, R as ReturnOf } from "../packem_shared/lunora-client.d-CPMaTnsC.js";
|
|
3
|
+
export { p as preloadQuery, a as preloadedQueryResult } from "../packem_shared/preload.d-DH0CqSxy.js";
|
|
4
4
|
import '@lunora/runtime';
|
|
5
5
|
/**
|
|
6
6
|
* Structural shape of a better-auth `getSession` call's resolved value.
|
package/dist/ssr/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { getServerSession } from '../packem_shared/getServerSession-8jXewqxd.mjs';
|
|
2
2
|
export { deserializePreloaded, serializePreloaded } from '../packem_shared/deserializePreloaded-C0eJTY_W.mjs';
|
|
3
|
-
export { createServerClient } from '../packem_shared/createServerClient-
|
|
3
|
+
export { createServerClient } from '../packem_shared/createServerClient-CFrM8ZQO.mjs';
|
|
4
4
|
export { preloadQuery, preloadedQueryResult } from '../packem_shared/preloadQuery-lobFkD2Z.mjs';
|
package/package.json
CHANGED