@lunora/client 1.0.0-alpha.17 → 1.0.0-alpha.19
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/LICENSE.md +6 -0
- package/dist/auth/index.d.mts +1 -1
- package/dist/auth/index.d.ts +1 -1
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.mjs +1 -1
- package/dist/packem_shared/{LunoraClient-jOfAmV8f.mjs → LunoraClient-BECgZjx4.mjs} +98 -0
- package/dist/packem_shared/{createServerClient-Blht8tLm.mjs → createServerClient-Cet4TATX.mjs} +1 -1
- package/dist/packem_shared/{lunora-client.d-DPLSlPiP.d.mts → lunora-client.d-Dy4neKF6.d.mts} +102 -1
- package/dist/packem_shared/{lunora-client.d-DPLSlPiP.d.ts → lunora-client.d-Dy4neKF6.d.ts} +102 -1
- package/dist/packem_shared/{preload.d-Bpi7xweC.d.mts → preload.d-BQaCmS5J.d.mts} +1 -1
- package/dist/packem_shared/{preload.d-CmFdZFQi.d.ts → preload.d-DI-5eqHP.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 +2 -2
package/LICENSE.md
CHANGED
|
@@ -103,3 +103,9 @@ Unless required by applicable law or agreed to in writing, software distributed
|
|
|
103
103
|
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
|
104
104
|
CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
|
105
105
|
specific language governing permissions and limitations under the License.
|
|
106
|
+
|
|
107
|
+
<!-- DEPENDENCIES -->
|
|
108
|
+
<!-- /DEPENDENCIES -->
|
|
109
|
+
|
|
110
|
+
<!-- TYPE_DEPENDENCIES -->
|
|
111
|
+
<!-- /TYPE_DEPENDENCIES -->
|
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-Dy4neKF6.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-Dy4neKF6.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, 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-
|
|
3
|
-
export { p as preloadQuery, a as preloadedQueryResult } from "./packem_shared/preload.d-
|
|
4
|
-
export type { AuthCapabilities, AuthImpersonation, AuthPage, AuthSession, AuthUser, CronJobInfo, KvKeyEntry, KvKeyListResult, KvNamespaceSummary, KvValueResult, 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-Dy4neKF6.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-Dy4neKF6.mjs";
|
|
3
|
+
export { p as preloadQuery, a as preloadedQueryResult } from "./packem_shared/preload.d-BQaCmS5J.mjs";
|
|
4
|
+
export type { AuthCapabilities, AuthConfigInfo, AuthImpersonation, AuthPage, AuthSession, AuthUser, AuthUserFieldSpec, 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
|
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, 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-
|
|
3
|
-
export { p as preloadQuery, a as preloadedQueryResult } from "./packem_shared/preload.d-
|
|
4
|
-
export type { AuthCapabilities, AuthImpersonation, AuthPage, AuthSession, AuthUser, CronJobInfo, KvKeyEntry, KvKeyListResult, KvNamespaceSummary, KvValueResult, 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-Dy4neKF6.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-Dy4neKF6.js";
|
|
3
|
+
export { p as preloadQuery, a as preloadedQueryResult } from "./packem_shared/preload.d-DI-5eqHP.js";
|
|
4
|
+
export type { AuthCapabilities, AuthConfigInfo, AuthImpersonation, AuthPage, AuthSession, AuthUser, AuthUserFieldSpec, 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
|
package/dist/index.mjs
CHANGED
|
@@ -3,7 +3,7 @@ export { default as createInMemoryBookmarkStorage } from './packem_shared/create
|
|
|
3
3
|
export { applyDelta, isMutationDelta } from './packem_shared/applyDelta-4jFGTPA3.mjs';
|
|
4
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-BECgZjx4.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';
|
|
@@ -332,6 +332,24 @@ const AUTH_ORG_MEMBERS_PATH = "/_lunora/admin/auth/organizations/members";
|
|
|
332
332
|
const AUTH_ORG_INVITATIONS_PATH = "/_lunora/admin/auth/organizations/invitations";
|
|
333
333
|
const AUTH_REMOVE_MEMBER_PATH = "/_lunora/admin/auth/organizations/members/remove";
|
|
334
334
|
const AUTH_CANCEL_INVITATION_PATH = "/_lunora/admin/auth/organizations/invitations/cancel";
|
|
335
|
+
const AUTH_CONFIG_PATH = "/_lunora/admin/auth/config";
|
|
336
|
+
const AUTH_CREATE_ORG_PATH = "/_lunora/admin/auth/organizations/create";
|
|
337
|
+
const AUTH_UPDATE_ORG_PATH = "/_lunora/admin/auth/organizations/update";
|
|
338
|
+
const AUTH_REMOVE_ORG_PATH = "/_lunora/admin/auth/organizations/remove";
|
|
339
|
+
const AUTH_ADD_MEMBER_PATH = "/_lunora/admin/auth/organizations/members/add";
|
|
340
|
+
const AUTH_INVITE_MEMBER_PATH = "/_lunora/admin/auth/organizations/members/invite";
|
|
341
|
+
const AUTH_MEMBER_ROLE_PATH = "/_lunora/admin/auth/organizations/members/role";
|
|
342
|
+
const AUTH_ORG_TEAMS_PATH = "/_lunora/admin/auth/organizations/teams";
|
|
343
|
+
const AUTH_CREATE_TEAM_PATH = "/_lunora/admin/auth/organizations/teams/create";
|
|
344
|
+
const AUTH_UPDATE_TEAM_PATH = "/_lunora/admin/auth/organizations/teams/update";
|
|
345
|
+
const AUTH_REMOVE_TEAM_PATH = "/_lunora/admin/auth/organizations/teams/remove";
|
|
346
|
+
const AUTH_ORG_TEAM_MEMBERS_PATH = "/_lunora/admin/auth/organizations/teams/members";
|
|
347
|
+
const AUTH_ADD_TEAM_MEMBER_PATH = "/_lunora/admin/auth/organizations/teams/members/add";
|
|
348
|
+
const AUTH_REMOVE_TEAM_MEMBER_PATH = "/_lunora/admin/auth/organizations/teams/members/remove";
|
|
349
|
+
const AUTH_ORG_ROLES_PATH = "/_lunora/admin/auth/organizations/roles";
|
|
350
|
+
const AUTH_CREATE_ROLE_PATH = "/_lunora/admin/auth/organizations/roles/create";
|
|
351
|
+
const AUTH_UPDATE_ROLE_PATH = "/_lunora/admin/auth/organizations/roles/update";
|
|
352
|
+
const AUTH_REMOVE_ROLE_PATH = "/_lunora/admin/auth/organizations/roles/remove";
|
|
335
353
|
const DEFAULT_AUTH_BASE_PATH = "/api/auth";
|
|
336
354
|
const GET_SESSION_PATH = "/get-session";
|
|
337
355
|
const deriveWsUrl = (url) => {
|
|
@@ -1766,6 +1784,86 @@ class LunoraClient {
|
|
|
1766
1784
|
async cancelAuthOrgInvitation(input) {
|
|
1767
1785
|
await this.adminFetch(AUTH_CANCEL_INVITATION_PATH, "POST", input);
|
|
1768
1786
|
}
|
|
1787
|
+
/**
|
|
1788
|
+
* Report the deployment's auth configuration — enabled plugins, sign-in
|
|
1789
|
+
* methods, user-settable create-user fields, organization sub-features
|
|
1790
|
+
* (teams / roles), and session / rate-limit policy. Drives the config panel
|
|
1791
|
+
* and the dynamic create-user form. Never carries a secret.
|
|
1792
|
+
*/
|
|
1793
|
+
async getAuthConfig() {
|
|
1794
|
+
return await this.adminFetch(AUTH_CONFIG_PATH, "GET");
|
|
1795
|
+
}
|
|
1796
|
+
/** Create an organization; optionally seed an `owner` member for `ownerId`. */
|
|
1797
|
+
async createAuthOrganization(input) {
|
|
1798
|
+
return await this.adminFetch(AUTH_CREATE_ORG_PATH, "POST", input);
|
|
1799
|
+
}
|
|
1800
|
+
/** Update an organization's name/slug/logo/metadata. */
|
|
1801
|
+
async updateAuthOrganization(input) {
|
|
1802
|
+
return await this.adminFetch(AUTH_UPDATE_ORG_PATH, "POST", input);
|
|
1803
|
+
}
|
|
1804
|
+
/** Delete an organization and cascade its members, invitations, teams, and custom roles. */
|
|
1805
|
+
async deleteAuthOrganization(input) {
|
|
1806
|
+
await this.adminFetch(AUTH_REMOVE_ORG_PATH, "POST", input);
|
|
1807
|
+
}
|
|
1808
|
+
/** Directly add an existing user to an organization (no invitation/acceptance). */
|
|
1809
|
+
async addAuthOrgMember(input) {
|
|
1810
|
+
return await this.adminFetch(AUTH_ADD_MEMBER_PATH, "POST", input);
|
|
1811
|
+
}
|
|
1812
|
+
/** Create a pending email invitation to an organization. */
|
|
1813
|
+
async inviteAuthOrgMember(input) {
|
|
1814
|
+
return await this.adminFetch(AUTH_INVITE_MEMBER_PATH, "POST", input);
|
|
1815
|
+
}
|
|
1816
|
+
/** Change a member's role. */
|
|
1817
|
+
async setAuthOrgMemberRole(input) {
|
|
1818
|
+
return await this.adminFetch(AUTH_MEMBER_ROLE_PATH, "POST", input);
|
|
1819
|
+
}
|
|
1820
|
+
/** List an organization's teams (requires the organization plugin with teams enabled). */
|
|
1821
|
+
async listAuthOrgTeams(input) {
|
|
1822
|
+
const path = withQuery(AUTH_ORG_TEAMS_PATH, { limit: input.limit, offset: input.offset, organizationId: input.organizationId });
|
|
1823
|
+
return await this.adminFetch(path, "GET");
|
|
1824
|
+
}
|
|
1825
|
+
/** Create a team under an organization. */
|
|
1826
|
+
async createAuthOrgTeam(input) {
|
|
1827
|
+
return await this.adminFetch(AUTH_CREATE_TEAM_PATH, "POST", input);
|
|
1828
|
+
}
|
|
1829
|
+
/** Rename a team. */
|
|
1830
|
+
async updateAuthOrgTeam(input) {
|
|
1831
|
+
return await this.adminFetch(AUTH_UPDATE_TEAM_PATH, "POST", input);
|
|
1832
|
+
}
|
|
1833
|
+
/** Delete a team and its memberships. */
|
|
1834
|
+
async removeAuthOrgTeam(input) {
|
|
1835
|
+
await this.adminFetch(AUTH_REMOVE_TEAM_PATH, "POST", input);
|
|
1836
|
+
}
|
|
1837
|
+
/** List a team's members. */
|
|
1838
|
+
async listAuthOrgTeamMembers(input) {
|
|
1839
|
+
const path = withQuery(AUTH_ORG_TEAM_MEMBERS_PATH, { limit: input.limit, offset: input.offset, teamId: input.teamId });
|
|
1840
|
+
return await this.adminFetch(path, "GET");
|
|
1841
|
+
}
|
|
1842
|
+
/** Add a user to a team. */
|
|
1843
|
+
async addAuthOrgTeamMember(input) {
|
|
1844
|
+
return await this.adminFetch(AUTH_ADD_TEAM_MEMBER_PATH, "POST", input);
|
|
1845
|
+
}
|
|
1846
|
+
/** Remove a member from a team. */
|
|
1847
|
+
async removeAuthOrgTeamMember(input) {
|
|
1848
|
+
await this.adminFetch(AUTH_REMOVE_TEAM_MEMBER_PATH, "POST", input);
|
|
1849
|
+
}
|
|
1850
|
+
/** List an organization's custom roles (requires the organization plugin with dynamic access control). */
|
|
1851
|
+
async listAuthOrgRoles(input) {
|
|
1852
|
+
const path = withQuery(AUTH_ORG_ROLES_PATH, { limit: input.limit, offset: input.offset, organizationId: input.organizationId });
|
|
1853
|
+
return await this.adminFetch(path, "GET");
|
|
1854
|
+
}
|
|
1855
|
+
/** Create a custom org role with a permission grant (a `resource -> actions[]` map). */
|
|
1856
|
+
async createAuthOrgRole(input) {
|
|
1857
|
+
return await this.adminFetch(AUTH_CREATE_ROLE_PATH, "POST", input);
|
|
1858
|
+
}
|
|
1859
|
+
/** Replace a custom org role's permission grant. */
|
|
1860
|
+
async updateAuthOrgRole(input) {
|
|
1861
|
+
return await this.adminFetch(AUTH_UPDATE_ROLE_PATH, "POST", input);
|
|
1862
|
+
}
|
|
1863
|
+
/** Delete a custom org role. */
|
|
1864
|
+
async deleteAuthOrgRole(input) {
|
|
1865
|
+
await this.adminFetch(AUTH_REMOVE_ROLE_PATH, "POST", input);
|
|
1866
|
+
}
|
|
1769
1867
|
/** List auth sessions, paged and optionally filtered to one user. */
|
|
1770
1868
|
async listAuthSessions(options = {}) {
|
|
1771
1869
|
if (this.closed) {
|
package/dist/packem_shared/{lunora-client.d-DPLSlPiP.d.mts → lunora-client.d-Dy4neKF6.d.mts}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CronJobInfo, VectorIndexSummary, VectorQueryMatch, KvNamespaceSummary, KvKeyListResult, KvValueResult, AuthUser, AuthPage, AuthImpersonation, AuthCapabilities, AuthSession } from '@lunora/runtime';
|
|
1
|
+
import { CronJobInfo, VectorIndexSummary, VectorQueryMatch, KvNamespaceSummary, KvKeyListResult, KvValueResult, AuthUser, AuthPage, AuthImpersonation, AuthCapabilities, AuthConfigInfo, AuthSession } from '@lunora/runtime';
|
|
2
2
|
/**
|
|
3
3
|
* The machine-readable error codes a client can observe on a failed
|
|
4
4
|
* RPC/batch/subscription. Mirrors the server's `CODE_STATUS` keys
|
|
@@ -2048,6 +2048,107 @@ declare class LunoraClient {
|
|
|
2048
2048
|
cancelAuthOrgInvitation(input: {
|
|
2049
2049
|
invitationId: string;
|
|
2050
2050
|
}): Promise<void>;
|
|
2051
|
+
/**
|
|
2052
|
+
* Report the deployment's auth configuration — enabled plugins, sign-in
|
|
2053
|
+
* methods, user-settable create-user fields, organization sub-features
|
|
2054
|
+
* (teams / roles), and session / rate-limit policy. Drives the config panel
|
|
2055
|
+
* and the dynamic create-user form. Never carries a secret.
|
|
2056
|
+
*/
|
|
2057
|
+
getAuthConfig(): Promise<AuthConfigInfo>;
|
|
2058
|
+
/** Create an organization; optionally seed an `owner` member for `ownerId`. */
|
|
2059
|
+
createAuthOrganization(input: {
|
|
2060
|
+
logo?: string;
|
|
2061
|
+
metadata?: Record<string, unknown>;
|
|
2062
|
+
name: string;
|
|
2063
|
+
ownerId?: string;
|
|
2064
|
+
slug?: string;
|
|
2065
|
+
}): Promise<Record<string, unknown>>;
|
|
2066
|
+
/** Update an organization's name/slug/logo/metadata. */
|
|
2067
|
+
updateAuthOrganization(input: {
|
|
2068
|
+
logo?: string;
|
|
2069
|
+
metadata?: Record<string, unknown>;
|
|
2070
|
+
name?: string;
|
|
2071
|
+
organizationId: string;
|
|
2072
|
+
slug?: string;
|
|
2073
|
+
}): Promise<Record<string, unknown>>;
|
|
2074
|
+
/** Delete an organization and cascade its members, invitations, teams, and custom roles. */
|
|
2075
|
+
deleteAuthOrganization(input: {
|
|
2076
|
+
organizationId: string;
|
|
2077
|
+
}): Promise<void>;
|
|
2078
|
+
/** Directly add an existing user to an organization (no invitation/acceptance). */
|
|
2079
|
+
addAuthOrgMember(input: {
|
|
2080
|
+
organizationId: string;
|
|
2081
|
+
role?: string;
|
|
2082
|
+
userId: string;
|
|
2083
|
+
}): Promise<Record<string, unknown>>;
|
|
2084
|
+
/** Create a pending email invitation to an organization. */
|
|
2085
|
+
inviteAuthOrgMember(input: {
|
|
2086
|
+
email: string;
|
|
2087
|
+
inviterId?: string;
|
|
2088
|
+
organizationId: string;
|
|
2089
|
+
role?: string;
|
|
2090
|
+
}): Promise<Record<string, unknown>>;
|
|
2091
|
+
/** Change a member's role. */
|
|
2092
|
+
setAuthOrgMemberRole(input: {
|
|
2093
|
+
memberId: string;
|
|
2094
|
+
role: string | string[];
|
|
2095
|
+
}): Promise<Record<string, unknown>>;
|
|
2096
|
+
/** List an organization's teams (requires the organization plugin with teams enabled). */
|
|
2097
|
+
listAuthOrgTeams(input: {
|
|
2098
|
+
limit?: number;
|
|
2099
|
+
offset?: number;
|
|
2100
|
+
organizationId: string;
|
|
2101
|
+
}): Promise<AuthPage<Record<string, unknown>>>;
|
|
2102
|
+
/** Create a team under an organization. */
|
|
2103
|
+
createAuthOrgTeam(input: {
|
|
2104
|
+
name: string;
|
|
2105
|
+
organizationId: string;
|
|
2106
|
+
}): Promise<Record<string, unknown>>;
|
|
2107
|
+
/** Rename a team. */
|
|
2108
|
+
updateAuthOrgTeam(input: {
|
|
2109
|
+
name: string;
|
|
2110
|
+
teamId: string;
|
|
2111
|
+
}): Promise<Record<string, unknown>>;
|
|
2112
|
+
/** Delete a team and its memberships. */
|
|
2113
|
+
removeAuthOrgTeam(input: {
|
|
2114
|
+
teamId: string;
|
|
2115
|
+
}): Promise<void>;
|
|
2116
|
+
/** List a team's members. */
|
|
2117
|
+
listAuthOrgTeamMembers(input: {
|
|
2118
|
+
limit?: number;
|
|
2119
|
+
offset?: number;
|
|
2120
|
+
teamId: string;
|
|
2121
|
+
}): Promise<AuthPage<Record<string, unknown>>>;
|
|
2122
|
+
/** Add a user to a team. */
|
|
2123
|
+
addAuthOrgTeamMember(input: {
|
|
2124
|
+
teamId: string;
|
|
2125
|
+
userId: string;
|
|
2126
|
+
}): Promise<Record<string, unknown>>;
|
|
2127
|
+
/** Remove a member from a team. */
|
|
2128
|
+
removeAuthOrgTeamMember(input: {
|
|
2129
|
+
teamMemberId: string;
|
|
2130
|
+
}): Promise<void>;
|
|
2131
|
+
/** List an organization's custom roles (requires the organization plugin with dynamic access control). */
|
|
2132
|
+
listAuthOrgRoles(input: {
|
|
2133
|
+
limit?: number;
|
|
2134
|
+
offset?: number;
|
|
2135
|
+
organizationId: string;
|
|
2136
|
+
}): Promise<AuthPage<Record<string, unknown>>>;
|
|
2137
|
+
/** Create a custom org role with a permission grant (a `resource -> actions[]` map). */
|
|
2138
|
+
createAuthOrgRole(input: {
|
|
2139
|
+
organizationId: string;
|
|
2140
|
+
permission: Record<string, string[]>;
|
|
2141
|
+
role: string;
|
|
2142
|
+
}): Promise<Record<string, unknown>>;
|
|
2143
|
+
/** Replace a custom org role's permission grant. */
|
|
2144
|
+
updateAuthOrgRole(input: {
|
|
2145
|
+
permission: Record<string, string[]>;
|
|
2146
|
+
roleId: string;
|
|
2147
|
+
}): Promise<Record<string, unknown>>;
|
|
2148
|
+
/** Delete a custom org role. */
|
|
2149
|
+
deleteAuthOrgRole(input: {
|
|
2150
|
+
roleId: string;
|
|
2151
|
+
}): Promise<void>;
|
|
2051
2152
|
/** List auth sessions, paged and optionally filtered to one user. */
|
|
2052
2153
|
listAuthSessions(options?: {
|
|
2053
2154
|
limit?: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CronJobInfo, VectorIndexSummary, VectorQueryMatch, KvNamespaceSummary, KvKeyListResult, KvValueResult, AuthUser, AuthPage, AuthImpersonation, AuthCapabilities, AuthSession } from '@lunora/runtime';
|
|
1
|
+
import { CronJobInfo, VectorIndexSummary, VectorQueryMatch, KvNamespaceSummary, KvKeyListResult, KvValueResult, AuthUser, AuthPage, AuthImpersonation, AuthCapabilities, AuthConfigInfo, AuthSession } from '@lunora/runtime';
|
|
2
2
|
/**
|
|
3
3
|
* The machine-readable error codes a client can observe on a failed
|
|
4
4
|
* RPC/batch/subscription. Mirrors the server's `CODE_STATUS` keys
|
|
@@ -2048,6 +2048,107 @@ declare class LunoraClient {
|
|
|
2048
2048
|
cancelAuthOrgInvitation(input: {
|
|
2049
2049
|
invitationId: string;
|
|
2050
2050
|
}): Promise<void>;
|
|
2051
|
+
/**
|
|
2052
|
+
* Report the deployment's auth configuration — enabled plugins, sign-in
|
|
2053
|
+
* methods, user-settable create-user fields, organization sub-features
|
|
2054
|
+
* (teams / roles), and session / rate-limit policy. Drives the config panel
|
|
2055
|
+
* and the dynamic create-user form. Never carries a secret.
|
|
2056
|
+
*/
|
|
2057
|
+
getAuthConfig(): Promise<AuthConfigInfo>;
|
|
2058
|
+
/** Create an organization; optionally seed an `owner` member for `ownerId`. */
|
|
2059
|
+
createAuthOrganization(input: {
|
|
2060
|
+
logo?: string;
|
|
2061
|
+
metadata?: Record<string, unknown>;
|
|
2062
|
+
name: string;
|
|
2063
|
+
ownerId?: string;
|
|
2064
|
+
slug?: string;
|
|
2065
|
+
}): Promise<Record<string, unknown>>;
|
|
2066
|
+
/** Update an organization's name/slug/logo/metadata. */
|
|
2067
|
+
updateAuthOrganization(input: {
|
|
2068
|
+
logo?: string;
|
|
2069
|
+
metadata?: Record<string, unknown>;
|
|
2070
|
+
name?: string;
|
|
2071
|
+
organizationId: string;
|
|
2072
|
+
slug?: string;
|
|
2073
|
+
}): Promise<Record<string, unknown>>;
|
|
2074
|
+
/** Delete an organization and cascade its members, invitations, teams, and custom roles. */
|
|
2075
|
+
deleteAuthOrganization(input: {
|
|
2076
|
+
organizationId: string;
|
|
2077
|
+
}): Promise<void>;
|
|
2078
|
+
/** Directly add an existing user to an organization (no invitation/acceptance). */
|
|
2079
|
+
addAuthOrgMember(input: {
|
|
2080
|
+
organizationId: string;
|
|
2081
|
+
role?: string;
|
|
2082
|
+
userId: string;
|
|
2083
|
+
}): Promise<Record<string, unknown>>;
|
|
2084
|
+
/** Create a pending email invitation to an organization. */
|
|
2085
|
+
inviteAuthOrgMember(input: {
|
|
2086
|
+
email: string;
|
|
2087
|
+
inviterId?: string;
|
|
2088
|
+
organizationId: string;
|
|
2089
|
+
role?: string;
|
|
2090
|
+
}): Promise<Record<string, unknown>>;
|
|
2091
|
+
/** Change a member's role. */
|
|
2092
|
+
setAuthOrgMemberRole(input: {
|
|
2093
|
+
memberId: string;
|
|
2094
|
+
role: string | string[];
|
|
2095
|
+
}): Promise<Record<string, unknown>>;
|
|
2096
|
+
/** List an organization's teams (requires the organization plugin with teams enabled). */
|
|
2097
|
+
listAuthOrgTeams(input: {
|
|
2098
|
+
limit?: number;
|
|
2099
|
+
offset?: number;
|
|
2100
|
+
organizationId: string;
|
|
2101
|
+
}): Promise<AuthPage<Record<string, unknown>>>;
|
|
2102
|
+
/** Create a team under an organization. */
|
|
2103
|
+
createAuthOrgTeam(input: {
|
|
2104
|
+
name: string;
|
|
2105
|
+
organizationId: string;
|
|
2106
|
+
}): Promise<Record<string, unknown>>;
|
|
2107
|
+
/** Rename a team. */
|
|
2108
|
+
updateAuthOrgTeam(input: {
|
|
2109
|
+
name: string;
|
|
2110
|
+
teamId: string;
|
|
2111
|
+
}): Promise<Record<string, unknown>>;
|
|
2112
|
+
/** Delete a team and its memberships. */
|
|
2113
|
+
removeAuthOrgTeam(input: {
|
|
2114
|
+
teamId: string;
|
|
2115
|
+
}): Promise<void>;
|
|
2116
|
+
/** List a team's members. */
|
|
2117
|
+
listAuthOrgTeamMembers(input: {
|
|
2118
|
+
limit?: number;
|
|
2119
|
+
offset?: number;
|
|
2120
|
+
teamId: string;
|
|
2121
|
+
}): Promise<AuthPage<Record<string, unknown>>>;
|
|
2122
|
+
/** Add a user to a team. */
|
|
2123
|
+
addAuthOrgTeamMember(input: {
|
|
2124
|
+
teamId: string;
|
|
2125
|
+
userId: string;
|
|
2126
|
+
}): Promise<Record<string, unknown>>;
|
|
2127
|
+
/** Remove a member from a team. */
|
|
2128
|
+
removeAuthOrgTeamMember(input: {
|
|
2129
|
+
teamMemberId: string;
|
|
2130
|
+
}): Promise<void>;
|
|
2131
|
+
/** List an organization's custom roles (requires the organization plugin with dynamic access control). */
|
|
2132
|
+
listAuthOrgRoles(input: {
|
|
2133
|
+
limit?: number;
|
|
2134
|
+
offset?: number;
|
|
2135
|
+
organizationId: string;
|
|
2136
|
+
}): Promise<AuthPage<Record<string, unknown>>>;
|
|
2137
|
+
/** Create a custom org role with a permission grant (a `resource -> actions[]` map). */
|
|
2138
|
+
createAuthOrgRole(input: {
|
|
2139
|
+
organizationId: string;
|
|
2140
|
+
permission: Record<string, string[]>;
|
|
2141
|
+
role: string;
|
|
2142
|
+
}): Promise<Record<string, unknown>>;
|
|
2143
|
+
/** Replace a custom org role's permission grant. */
|
|
2144
|
+
updateAuthOrgRole(input: {
|
|
2145
|
+
permission: Record<string, string[]>;
|
|
2146
|
+
roleId: string;
|
|
2147
|
+
}): Promise<Record<string, unknown>>;
|
|
2148
|
+
/** Delete a custom org role. */
|
|
2149
|
+
deleteAuthOrgRole(input: {
|
|
2150
|
+
roleId: string;
|
|
2151
|
+
}): Promise<void>;
|
|
2051
2152
|
/** List auth sessions, paged and optionally filtered to one user. */
|
|
2052
2153
|
listAuthSessions(options?: {
|
|
2053
2154
|
limit?: number;
|
|
@@ -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-Dy4neKF6.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-Dy4neKF6.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-Dy4neKF6.mjs";
|
|
2
|
+
export type { b as SubscriptionErrorCallback } from "../packem_shared/lunora-client.d-Dy4neKF6.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-Dy4neKF6.js";
|
|
2
|
+
export type { b as SubscriptionErrorCallback } from "../packem_shared/lunora-client.d-Dy4neKF6.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-Dy4neKF6.mjs";
|
|
2
|
+
export type { A as ArgsOf, F as FunctionReference, R as ReturnOf } from "../packem_shared/lunora-client.d-Dy4neKF6.mjs";
|
|
3
|
+
export { p as preloadQuery, a as preloadedQueryResult } from "../packem_shared/preload.d-BQaCmS5J.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-Dy4neKF6.js";
|
|
2
|
+
export type { A as ArgsOf, F as FunctionReference, R as ReturnOf } from "../packem_shared/lunora-client.d-Dy4neKF6.js";
|
|
3
|
+
export { p as preloadQuery, a as preloadedQueryResult } from "../packem_shared/preload.d-DI-5eqHP.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-Cet4TATX.mjs';
|
|
4
4
|
export { preloadQuery, preloadedQueryResult } from '../packem_shared/preloadQuery-lobFkD2Z.mjs';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lunora/client",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.19",
|
|
4
4
|
"description": "Lunora browser SDK: WebSocket transport, optimistic updates, and an offline mutation queue",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cloudflare",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"access": "public"
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
|
-
"@lunora/errors": "1.0.0-alpha.
|
|
65
|
+
"@lunora/errors": "1.0.0-alpha.2"
|
|
66
66
|
},
|
|
67
67
|
"engines": {
|
|
68
68
|
"node": "^22.15.0 || >=24.11.0"
|