@marianmeres/collection-types 1.38.1 → 1.39.0

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.
@@ -10,6 +10,19 @@ import type { AreaPagesConfig } from "./area-pages.js";
10
10
  import type { FormRoutesConfig } from "./form-routes.js";
11
11
  import type { JoyConfig } from "./joy-config.js";
12
12
  import type { LinkedConfig } from "./linked.js";
13
+ /**
14
+ * Account auth flags advertised to the SPA so it can show/hide registration
15
+ * UI without an extra round trip. Populated server-side from the same boot
16
+ * options that drive `createAccountApp` / `bootstrapAccount`.
17
+ */
18
+ export interface JoyAuthMeta {
19
+ /** Whether `POST /account/register` is enabled. Drives the Sign-up tab. */
20
+ allowSelfRegistration: boolean;
21
+ /** Whether OAuth providers may create new accounts (vs login-only). */
22
+ allowOAuthRegistration: boolean;
23
+ /** Whether the email verification gate is on (drives the OTP step). */
24
+ requireVerifiedEmail: boolean;
25
+ }
13
26
  /**
14
27
  * Consolidated Joy configuration response.
15
28
  * Single endpoint replaces 5 individual config fetches.
@@ -53,4 +66,8 @@ export interface JoyResponse {
53
66
  * 3-level hierarchy: Group -> Page -> Tab.
54
67
  */
55
68
  userPages: AreaPagesConfig | null;
69
+ /**
70
+ * Account auth flags. Optional for back-compat — older servers may omit it.
71
+ */
72
+ auth?: JoyAuthMeta;
56
73
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marianmeres/collection-types",
3
- "version": "1.38.1",
3
+ "version": "1.39.0",
4
4
  "type": "module",
5
5
  "main": "dist/mod.js",
6
6
  "types": "dist/mod.d.ts",