@fleetless/contracts 8.1.0 → 9.0.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.
@@ -0,0 +1,101 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "id": {
6
+ "type": "string",
7
+ "format": "uuid",
8
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
9
+ },
10
+ "context": {
11
+ "type": "string",
12
+ "enum": [
13
+ "registration",
14
+ "invitation",
15
+ "order",
16
+ "existing_org"
17
+ ]
18
+ },
19
+ "accepted_at": {
20
+ "type": "string",
21
+ "format": "date-time",
22
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{6}(?:Z))$"
23
+ },
24
+ "text_id": {
25
+ "type": "string",
26
+ "minLength": 1,
27
+ "maxLength": 80,
28
+ "pattern": "\\S"
29
+ },
30
+ "terms": {
31
+ "type": "object",
32
+ "properties": {
33
+ "version": {
34
+ "type": "string",
35
+ "minLength": 1,
36
+ "maxLength": 80
37
+ },
38
+ "version_date": {
39
+ "type": "string",
40
+ "format": "date",
41
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
42
+ },
43
+ "url": {
44
+ "type": "string",
45
+ "maxLength": 2048,
46
+ "pattern": "^https:\\/\\/(?=[A-Za-z0-9.-]{1,253}(?::[0-9]{1,5})?(?:[/?#]|$))[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?(?:\\.[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*(?::(?:[0-5]?[0-9]{1,4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5]))?(?:[/?#]|$)",
47
+ "format": "uri"
48
+ }
49
+ },
50
+ "required": [
51
+ "version",
52
+ "version_date",
53
+ "url"
54
+ ],
55
+ "additionalProperties": false
56
+ },
57
+ "dpa": {
58
+ "anyOf": [
59
+ {
60
+ "type": "object",
61
+ "properties": {
62
+ "version": {
63
+ "type": "string",
64
+ "minLength": 1,
65
+ "maxLength": 80
66
+ },
67
+ "version_date": {
68
+ "type": "string",
69
+ "format": "date",
70
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
71
+ },
72
+ "url": {
73
+ "type": "string",
74
+ "maxLength": 2048,
75
+ "pattern": "^https:\\/\\/(?=[A-Za-z0-9.-]{1,253}(?::[0-9]{1,5})?(?:[/?#]|$))[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?(?:\\.[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*(?::(?:[0-5]?[0-9]{1,4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5]))?(?:[/?#]|$)",
76
+ "format": "uri"
77
+ }
78
+ },
79
+ "required": [
80
+ "version",
81
+ "version_date",
82
+ "url"
83
+ ],
84
+ "additionalProperties": false
85
+ },
86
+ {
87
+ "type": "null"
88
+ }
89
+ ]
90
+ }
91
+ },
92
+ "required": [
93
+ "id",
94
+ "context",
95
+ "accepted_at",
96
+ "text_id",
97
+ "terms",
98
+ "dpa"
99
+ ],
100
+ "additionalProperties": false
101
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "version": {
6
+ "type": "string",
7
+ "minLength": 1,
8
+ "maxLength": 80
9
+ },
10
+ "version_date": {
11
+ "type": "string",
12
+ "format": "date",
13
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
14
+ },
15
+ "url": {
16
+ "type": "string",
17
+ "maxLength": 2048,
18
+ "pattern": "^https:\\/\\/(?=[A-Za-z0-9.-]{1,253}(?::[0-9]{1,5})?(?:[/?#]|$))[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?(?:\\.[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*(?::(?:[0-5]?[0-9]{1,4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5]))?(?:[/?#]|$)",
19
+ "format": "uri"
20
+ }
21
+ },
22
+ "required": [
23
+ "version",
24
+ "version_date",
25
+ "url"
26
+ ],
27
+ "additionalProperties": false
28
+ }
@@ -0,0 +1,72 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "terms": {
6
+ "type": "object",
7
+ "properties": {
8
+ "version": {
9
+ "type": "string",
10
+ "minLength": 1,
11
+ "maxLength": 80
12
+ },
13
+ "version_date": {
14
+ "type": "string",
15
+ "format": "date",
16
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
17
+ },
18
+ "url": {
19
+ "type": "string",
20
+ "maxLength": 2048,
21
+ "pattern": "^https:\\/\\/(?=[A-Za-z0-9.-]{1,253}(?::[0-9]{1,5})?(?:[/?#]|$))[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?(?:\\.[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*(?::(?:[0-5]?[0-9]{1,4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5]))?(?:[/?#]|$)",
22
+ "format": "uri"
23
+ }
24
+ },
25
+ "required": [
26
+ "version",
27
+ "version_date",
28
+ "url"
29
+ ],
30
+ "additionalProperties": false
31
+ },
32
+ "dpa": {
33
+ "anyOf": [
34
+ {
35
+ "type": "object",
36
+ "properties": {
37
+ "version": {
38
+ "type": "string",
39
+ "minLength": 1,
40
+ "maxLength": 80
41
+ },
42
+ "version_date": {
43
+ "type": "string",
44
+ "format": "date",
45
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
46
+ },
47
+ "url": {
48
+ "type": "string",
49
+ "maxLength": 2048,
50
+ "pattern": "^https:\\/\\/(?=[A-Za-z0-9.-]{1,253}(?::[0-9]{1,5})?(?:[/?#]|$))[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?(?:\\.[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*(?::(?:[0-5]?[0-9]{1,4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5]))?(?:[/?#]|$)",
51
+ "format": "uri"
52
+ }
53
+ },
54
+ "required": [
55
+ "version",
56
+ "version_date",
57
+ "url"
58
+ ],
59
+ "additionalProperties": false
60
+ },
61
+ {
62
+ "type": "null"
63
+ }
64
+ ]
65
+ }
66
+ },
67
+ "required": [
68
+ "terms",
69
+ "dpa"
70
+ ],
71
+ "additionalProperties": false
72
+ }
@@ -62,6 +62,34 @@
62
62
  }
