@zitadel/api 0.1.0-alpha.15 → 0.1.0-alpha.17

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.
Files changed (74) hide show
  1. package/dist/generated/endpoints/zitadelNextGen.d.mts +2 -2
  2. package/dist/generated/endpoints/zitadelNextGen.mjs +41 -1
  3. package/dist/generated/endpoints/zitadelNextGen.mjs.map +1 -1
  4. package/dist/generated/endpoints/zitadelNextGen.msw.d.mts +6 -2
  5. package/dist/generated/endpoints/zitadelNextGen.msw.d.mts.map +1 -1
  6. package/dist/generated/endpoints/zitadelNextGen.msw.mjs +117 -1
  7. package/dist/generated/endpoints/zitadelNextGen.msw.mjs.map +1 -1
  8. package/dist/generated/endpoints/zitadelNextGen.zod.d.mts +81 -5
  9. package/dist/generated/endpoints/zitadelNextGen.zod.d.mts.map +1 -1
  10. package/dist/generated/endpoints/zitadelNextGen.zod.mjs +71 -3
  11. package/dist/generated/endpoints/zitadelNextGen.zod.mjs.map +1 -1
  12. package/dist/generated/model/index.d.mts +2 -2
  13. package/dist/generated/model/index.mjs +31 -1
  14. package/dist/generated/model/index.mjs.map +1 -1
  15. package/dist/{index-4CTwhwmD.d.mts → index-C4jNq61U.d.mts} +568 -38
  16. package/dist/index-C4jNq61U.d.mts.map +1 -0
  17. package/dist/runtime/api-factory.d.mts +1 -1
  18. package/dist/runtime/fetch.d.mts +9 -1
  19. package/dist/runtime/fetch.d.mts.map +1 -1
  20. package/dist/runtime/fetch.mjs +32 -1
  21. package/dist/runtime/fetch.mjs.map +1 -1
  22. package/dist/{zitadelNextGen-DDnOEggX.d.mts → zitadelNextGen-fcgWBw_N.d.mts} +16 -4
  23. package/dist/zitadelNextGen-fcgWBw_N.d.mts.map +1 -0
  24. package/package.json +1 -1
  25. package/src/generated/endpoints/zitadelNextGen.msw.ts +140 -0
  26. package/src/generated/endpoints/zitadelNextGen.ts +45 -0
  27. package/src/generated/endpoints/zitadelNextGen.zod.ts +175 -2
  28. package/src/generated/model/createFlow201Step.ts +11 -1
  29. package/src/generated/model/createProject201.ts +2 -0
  30. package/src/generated/model/createProjectBody.ts +2 -0
  31. package/src/generated/model/createSession201Session.ts +17 -0
  32. package/src/generated/model/exchangeHandoff200Session.ts +17 -0
  33. package/src/generated/model/getFlowStep200Step.ts +11 -1
  34. package/src/generated/model/getMySession200.ts +17 -0
  35. package/src/generated/model/getMySessionDefault.ts +21 -12
  36. package/src/generated/model/getProject200.ts +5 -0
  37. package/src/generated/model/getSession200.ts +17 -0
  38. package/src/generated/model/getSessionDefault.ts +21 -12
  39. package/src/generated/model/index.ts +29 -2
  40. package/src/generated/model/listSessions200SessionsItem.ts +17 -0
  41. package/src/generated/model/patchProject200.ts +24 -0
  42. package/src/generated/model/patchProject400.ts +20 -0
  43. package/src/generated/model/{getSessionDefaultDetails.ts → patchProject400Details.ts} +1 -1
  44. package/src/generated/model/patchProject401.ts +20 -0
  45. package/src/generated/model/patchProject401Details.ts +12 -0
  46. package/src/generated/model/patchProject404.ts +20 -0
  47. package/src/generated/model/patchProject404Details.ts +12 -0
  48. package/src/generated/model/patchProjectBody.ts +12 -0
  49. package/src/generated/model/patchProjectDefault.ts +20 -0
  50. package/src/generated/model/{getMySessionDefaultDetails.ts → patchProjectDefaultDetails.ts} +1 -1
  51. package/src/generated/model/queryProjects200.ts +19 -0
  52. package/src/generated/model/queryProjects200ProjectsItem.ts +24 -0
  53. package/src/generated/model/queryProjects400.ts +20 -0
  54. package/src/generated/model/queryProjects400Details.ts +12 -0
  55. package/src/generated/model/queryProjects401.ts +20 -0
  56. package/src/generated/model/queryProjects401Details.ts +12 -0
  57. package/src/generated/model/queryProjects403.ts +20 -0
  58. package/src/generated/model/queryProjects403Details.ts +12 -0
  59. package/src/generated/model/queryProjects429.ts +20 -0
  60. package/src/generated/model/queryProjects429Details.ts +12 -0
  61. package/src/generated/model/queryProjectsBody.ts +25 -0
  62. package/src/generated/model/queryProjectsBodyFilterItem.ts +22 -0
  63. package/src/generated/model/queryProjectsBodyFilterItemField.ts +15 -0
  64. package/src/generated/model/queryProjectsBodyFilterItemOperation.ts +26 -0
  65. package/src/generated/model/queryProjectsBodySorting.ts +14 -0
  66. package/src/generated/model/queryProjectsBodySortingDirection.ts +15 -0
  67. package/src/generated/model/queryProjectsBodySortingField.ts +15 -0
  68. package/src/generated/model/queryProjectsDefault.ts +20 -0
  69. package/src/generated/model/queryProjectsDefaultDetails.ts +12 -0
  70. package/src/generated/model/submitFlowStep200Step.ts +11 -1
  71. package/src/generated/model/submitFlowStep400Step.ts +11 -1
  72. package/src/runtime/fetch.ts +45 -0
  73. package/dist/index-4CTwhwmD.d.mts.map +0 -1
  74. package/dist/zitadelNextGen-DDnOEggX.d.mts.map +0 -1
