@softr/sdk 0.0.63 → 0.0.64-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auth/isomorphic.d.ts +63 -4
- package/dist/auth/isomorphic.js +63 -5
- package/dist/auth/methods/passwordLink.d.ts +47 -0
- package/dist/auth/methods/passwordLink.js +86 -0
- package/dist/auth/methods/settings.d.ts +11 -0
- package/dist/auth/methods/settings.js +17 -0
- package/dist/auth/methods/signup.js +1 -0
- package/dist/auth/methods/social.js +1 -0
- package/dist/auth/methods/utils.d.ts +1 -1
- package/dist/auth/platform.d.ts +46 -0
- package/dist/auth/platform.js +54 -0
- package/dist/auth/server.d.ts +6 -0
- package/dist/auth/server.js +7 -1
- package/dist/index.d.ts +4 -3
- package/dist/index.js +3 -3
- package/dist/mcp.d.ts +2 -8
- package/dist/mcp.js +8 -8
- package/dist/package.js +1 -1
- package/dist/softr-config.d.ts +1 -0
- package/dist/softr-config.js +26 -5
- package/dist/visibility/route.d.ts +34 -6
- package/dist/visibility/route.js +55 -13
- package/package.json +33 -10
- package/schema/softr.schema.json +42 -1
- package/skills/softr-sdk/SKILL.md +4 -3
- package/skills/softr-sdk/auth/SKILL.md +131 -31
- package/skills/softr-sdk/charts-and-metrics/SKILL.md +1 -1
- package/skills/softr-sdk/current-user/SKILL.md +1 -1
- package/skills/softr-sdk/file-uploads/SKILL.md +1 -1
- package/skills/softr-sdk/formatting/SKILL.md +4 -4
- package/skills/softr-sdk/integrations/SKILL.md +1 -1
- package/skills/softr-sdk/mcp/SKILL.md +7 -14
- package/skills/softr-sdk/pwa/SKILL.md +3 -3
- package/skills/softr-sdk/record-mutations/SKILL.md +1 -1
- package/skills/softr-sdk/record-queries/SKILL.md +1 -1
- package/skills/softr-sdk/region-visibility/SKILL.md +1 -1
- package/skills/softr-sdk/routes-and-visibility/SKILL.md +24 -12
- package/skills/softr-sdk/workflows/SKILL.md +1 -1
package/dist/mcp.js
CHANGED
|
@@ -4,6 +4,7 @@ import { sessionConfig } from "./auth/config.js";
|
|
|
4
4
|
import { readSessionToken, withSessionToken } from "./auth/session.js";
|
|
5
5
|
import { makePlatform, platformApiUrl } from "./auth/platform.js";
|
|
6
6
|
import { isDatasourceAction } from "./action.js";
|
|
7
|
+
import { softrConfig } from "./visibility/route.js";
|
|
7
8
|
import { ds } from "./datasource/datasource.js";
|
|
8
9
|
import { createMiddleware } from "@tanstack/react-start";
|
|
9
10
|
import { z } from "zod";
|
|
@@ -38,8 +39,7 @@ const SUPPORTED_PROTOCOL_VERSIONS = ["2025-06-18", "2025-03-26"];
|
|
|
38
39
|
* }))
|
|
39
40
|
*/
|
|
40
41
|
function softrMcpMiddleware(options = {}) {
|
|
41
|
-
const
|
|
42
|
-
assert(loginPath.startsWith("/") && new URL(loginPath, "https://app.invalid").origin === "https://app.invalid", `softrMcpMiddleware's loginPath must be a path on this app, got "${loginPath}"`);
|
|
42
|
+
const login = softrConfig().auth.routes.login;
|
|
43
43
|
const actions = /* @__PURE__ */ new Map();
|
|
44
44
|
for (const action of options.actions ?? []) {
|
|
45
45
|
assert(isDatasourceAction(action), "softrMcpMiddleware takes actions built by defineQuery or defineMutation");
|
|
@@ -68,7 +68,7 @@ function softrMcpMiddleware(options = {}) {
|
|
|
68
68
|
client_id_metadata_document_supported: true,
|
|
69
69
|
scopes_supported: SCOPES
|
|
70
70
|
});
|
|
71
|
-
case AUTHORIZE_PATH: return await authorize(request,
|
|
71
|
+
case AUTHORIZE_PATH: return await authorize(request, login);
|
|
72
72
|
case TOKEN_PATH: return await issueToken(request);
|
|
73
73
|
case MCP_PATH: return await rpc(request, origin, actions);
|
|
74
74
|
default: return await next();
|
|
@@ -92,14 +92,14 @@ const authorizeQuerySchema = z.object({
|
|
|
92
92
|
* because this runs on the app's origin. The client and the code are the
|
|
93
93
|
* platform's, so we ask it for both.
|
|
94
94
|
*/
|
|
95
|
-
async function authorize(request,
|
|
95
|
+
async function authorize(request, login) {
|
|
96
96
|
const url = new URL(request.url);
|
|
97
97
|
const query = authorizeQuerySchema.safeParse(Object.fromEntries(url.searchParams));
|
|
98
98
|
if (!query.success) return html(400, page("This request is not valid", "The app that sent you here left something out. Close this window and try connecting again."));
|
|
99
99
|
if (request.method !== "GET" && request.method !== "POST") return methodNotAllowed("GET, POST");
|
|
100
100
|
const sessionToken = readSessionToken();
|
|
101
101
|
const user = sessionToken === null ? null : await resolveUser(sessionToken);
|
|
102
|
-
if (user === null || sessionToken === null) return html(200, signInPage(url,
|
|
102
|
+
if (user === null || sessionToken === null) return html(200, signInPage(url, login));
|
|
103
103
|
const client = await platformConsent(query.data);
|
|
104
104
|
if (!client.ok) return html(400, page("We can't connect this right now", escapeHtml(client.message)));
|
|
105
105
|
if (request.method === "GET") return html(200, consentPage(user, url, client.name));
|
|
@@ -539,9 +539,9 @@ function consentPage(user, url, clientName) {
|
|
|
539
539
|
<button type="submit" name="decision" value="deny">Cancel</button>
|
|
540
540
|
</form>`);
|
|
541
541
|
}
|
|
542
|
-
function signInPage(url,
|
|
543
|
-
const back =
|
|
544
|
-
return page("Sign in first", "You need to be signed in to this app before you can connect an assistant to it.", `<a class="primary" href="${escapeHtml(
|
|
542
|
+
function signInPage(url, login) {
|
|
543
|
+
const back = new URLSearchParams({ [login.redirectParam]: url.pathname + url.search });
|
|
544
|
+
return page("Sign in first", "You need to be signed in to this app before you can connect an assistant to it.", `<a class="primary" href="${escapeHtml(`${login.path}?${back}`)}">Sign in</a>`);
|
|
545
545
|
}
|
|
546
546
|
function page(title, body, actions = "") {
|
|
547
547
|
return `<!doctype html>
|
package/dist/package.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { z } from "zod";
|
package/dist/softr-config.js
CHANGED
|
@@ -9,11 +9,32 @@ const AccessBehaviour = z.union([
|
|
|
9
9
|
}),
|
|
10
10
|
z.object({ strategy: z.literal("throw") })
|
|
11
11
|
], { error: "must be a path like \"/login\", { \"strategy\": \"redirect\", \"to\": \"/login\" } or { \"strategy\": \"throw\" }" });
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
const AppPath = z.string().refine((path) => path.startsWith("/") && !path.includes("?") && !path.includes("#") && new URL(path, "https://app.invalid").origin === "https://app.invalid", { error: "must be a path on this app like \"/login\", with no \"?\" or \"#\"" });
|
|
13
|
+
const SoftrConfigSchema = z.object({ auth: z.strictObject({
|
|
14
|
+
routes: z.strictObject({
|
|
15
|
+
login: z.strictObject({
|
|
16
|
+
path: AppPath,
|
|
17
|
+
redirectParam: z.string()
|
|
18
|
+
}),
|
|
19
|
+
resetPassword: z.strictObject({
|
|
20
|
+
path: AppPath,
|
|
21
|
+
tokenParam: z.string()
|
|
22
|
+
}),
|
|
23
|
+
acceptInvitation: z.strictObject({
|
|
24
|
+
path: AppPath,
|
|
25
|
+
tokenParam: z.string()
|
|
26
|
+
}),
|
|
27
|
+
magicLink: z.strictObject({
|
|
28
|
+
path: AppPath,
|
|
29
|
+
tokenParam: z.string()
|
|
30
|
+
})
|
|
31
|
+
}),
|
|
32
|
+
guard: z.strictObject({
|
|
33
|
+
unauthenticated: AccessBehaviour,
|
|
34
|
+
forbidden: AccessBehaviour,
|
|
35
|
+
alreadyAuthenticated: AccessBehaviour
|
|
36
|
+
})
|
|
37
|
+
}) });
|
|
17
38
|
|
|
18
39
|
//#endregion
|
|
19
40
|
export { SoftrConfigSchema };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AccessContext, AccessReason, Narrowed, Visibility, VisibilityRule } from "./visibility.js";
|
|
2
|
+
import "../softr-config.js";
|
|
2
3
|
|
|
3
4
|
//#region src/visibility/route.d.ts
|
|
4
5
|
|
|
@@ -46,7 +47,8 @@ declare function isAlreadyAuthenticatedError(error: unknown): error is AccessErr
|
|
|
46
47
|
* A `beforeLoad` handler that denies a visitor who fails the rule.
|
|
47
48
|
*
|
|
48
49
|
* Each reason falls back to the app's configured behaviour. Pass `overrides` to
|
|
49
|
-
* change what any one reason does.
|
|
50
|
+
* change what any one reason does. A redirected signed-out visitor carries the
|
|
51
|
+
* page they wanted, for {@link toReturnPath} to read back.
|
|
50
52
|
*
|
|
51
53
|
* Throws a router redirect, so it belongs in `beforeLoad` and nowhere else.
|
|
52
54
|
*
|
|
@@ -55,17 +57,43 @@ declare function isAlreadyAuthenticatedError(error: unknown): error is AccessErr
|
|
|
55
57
|
*/
|
|
56
58
|
declare function guardRoute(visibility: Visibility, overrides?: GuardOverrides): (opts: {
|
|
57
59
|
context: AccessContext;
|
|
60
|
+
location: {
|
|
61
|
+
href: string;
|
|
62
|
+
};
|
|
58
63
|
}) => void;
|
|
59
64
|
/**
|
|
60
65
|
* Throws what {@link guardRoute} would, for a `beforeLoad` that runs its own
|
|
61
66
|
* checks after the rule. It takes no overrides.
|
|
62
67
|
*
|
|
63
68
|
* @example
|
|
64
|
-
* beforeLoad: (
|
|
65
|
-
* assertRouteAccess(visibility,
|
|
66
|
-
* if (params.projectId === "demo") throw redirect({ to: "/projects" })
|
|
69
|
+
* beforeLoad: (opts) => {
|
|
70
|
+
* assertRouteAccess(visibility, opts)
|
|
71
|
+
* if (opts.params.projectId === "demo") throw redirect({ to: "/projects" })
|
|
67
72
|
* }
|
|
68
73
|
*/
|
|
69
|
-
declare function assertRouteAccess<R extends VisibilityRule
|
|
74
|
+
declare function assertRouteAccess<R extends VisibilityRule, O extends {
|
|
75
|
+
context: AccessContext;
|
|
76
|
+
location: {
|
|
77
|
+
href: string;
|
|
78
|
+
};
|
|
79
|
+
}>(visibility: Visibility<R>, opts: O): asserts opts is O & {
|
|
80
|
+
context: Narrowed<R>;
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* Where to send a visitor who just signed in: the path a guard sent them away
|
|
84
|
+
* from, else where `auth.guard.alreadyAuthenticated` in softr.json points, else
|
|
85
|
+
* `/`. Anything but a path on this app counts as missing. It always reloads the
|
|
86
|
+
* page, so the router picks up the new session.
|
|
87
|
+
*
|
|
88
|
+
* @example
|
|
89
|
+
* const location = useLocation()
|
|
90
|
+
* navigate(toReturnPath(location))
|
|
91
|
+
*/
|
|
92
|
+
declare function toReturnPath(location: {
|
|
93
|
+
search: Record<string, unknown>;
|
|
94
|
+
}): {
|
|
95
|
+
href: string;
|
|
96
|
+
reloadDocument: true;
|
|
97
|
+
};
|
|
70
98
|
//#endregion
|
|
71
|
-
export { assertRouteAccess, guardRoute, isAccessError, isAlreadyAuthenticatedError, isForbiddenError, isUnauthenticatedError };
|
|
99
|
+
export { assertRouteAccess, guardRoute, isAccessError, isAlreadyAuthenticatedError, isForbiddenError, isUnauthenticatedError, toReturnPath };
|
package/dist/visibility/route.js
CHANGED
|
@@ -32,14 +32,24 @@ function isForbiddenError(error) {
|
|
|
32
32
|
function isAlreadyAuthenticatedError(error) {
|
|
33
33
|
return isReason(error, "alreadyAuthenticated");
|
|
34
34
|
}
|
|
35
|
+
function softrConfig() {
|
|
36
|
+
return typeof __SOFTR_CONFIG__ === "undefined" ? panic("softr.json is missing") : __SOFTR_CONFIG__;
|
|
37
|
+
}
|
|
35
38
|
/** What a guard throws for a reason: a redirect, or an {@link AccessError}. */
|
|
36
|
-
function thrownFor(reason, overrides) {
|
|
37
|
-
const behaviour = overrides?.[reason] ?? (
|
|
39
|
+
function thrownFor(reason, overrides, location) {
|
|
40
|
+
const behaviour = overrides?.[reason] ?? softrConfig().auth.guard[reason];
|
|
38
41
|
const resolved = typeof behaviour === "string" ? {
|
|
39
42
|
strategy: "redirect",
|
|
40
43
|
to: behaviour
|
|
41
44
|
} : behaviour;
|
|
42
|
-
if (resolved.strategy === "redirect")
|
|
45
|
+
if (resolved.strategy === "redirect") {
|
|
46
|
+
if (reason !== "unauthenticated") return redirect({ to: resolved.to });
|
|
47
|
+
const { redirectParam } = softrConfig().auth.routes.login;
|
|
48
|
+
return redirect({
|
|
49
|
+
to: resolved.to,
|
|
50
|
+
search: { [redirectParam]: location.href }
|
|
51
|
+
});
|
|
52
|
+
}
|
|
43
53
|
return {
|
|
44
54
|
type: "access_error",
|
|
45
55
|
reason
|
|
@@ -49,7 +59,8 @@ function thrownFor(reason, overrides) {
|
|
|
49
59
|
* A `beforeLoad` handler that denies a visitor who fails the rule.
|
|
50
60
|
*
|
|
51
61
|
* Each reason falls back to the app's configured behaviour. Pass `overrides` to
|
|
52
|
-
* change what any one reason does.
|
|
62
|
+
* change what any one reason does. A redirected signed-out visitor carries the
|
|
63
|
+
* page they wanted, for {@link toReturnPath} to read back.
|
|
53
64
|
*
|
|
54
65
|
* Throws a router redirect, so it belongs in `beforeLoad` and nowhere else.
|
|
55
66
|
*
|
|
@@ -57,10 +68,10 @@ function thrownFor(reason, overrides) {
|
|
|
57
68
|
* beforeLoad: guardRoute(visibility, { unauthenticated: "/sign-in" })
|
|
58
69
|
*/
|
|
59
70
|
function guardRoute(visibility, overrides) {
|
|
60
|
-
return ({ context }) => {
|
|
71
|
+
return ({ context, location }) => {
|
|
61
72
|
const result = checkAccess(visibility, context);
|
|
62
73
|
if (result.ok) return;
|
|
63
|
-
throw thrownFor(result.reason, overrides);
|
|
74
|
+
throw thrownFor(result.reason, overrides, location);
|
|
64
75
|
};
|
|
65
76
|
}
|
|
66
77
|
/**
|
|
@@ -68,16 +79,47 @@ function guardRoute(visibility, overrides) {
|
|
|
68
79
|
* checks after the rule. It takes no overrides.
|
|
69
80
|
*
|
|
70
81
|
* @example
|
|
71
|
-
* beforeLoad: (
|
|
72
|
-
* assertRouteAccess(visibility,
|
|
73
|
-
* if (params.projectId === "demo") throw redirect({ to: "/projects" })
|
|
82
|
+
* beforeLoad: (opts) => {
|
|
83
|
+
* assertRouteAccess(visibility, opts)
|
|
84
|
+
* if (opts.params.projectId === "demo") throw redirect({ to: "/projects" })
|
|
74
85
|
* }
|
|
75
86
|
*/
|
|
76
|
-
function assertRouteAccess(visibility,
|
|
77
|
-
const result = checkAccess(visibility, context);
|
|
87
|
+
function assertRouteAccess(visibility, opts) {
|
|
88
|
+
const result = checkAccess(visibility, opts.context);
|
|
78
89
|
if (result.ok) return;
|
|
79
|
-
throw thrownFor(result.reason, void 0);
|
|
90
|
+
throw thrownFor(result.reason, void 0, opts.location);
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Where to send a visitor who just signed in: the path a guard sent them away
|
|
94
|
+
* from, else where `auth.guard.alreadyAuthenticated` in softr.json points, else
|
|
95
|
+
* `/`. Anything but a path on this app counts as missing. It always reloads the
|
|
96
|
+
* page, so the router picks up the new session.
|
|
97
|
+
*
|
|
98
|
+
* @example
|
|
99
|
+
* const location = useLocation()
|
|
100
|
+
* navigate(toReturnPath(location))
|
|
101
|
+
*/
|
|
102
|
+
function toReturnPath(location) {
|
|
103
|
+
const { auth } = softrConfig();
|
|
104
|
+
const target = location.search[auth.routes.login.redirectParam];
|
|
105
|
+
if (typeof target === "string" && target.startsWith("/") && new URL(target, "https://app.invalid").origin === "https://app.invalid") return {
|
|
106
|
+
href: target,
|
|
107
|
+
reloadDocument: true
|
|
108
|
+
};
|
|
109
|
+
const fallback = auth.guard.alreadyAuthenticated;
|
|
110
|
+
if (typeof fallback === "string") return {
|
|
111
|
+
href: fallback,
|
|
112
|
+
reloadDocument: true
|
|
113
|
+
};
|
|
114
|
+
if (fallback.strategy === "redirect") return {
|
|
115
|
+
href: fallback.to,
|
|
116
|
+
reloadDocument: true
|
|
117
|
+
};
|
|
118
|
+
return {
|
|
119
|
+
href: "/",
|
|
120
|
+
reloadDocument: true
|
|
121
|
+
};
|
|
80
122
|
}
|
|
81
123
|
|
|
82
124
|
//#endregion
|
|
83
|
-
export { assertRouteAccess, guardRoute, isAccessError, isAlreadyAuthenticatedError, isForbiddenError, isUnauthenticatedError };
|
|
125
|
+
export { assertRouteAccess, guardRoute, isAccessError, isAlreadyAuthenticatedError, isForbiddenError, isUnauthenticatedError, softrConfig, toReturnPath };
|
package/package.json
CHANGED
|
@@ -1,16 +1,37 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@softr/sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.64-alpha.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
|
-
".": {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
6
|
+
".": {
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"import": "./dist/index.js"
|
|
9
|
+
},
|
|
10
|
+
"./client": {
|
|
11
|
+
"types": "./dist/client.d.ts",
|
|
12
|
+
"import": "./dist/client.js"
|
|
13
|
+
},
|
|
14
|
+
"./server": {
|
|
15
|
+
"types": "./dist/server.d.ts",
|
|
16
|
+
"import": "./dist/server.js"
|
|
17
|
+
},
|
|
18
|
+
"./vite": {
|
|
19
|
+
"types": "./dist/vite.d.ts",
|
|
20
|
+
"import": "./dist/vite.js"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"bin": {
|
|
24
|
+
"softr-sdk": "./dist/cli.js"
|
|
25
|
+
},
|
|
26
|
+
"files": [
|
|
27
|
+
"dist",
|
|
28
|
+
"schema",
|
|
29
|
+
"skills",
|
|
30
|
+
"!skills/_artifacts"
|
|
31
|
+
],
|
|
32
|
+
"publishConfig": {
|
|
33
|
+
"access": "public"
|
|
34
|
+
},
|
|
14
35
|
"scripts": {
|
|
15
36
|
"build": "tsdown",
|
|
16
37
|
"test": "node --import ./src/test-utils/setup.ts --test",
|
|
@@ -42,7 +63,9 @@
|
|
|
42
63
|
"optional": true
|
|
43
64
|
}
|
|
44
65
|
},
|
|
45
|
-
"keywords": [
|
|
66
|
+
"keywords": [
|
|
67
|
+
"tanstack-intent"
|
|
68
|
+
],
|
|
46
69
|
"intent": {
|
|
47
70
|
"version": 1,
|
|
48
71
|
"repo": "@softr/sdk",
|
package/schema/softr.schema.json
CHANGED
|
@@ -7,6 +7,30 @@
|
|
|
7
7
|
"type": "object",
|
|
8
8
|
"description": "Authentication. Written in this repo and read by the app's build.",
|
|
9
9
|
"properties": {
|
|
10
|
+
"routes": {
|
|
11
|
+
"type": "object",
|
|
12
|
+
"description": "Where the app's sign-in pages live.",
|
|
13
|
+
"properties": {
|
|
14
|
+
"login": {
|
|
15
|
+
"type": "object",
|
|
16
|
+
"description": "The sign-in page.",
|
|
17
|
+
"properties": {
|
|
18
|
+
"path": { "$ref": "#/$defs/appPath" },
|
|
19
|
+
"redirectParam": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"description": "The search param that carries where to go after signing in. Every unauthenticated redirect sets it."
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"required": ["path", "redirectParam"],
|
|
25
|
+
"additionalProperties": false
|
|
26
|
+
},
|
|
27
|
+
"resetPassword": { "$ref": "#/$defs/tokenRoute", "description": "The page a password reset email links to." },
|
|
28
|
+
"acceptInvitation": { "$ref": "#/$defs/tokenRoute", "description": "The page an invitation email links to." },
|
|
29
|
+
"magicLink": { "$ref": "#/$defs/tokenRoute", "description": "The page a magic link email links to." }
|
|
30
|
+
},
|
|
31
|
+
"required": ["login", "resetPassword", "acceptInvitation", "magicLink"],
|
|
32
|
+
"additionalProperties": false
|
|
33
|
+
},
|
|
10
34
|
"guard": {
|
|
11
35
|
"type": "object",
|
|
12
36
|
"description": "What a route guard does when it denies a visitor. A route's own overrides win over these.",
|
|
@@ -28,12 +52,29 @@
|
|
|
28
52
|
"additionalProperties": false
|
|
29
53
|
}
|
|
30
54
|
},
|
|
31
|
-
"required": ["guard"],
|
|
55
|
+
"required": ["routes", "guard"],
|
|
32
56
|
"additionalProperties": false
|
|
33
57
|
}
|
|
34
58
|
},
|
|
35
59
|
"required": ["auth"],
|
|
36
60
|
"$defs": {
|
|
61
|
+
"appPath": {
|
|
62
|
+
"type": "string",
|
|
63
|
+
"pattern": "^/[^?#]*$",
|
|
64
|
+
"description": "A path on this app, with no search or hash."
|
|
65
|
+
},
|
|
66
|
+
"tokenRoute": {
|
|
67
|
+
"type": "object",
|
|
68
|
+
"properties": {
|
|
69
|
+
"path": { "$ref": "#/$defs/appPath" },
|
|
70
|
+
"tokenParam": {
|
|
71
|
+
"type": "string",
|
|
72
|
+
"description": "The search param that carries the link's token."
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"required": ["path", "tokenParam"],
|
|
76
|
+
"additionalProperties": false
|
|
77
|
+
},
|
|
37
78
|
"accessBehaviour": {
|
|
38
79
|
"oneOf": [
|
|
39
80
|
{ "type": "string", "description": "A path to redirect to." },
|
|
@@ -6,12 +6,13 @@ description: >-
|
|
|
6
6
|
boundary between them, softrAuthMiddleware, getSoftrContext,
|
|
7
7
|
initialSoftrContext, SoftrContext, and which sub-skill to load for route
|
|
8
8
|
visibility, the current user, reading records, charts and metrics, writing
|
|
9
|
-
records, auth, or showing dates and numbers. Load this when unsure which
|
|
10
|
-
touching the wiring; each sub-skill stands alone
|
|
9
|
+
records, auth, or showing dates and numbers. Load this when unsure which
|
|
10
|
+
sub-skill applies, or when touching the wiring; each sub-skill stands alone
|
|
11
|
+
for its own task.
|
|
11
12
|
metadata:
|
|
12
13
|
type: core
|
|
13
14
|
library: softr-sdk
|
|
14
|
-
library_version: 0.0.
|
|
15
|
+
library_version: 0.0.64-alpha.1
|
|
15
16
|
---
|
|
16
17
|
|
|
17
18
|
# Softr SDK core
|