63
63
  ],
64
64
  "description": "The page an MCP authorization redirects to, with `{interaction}` where the interaction id goes. Not a token: the id names a pending request the server already holds, and the app authenticates the user itself before approving it. `null` means the hosted MCP sign-in in `hosted_pages` is used."
65
+ },
66
+ "operator_info_url": {
67
+ "anyOf": [
68
+ {
69
+ "type": "string",
70
+ "maxLength": 2048,
71
+ "pattern": "^https:\\/\\/(?=[A-Za-z0-9.-]{1,253}(?::[0-9]{1,5})?(?:[/?#]|$))[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?(?:\\.[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*(?::(?:[0-5]?[0-9]{1,4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5]))?(?:[/?#]|$)",
72
+ "format": "uri"
73
+ },
74
+ {
75
+ "type": "null"
76
+ }
77
+ ],
78
+ "description": "Operator information / legal notice URL for this customer app. `null` means unset; cloud checks reachability and public addresses before allowing new app-user access flows."
79
+ },
80
+ "privacy_policy_url": {
81
+ "anyOf": [
82
+ {
83
+ "type": "string",
84
+ "maxLength": 2048,
85
+ "pattern": "^https:\\/\\/(?=[A-Za-z0-9.-]{1,253}(?::[0-9]{1,5})?(?:[/?#]|$))[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?(?:\\.[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*(?::(?:[0-5]?[0-9]{1,4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5]))?(?:[/?#]|$)",
86
+ "format": "uri"
87
+ },
88
+ {
89
+ "type": "null"
90
+ }
91
+ ],
92
+ "description": "Privacy policy URL for this customer app. `null` means unset; cloud checks reachability and public addresses before allowing new app-user access flows."
65
93
  }
66
94
  },
67
95
  "required": [
@@ -69,7 +97,9 @@
69
97
  "invite_url",
70
98
  "verify_url",
71
99
  "reset_url",
72
- "mcp_login_url"
100
+ "mcp_login_url",
101
+ "operator_info_url",
102
+ "privacy_policy_url"
73
103
  ],
74
104
  "additionalProperties": false
75
105
  }
@@ -7,9 +7,17 @@
7
7
  "maxLength": 254,
8
8
  "format": "email",
9
9
  "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
10
+ },
11
+ "consent_text_version": {
12
+ "type": "string",
13
+ "minLength": 1,
14
+ "maxLength": 80,
15
+ "pattern": "\\S",
16
+ "description": "Version of the F.1 text shown at submission. Cloud rejects unsupported versions and stores the submitted value in a consent record separate from the waiting list."
10
17
  }