@@ -45,6 +45,8 @@ import type {
45
45
  ListSchemas200Item,
46
46
  ListSessions200,
47
47
  ListUsers200Item,
48
+ PatchProject200,
49
+ QueryProjects200,
48
50
  SubmitFlowStep200,
49
51
  UpdateFlowDefinition200,
50
52
  VerifyChallengeProof200,
@@ -1157,6 +1159,7 @@ export const getCreateProjectResponseMock = (
1157
1159
  overrideResponse: Partial<Extract<CreateProject201, object>> = {},
1158
1160
  ): CreateProject201 => ({
1159
1161
  id: faker.string.alpha({ length: { min: 10, max: 20 } }),
1162
+ name: faker.string.alpha({ length: { min: 10, max: 20 } }),
1160
1163
  projectSecret: faker.string.alpha({ length: { min: 10, max: 20 } }),
1161
1164
  previewSecret: faker.string.alpha({ length: { min: 10, max: 20 } }),
1162
1165
  previewOrigins: Array.from(
@@ -1167,10 +1170,57 @@ export const getCreateProjectResponseMock = (
1167
1170
  ...overrideResponse,
1168
1171
  });
1169
1172
 
1173
+ export const getQueryProjectsResponseMock = (
1174
+ overrideResponse: Partial<Extract<QueryProjects200, object>> = {},
1175
+ ): QueryProjects200 => ({
1176
+ projects: Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(
1177
+ () => ({
1178
+ id: faker.string.alpha({ length: { min: 10, max: 20 } }),
1179
+ name: faker.string.alpha({ length: { min: 10, max: 20 } }),
1180
+ previewOrigins: faker.helpers.arrayElement([
1181
+ Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() =>
1182
+ faker.string.alpha({ length: { min: 10, max: 20 } }),
1183
+ ),
1184
+ undefined,
1185
+ ]),
1186
+ createdAt: faker.date.past().toISOString().slice(0, 19) + "Z",
1187
+ updatedAt: faker.date.past().toISOString().slice(0, 19) + "Z",
1188
+ }),
1189
+ ),
1190
+ next_page_token: faker.helpers.arrayElement([
1191
+ faker.helpers.arrayElement([faker.string.alpha({ length: { min: 10, max: 20 } }), null]),
1192
+ undefined,
1193
+ ]),
1194
+ ...overrideResponse,
1195
+ });
1196
+
1170
1197
  export const getGetProjectResponseMock = (
1171
1198
  overrideResponse: Partial<Extract<GetProject200, object>> = {},
1172
1199
  ): GetProject200 => ({
1173
1200
  id: faker.string.alpha({ length: { min: 10, max: 20 } }),
1201
+ name: faker.string.alpha({ length: { min: 10, max: 20 } }),
1202
+ previewOrigins: faker.helpers.arrayElement([
1203
+ Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() =>
1204
+ faker.string.alpha({ length: { min: 10, max: 20 } }),
1205
+ ),
1206
+ undefined,
1207
+ ]),
1208
+ createdAt: faker.date.past().toISOString().slice(0, 19) + "Z",
1209
+ updatedAt: faker.date.past().toISOString().slice(0, 19) + "Z",
1210
+ ...overrideResponse,
1211
+ });
1212
+
1213
+ export const getPatchProjectResponseMock = (
1214
+ overrideResponse: Partial<Extract<PatchProject200, object>> = {},
1215
+ ): PatchProject200 => ({
1216
+ id: faker.string.alpha({ length: { min: 10, max: 20 } }),
1217
+ name: faker.string.alpha({ length: { min: 10, max: 20 } }),
1218
+ previewOrigins: faker.helpers.arrayElement([
1219
+ Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() =>
1220
+ faker.string.alpha({ length: { min: 10, max: 20 } }),
1221
+ ),
1222
+ undefined,
1223
+ ]),
1174
1224
  createdAt: faker.date.past().toISOString().slice(0, 19) + "Z",
1175
1225
  updatedAt: faker.date.past().toISOString().slice(0, 19) + "Z",
1176
1226
  ...overrideResponse,
@@ -1187,6 +1237,14 @@ export const getCreateSessionResponseMock = (
1187
1237
  faker.helpers.arrayElement([faker.helpers.fromRegExp("^user_[a-zA-Z0-9_-]+$"), null]),
1188
1238
  undefined,
1189
1239
  ]),
1240
+ name: faker.helpers.arrayElement([
1241
+ faker.string.alpha({ length: { min: 10, max: 20 } }),
1242
+ undefined,
1243
+ ]),
1244
+ email: faker.helpers.arrayElement([
1245
+ faker.string.alpha({ length: { min: 10, max: 20 } }),
1246
+ undefined,
1247
+ ]),
1190
1248
  factors: Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(
1191
1249
  () => ({
1192
1250
  method: faker.helpers.arrayElement(["identifier", "password", "passkey"] as const),
@@ -1251,6 +1309,14 @@ export const getListSessionsResponseMock = (
1251
1309
  faker.helpers.arrayElement([faker.helpers.fromRegExp("^user_[a-zA-Z0-9_-]+$"), null]),
1252
1310
  undefined,
1253
1311
  ]),
1312
+ name: faker.helpers.arrayElement([
1313
+ faker.string.alpha({ length: { min: 10, max: 20 } }),
1314
+ undefined,
1315
+ ]),
1316
+ email: faker.helpers.arrayElement([
1317
+ faker.string.alpha({ length: { min: 10, max: 20 } }),
1318
+ undefined,
1319
+ ]),
1254
1320
  factors: Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(
1255
1321
  () => ({
1256
1322
  method: faker.helpers.arrayElement(["identifier", "password", "passkey"] as const),
@@ -1318,6 +1384,14 @@ export const getExchangeHandoffResponseMock = (
1318
1384
  faker.helpers.arrayElement([faker.helpers.fromRegExp("^user_[a-zA-Z0-9_-]+$"), null]),
1319
1385
  undefined,
1320
1386
  ]),
1387
+ name: faker.helpers.arrayElement([
1388
+ faker.string.alpha({ length: { min: 10, max: 20 } }),
1389
+ undefined,
1390
+ ]),
1391
+ email: faker.helpers.arrayElement([
1392
+ faker.string.alpha({ length: { min: 10, max: 20 } }),
1393
+ undefined,
1394
+ ]),
1321
1395
  factors: Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(
1322
1396
  () => ({
1323
1397
  method: faker.helpers.arrayElement(["identifier", "password", "passkey"] as const),
@@ -1380,6 +1454,14 @@ export const getGetSessionResponseMock = (
1380
1454
  faker.helpers.arrayElement([faker.helpers.fromRegExp("^user_[a-zA-Z0-9_-]+$"), null]),
1381
1455
  undefined,
1382
1456
  ]),
1457
+ name: faker.helpers.arrayElement([
1458
+ faker.string.alpha({ length: { min: 10, max: 20 } }),
1459
+ undefined,
1460
+ ]),
1461
+ email: faker.helpers.arrayElement([
1462
+ faker.string.alpha({ length: { min: 10, max: 20 } }),
1463
+ undefined,
1464
+ ]),
1383
1465
  factors: Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(
1384
1466
  () => ({
1385
1467
  method: faker.helpers.arrayElement(["identifier", "password", "passkey"] as const),
@@ -1440,6 +1522,14 @@ export const getGetMySessionResponseMock = (
1440
1522
  faker.helpers.arrayElement([faker.helpers.fromRegExp("^user_[a-zA-Z0-9_-]+$"), null]),
1441
1523
  undefined,
1442
1524
  ]),
1525
+ name: faker.helpers.arrayElement([
1526
+ faker.string.alpha({ length: { min: 10, max: 20 } }),
1527
+ undefined,
1528
+ ]),
1529
+ email: faker.helpers.arrayElement([
1530
+ faker.string.alpha({ length: { min: 10, max: 20 } }),
1531
+ undefined,
1532
+ ]),
1443
1533
  factors: Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(
1444
1534
  () => ({
1445
1535
  method: faker.helpers.arrayElement(["identifier", "password", "passkey"] as const),
@@ -2516,6 +2606,30 @@ export const getCreateProjectMockHandler = (
2516
2606
  );
2517
2607
  };
2518
2608
 
2609
+ export const getQueryProjectsMockHandler = (
2610
+ overrideResponse?:
2611
+ | QueryProjects200
2612
+ | ((
2613
+ info: Parameters<Parameters<typeof http.post>[1]>[0],
2614
+ ) => Promise<QueryProjects200> | QueryProjects200),
2615
+ options?: RequestHandlerOptions,
2616
+ ) => {
2617
+ return http.post(
2618
+ "*/projects/query",
2619
+ async (info: Parameters<Parameters<typeof http.post>[1]>[0]) => {
2620
+ return HttpResponse.json(
2621
+ overrideResponse !== undefined
2622
+ ? typeof overrideResponse === "function"
2623
+ ? await overrideResponse(info)
2624
+ : overrideResponse
2625
+ : getQueryProjectsResponseMock(),
2626
+ { status: 200 },
2627
+ );
2628
+ },
2629
+ options,
2630
+ );
2631
+ };
2632
+
2519
2633
  export const getGetProjectMockHandler = (
2520
2634
  overrideResponse?:
2521
2635
  | GetProject200
@@ -2540,6 +2654,30 @@ export const getGetProjectMockHandler = (
2540
2654
  );
2541
2655
  };
2542
2656
 
2657
+ export const getPatchProjectMockHandler = (
2658
+ overrideResponse?:
2659
+ | PatchProject200
2660
+ | ((
2661
+ info: Parameters<Parameters<typeof http.patch>[1]>[0],
2662
+ ) => Promise<PatchProject200> | PatchProject200),
2663
+ options?: RequestHandlerOptions,
2664
+ ) => {
2665
+ return http.patch(
2666
+ "*/projects/:projectId",
2667
+ async (info: Parameters<Parameters<typeof http.patch>[1]>[0]) => {
2668
+ return HttpResponse.json(
2669
+ overrideResponse !== undefined
2670
+ ? typeof overrideResponse === "function"
2671
+ ? await overrideResponse(info)
2672
+ : overrideResponse
2673
+ : getPatchProjectResponseMock(),
2674
+ { status: 200 },
2675
+ );
2676
+ },
2677
+ options,
2678
+ );
2679
+ };
2680
+
2543
2681
  export const getCreateSessionMockHandler = (
2544
2682
  overrideResponse?:
2545
2683
  | CreateSession201
@@ -2996,7 +3134,9 @@ export const getZitadelNextGenMock = () => [
2996
3134
  getVerifyChallengeProofMockHandler(),
2997
3135
  getCreateHandoffMockHandler(),
2998
3136
  getCreateProjectMockHandler(),
3137
+ getQueryProjectsMockHandler(),
2999
3138
  getGetProjectMockHandler(),
3139
+ getPatchProjectMockHandler(),
3000
3140
  getCreateSessionMockHandler(),
3001
3141
  getListSessionsMockHandler(),
3002
3142
  getExchangeHandoffMockHandler(),
@@ -74,6 +74,10 @@ import type {
74
74
  ListSessionsParams,
75
75
  ListUsers200Item,
76
76
  ListUsersParams,
77
+ PatchProject200,
78
+ PatchProjectBody,
79
+ QueryProjects200,
80
+ QueryProjectsBody,
77
81
  RevokeSessionParams,
78
82
  RevokeTokenBody,
79
83
  SetUserPasswordBody,
@@ -777,6 +781,25 @@ export const createProject = async (
777
781
  });
778
782
  };
779
783
 
784
+ export const getQueryProjectsUrl = () => {
785
+ return `${getProxyPath()}/projects/query`;
786
+ };
787
+
788
+ /**
789
+ * @summary Query projects
790
+ */
791
+ export const queryProjects = async (
792
+ queryProjectsBody: QueryProjectsBody,
793
+ options?: RequestInit,
794
+ ): Promise<QueryProjects200> => {
795
+ return customFetch<QueryProjects200>(getQueryProjectsUrl(), {
796
+ ...options,
797
+ method: "POST",
798
+ headers: { "Content-Type": "application/json", ...options?.headers },
799
+ body: JSON.stringify(queryProjectsBody),
800
+ });
801
+ };
802
+
780
803
  export const getGetProjectUrl = (projectId: string) => {
781
804
  return `${getProxyPath()}/projects/${projectId}`;
782
805
  };
@@ -796,6 +819,28 @@ export const getProject = async (
796
819
  });
797
820
  };
798
821
 
822
+ export const getPatchProjectUrl = (projectId: string) => {
823
+ return `${getProxyPath()}/projects/${projectId}`;
824
+ };
825
+
826
+ /**
827
+ * Updates the state of a project.
828
+
829
+ * @summary Update project
830
+ */
831
+ export const patchProject = async (
832
+ projectId: string,
833
+ patchProjectBody: PatchProjectBody,
834
+ options?: RequestInit,
835
+ ): Promise<PatchProject200> => {
836
+ return customFetch<PatchProject200>(getPatchProjectUrl(projectId), {
837
+ ...options,
838
+ method: "PATCH",
839
+ headers: { "Content-Type": "application/json", ...options?.headers },
840
+ body: JSON.stringify(patchProjectBody),
841
+ });
842
+ };
843
+
799
844
  export const getCreateSessionUrl = () => {
800
845
  return `${getProxyPath()}/sessions`;
801
846
  };
@@ -750,7 +750,9 @@ export const GetFlowStepResponse = zod.object({
750
750
  error: zod
751
751
  .union([zod.string(), zod.null()])
752
752
  .optional()
753
- .describe("Error message from a previous failed submission."),
753
+ .describe(
754
+ 'Error from a previous failed submission. Field-validation failures\ncarry localisation text keys: `error.<field>_<rule>` per violation\n(e.g. `error.email_required`; the `format` rule is spelled\n`error.<field>_invalid`), multiple violations joined with `\"; \"`.\nField names appear verbatim, so clients localise unknown keys via\nthe generic `error.field_<rule>` catalog entries. Other engine\nfailures carry `error.\*` catalog keys as well (e.g.\n`error.invalid_credentials`, `error.passkey_invalid`); a\nnon-`error.` payload is an outcome token (e.g. `user_not_found`)\nthat clients keep verbatim.\n',
755
+ ),
754
756
  complete: zod
755
757
  .enum(["redirect", "show"])
756
758
  .optional()
@@ -1116,7 +1118,9 @@ export const SubmitFlowStepResponse = zod.object({
1116
1118
  error: zod
1117
1119
  .union([zod.string(), zod.null()])
1118
1120
  .optional()
1119
- .describe("Error message from a previous failed submission."),
1121
+ .describe(
1122
+ 'Error from a previous failed submission. Field-validation failures\ncarry localisation text keys: `error.<field>_<rule>` per violation\n(e.g. `error.email_required`; the `format` rule is spelled\n`error.<field>_invalid`), multiple violations joined with `\"; \"`.\nField names appear verbatim, so clients localise unknown keys via\nthe generic `error.field_<rule>` catalog entries. Other engine\nfailures carry `error.\*` catalog keys as well (e.g.\n`error.invalid_credentials`, `error.passkey_invalid`); a\nnon-`error.` payload is an outcome token (e.g. `user_not_found`)\nthat clients keep verbatim.\n',
1123
+ ),
1120
1124
  complete: zod
1121
1125
  .enum(["redirect", "show"])
1122
1126
  .optional()
@@ -1981,6 +1985,7 @@ export const CreateHandoffResponse = zod
1981
1985
  export const createProjectBodySeedDefaultsDefault = true;
1982
1986
 
1983
1987
  export const CreateProjectBody = zod.object({
1988
+ name: zod.string().describe("The name of the project."),
1984
1989
  previewOrigins: zod
1985
1990
  .array(zod.string())
1986
1991
  .optional()
@@ -1993,6 +1998,89 @@ export const CreateProjectBody = zod.object({
1993
1998
  ),
1994
1999
  });
1995
2000
 
2001
+ /**
2002
+ * @summary Query projects
2003
+ */
2004
+ export const queryProjectsBodyLimitDefault = 20;
2005
+ export const queryProjectsBodyLimitMax = 100;
2006
+
2007
+ export const QueryProjectsBody = zod
2008
+ .object({
2009
+ limit: zod
2010
+ .number()
2011
+ .min(1)
2012
+ .max(queryProjectsBodyLimitMax)
2013
+ .default(queryProjectsBodyLimitDefault),
2014
+ page_token: zod
2015
+ .union([zod.string(), zod.null()])
2016
+ .optional()
2017
+ .describe("Token to retrieve the next page of results."),
2018
+ sorting: zod
2019
+ .object({
2020
+ field: zod.enum(["name", "createdAt"]),
2021
+ direction: zod.enum(["asc", "desc"]),
2022
+ })
2023
+ .optional(),
2024
+ filter: zod
2025
+ .array(
2026
+ zod.object({
2027
+ field: zod.enum(["name", "createdAt"]),
2028
+ value: zod
2029
+ .union([zod.string(), zod.number(), zod.boolean(), zod.null()])
2030
+ .optional()
2031
+ .describe(
2032
+ "Filter-value specifies which values can be filtered by a query endpoint. This\nis a union of types. When a value is specified which is not assignable to the\nfield which is being filtered, a 400 error will be returned.\n",
2033
+ ),
2034
+ operation: zod
2035
+ .enum([
2036
+ "equals",
2037
+ "not_equals",
2038
+ "contains",
2039
+ "not_contains",
2040
+ "less_than",
2041
+ "less_than_or_equal",
2042
+ "greater_than",
2043
+ "greater_than_or_equal",
2044
+ ])
2045
+ .describe(
2046
+ "Filter operation defines the operations which can be used when filtering on a\nquery endpoint.\n",
2047
+ ),
2048
+ }),
2049
+ )
2050
+ .optional()
2051
+ .describe("Filter criteria for querying projects."),
2052
+ })
2053
+ .describe("Request to query projects.");
2054
+
2055
+ export const QueryProjectsResponse = zod
2056
+ .object({
2057
+ projects: zod.array(
2058
+ zod
2059
+ .object({
2060
+ id: zod.string().describe("The unique identifier of the project."),
2061
+ name: zod.string().describe("The name of the project."),
2062
+ previewOrigins: zod
2063
+ .array(zod.string())
2064
+ .optional()
2065
+ .describe("Origins which are allowed for previewing and testing the project.\n"),
2066
+ createdAt: zod.iso
2067
+ .datetime({ offset: true })
2068
+ .describe("The time when the project was created."),
2069
+ updatedAt: zod.iso
2070
+ .datetime({ offset: true })
2071
+ .describe("The time when the project was last updated."),
2072
+ })
2073
+ .describe("The current state of a project."),
2074
+ ),
2075
+ next_page_token: zod
2076
+ .union([zod.string(), zod.null()])
2077
+ .optional()
2078
+ .describe(
2079
+ "Token to pass as `page_token` in the next request to fetch the following page.\nAbsent when there are no more results.\n",
2080
+ ),
2081
+ })
2082
+ .describe("Paginated list of projects.");
2083
+
1996
2084
  /**
1997
2085
  * Returns the current state of a project.
1998
2086
 
@@ -2007,6 +2095,43 @@ export const GetProjectParams = zod.object({
2007
2095
  export const GetProjectResponse = zod
2008
2096
  .object({
2009
2097
  id: zod.string().describe("The unique identifier of the project."),
2098
+ name: zod.string().describe("The name of the project."),
2099
+ previewOrigins: zod
2100
+ .array(zod.string())
2101
+ .optional()
2102
+ .describe("Origins which are allowed for previewing and testing the project.\n"),
2103
+ createdAt: zod.iso
2104
+ .datetime({ offset: true })
2105
+ .describe("The time when the project was created."),
2106
+ updatedAt: zod.iso
2107
+ .datetime({ offset: true })
2108
+ .describe("The time when the project was last updated."),
2109
+ })
2110
+ .describe("The current state of a project.");
2111
+
2112
+ /**
2113
+ * Updates the state of a project.
2114
+
2115
+ * @summary Update project
2116
+ */
2117
+ export const patchProjectPathProjectIdRegExp = new RegExp("^[a-zA-Z0-9_-]+$");
2118
+
2119
+ export const PatchProjectParams = zod.object({
2120
+ project_id: zod.string().regex(patchProjectPathProjectIdRegExp),
2121
+ });
2122
+
2123
+ export const PatchProjectBody = zod.object({
2124
+ name: zod.union([zod.null(), zod.string()]).optional().describe("The name of the project."),
2125
+ });
2126
+
2127
+ export const PatchProjectResponse = zod
2128
+ .object({
2129
+ id: zod.string().describe("The unique identifier of the project."),
2130
+ name: zod.string().describe("The name of the project."),
2131
+ previewOrigins: zod
2132
+ .array(zod.string())
2133
+ .optional()
2134
+ .describe("Origins which are allowed for previewing and testing the project.\n"),
2010
2135
  createdAt: zod.iso
2011
2136
  .datetime({ offset: true })
2012
2137
  .describe("The time when the project was created."),
@@ -2121,6 +2246,18 @@ export const ListSessionsResponse = zod
2121
2246
  .describe(
2122
2247
  "The authenticated user. Null for anonymous sessions and until the `user`\nfactor has been verified through an `auth_attempt`.\n",
2123
2248
  ),
2249
+ name: zod
2250
+ .string()
2251
+ .optional()
2252
+ .describe(
2253
+ "Human-readable name of the authenticated user, resolved from the\nconventional user-schema properties: `name` when defined, otherwise\nthe given and family name parts joined — `givenName`\/`familyName`\n(the shipped presets' spelling) or `given_name`\/`family_name`. Only\npresent on reads that hydrate the user's identity\n(`GET \/sessions\/me`) and only when the session has an authenticated\nuser whose schema carries those properties; clients fall back to\n`email`, then `user_id`.\n",
2254
+ ),
2255
+ email: zod
2256
+ .string()
2257
+ .optional()
2258
+ .describe(
2259
+ "Email address of the authenticated user, resolved from the\nconventional `email` user-schema property. Only present on reads\nthat hydrate the user's identity (`GET \/sessions\/me`) and only when\nthe session has an authenticated user whose schema carries that\nproperty.\n",
2260
+ ),
2124
2261
  factors: zod
2125
2262
  .array(
2126
2263
  zod
@@ -2310,6 +2447,18 @@ export const ExchangeHandoffResponse = zod
2310
2447
  .describe(
2311
2448
  "The authenticated user. Null for anonymous sessions and until the `user`\nfactor has been verified through an `auth_attempt`.\n",
2312
2449
  ),
2450
+ name: zod
2451
+ .string()
2452
+ .optional()
2453
+ .describe(
2454
+ "Human-readable name of the authenticated user, resolved from the\nconventional user-schema properties: `name` when defined, otherwise\nthe given and family name parts joined — `givenName`\/`familyName`\n(the shipped presets' spelling) or `given_name`\/`family_name`. Only\npresent on reads that hydrate the user's identity\n(`GET \/sessions\/me`) and only when the session has an authenticated\nuser whose schema carries those properties; clients fall back to\n`email`, then `user_id`.\n",
2455
+ ),
2456
+ email: zod
2457
+ .string()
2458
+ .optional()
2459
+ .describe(
2460
+ "Email address of the authenticated user, resolved from the\nconventional `email` user-schema property. Only present on reads\nthat hydrate the user's identity (`GET \/sessions\/me`) and only when\nthe session has an authenticated user whose schema carries that\nproperty.\n",
2461
+ ),
2313
2462
  factors: zod
2314
2463
  .array(
2315
2464
  zod
@@ -2462,6 +2611,18 @@ export const GetSessionResponse = zod
2462
2611
  .describe(
2463
2612
  "The authenticated user. Null for anonymous sessions and until the `user`\nfactor has been verified through an `auth_attempt`.\n",
2464
2613
  ),
2614
+ name: zod
2615
+ .string()
2616
+ .optional()
2617
+ .describe(
2618
+ "Human-readable name of the authenticated user, resolved from the\nconventional user-schema properties: `name` when defined, otherwise\nthe given and family name parts joined — `givenName`\/`familyName`\n(the shipped presets' spelling) or `given_name`\/`family_name`. Only\npresent on reads that hydrate the user's identity\n(`GET \/sessions\/me`) and only when the session has an authenticated\nuser whose schema carries those properties; clients fall back to\n`email`, then `user_id`.\n",
2619
+ ),
2620
+ email: zod
2621
+ .string()
2622
+ .optional()
2623
+ .describe(
2624
+ "Email address of the authenticated user, resolved from the\nconventional `email` user-schema property. Only present on reads\nthat hydrate the user's identity (`GET \/sessions\/me`) and only when\nthe session has an authenticated user whose schema carries that\nproperty.\n",
2625
+ ),
2465
2626
  factors: zod
2466
2627
  .array(
2467
2628
  zod
@@ -2613,6 +2774,18 @@ export const GetMySessionResponse = zod
2613
2774
  .describe(
2614
2775
  "The authenticated user. Null for anonymous sessions and until the `user`\nfactor has been verified through an `auth_attempt`.\n",
2615
2776
  ),
2777
+ name: zod
2778
+ .string()
2779
+ .optional()
2780
+ .describe(
2781
+ "Human-readable name of the authenticated user, resolved from the\nconventional user-schema properties: `name` when defined, otherwise\nthe given and family name parts joined — `givenName`\/`familyName`\n(the shipped presets' spelling) or `given_name`\/`family_name`. Only\npresent on reads that hydrate the user's identity\n(`GET \/sessions\/me`) and only when the session has an authenticated\nuser whose schema carries those properties; clients fall back to\n`email`, then `user_id`.\n",
2782
+ ),
2783
+ email: zod
2784
+ .string()
2785
+ .optional()
2786
+ .describe(
2787
+ "Email address of the authenticated user, resolved from the\nconventional `email` user-schema property. Only present on reads\nthat hydrate the user's identity (`GET \/sessions\/me`) and only when\nthe session has an authenticated user whose schema carries that\nproperty.\n",
2788
+ ),
2616
2789
  factors: zod
2617
2790
  .array(
2618
2791
  zod
@@ -27,7 +27,17 @@ export type CreateFlow201Step = {
27
27
  The backend never sends display text — only semantic keys.
28
28
  */
29
29
  texts?: CreateFlow201StepTexts;
30
- /** Error message from a previous failed submission. */
30
+ /** Error from a previous failed submission. Field-validation failures
31
+ carry localisation text keys: `error.<field>_<rule>` per violation
32
+ (e.g. `error.email_required`; the `format` rule is spelled
33
+ `error.<field>_invalid`), multiple violations joined with `"; "`.
34
+ Field names appear verbatim, so clients localise unknown keys via
35
+ the generic `error.field_<rule>` catalog entries. Other engine
36
+ failures carry `error.*` catalog keys as well (e.g.
37
+ `error.invalid_credentials`, `error.passkey_invalid`); a
38
+ non-`error.` payload is an outcome token (e.g. `user_not_found`)
39
+ that clients keep verbatim.
40
+ */
31
41
  error?: string | null;
32
42
  /** Present only on terminal steps. Tells the frontend what to do:
33
43
  - redirect: navigate to redirect_uri immediately (OIDC/SAML done)
@@ -9,6 +9,8 @@
9
9
  export type CreateProject201 = {
10
10
  /** The unique identifier of the project. */
11
11
  id: string;
12
+ /** The name of the project. */
13
+ name: string;
12
14
  /** Secret which can be used for authentication when modifying the project.
13
15
  */
14
16
  projectSecret: string;
@@ -7,6 +7,8 @@
7
7
  */
8
8
 
9
9
  export type CreateProjectBody = {
10
+ /** The name of the project. */
11
+ name: string;
10
12
  /** Origins which are allowed for previewing and testing the project.
11
13
  */
12
14
  previewOrigins?: string[];
@@ -38,6 +38,23 @@ export type CreateSession201Session = {
38
38
  factor has been verified through an `auth_attempt`.
39
39
  */
40
40
  user_id?: string | null;
41
+ /** Human-readable name of the authenticated user, resolved from the
42
+ conventional user-schema properties: `name` when defined, otherwise
43
+ the given and family name parts joined — `givenName`/`familyName`
44
+ (the shipped presets' spelling) or `given_name`/`family_name`. Only
45
+ present on reads that hydrate the user's identity
46
+ (`GET /sessions/me`) and only when the session has an authenticated
47
+ user whose schema carries those properties; clients fall back to
48
+ `email`, then `user_id`.
49
+ */
50
+ name?: string;
51
+ /** Email address of the authenticated user, resolved from the
52
+ conventional `email` user-schema property. Only present on reads
53
+ that hydrate the user's identity (`GET /sessions/me`) and only when
54
+ the session has an authenticated user whose schema carries that
55
+ property.
56
+ */
57
+ email?: string;
41
58
  /** Verified authentication factors accumulated by this session.
42
59
  Each key is a factor type (e.g. `password`, `totp`, `passkey`).
43
60
  Each value is a factor event object with at least `verified_at` and
@@ -38,6 +38,23 @@ export type ExchangeHandoff200Session = {
38
38
  factor has been verified through an `auth_attempt`.
39
39
  */
40
40
  user_id?: string | null;
41
+ /** Human-readable name of the authenticated user, resolved from the
42
+ conventional user-schema properties: `name` when defined, otherwise
43
+ the given and family name parts joined — `givenName`/`familyName`
44
+ (the shipped presets' spelling) or `given_name`/`family_name`. Only
45
+ present on reads that hydrate the user's identity
46
+ (`GET /sessions/me`) and only when the session has an authenticated
47
+ user whose schema carries those properties; clients fall back to
48
+ `email`, then `user_id`.
49
+ */
50
+ name?: string;
51
+ /** Email address of the authenticated user, resolved from the
52
+ conventional `email` user-schema property. Only present on reads
53
+ that hydrate the user's identity (`GET /sessions/me`) and only when
54
+ the session has an authenticated user whose schema carries that
55
+ property.
56
+ */
57
+ email?: string;
41
58
  /** Verified authentication factors accumulated by this session.
42
59
  Each key is a factor type (e.g. `password`, `totp`, `passkey`).
43
60
  Each value is a factor event object with at least `verified_at` and
@@ -27,7 +27,17 @@ export type GetFlowStep200Step = {
27
27
  The backend never sends display text — only semantic keys.
28
28
  */
29
29
  texts?: GetFlowStep200StepTexts;
30
- /** Error message from a previous failed submission. */
30
+ /** Error from a previous failed submission. Field-validation failures
31
+ carry localisation text keys: `error.<field>_<rule>` per violation
32
+ (e.g. `error.email_required`; the `format` rule is spelled
33
+ `error.<field>_invalid`), multiple violations joined with `"; "`.
34
+ Field names appear verbatim, so clients localise unknown keys via
35
+ the generic `error.field_<rule>` catalog entries. Other engine
36
+ failures carry `error.*` catalog keys as well (e.g.
37
+ `error.invalid_credentials`, `error.passkey_invalid`); a
38
+ non-`error.` payload is an outcome token (e.g. `user_not_found`)
39
+ that clients keep verbatim.
40
+ */
31
41
  error?: string | null;
32
42
  /** Present only on terminal steps. Tells the frontend what to do:
33
43
  - redirect: navigate to redirect_uri immediately (OIDC/SAML done)
@@ -38,6 +38,23 @@ export type GetMySession200 = {
38
38
  factor has been verified through an `auth_attempt`.
39
39
  */
40
40
  user_id?: string | null;
41
+ /** Human-readable name of the authenticated user, resolved from the
42
+ conventional user-schema properties: `name` when defined, otherwise
43
+ the given and family name parts joined — `givenName`/`familyName`
44
+ (the shipped presets' spelling) or `given_name`/`family_name`. Only
45
+ present on reads that hydrate the user's identity
46
+ (`GET /sessions/me`) and only when the session has an authenticated
47
+ user whose schema carries those properties; clients fall back to
48
+ `email`, then `user_id`.
49
+ */
50
+ name?: string;
51
+ /** Email address of the authenticated user, resolved from the
52
+ conventional `email` user-schema property. Only present on reads
53
+ that hydrate the user's identity (`GET /sessions/me`) and only when
54
+ the session has an authenticated user whose schema carries that
55
+ property.
56
+ */
57
+ email?: string;
41
58
  /** Verified authentication factors accumulated by this session.
42
59
  Each key is a factor type (e.g. `password`, `totp`, `passkey`).
43
60
  Each value is a factor event object with at least `verified_at` and