@fleetless/contracts 11.1.0-next.1 → 12.1.0-next.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/CHANGELOG.md CHANGED
@@ -15,6 +15,15 @@ version.
15
15
  limit and known file size through Bridge progress and Cloud sync status.
16
16
  Store-full `details` stays separate; failure kinds are unchanged.
17
17
 
18
+ ## [12.0.0] — 2026-11-02
19
+
20
+ ### Changed
21
+
22
+ - **Breaking (major):** The public `GET /api/client/providers` response now
23
+ requires `two_factor: off | optional | required`, the app's two-factor
24
+ policy. It does not describe a person's enrollment state. Older responses
25
+ without this field no longer satisfy the contract.
26
+
18
27
  ### Fixed
19
28
 
20
29
  - Corrected the exported `Job.state` and `JobRun.state` descriptions of final
@@ -21848,11 +21848,21 @@
21848
21848
  ],
21849
21849
  "additionalProperties": false,
21850
21850
  "description": "Which of password and emailed code the app accepts, so its sign-in page draws the right fields without guessing. The same value the developer set; public, like the provider buttons."
21851
+ },
21852
+ "two_factor": {
21853
+ "type": "string",
21854
+ "enum": [
21855
+ "off",
21856
+ "optional",
21857
+ "required"
21858
+ ],
21859
+ "description": "The app's off, optional or required two-factor policy; not the caller's enrollment state."
21851
21860
  }
21852
21861
  },
21853
21862
  "required": [
21854
21863
  "providers",
21855
- "sign_in_methods"
21864
+ "sign_in_methods",
21865
+ "two_factor"
21856
21866
  ],
21857
21867
  "additionalProperties": false
21858
21868
  },
@@ -44,11 +44,21 @@
44
44
  ],
45
45
  "additionalProperties": false,
46
46
  "description": "Which of password and emailed code the app accepts, so its sign-in page draws the right fields without guessing. The same value the developer set; public, like the provider buttons."
47
+ },
48
+ "two_factor": {
49
+ "type": "string",
50
+ "enum": [
51
+ "off",
52
+ "optional",
53
+ "required"
54
+ ],
55
+ "description": "The app's off, optional or required two-factor policy; not the caller's enrollment state."
47
56
  }
48
57
  },
49
58
  "required": [
50
59
  "providers",
51
- "sign_in_methods"
60
+ "sign_in_methods",
61
+ "two_factor"
52
62
  ],
53
63
  "additionalProperties": false
54
64
  }
@@ -271,10 +271,11 @@ export declare const clientProviderListQuery: z.ZodObject<{
271
271
  }, z.core.$strip>;
272
272
  export type ClientProviderListQuery = z.infer<typeof clientProviderListQuery>;
273
273
  /**
274
- * What the developer's login page needs to draw its provider buttons and its
275
- * password or code fields, and **nothing more**. This route is public and unauthenticated: the issuer, the
276
- * client id, the scopes and the linking policy are all management-side facts
277
- * that would tell a stranger how the app's federation is configured.
274
+ * What the developer's login page needs to draw its provider buttons,
275
+ * password or code fields, and two-factor policy. This route is public and
276
+ * unauthenticated: the issuer, the client id, the scopes and the linking
277
+ * policy are all management-side facts that would tell a stranger how the
278
+ * app's federation is configured. The policy says nothing about a person.
278
279
  *
279
280
  * Only **enabled** providers appear. A disabled one is not a button that
280
281
  * refuses; it is a button that is not there.
@@ -288,6 +289,11 @@ export declare const clientProviderListResponse: z.ZodObject<{
288
289
  password: z.ZodBoolean;
289
290
  email_code: z.ZodBoolean;
290
291
  }, z.core.$strict>;
292
+ two_factor: z.ZodEnum<{
293
+ optional: "optional";
294
+ required: "required";
295
+ off: "off";
296
+ }>;
291
297
  }, z.core.$strip>;
292
298
  export type ClientProviderListResponse = z.infer<typeof clientProviderListResponse>;
293
299
  /**
@@ -1,7 +1,7 @@
1
1
  // SPDX-License-Identifier: Apache-2.0
2
2
  import { z } from 'zod';
3
3
  import { appIdentifier } from './apps.js';
4
- import { APP_USER_DISPLAY_NAME_MAX, appSignInMethods, providerSlug } from './app-users.js';
4
+ import { APP_USER_DISPLAY_NAME_MAX, appSignInMethods, appTwoFactorPolicy, providerSlug } from './app-users.js';
5
5
  import { loginCode, password, recoveryCode, recoveryCodesList, sessionTokens, totpCode } from './identity.js';
6
6
  /**
7
7
  * **The client auth API: the whole of what an app user's browser talks to.**
@@ -314,10 +314,11 @@ export const clientProviderListQuery = z
314
314
  })
315
315
  .meta({ description: 'The one parameter of the public provider listing.' });
316
316
  /**
317
- * What the developer's login page needs to draw its provider buttons and its
318
- * password or code fields, and **nothing more**. This route is public and unauthenticated: the issuer, the
319
- * client id, the scopes and the linking policy are all management-side facts
320
- * that would tell a stranger how the app's federation is configured.
317
+ * What the developer's login page needs to draw its provider buttons,
318
+ * password or code fields, and two-factor policy. This route is public and
319
+ * unauthenticated: the issuer, the client id, the scopes and the linking
320
+ * policy are all management-side facts that would tell a stranger how the
321
+ * app's federation is configured. The policy says nothing about a person.
321
322
  *
322
323
  * Only **enabled** providers appear. A disabled one is not a button that
323
324
  * refuses; it is a button that is not there.
@@ -334,6 +335,9 @@ export const clientProviderListResponse = z.object({
334
335
  sign_in_methods: appSignInMethods.meta({
335
336
  description: 'Which of password and emailed code the app accepts, so its sign-in page draws the right fields without guessing. The same value the developer set; public, like the provider buttons.',
336
337
  }),
338
+ two_factor: appTwoFactorPolicy.meta({
339
+ description: "The app's off, optional or required two-factor policy; not the caller's enrollment state.",
340
+ }),
337
341
  });
338
342
  /**
339
343
  * The query of `GET /api/client/oidc/:slug/start`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fleetless/contracts",
3
- "version": "11.1.0-next.1",
3
+ "version": "12.1.0-next.1",
4
4
  "description": "Fleetless wire contracts: the bridge-cloud protocol, the REST API schemas and the error codes, as zod schemas with generated JSON Schema and OpenAPI artifacts.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Dehne Robotik GmbH",