You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: align every remaining /api/ reference to /api/v1/
The v0.7.0 versioning sprint left a long tail of non-route references
to the old unversioned paths in:
Runtime fetches missed by the original sed:
sdk-js/src/codegen/flags.ts — vb-flags CLI 404'd against admin
admin/src/theme.ts — public theme endpoint, fixed in b3348a2
Display strings + UI labels:
admin/src/pages/{Settings,Hooks,Records,CollectionEdit,
NewCollectionModal,AuditLog}.tsx
admin/src/components/CodeEditor.tsx
admin/src/stores/auth.ts
admin/src/App.tsx
admin/src/pages/Setup.tsx
Server-side comments + log strings:
src/api/{audit-log,auth,flags,security,theme,webhooks}.ts
src/core/{audit-log,collections,routes,update-check,version}.ts
src/db/schema.ts
src/realtime/{manager,sse}.ts
SDK help/doc strings:
sdk-js/src/codegen/{bin,generate}.ts
sdk-js/src/flags/manager.ts
sdk-js/src/realtime/manager.ts
sdk-js/README.md
The path-introspection sites in src/api/ratelimit.ts and
src/core/audit-log.ts SKIP_PATHS are intentionally left referencing
'/api/admin/...' (without /v1/) because they run after normalizeApiPath
strips the version prefix. Comments document this; tests verify it.
637 + 65 tests pass; vaultbase + admin + sdk + docs all build clean.
{type==="auth"&&<>Email + password sign-up via <spanclassName="mono">/api/auth/{collName||"name"}/register</span>. Field names <spanclassName="mono">email</span>, <spanclassName="mono">password</span>, <spanclassName="mono">verified</span> are managed by the implicit auth schema and cannot be redefined.</>}
246
+
{type==="auth"&&<>Email + password sign-up via <spanclassName="mono">/api/v1/auth/{collName||"name"}/register</span>. Field names <spanclassName="mono">email</span>, <spanclassName="mono">password</span>, <spanclassName="mono">verified</span> are managed by the implicit auth schema and cannot be redefined.</>}
247
247
{type==="view"&&<>Read-only collection backed by a SQL <spanclassName="mono">SELECT</span>. Defaults to admin-only access — open it up via the API rules after creation. Writes return 405.</>}
248
248
{type==="base"&&<>Standard records collection. CRUD via <spanclassName="mono">/api/{collName||"name"}</span>.</>}
description: <>Passwordless sign-in via email — both a 6-digit code and a magic link. Requires SMTP. Endpoints: <codestyle={codeStyle}>POST /api/auth/<col>/otp/{request,auth}</code>.</>,
1843
+
description: <>Passwordless sign-in via email — both a 6-digit code and a magic link. Requires SMTP. Endpoints: <codestyle={codeStyle}>POST /api/v1/auth/<col>/otp/{request,auth}</code>.</>,
1844
1844
},
1845
1845
{
1846
1846
key: "mfa",
1847
1847
label: "MFA / TOTP (2FA)",
1848
1848
defaultOn: true,
1849
-
description: <>RFC 6238 TOTP with authenticator apps. Disabling blocks new enrollment but lets existing users still sign in and disable their own MFA. Endpoints: <codestyle={codeStyle}>POST /api/auth/<col>/totp/{setup,confirm,disable}</code>.</>,
1849
+
description: <>RFC 6238 TOTP with authenticator apps. Disabling blocks new enrollment but lets existing users still sign in and disable their own MFA. Endpoints: <codestyle={codeStyle}>POST /api/v1/auth/<col>/totp/{setup,confirm,disable}</code>.</>,
1850
1850
},
1851
1851
{
1852
1852
key: "anonymous",
1853
1853
label: "Anonymous sign-in",
1854
1854
defaultOn: false,
1855
-
description: <>Mints a guest user with no email/password — useful for guest carts or onboarding before signup. Sessions live 30 days. Endpoint: <codestyle={codeStyle}>POST /api/auth/<col>/anonymous</code>.</>,
1855
+
description: <>Mints a guest user with no email/password — useful for guest carts or onboarding before signup. Sessions live 30 days. Endpoint: <codestyle={codeStyle}>POST /api/v1/auth/<col>/anonymous</code>.</>,
1856
1856
},
1857
1857
{
1858
1858
key: "impersonation",
1859
1859
label: "Admin impersonation",
1860
1860
defaultOn: true,
1861
-
description: <>Admin mints a 1-hour user JWT for support purposes. JWT carries <codestyle={codeStyle}>impersonated_by</code> for audit. Endpoint: <codestyle={codeStyle}>POST /api/admin/impersonate/<col>/<userId></code>.</>,
1861
+
description: <>Admin mints a 1-hour user JWT for support purposes. JWT carries <codestyle={codeStyle}>impersonated_by</code> for audit. Endpoint: <codestyle={codeStyle}>POST /api/v1/admin/impersonate/<col>/<userId></code>.</>,
{kind: "admin",label: "Admin",description: "Admin JWTs minted by POST /api/admin/auth/login.",defaultSeconds: 7*24*3600},
1961
+
{kind: "admin",label: "Admin",description: "Admin JWTs minted by POST /api/v1/admin/auth/login.",defaultSeconds: 7*24*3600},
1962
1962
{kind: "impersonate",label: "Impersonate",description: "JWTs issued by admin impersonation. Keep short — these escalate access.",defaultSeconds: 3600},
1963
1963
{kind: "refresh",label: "Refresh",description: "Window applied when /refresh re-mints a token. Acts as the sliding ratchet.",defaultSeconds: 7*24*3600},
1964
-
{kind: "file",label: "File access",description: "Protected-file URLs minted via POST /api/files/.../token.",defaultSeconds: 3600},
1964
+
{kind: "file",label: "File access",description: "Protected-file URLs minted via POST /api/v1/files/.../token.",defaultSeconds: 3600},
0 commit comments