@feltdb/feltkit 0.3.17 → 0.3.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/dist/app.d.ts +246 -13
- package/dist/app.js +215 -6
- package/dist/app.js.map +1 -1
- package/dist/appboundry/build.d.ts +70 -0
- package/dist/appboundry/build.js +62 -2
- package/dist/appboundry/build.js.map +1 -1
- package/dist/appboundry/guest.js +57 -3
- package/dist/appboundry/guest.js.map +1 -1
- package/dist/appboundry/host.js +7 -0
- package/dist/appboundry/host.js.map +1 -1
- package/dist/authorize.js +1 -0
- package/dist/authorize.js.map +1 -1
- package/dist/cli/compose.d.ts +31 -0
- package/dist/cli/compose.js +274 -0
- package/dist/cli/compose.js.map +1 -0
- package/dist/cli/create.d.ts +201 -0
- package/dist/cli/create.js +1139 -0
- package/dist/cli/create.js.map +1 -0
- package/dist/cli/deploy-appboundry-self-hosted.d.ts +2 -0
- package/dist/cli/deploy-appboundry-self-hosted.js +1 -1
- package/dist/cli/deploy-appboundry-self-hosted.js.map +1 -1
- package/dist/cli/deploy-appboundry.js +3 -0
- package/dist/cli/deploy-appboundry.js.map +1 -1
- package/dist/cli/deploy.d.ts +1 -0
- package/dist/cli/deploy.js +66 -6
- package/dist/cli/deploy.js.map +1 -1
- package/dist/cli/domain.d.ts +174 -0
- package/dist/cli/domain.js +1119 -0
- package/dist/cli/domain.js.map +1 -0
- package/dist/cli/main.d.ts +2 -0
- package/dist/cli/main.js +141 -7
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/shell.d.ts +7 -0
- package/dist/cli/shell.js +59 -0
- package/dist/cli/shell.js.map +1 -0
- package/dist/client/index.d.ts +192 -5
- package/dist/client/index.js +301 -28
- package/dist/client/index.js.map +1 -1
- package/dist/component.d.ts +174 -0
- package/dist/component.js +77 -0
- package/dist/component.js.map +1 -0
- package/dist/composition/catalog.d.ts +3 -0
- package/dist/composition/catalog.js +217 -0
- package/dist/composition/catalog.js.map +1 -0
- package/dist/composition/contract.d.ts +165 -0
- package/dist/composition/contract.js +12 -0
- package/dist/composition/contract.js.map +1 -0
- package/dist/composition/execute.d.ts +110 -0
- package/dist/composition/execute.js +350 -0
- package/dist/composition/execute.js.map +1 -0
- package/dist/composition/generate.d.ts +105 -0
- package/dist/composition/generate.js +274 -0
- package/dist/composition/generate.js.map +1 -0
- package/dist/composition/plan.d.ts +131 -0
- package/dist/composition/plan.js +558 -0
- package/dist/composition/plan.js.map +1 -0
- package/dist/composition/profiles.d.ts +20 -0
- package/dist/composition/profiles.js +81 -0
- package/dist/composition/profiles.js.map +1 -0
- package/dist/composition/reconcile.d.ts +153 -0
- package/dist/composition/reconcile.js +282 -0
- package/dist/composition/reconcile.js.map +1 -0
- package/dist/composition/recover.d.ts +89 -0
- package/dist/composition/recover.js +407 -0
- package/dist/composition/recover.js.map +1 -0
- package/dist/composition/resolve.d.ts +2 -0
- package/dist/composition/resolve.js +208 -0
- package/dist/composition/resolve.js.map +1 -0
- package/dist/dashboard/assets/{index-DnIOVGF-.js → index-BrC1AtZ1.js} +5 -5
- package/dist/dashboard/index.html +1 -1
- package/dist/docs.d.ts +1 -1
- package/dist/docs.js +2 -0
- package/dist/docs.js.map +1 -1
- package/dist/index.d.ts +7 -3
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/react/auth.d.ts +131 -0
- package/dist/react/auth.js +830 -0
- package/dist/react/auth.js.map +1 -0
- package/dist/react/context.d.ts +8 -0
- package/dist/react/context.js +14 -0
- package/dist/react/context.js.map +1 -0
- package/dist/react/index.d.ts +3 -18
- package/dist/react/index.js +5 -13
- package/dist/react/index.js.map +1 -1
- package/dist/runtime/accounts.d.ts +33 -2
- package/dist/runtime/accounts.js +167 -27
- package/dist/runtime/accounts.js.map +1 -1
- package/dist/runtime/activity.d.ts +8 -1
- package/dist/runtime/activity.js.map +1 -1
- package/dist/runtime/audit.d.ts +43 -0
- package/dist/runtime/audit.js +52 -0
- package/dist/runtime/audit.js.map +1 -0
- package/dist/runtime/authority.d.ts +8 -1
- package/dist/runtime/authority.js +11 -2
- package/dist/runtime/authority.js.map +1 -1
- package/dist/runtime/challenges.d.ts +51 -0
- package/dist/runtime/challenges.js +121 -0
- package/dist/runtime/challenges.js.map +1 -0
- package/dist/runtime/changes.d.ts +22 -0
- package/dist/runtime/changes.js +51 -3
- package/dist/runtime/changes.js.map +1 -1
- package/dist/runtime/claims.d.ts +76 -0
- package/dist/runtime/claims.js +100 -0
- package/dist/runtime/claims.js.map +1 -0
- package/dist/runtime/context.d.ts +47 -5
- package/dist/runtime/contract.js +17 -3
- package/dist/runtime/contract.js.map +1 -1
- package/dist/runtime/data.d.ts +50 -4
- package/dist/runtime/data.js +113 -35
- package/dist/runtime/data.js.map +1 -1
- package/dist/runtime/escape-hatch.d.ts +37 -0
- package/dist/runtime/escape-hatch.js +76 -0
- package/dist/runtime/escape-hatch.js.map +1 -0
- package/dist/runtime/instance.js +2 -1
- package/dist/runtime/instance.js.map +1 -1
- package/dist/runtime/live.d.ts +48 -0
- package/dist/runtime/live.js +154 -0
- package/dist/runtime/live.js.map +1 -0
- package/dist/runtime/outbox.js +6 -0
- package/dist/runtime/outbox.js.map +1 -1
- package/dist/runtime/runtime.d.ts +103 -5
- package/dist/runtime/runtime.js +411 -41
- package/dist/runtime/runtime.js.map +1 -1
- package/dist/runtime/search.d.ts +54 -0
- package/dist/runtime/search.js +66 -0
- package/dist/runtime/search.js.map +1 -0
- package/dist/runtime/services-rules.d.ts +12 -0
- package/dist/runtime/services-rules.js +8 -0
- package/dist/runtime/services-rules.js.map +1 -0
- package/dist/runtime/services.js +5 -3
- package/dist/runtime/services.js.map +1 -1
- package/dist/runtime/sessions.d.ts +16 -2
- package/dist/runtime/sessions.js +40 -4
- package/dist/runtime/sessions.js.map +1 -1
- package/dist/runtime/tenancy.d.ts +198 -0
- package/dist/runtime/tenancy.js +397 -0
- package/dist/runtime/tenancy.js.map +1 -0
- package/dist/runtime/tenant-scope.d.ts +9 -0
- package/dist/runtime/tenant-scope.js +127 -0
- package/dist/runtime/tenant-scope.js.map +1 -0
- package/dist/runtime/transactions.d.ts +83 -3
- package/dist/runtime/transactions.js +53 -11
- package/dist/runtime/transactions.js.map +1 -1
- package/dist/server/admin.js +52 -0
- package/dist/server/admin.js.map +1 -1
- package/dist/server/components.d.ts +44 -0
- package/dist/server/components.js +212 -0
- package/dist/server/components.js.map +1 -0
- package/dist/server/index.d.ts +4 -1
- package/dist/server/index.js +324 -63
- package/dist/server/index.js.map +1 -1
- package/dist/server/mcp.js +6 -3
- package/dist/server/mcp.js.map +1 -1
- package/dist/server/project.d.ts +27 -0
- package/dist/server/project.js +63 -0
- package/dist/server/project.js.map +1 -1
- package/dist/server/public.d.ts +2 -0
- package/dist/server/public.js +2 -0
- package/dist/server/public.js.map +1 -1
- package/dist/server/session-http.d.ts +48 -0
- package/dist/server/session-http.js +116 -0
- package/dist/server/session-http.js.map +1 -0
- package/dist/server/tenancy.d.ts +40 -0
- package/dist/server/tenancy.js +191 -0
- package/dist/server/tenancy.js.map +1 -0
- package/dist/testing/index.d.ts +19 -0
- package/dist/testing/index.js +22 -2
- package/dist/testing/index.js.map +1 -1
- package/docs/AGENT-OPERATIONS.md +1 -0
- package/docs/APPBOUNDRY.md +11 -1
- package/docs/ARCHITECTURE.md +5 -3
- package/docs/AUTH.md +267 -0
- package/docs/COMPONENTS.md +91 -0
- package/docs/GUARANTEES.md +74 -7
- package/docs/README.md +4 -2
- package/docs/RESOLVER.md +4 -2
- package/docs/SECURITY.md +5 -4
- package/docs/TRANSACTIONS.md +98 -1
- package/docs/UPSTREAM-GAPS.md +2 -0
- package/package.json +15 -12
- package/skills/.claude-plugin/marketplace.json +1 -1
- package/skills/.claude-plugin/plugin.json +1 -1
- package/skills/feltkit-data/SKILL.md +6 -0
- package/skills/feltkit-services/SKILL.md +1 -1
- package/dist/runtime/account-links.d.ts +0 -19
- package/dist/runtime/account-links.js +0 -45
- package/dist/runtime/account-links.js.map +0 -1
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<link rel="apple-touch-icon" href="/_feltkit/apple-touch-icon.png" />
|
|
10
10
|
<title>FeltKit</title>
|
|
11
11
|
<script>(function(){try{var v=window.localStorage.getItem("stack-ui.theme");if(v==="light"||v==="dark")document.documentElement.setAttribute("data-stack-theme",v);}catch(e){}})();</script>
|
|
12
|
-
<script type="module" crossorigin src="/_feltkit/assets/index-
|
|
12
|
+
<script type="module" crossorigin src="/_feltkit/assets/index-BrC1AtZ1.js"></script>
|
|
13
13
|
<link rel="stylesheet" crossorigin href="/_feltkit/assets/index-BXTNQAg1.css">
|
|
14
14
|
</head>
|
|
15
15
|
<body>
|
package/dist/docs.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const PACKAGE_NAME = "@feltdb/feltkit";
|
|
2
2
|
/** The documents shipped in the package, with what each one answers. Order = reading order. */
|
|
3
|
-
export declare const SHIPPED_DOCS: readonly [readonly ["ARCHITECTURE.md", "How FeltKit is put together: one FeltDB instance, AppPort, AppPort Services"], readonly ["GUARANTEES.md", "What FeltKit guarantees, and its known limitations"], readonly ["TRANSACTIONS.md", "Mutations, ctx.db.sequence and ctx.afterCommit: the transaction contract"], readonly ["SECURITY.md", "Authorization, sessions, credentials, and production Studio"], readonly ["AGENT-OPERATIONS.md", "Agents: MCP, tasks, proposals, approvals, and evidence"], readonly ["RESOLVER.md", "Model references: change the model a deployed app uses through Resolver, without a redeploy"], readonly ["PATH-TO-PRODUCTION.md", "From a local app to production: deploy targets and what you must provide"], readonly ["BACKUP.md", "Backing up and restoring an environment's state"], readonly ["APPBOUNDRY.md", "The AppBoundry artifact, deploying through AppBoundry, and the self-hosted runtime"], readonly ["APPBOUNDRY-DEPLOY-CONTRACT.md", "The deployment contract FeltKit expects from AppBoundry (proposed)"], readonly ["WHY-FELTKIT.md", "Design choices, compared with Convex"], readonly ["UPSTREAM-GAPS.md", "Known gaps in FeltDB, AppPort and AppPort Services, and their status"]];
|
|
3
|
+
export declare const SHIPPED_DOCS: readonly [readonly ["ARCHITECTURE.md", "How FeltKit is put together: one FeltDB instance, AppPort, AppPort Services"], readonly ["GUARANTEES.md", "What FeltKit guarantees, and its known limitations"], readonly ["TRANSACTIONS.md", "Mutations, ctx.db.sequence and ctx.afterCommit: the transaction contract"], readonly ["SECURITY.md", "Authorization, sessions, credentials, and production Studio"], readonly ["AUTH.md", "Accounts, sessions, workspaces (tenancy), invitations, and the React sign-in and workspace screens"], readonly ["AGENT-OPERATIONS.md", "Agents: MCP, tasks, proposals, approvals, and evidence"], readonly ["RESOLVER.md", "Model references: change the model a deployed app uses through Resolver, without a redeploy"], readonly ["PATH-TO-PRODUCTION.md", "From a local app to production: deploy targets and what you must provide"], readonly ["BACKUP.md", "Backing up and restoring an environment's state"], readonly ["COMPONENTS.md", "Runtime components: a gateway or worker that runs with the application, as a declared principal"], readonly ["APPBOUNDRY.md", "The AppBoundry artifact, deploying through AppBoundry, and the self-hosted runtime"], readonly ["APPBOUNDRY-DEPLOY-CONTRACT.md", "The deployment contract FeltKit expects from AppBoundry (proposed)"], readonly ["WHY-FELTKIT.md", "Design choices, compared with Convex"], readonly ["UPSTREAM-GAPS.md", "Known gaps in FeltDB, AppPort and AppPort Services, and their status"]];
|
|
4
4
|
export type DocName = (typeof SHIPPED_DOCS)[number][0];
|
|
5
5
|
/** The shipped file on disk (inside node_modules/@feltdb/feltkit in a project). */
|
|
6
6
|
export declare function docFile(name: DocName): string;
|
package/dist/docs.js
CHANGED
|
@@ -18,10 +18,12 @@ export const SHIPPED_DOCS = [
|
|
|
18
18
|
["GUARANTEES.md", "What FeltKit guarantees, and its known limitations"],
|
|
19
19
|
["TRANSACTIONS.md", "Mutations, ctx.db.sequence and ctx.afterCommit: the transaction contract"],
|
|
20
20
|
["SECURITY.md", "Authorization, sessions, credentials, and production Studio"],
|
|
21
|
+
["AUTH.md", "Accounts, sessions, workspaces (tenancy), invitations, and the React sign-in and workspace screens"],
|
|
21
22
|
["AGENT-OPERATIONS.md", "Agents: MCP, tasks, proposals, approvals, and evidence"],
|
|
22
23
|
["RESOLVER.md", "Model references: change the model a deployed app uses through Resolver, without a redeploy"],
|
|
23
24
|
["PATH-TO-PRODUCTION.md", "From a local app to production: deploy targets and what you must provide"],
|
|
24
25
|
["BACKUP.md", "Backing up and restoring an environment's state"],
|
|
26
|
+
["COMPONENTS.md", "Runtime components: a gateway or worker that runs with the application, as a declared principal"],
|
|
25
27
|
["APPBOUNDRY.md", "The AppBoundry artifact, deploying through AppBoundry, and the self-hosted runtime"],
|
|
26
28
|
["APPBOUNDRY-DEPLOY-CONTRACT.md", "The deployment contract FeltKit expects from AppBoundry (proposed)"],
|
|
27
29
|
["WHY-FELTKIT.md", "Design choices, compared with Convex"],
|
package/dist/docs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docs.js","sourceRoot":"","sources":["../src/docs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,MAAM,CAAC,MAAM,YAAY,GAAG,iBAAiB,CAAC;AAC9C,MAAM,OAAO,GAAW,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,GAAG,CAAC,iBAAiB,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC;AAE9G,+FAA+F;AAC/F,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,CAAC,iBAAiB,EAAE,6EAA6E,CAAC;IAClG,CAAC,eAAe,EAAE,oDAAoD,CAAC;IACvE,CAAC,iBAAiB,EAAE,0EAA0E,CAAC;IAC/F,CAAC,aAAa,EAAE,6DAA6D,CAAC;IAC9E,CAAC,qBAAqB,EAAE,wDAAwD,CAAC;IACjF,CAAC,aAAa,EAAE,6FAA6F,CAAC;IAC9G,CAAC,u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ANGED
|
@@ -7,17 +7,21 @@
|
|
|
7
7
|
* export const list = app.query({ access: "tasks.read", handler: (ctx) => ctx.db.find(tasks) });
|
|
8
8
|
*/
|
|
9
9
|
export { feltkit, FeltKitApp, RESERVED_COLLECTIONS } from "./app.js";
|
|
10
|
-
export type { Access, AuthenticateRequest, CapabilityExposure, CollectionDefinition, CollectionOptions, MigrationContext, MigrationDefinition, StoredRecord, UniqueDeclaration, FeltKitOptions, DevUser, AccountsOptions, AccountEmailOptions, ProviderClient, OidcProvider, SignInProviders, FunctionConfig, FunctionDefinition, FunctionKind, MutationDefinition, PrincipalInput, QueryDefinition, } from "./app.js";
|
|
10
|
+
export type { Access, AgentConfig, AgentDefinition, AuthenticateRequest, CapabilityExposure, CollectionDefinition, CollectionOptions, MigrationContext, MigrationDefinition, StoredRecord, UniqueDeclaration, FeltKitOptions, DevUser, AccountsOptions, AccountEmailOptions, ProviderClient, OidcProvider, SignInProviders, FunctionConfig, FunctionDefinition, FunctionKind, MutationDefinition, PrincipalInput, QueryDefinition, } from "./app.js";
|
|
11
11
|
export { s } from "./schema.js";
|
|
12
12
|
export type { Doc, InferShape, Schema, ShapeInput, ShapeSchema } from "./schema.js";
|
|
13
13
|
export { FeltKitError, fail, isFeltKitError } from "./errors.js";
|
|
14
14
|
export type { FeltKitErrorCode, FeltKitErrorJSON } from "./errors.js";
|
|
15
|
-
export type { QueryCtx, MutationCtx, Logger, EnvironmentInfo } from "./runtime/context.js";
|
|
15
|
+
export type { QueryCtx, MutationCtx, AgentCtx, AgentTrigger, Logger, EnvironmentInfo } from "./runtime/context.js";
|
|
16
16
|
export type { CryptoContext } from "./runtime/crypto-token.js";
|
|
17
|
-
export type {
|
|
17
|
+
export type { ClaimDeclaration, ClaimSpec, ClaimStatus, ClaimProvenance } from "./runtime/claims.js";
|
|
18
|
+
export { CLAIM_TYPES, claimSpecProblem, claimSchema, isClaimSpec } from "./runtime/claims.js";
|
|
19
|
+
export type { DatabaseReader, DatabaseWriter, FindOptions, QueryRequest, QueryPage, WhereClause, OrderBy, SearchRequest } from "./runtime/data.js";
|
|
18
20
|
export type { AuthContext, Principal, PrincipalType } from "./runtime/authority.js";
|
|
19
21
|
export type { AuthorizeHook, AuthorizeRequest, AuthorizeResult } from "./authorize.js";
|
|
20
22
|
export type { EventDefinition } from "./app.js";
|
|
21
23
|
export type { EventsWriter } from "./runtime/context.js";
|
|
22
24
|
export type { FileInfo, FilesReader, FilesWriter, UploadInput, NotificationInfo, NotificationsReader, NotificationsWriter, SendNotificationInput, JobsWriter, WebhooksWriter, ConfigurationReader, ConfigurationWriter } from "./runtime/services.js";
|
|
23
25
|
export type { ModelReferenceOption, ModelResolution } from "./runtime/decisions.js";
|
|
26
|
+
export { defineComponent } from "./component.js";
|
|
27
|
+
export type { ComponentDeclaration, ComponentContext, ComponentInstance, ComponentHealth, ComponentState, ComponentModel, ComponentDefinition, ComponentWorkItem, ComponentWorkOutcome } from "./component.js";
|
package/dist/index.js
CHANGED
|
@@ -9,4 +9,6 @@
|
|
|
9
9
|
export { feltkit, FeltKitApp, RESERVED_COLLECTIONS } from "./app.js";
|
|
10
10
|
export { s } from "./schema.js";
|
|
11
11
|
export { FeltKitError, fail, isFeltKitError } from "./errors.js";
|
|
12
|
+
export { CLAIM_TYPES, claimSpecProblem, claimSchema, isClaimSpec } from "./runtime/claims.js";
|
|
13
|
+
export { defineComponent } from "./component.js";
|
|
12
14
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AA2BrE,OAAO,EAAE,CAAC,EAAE,MAAM,aAAa,CAAC;AAEhC,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAKjE,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAQ9F,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import type { AuthRedirect, SessionInfo, TenantInfo, TenantsInfo } from "../client/index.js";
|
|
2
|
+
/** Turn the built-in stylesheet off (render it once near the root): every class stays, unstyled. */
|
|
3
|
+
export declare function FeltKitAuthStyles({ disabled }: {
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
}): null;
|
|
6
|
+
/**
|
|
7
|
+
* What a link into the app carried (sign-in link, verification, reset, invitation, provider sign-in),
|
|
8
|
+
* read once per page load and shared by every component. An invitation is kept for this tab until it
|
|
9
|
+
* is accepted or dismissed, so signing in first does not lose it.
|
|
10
|
+
*/
|
|
11
|
+
export declare function useAuthRedirect(): {
|
|
12
|
+
redirect: AuthRedirect | null;
|
|
13
|
+
pending: boolean;
|
|
14
|
+
clear(): void;
|
|
15
|
+
};
|
|
16
|
+
export interface UseAuth {
|
|
17
|
+
/** True until the first answer from the server. */
|
|
18
|
+
loading: boolean;
|
|
19
|
+
/** The signed-in principal, or null. */
|
|
20
|
+
user: NonNullable<SessionInfo["principal"]> | null;
|
|
21
|
+
/** The signed-in account (built-in accounts), or null. */
|
|
22
|
+
account: NonNullable<SessionInfo["account"]> | null;
|
|
23
|
+
/** The tenant this session works in (`auth.tenant`), or null. */
|
|
24
|
+
tenant: TenantInfo | null;
|
|
25
|
+
permissions: string[];
|
|
26
|
+
/** What the app offers: sign-up, password, magic link, providers, e-mail (`session.accounts`). */
|
|
27
|
+
settings: SessionInfo["accounts"] | null;
|
|
28
|
+
tenancy: SessionInfo["tenancy"] | null;
|
|
29
|
+
session: SessionInfo | undefined;
|
|
30
|
+
/** Whether the user holds a permission (e.g. to show an admin screen; the server checks again). */
|
|
31
|
+
can(permission: string): boolean;
|
|
32
|
+
signOut(): Promise<void>;
|
|
33
|
+
refresh(): void;
|
|
34
|
+
}
|
|
35
|
+
/** The current session: who is signed in, their account and tenant, and what the app offers. */
|
|
36
|
+
export declare function useAuth(): UseAuth;
|
|
37
|
+
export interface UseTenant {
|
|
38
|
+
loading: boolean;
|
|
39
|
+
error: string | null;
|
|
40
|
+
/** The tenant this session works in, or null. */
|
|
41
|
+
current: TenantInfo | null;
|
|
42
|
+
/** Your tenants, most recently used first. */
|
|
43
|
+
tenants: TenantsInfo["tenants"];
|
|
44
|
+
settings: TenantsInfo["settings"] | null;
|
|
45
|
+
/** Switch (the server checks your membership; every live query re-runs). */
|
|
46
|
+
switchTo(tenantId: string | null): Promise<void>;
|
|
47
|
+
create(name: string): Promise<void>;
|
|
48
|
+
refresh(): void;
|
|
49
|
+
}
|
|
50
|
+
/** Your tenants and the current one (`auth.tenant`). */
|
|
51
|
+
export declare function useTenant(): UseTenant;
|
|
52
|
+
export interface SignInProps {
|
|
53
|
+
/** Shown above the form: your app's name and logo. */
|
|
54
|
+
brand?: {
|
|
55
|
+
name?: string;
|
|
56
|
+
logo?: string;
|
|
57
|
+
};
|
|
58
|
+
title?: string;
|
|
59
|
+
/** Where a provider sign-in returns to. Only a path on this site is used. Default: the current path. */
|
|
60
|
+
returnTo?: string;
|
|
61
|
+
/** Called once signed in. */
|
|
62
|
+
onSignedIn?(): void;
|
|
63
|
+
/** Start on sign-up instead of sign-in. */
|
|
64
|
+
initialMode?: "sign-in" | "sign-up";
|
|
65
|
+
/** Prefill the address (an invitation for it, say). */
|
|
66
|
+
email?: string;
|
|
67
|
+
className?: string;
|
|
68
|
+
/** Leave out the card frame (for embedding in your own layout). */
|
|
69
|
+
bare?: boolean;
|
|
70
|
+
}
|
|
71
|
+
/** A safe return path: a path on this site, never another origin. */
|
|
72
|
+
export declare function safeReturnPath(value: string | undefined | null, fallback?: string): string;
|
|
73
|
+
/**
|
|
74
|
+
* Sign in or create an account: password, e-mailed link (and code), Google / GitHub / OpenID Connect,
|
|
75
|
+
* forgot password, and the screens links back into the app need (reset, verification result,
|
|
76
|
+
* expired or used links). Offers only what the app enables.
|
|
77
|
+
*/
|
|
78
|
+
export declare function SignIn(props: SignInProps): import("react/jsx-runtime").JSX.Element;
|
|
79
|
+
/** Shows what a link opened while signed in did (address verified or changed, a link that failed). */
|
|
80
|
+
export declare function AuthNotices({ className }: {
|
|
81
|
+
className?: string;
|
|
82
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
83
|
+
/** A reminder to verify the account's address, with a button to send the link again. */
|
|
84
|
+
export declare function VerifyEmailBanner({ className }: {
|
|
85
|
+
className?: string;
|
|
86
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
87
|
+
/**
|
|
88
|
+
* Accept an invitation: the one in the link that opened the app (kept for this tab until used), or
|
|
89
|
+
* `token`. Shows what it is for; asks the person to sign in (as the invited address) first when
|
|
90
|
+
* needed; handles expired, withdrawn, used and wrong-account invitations. Renders nothing when there
|
|
91
|
+
* is no invitation.
|
|
92
|
+
*/
|
|
93
|
+
export declare function AcceptInvitation(props: {
|
|
94
|
+
token?: string;
|
|
95
|
+
onAccepted?(tenant: TenantInfo | null): void;
|
|
96
|
+
onDismiss?(): void;
|
|
97
|
+
brand?: SignInProps["brand"];
|
|
98
|
+
className?: string;
|
|
99
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
100
|
+
/**
|
|
101
|
+
* The current workspace, and a menu to switch to another or create one. Keyboard: Enter/Space opens,
|
|
102
|
+
* arrows move, Escape closes. Switching re-checks your membership on the server and re-runs every query.
|
|
103
|
+
*/
|
|
104
|
+
export declare function TenantSwitcher(props: {
|
|
105
|
+
className?: string;
|
|
106
|
+
onSwitched?(tenant: TenantInfo | null): void;
|
|
107
|
+
allowCreate?: boolean;
|
|
108
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
109
|
+
/** For a person with no workspace yet: create one (or wait for an invitation). */
|
|
110
|
+
export declare function CreateTenant(props: {
|
|
111
|
+
className?: string;
|
|
112
|
+
title?: string;
|
|
113
|
+
onCreated?(): void;
|
|
114
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
115
|
+
/** Members of the current workspace: roles (for those who may manage), removal, and leaving. */
|
|
116
|
+
export declare function MembersPanel(props: {
|
|
117
|
+
className?: string;
|
|
118
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
119
|
+
/** Invite people to the current workspace by e-mail; see, copy and withdraw open invitations. */
|
|
120
|
+
export declare function InvitationsPanel(props: {
|
|
121
|
+
className?: string;
|
|
122
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
123
|
+
/** Workspace settings: its name (for roles with tenant.update), members, invitations. */
|
|
124
|
+
export declare function TenantSettings(props: {
|
|
125
|
+
className?: string;
|
|
126
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
127
|
+
/** Profile, address, password, connected providers, active sessions, sign out. */
|
|
128
|
+
export declare function AccountSettings(props: {
|
|
129
|
+
className?: string;
|
|
130
|
+
onSignedOut?(): void;
|
|
131
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|