11
18
  },
12
19
  "required": [
13
- "email"
20
+ "email",
21
+ "consent_text_version"
14
22
  ]
15
23
  }
@@ -455,6 +455,9 @@ export type AppHostedPages = z.infer<typeof appHostedPages>;
455
455
  * Fleetless-hosted page in `hosted_pages`, so nothing is refused for a
456
456
  * missing URL — self-registration, mailed invitations, resets and MCP sign-in
457
457
  * all work before the app has a page of its own.
458
+ * The app's operator-information and privacy-policy links are separate:
459
+ * `null` represents an unset legacy link. The cloud checks reachability and
460
+ * public addresses and gates new access flows until both are valid.
458
461
  */
459
462
  export declare const appAuthConfig: z.ZodObject<{
460
463
  self_registration: z.ZodBoolean;
@@ -466,6 +469,8 @@ export declare const appAuthConfig: z.ZodObject<{
466
469
  reset_url: z.ZodNullable<z.ZodString>;
467
470
  mcp_login_url: z.ZodNullable<z.ZodString>;
468
471
  app_url: z.ZodNullable<z.ZodURL>;
472
+ operator_info_url: z.ZodNullable<z.ZodURL>;
473
+ privacy_policy_url: z.ZodNullable<z.ZodURL>;
469
474
  sign_in_methods: z.ZodObject<{
470
475
  password: z.ZodBoolean;
471
476
  email_code: z.ZodBoolean;
@@ -520,10 +525,10 @@ export declare const putAppAuthSignInRequest: z.ZodObject<{
520
525
  }, z.core.$strict>;
521
526
  export type PutAppAuthSignInRequest = z.infer<typeof putAppAuthSignInRequest>;
522
527
  /**
523
- * `PUT /api/apps/:id/auth-config/urls` — the app's home page and the four
524
- * pages Fleetless's mails and the MCP sign-in point at. One slice, because
525
- * the console's Pages section owns all five; each `null` falls back to the
526
- * hosted page.
528
+ * `PUT /api/apps/:id/auth-config/urls` — the app's home page, four flow pages,
529
+ * and two legal pages. The console's Pages section owns all seven. `null`
530
+ * falls back to a hosted flow page for the four flow URLs; `null` on a legal
531
+ * link clears it and the cloud gates the affected new access flows.
527
532
  */
528
533
  export declare const putAppAuthUrlsRequest: z.ZodObject<{
529
534
  invite_url: z.ZodNullable<z.ZodString>;
@@ -531,6 +536,8 @@ export declare const putAppAuthUrlsRequest: z.ZodObject<{
531
536
  reset_url: z.ZodNullable<z.ZodString>;
532
537
  mcp_login_url: z.ZodNullable<z.ZodString>;
533
538
  app_url: z.ZodNullable<z.ZodURL>;
539
+ operator_info_url: z.ZodNullable<z.ZodURL>;
540
+ privacy_policy_url: z.ZodNullable<z.ZodURL>;
534
541
  }, z.core.$strict>;
535
542
  export type PutAppAuthUrlsRequest = z.infer<typeof putAppAuthUrlsRequest>;
536
543
  /**
@@ -570,7 +577,7 @@ export type MailTemplateKind = z.infer<typeof mailTemplateKind>;
570
577
  * where the renderer, the console's completion and the docs all read the same
571
578
  * one.
572
579
  */
573
- export declare const MAIL_TEMPLATE_VARIABLES: readonly ["app.name", "org.name", "user.email", "user.display_name", "role.name", "link", "expires_in_hours", "code", "expires_in_minutes"];
580
+ export declare const MAIL_TEMPLATE_VARIABLES: readonly ["app.name", "org.name", "user.email", "user.display_name", "role.name", "link", "expires_in_hours", "code", "expires_in_minutes", "app.operator_info_url", "app.privacy_policy_url"];
574
581
  /**
575
582
  * **The Fleetless default text for the four app mails.**
576
583
  *
package/dist/app-users.js CHANGED
@@ -1,6 +1,7 @@
1
1
  // SPDX-License-Identifier: Apache-2.0
2
2
  import { z } from 'zod';
3
3
  import { idpIssuer, mailStatus, password } from './identity.js';
4
+ import { httpsLegalUrl } from './legal.js';
4
5
  /**
5
6
  * **App users: the per-app identity space.**
6
7
  *
@@ -536,6 +537,9 @@ export const appHostedPages = z.object({
536
537
  * Fleetless-hosted page in `hosted_pages`, so nothing is refused for a
537
538
  * missing URL — self-registration, mailed invitations, resets and MCP sign-in
538
539
  * all work before the app has a page of its own.
540
+ * The app's operator-information and privacy-policy links are separate:
541
+ * `null` represents an unset legacy link. The cloud checks reachability and
542
+ * public addresses and gates new access flows until both are valid.
539
543
  */
540
544
  export const appAuthConfig = z.object({
541
545
  self_registration: z.boolean().meta({
@@ -565,6 +569,12 @@ export const appAuthConfig = z.object({
565
569
  app_url: appHomeUrl.nullable().meta({
566
570
  description: 'The app\'s own home page, linked as `Open <app>` when a hosted flow is done. `null` makes the hosted done page say `You can close this tab`.',
567
571
  }),
572
+ operator_info_url: httpsLegalUrl.nullable().meta({
573
+ description: 'Operator information / legal notice URL for this customer app. `null` means unset; cloud checks reachability and public addresses before allowing new app-user access flows.',
574
+ }),
575
+ privacy_policy_url: httpsLegalUrl.nullable().meta({
576
+ description: 'Privacy policy URL for this customer app. `null` means unset; cloud checks reachability and public addresses before allowing new app-user access flows.',
577
+ }),
568
578
  sign_in_methods: appSignInMethods.meta({
569
579
  description: 'Which sign-in methods the app offers: password, emailed code, or both — at least one. Identity providers stay on top of either. The default is password only.',
570
580
  }),
@@ -606,13 +616,14 @@ export const putAppAuthSignInRequest = appAuthConfig
606
616
  .pick({ sign_in_methods: true, two_factor: true })
607
617
  .strict();
608
618
  /**
609
- * `PUT /api/apps/:id/auth-config/urls` — the app's home page and the four
610
- * pages Fleetless's mails and the MCP sign-in point at. One slice, because
611
- * the console's Pages section owns all five; each `null` falls back to the
612
- * hosted page.
619
+ * `PUT /api/apps/:id/auth-config/urls` — the app's home page, four flow pages,
620
+ * and two legal pages. The console's Pages section owns all seven. `null`
621
+ * falls back to a hosted flow page for the four flow URLs; `null` on a legal
622
+ * link clears it and the cloud gates the affected new access flows.
613
623
  */
614
624
  export const putAppAuthUrlsRequest = appAuthConfig
615
- .pick({ app_url: true, invite_url: true, verify_url: true, reset_url: true, mcp_login_url: true })
625
+ .pick({ app_url: true, invite_url: true, verify_url: true, reset_url: true, mcp_login_url: true,
626
+ operator_info_url: true, privacy_policy_url: true })
616
627
  .strict();
617
628
  /**
618
629
  * `PUT /api/apps/:id/auth-config/mcp` — the switch alone. Its login URL moved
@@ -653,7 +664,14 @@ export const MAIL_TEMPLATE_VARIABLES = [
653
664
  'expires_in_hours',
654
665
  'code',
655
666
  'expires_in_minutes',
667
+ 'app.operator_info_url',
668
+ 'app.privacy_policy_url',
656
669
  ];
670
+ /** Omit the entire D.2 line while a legacy app has either legal link unset. */
671
+ const APP_LEGAL_MAIL_FOOTER = `{% if app.operator_info_url and app.privacy_policy_url %}
672
+
673
+ {{ app.name }} · Operator information: {{ app.operator_info_url }} · Privacy policy: {{ app.privacy_policy_url }}
674
+ {% endif %}`;
657
675
  /**
658
676
  * **The Fleetless default text for the four app mails.**
659
677
  *
@@ -716,6 +734,7 @@ Accept the invitation:
716
734
  {{ link }}
717
735
 
718
736
  The link works for the next {% if expires_in_hours >= 48 %}{{ expires_in_hours | divided_by: 24 }} days{% elsif expires_in_hours == 1 %}1 hour{% else %}{{ expires_in_hours }} hours{% endif %}. If you were not expecting this invitation, ignore this mail — no account is created until you accept.
737
+ ${APP_LEGAL_MAIL_FOOTER}
719
738
  `,
720
739
  html: null,
721
740
  },
@@ -727,6 +746,7 @@ Confirm this address so you can sign in to {{ app.name }}:
727
746
  {{ link }}
728
747
 
729
748
  The link works for the next {% if expires_in_hours >= 48 %}{{ expires_in_hours | divided_by: 24 }} days{% elsif expires_in_hours == 1 %}1 hour{% else %}{{ expires_in_hours }} hours{% endif %}. If you did not create this account, ignore this mail — the account stays unconfirmed and cannot be used.
749
+ ${APP_LEGAL_MAIL_FOOTER}
730
750
  `,
731
751
  html: null,
732
752
  },
@@ -740,6 +760,7 @@ Choose a new password:
740
760
  {{ link }}
741
761
 
742
762
  The link works for the next {% if expires_in_hours >= 48 %}{{ expires_in_hours | divided_by: 24 }} days{% elsif expires_in_hours == 1 %}1 hour{% else %}{{ expires_in_hours }} hours{% endif %}. If it was not you, ignore this mail — your current password keeps working and nothing changes.
763
+ ${APP_LEGAL_MAIL_FOOTER}
743
764
  `,
744
765
  html: null,
745
766
  },
@@ -747,7 +768,9 @@ The link works for the next {% if expires_in_hours >= 48 %}{{ expires_in_hours |
747
768
  subject: 'Your {{ app.name }} sign-in code',
748
769
  text: `Your sign-in code for {{ app.name }} is {{ code }}.
749
770
 
750
- It works once, for {{ expires_in_minutes }} minutes. If you did not ask for it, ignore this mail.`,
771
+ It works once, for {{ expires_in_minutes }} minutes. If you did not ask for it, ignore this mail.
772
+
773
+ ${APP_LEGAL_MAIL_FOOTER}`,
751
774
  html: null,
752
775
  },
753
776
  };
@@ -0,0 +1,113 @@
1
+ // SPDX-License-Identifier: Apache-2.0
2
+ import { z } from 'zod';
3
+ export declare const controllerRegisterAddress: z.ZodObject<{
4
+ line1: z.ZodString;
5
+ line2: z.ZodDefault<z.ZodNullable<z.ZodString>>;
6
+ postalCode: z.ZodString;
7
+ city: z.ZodString;
8
+ country: z.ZodString;
9
+ }, z.core.$strict>;
10
+ export declare const controllerRegisterPrivacyContact: z.ZodObject<{
11
+ name: z.ZodString;
12
+ email: z.ZodString;
13
+ role: z.ZodEnum<{
14
+ general: "general";
15
+ appointed_dpo: "appointed_dpo";
16
+ }>;
17
+ }, z.core.$strict>;
18
+ export declare const controllerRegisterRepresentative: z.ZodObject<{
19
+ name: z.ZodString;
20
+ email: z.ZodString;
21
+ address: z.ZodString;
22
+ }, z.core.$strict>;
23
+ /** PUT replaces the whole confirmed record; null explicitly clears an optional contact. */
24
+ export declare const controllerRegisterWrite: z.ZodObject<{
25
+ legalName: z.ZodString;
26
+ address: z.ZodObject<{
27
+ line1: z.ZodString;
28
+ line2: z.ZodDefault<z.ZodNullable<z.ZodString>>;
29
+ postalCode: z.ZodString;
30
+ city: z.ZodString;
31
+ country: z.ZodString;
32
+ }, z.core.$strict>;
33
+ privacyContact: z.ZodNullable<z.ZodObject<{
34
+ name: z.ZodString;
35
+ email: z.ZodString;
36
+ role: z.ZodEnum<{
37
+ general: "general";
38
+ appointed_dpo: "appointed_dpo";
39
+ }>;
40
+ }, z.core.$strict>>;
41
+ euRepresentative: z.ZodNullable<z.ZodObject<{
42
+ name: z.ZodString;
43
+ email: z.ZodString;
44
+ address: z.ZodString;
45
+ }, z.core.$strict>>;
46
+ confirmationSource: z.ZodString;
47
+ }, z.core.$strict>;
48
+ /** A legacy record can exist before every required field was confirmed. */
49
+ export declare const controllerRegisterOrgRecord: z.ZodObject<{
50
+ privacyContact: z.ZodNullable<z.ZodObject<{
51
+ name: z.ZodString;
52
+ email: z.ZodString;
53
+ role: z.ZodEnum<{
54
+ general: "general";
55
+ appointed_dpo: "appointed_dpo";
56
+ }>;
57
+ }, z.core.$strict>>;
58
+ euRepresentative: z.ZodNullable<z.ZodObject<{
59
+ name: z.ZodString;
60
+ email: z.ZodString;
61
+ address: z.ZodString;
62
+ }, z.core.$strict>>;
63
+ confirmationSource: z.ZodString;
64
+ legalName: z.ZodNullable<z.ZodString>;
65
+ address: z.ZodNullable<z.ZodObject<{
66
+ line1: z.ZodString;
67
+ line2: z.ZodDefault<z.ZodNullable<z.ZodString>>;
68
+ postalCode: z.ZodString;
69
+ city: z.ZodString;
70
+ country: z.ZodString;
71
+ }, z.core.$strict>>;
72
+ updatedAt: z.ZodISODateTime;
73
+ updatedByKind: z.ZodEnum<{
74
+ owner: "owner";
75
+ operator: "operator";
76
+ }>;
77
+ updatedById: z.ZodUUID;
78
+ }, z.core.$strict>;
79
+ export declare const controllerRegisterOrgResponse: z.ZodObject<{
80
+ orgId: z.ZodUUID;
81
+ details: z.ZodNullable<z.ZodObject<{
82
+ privacyContact: z.ZodNullable<z.ZodObject<{
83
+ name: z.ZodString;
84
+ email: z.ZodString;
85
+ role: z.ZodEnum<{
86
+ general: "general";
87
+ appointed_dpo: "appointed_dpo";
88
+ }>;
89
+ }, z.core.$strict>>;
90
+ euRepresentative: z.ZodNullable<z.ZodObject<{
91
+ name: z.ZodString;
92
+ email: z.ZodString;
93
+ address: z.ZodString;
94
+ }, z.core.$strict>>;
95
+ confirmationSource: z.ZodString;
96
+ legalName: z.ZodNullable<z.ZodString>;
97
+ address: z.ZodNullable<z.ZodObject<{
98
+ line1: z.ZodString;
99
+ line2: z.ZodDefault<z.ZodNullable<z.ZodString>>;
100
+ postalCode: z.ZodString;
101
+ city: z.ZodString;
102
+ country: z.ZodString;
103
+ }, z.core.$strict>>;
104
+ updatedAt: z.ZodISODateTime;
105
+ updatedByKind: z.ZodEnum<{
106
+ owner: "owner";
107
+ operator: "operator";
108
+ }>;
109
+ updatedById: z.ZodUUID;
110
+ }, z.core.$strict>>;
111
+ }, z.core.$strict>;
112
+ export type ControllerRegisterWrite = z.infer<typeof controllerRegisterWrite>;
113
+ export type ControllerRegisterOrgResponse = z.infer<typeof controllerRegisterOrgResponse>;
@@ -0,0 +1,38 @@
1
+ // SPDX-License-Identifier: Apache-2.0
2
+ import { z } from 'zod';
3
+ /** Customer-confirmed controller details, independent of invoice data. */
4
+ const text = (max) => z.string().regex(/^\P{Cc}*$/u).trim().min(1).max(max);
5
+ const email = z.string().regex(/^\P{Cc}*$/u).trim().email().max(320);
6
+ export const controllerRegisterAddress = z.object({
7
+ line1: text(200),
8
+ line2: text(200).nullable().default(null),
9
+ postalCode: text(32),
10
+ city: text(120),
11
+ country: z.string().regex(/^\P{Cc}*$/u).trim().regex(/^[A-Z]{2}$/),
12
+ }).strict();
13
+ export const controllerRegisterPrivacyContact = z.object({
14
+ name: text(200), email, role: z.enum(['general', 'appointed_dpo']),
15
+ }).strict();
16
+ export const controllerRegisterRepresentative = z.object({
17
+ name: text(200), email, address: text(500),
18
+ }).strict();
19
+ /** PUT replaces the whole confirmed record; null explicitly clears an optional contact. */
20
+ export const controllerRegisterWrite = z.object({
21
+ legalName: text(200),
22
+ address: controllerRegisterAddress,
23
+ privacyContact: controllerRegisterPrivacyContact.nullable(),
24
+ euRepresentative: controllerRegisterRepresentative.nullable(),
25
+ confirmationSource: text(500),
26
+ }).strict();
27
+ /** A legacy record can exist before every required field was confirmed. */
28
+ export const controllerRegisterOrgRecord = controllerRegisterWrite.extend({
29
+ legalName: text(200).nullable(),
30
+ address: controllerRegisterAddress.nullable(),
31
+ updatedAt: z.iso.datetime(),
32
+ updatedByKind: z.enum(['owner', 'operator']),
33
+ updatedById: z.uuid(),
34
+ }).strict();
35
+ export const controllerRegisterOrgResponse = z.object({
36
+ orgId: z.uuid(),
37
+ details: controllerRegisterOrgRecord.nullable(),
38
+ }).strict();
@@ -192,9 +192,11 @@ export declare const twoFactorSetupResponse: z.ZodObject<{
192
192
  otpauth_url: z.ZodString;
193
193
  }, z.core.$strip>;
194
194
  export type TwoFactorSetupResponse = z.infer<typeof twoFactorSetupResponse>;
195
+ /** Version of the approved F.1 text shown by the waiting-list form. */
196
+ export declare const WAITLIST_F1_TEXT_VERSION = "F.1:1.0";
195
197
  /**
196
- * The landing page's waiting list (public site, 2026-09-04): one address,
197
- * posted from fleetless.dev while sign-up is closed. The route answers
198
+ * The landing page's waiting list (public site, 2026-09-04): an address and
199
+ * the F.1 text version shown, posted while sign-up is closed. The route answers
198
200
  * `202` whether or not the address was already listed.
199
201
  *
200
202
  * The address is bounded at 254 characters, the RFC 5321 forward-path limit.
@@ -204,6 +206,7 @@ export type TwoFactorSetupResponse = z.infer<typeof twoFactorSetupResponse>;
204
206
  */
205
207
  export declare const waitlistRequest: z.ZodObject<{
206
208
  email: z.ZodEmail;
209
+ consent_text_version: z.ZodString;
207
210
  }, z.core.$strip>;
208
211
  export type WaitlistRequest = z.infer<typeof waitlistRequest>;
209
212
  /**
package/dist/identity.js CHANGED
@@ -200,9 +200,11 @@ export const twoFactorSetupResponse = z.object({
200
200
  description: 'The same secret as an `otpauth://totp/` URL, to render as a QR code. It carries the secret: never log it.',
201
201
  }),
202
202
  });
203
+ /** Version of the approved F.1 text shown by the waiting-list form. */
204
+ export const WAITLIST_F1_TEXT_VERSION = 'F.1:1.0';
203
205
  /**
204
- * The landing page's waiting list (public site, 2026-09-04): one address,
205
- * posted from fleetless.dev while sign-up is closed. The route answers
206
+ * The landing page's waiting list (public site, 2026-09-04): an address and
207
+ * the F.1 text version shown, posted while sign-up is closed. The route answers
206
208
  * `202` whether or not the address was already listed.
207
209
  *
208
210
  * The address is bounded at 254 characters, the RFC 5321 forward-path limit.
@@ -210,7 +212,12 @@ export const twoFactorSetupResponse = z.object({
210
212
  * btree index, which raises above roughly 2704 bytes — so an unbounded address
211
213
  * turns an unauthenticated public route into a `500`.
212
214
  */
213
- export const waitlistRequest = z.object({ email: z.email().max(254) });
215
+ export const waitlistRequest = z.object({
216
+ email: z.email().max(254),
217
+ consent_text_version: z.string().min(1).max(80).regex(/\S/).meta({
218
+ description: 'Version of the F.1 text shown at submission. Cloud rejects unsupported versions and stores the submitted value in a consent record separate from the waiting list.',
219
+ }),
220
+ });
214
221
  /**
215
222
  * What happened to the mail, in four words instead of one.
216
223
  *