@zitadel/api 1.0.0-alpha.20 → 1.0.0-alpha.22

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 (94) hide show
  1. package/dist/generated/endpoints/zitadelNextGen.d.mts +2 -2
  2. package/dist/generated/endpoints/zitadelNextGen.mjs +75 -4
  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 +745 -41
  7. package/dist/generated/endpoints/zitadelNextGen.msw.mjs.map +1 -1
  8. package/dist/generated/endpoints/zitadelNextGen.zod.d.mts +432 -47
  9. package/dist/generated/endpoints/zitadelNextGen.zod.d.mts.map +1 -1
  10. package/dist/generated/endpoints/zitadelNextGen.zod.mjs +403 -43
  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 +54 -1
  14. package/dist/generated/model/index.mjs.map +1 -1
  15. package/dist/{index-BpCgp2NY.d.mts → index-DtExHu2p.d.mts} +1818 -299
  16. package/dist/index-DtExHu2p.d.mts.map +1 -0
  17. package/dist/runtime/api-factory.d.mts +1 -1
  18. package/dist/{zitadelNextGen-C4IZjGCT.d.mts → zitadelNextGen-C79YSuEo.d.mts} +45 -7
  19. package/dist/zitadelNextGen-C79YSuEo.d.mts.map +1 -0
  20. package/package.json +1 -1
  21. package/src/generated/endpoints/zitadelNextGen.msw.ts +887 -85
  22. package/src/generated/endpoints/zitadelNextGen.ts +98 -3
  23. package/src/generated/endpoints/zitadelNextGen.zod.ts +1314 -421
  24. package/src/generated/model/completeClaim410.ts +21 -16
  25. package/src/generated/model/createFlowDefinition201FlowDefinition.ts +5 -3
  26. package/src/generated/model/createFlowDefinitionBodyFlowDefinition.ts +5 -3
  27. package/src/generated/model/createFlowDefinitionDefault.ts +0 -10
  28. package/src/generated/model/createGrant201.ts +32 -0
  29. package/src/generated/model/createGrant201Principal.ts +147 -0
  30. package/src/generated/model/createGrant201Team.ts +22 -0
  31. package/src/generated/model/createGrant201User.ts +38 -0
  32. package/src/generated/model/createSession201Session.ts +8 -16
  33. package/src/generated/model/createSession201SessionUser.ts +38 -0
  34. package/src/generated/model/createUser201.ts +18 -0
  35. package/src/generated/model/exchangeHandoff200Session.ts +8 -16
  36. package/src/generated/model/exchangeHandoff200SessionUser.ts +38 -0
  37. package/src/generated/model/getClaimStatus410.ts +21 -16
  38. package/src/generated/model/getClaimWindow200.ts +23 -0
  39. package/src/generated/model/{createFlowDefinition409.ts → getClaimWindow404.ts} +3 -3
  40. package/src/generated/model/{createFlowDefinition409Details.ts → getClaimWindow404Details.ts} +1 -1
  41. package/src/generated/model/getClaimWindow429.ts +20 -0
  42. package/src/generated/model/getClaimWindow429Details.ts +12 -0
  43. package/src/generated/model/getClaimWindowDefault.ts +20 -0
  44. package/src/generated/model/getClaimWindowDefaultDetails.ts +12 -0
  45. package/src/generated/model/getClaimWindowParams.ts +15 -0
  46. package/src/generated/model/getEvent200.ts +75 -0
  47. package/src/generated/model/getFlowDefinition200FlowDefinition.ts +5 -3
  48. package/src/generated/model/getGrant200.ts +32 -0
  49. package/src/generated/model/getGrant200Principal.ts +147 -0
  50. package/src/generated/model/getGrant200Team.ts +22 -0
  51. package/src/generated/model/getGrant200User.ts +38 -0
  52. package/src/generated/model/getMySession200.ts +8 -16
  53. package/src/generated/model/getMySession200User.ts +38 -0
  54. package/src/generated/model/getMyUser200.ts +18 -0
  55. package/src/generated/model/getSession200.ts +8 -16
  56. package/src/generated/model/getSession200User.ts +38 -0
  57. package/src/generated/model/getUserByID200.ts +18 -0
  58. package/src/generated/model/index.ts +44 -2
  59. package/src/generated/model/initClaim410.ts +24 -0
  60. package/src/generated/model/listEvents200DataItem.ts +75 -0
  61. package/src/generated/model/listFlowDefinitions200.ts +3 -0
  62. package/src/generated/model/listFlowDefinitions200FlowDefinitionsItemFlowDefinition.ts +5 -3
  63. package/src/generated/model/listFlowDefinitionsParams.ts +8 -0
  64. package/src/generated/model/queryGrants200.ts +20 -0
  65. package/src/generated/model/queryGrants200GrantsItem.ts +66 -0
  66. package/src/generated/model/queryGrants200GrantsItemObjectType.ts +17 -0
  67. package/src/generated/model/queryGrants200GrantsItemPrincipal.ts +147 -0
  68. package/src/generated/model/queryGrants200GrantsItemPrincipalType.ts +18 -0
  69. package/src/generated/model/queryGrants200GrantsItemRelation.ts +19 -0
  70. package/src/generated/model/queryGrants200GrantsItemTeam.ts +22 -0
  71. package/src/generated/model/queryGrants200GrantsItemUser.ts +38 -0
  72. package/src/generated/model/queryGrants400.ts +20 -0
  73. package/src/generated/model/queryGrants400Details.ts +12 -0
  74. package/src/generated/model/queryGrants401.ts +20 -0
  75. package/src/generated/model/queryGrants401Details.ts +12 -0
  76. package/src/generated/model/queryGrants403.ts +20 -0
  77. package/src/generated/model/queryGrants403Details.ts +12 -0
  78. package/src/generated/model/queryGrantsBody.ts +33 -0
  79. package/src/generated/model/queryGrantsBodyExpandItem.ts +30 -0
  80. package/src/generated/model/queryGrantsBodyFilterItem.ts +33 -0
  81. package/src/generated/model/queryGrantsBodyFilterItemField.ts +27 -0
  82. package/src/generated/model/queryGrantsBodyFilterItemOperation.ts +30 -0
  83. package/src/generated/model/queryGrantsBodySorting.ts +17 -0
  84. package/src/generated/model/queryGrantsBodySortingDirection.ts +15 -0
  85. package/src/generated/model/queryGrantsBodySortingField.ts +21 -0
  86. package/src/generated/model/queryGrantsDefault.ts +99 -0
  87. package/src/generated/model/queryGrantsParams.ts +15 -0
  88. package/src/generated/model/querySessions200SessionsItem.ts +8 -16
  89. package/src/generated/model/querySessions200SessionsItemUser.ts +38 -0
  90. package/src/generated/model/queryUsers200UsersItem.ts +18 -0
  91. package/src/generated/model/updateFlowDefinition200FlowDefinition.ts +5 -3
  92. package/src/generated/model/updateFlowDefinitionBodyFlowDefinition.ts +5 -3
  93. package/dist/index-BpCgp2NY.d.mts.map +0 -1
  94. package/dist/zitadelNextGen-C4IZjGCT.d.mts.map +0 -1
@@ -99,8 +99,6 @@ export * from "./createFlowDefinition201FlowDefinitionStepsItemTransitions";
99
99
  export * from "./createFlowDefinition201UserSchema";
100
100
  export * from "./createFlowDefinition400";
101
101
  export * from "./createFlowDefinition400Details";
102
- export * from "./createFlowDefinition409";
103
- export * from "./createFlowDefinition409Details";
104
102
  export * from "./createFlowDefinitionBody";
105
103
  export * from "./createFlowDefinitionBodyFlowDefinition";
106
104
  export * from "./createFlowDefinitionBodyFlowDefinitionAudience";
@@ -118,8 +116,11 @@ export * from "./createFlowDefinitionBodyFlowDefinitionStepsItemTransitions";
118
116
  export * from "./createFlowDefinitionDefault";
119
117
  export * from "./createGrant201";
120
118
  export * from "./createGrant201ObjectType";
119
+ export * from "./createGrant201Principal";
121
120
  export * from "./createGrant201PrincipalType";
122
121
  export * from "./createGrant201Relation";
122
+ export * from "./createGrant201Team";
123
+ export * from "./createGrant201User";
123
124
  export * from "./createGrant400";
124
125
  export * from "./createGrant400Details";
125
126
  export * from "./createGrant401";
@@ -173,6 +174,7 @@ export * from "./createSession201SessionFactorsItemMethod";
173
174
  export * from "./createSession201SessionFactorsItemPayload";
174
175
  export * from "./createSession201SessionMetadata";
175
176
  export * from "./createSession201SessionState";
177
+ export * from "./createSession201SessionUser";
176
178
  export * from "./createSession201SessionUserAgent";
177
179
  export * from "./createSession400";
178
180
  export * from "./createSession400Details";
@@ -249,6 +251,7 @@ export * from "./exchangeHandoff200SessionFactorsItemMethod";
249
251
  export * from "./exchangeHandoff200SessionFactorsItemPayload";
250
252
  export * from "./exchangeHandoff200SessionMetadata";
251
253
  export * from "./exchangeHandoff200SessionState";
254
+ export * from "./exchangeHandoff200SessionUser";
252
255
  export * from "./exchangeHandoff200SessionUserAgent";
253
256
  export * from "./exchangeHandoff400";
254
257
  export * from "./exchangeHandoff400Details";
@@ -303,6 +306,14 @@ export * from "./getClaimStatus429Details";
303
306
  export * from "./getClaimStatusDefault";
304
307
  export * from "./getClaimStatusDefaultDetails";
305
308
  export * from "./getClaimStatusParams";
309
+ export * from "./getClaimWindow200";
310
+ export * from "./getClaimWindow404";
311
+ export * from "./getClaimWindow404Details";
312
+ export * from "./getClaimWindow429";
313
+ export * from "./getClaimWindow429Details";
314
+ export * from "./getClaimWindowDefault";
315
+ export * from "./getClaimWindowDefaultDetails";
316
+ export * from "./getClaimWindowParams";
306
317
  export * from "./getEnvironmentByName200";
307
318
  export * from "./getEnvironmentByNameDefault";
308
319
  export * from "./getEnvironmentByNameParams";
@@ -358,8 +369,11 @@ export * from "./getFlowStep410Details";
358
369
  export * from "./getFlowStepDefault";
359
370
  export * from "./getGrant200";
360
371
  export * from "./getGrant200ObjectType";
372
+ export * from "./getGrant200Principal";
361
373
  export * from "./getGrant200PrincipalType";
362
374
  export * from "./getGrant200Relation";
375
+ export * from "./getGrant200Team";
376
+ export * from "./getGrant200User";
363
377
  export * from "./getGrant401";
364
378
  export * from "./getGrant401Details";
365
379
  export * from "./getGrant403";
@@ -382,6 +396,7 @@ export * from "./getMySession200FactorsItemMethod";
382
396
  export * from "./getMySession200FactorsItemPayload";
383
397
  export * from "./getMySession200Metadata";
384
398
  export * from "./getMySession200State";
399
+ export * from "./getMySession200User";
385
400
  export * from "./getMySession200UserAgent";
386
401
  export * from "./getMySession401";
387
402
  export * from "./getMySession404";
@@ -429,6 +444,7 @@ export * from "./getSession200FactorsItemMethod";
429
444
  export * from "./getSession200FactorsItemPayload";
430
445
  export * from "./getSession200Metadata";
431
446
  export * from "./getSession200State";
447
+ export * from "./getSession200User";
432
448
  export * from "./getSession200UserAgent";
433
449
  export * from "./getSession401";
434
450
  export * from "./getSession401Details";
@@ -464,6 +480,7 @@ export * from "./initClaim401Details";
464
480
  export * from "./initClaim404";
465
481
  export * from "./initClaim409";
466
482
  export * from "./initClaim409Details";
483
+ export * from "./initClaim410";
467
484
  export * from "./initClaimDefault";
468
485
  export * from "./initClaimDefaultDetails";
469
486
  export * from "./issueChallenge201";
@@ -570,6 +587,30 @@ export * from "./patchProject404";
570
587
  export * from "./patchProject404Details";
571
588
  export * from "./patchProjectBody";
572
589
  export * from "./patchProjectDefault";
590
+ export * from "./queryGrants200";
591
+ export * from "./queryGrants200GrantsItem";
592
+ export * from "./queryGrants200GrantsItemObjectType";
593
+ export * from "./queryGrants200GrantsItemPrincipal";
594
+ export * from "./queryGrants200GrantsItemPrincipalType";
595
+ export * from "./queryGrants200GrantsItemRelation";
596
+ export * from "./queryGrants200GrantsItemTeam";
597
+ export * from "./queryGrants200GrantsItemUser";
598
+ export * from "./queryGrants400";
599
+ export * from "./queryGrants400Details";
600
+ export * from "./queryGrants401";
601
+ export * from "./queryGrants401Details";
602
+ export * from "./queryGrants403";
603
+ export * from "./queryGrants403Details";
604
+ export * from "./queryGrantsBody";
605
+ export * from "./queryGrantsBodyExpandItem";
606
+ export * from "./queryGrantsBodyFilterItem";
607
+ export * from "./queryGrantsBodyFilterItemField";
608
+ export * from "./queryGrantsBodyFilterItemOperation";
609
+ export * from "./queryGrantsBodySorting";
610
+ export * from "./queryGrantsBodySortingDirection";
611
+ export * from "./queryGrantsBodySortingField";
612
+ export * from "./queryGrantsDefault";
613
+ export * from "./queryGrantsParams";
573
614
  export * from "./queryProjects200";
574
615
  export * from "./queryProjects200ProjectsItem";
575
616
  export * from "./queryProjects400";
@@ -595,6 +636,7 @@ export * from "./querySessions200SessionsItemFactorsItemMethod";
595
636
  export * from "./querySessions200SessionsItemFactorsItemPayload";
596
637
  export * from "./querySessions200SessionsItemMetadata";
597
638
  export * from "./querySessions200SessionsItemState";
639
+ export * from "./querySessions200SessionsItemUser";
598
640
  export * from "./querySessions200SessionsItemUserAgent";
599
641
  export * from "./querySessions400";
600
642
  export * from "./querySessions400Details";
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Generated by orval v8.10.0 🍺
3
+ * Do not edit manually.
4
+ * Zitadel NextGen
5
+ * This is the next generation of the Zitadel identity platform.
6
+ * OpenAPI spec version: 0.0.1
7
+ */
8
+
9
+ /**
10
+ * The project was not claimed within 14 days of creation and can no longer be claimed
11
+
12
+ Error code: proj.claim_window_expired
13
+
14
+ */
15
+ export type InitClaim410 = {
16
+ /** Stable machine-readable error code. */
17
+ code: string;
18
+ /** Human-readable explanation of the error. */
19
+ message: string;
20
+ /** Additional error-specific context. */
21
+ details?: { [key: string]: unknown };
22
+ } & {
23
+ code: "proj.claim_window_expired";
24
+ };
@@ -1251,6 +1251,81 @@ export type ListEvents200DataItem =
1251
1251
  flow_id?: string | null;
1252
1252
  /** Emit-time metadata, already redacted at write. Path A request.api may
1253
1253
  set client (ip, user_agent, origin) for SIEM join on request_id. Not a
1254
+ live risk-evaluator input.
1255
+ */
1256
+ metadata?: {
1257
+ /** Observed HTTP requestor context on Path A request.api only. */
1258
+ client?: {
1259
+ /** Client IP from the first X-Forwarded-For hop or RemoteAddr. */
1260
+ ip?: string;
1261
+ /** Observed User-Agent header. */
1262
+ user_agent?: string;
1263
+ /** Origin header when present. */
1264
+ origin?: string;
1265
+ };
1266
+ [key: string]: unknown;
1267
+ };
1268
+ } & {
1269
+ event_type: "release.created";
1270
+ /** Allowlisted fields for `release.created`. The release id is already the
1271
+ event's `entity_id`; the pinned set is repeated here so the audit stream
1272
+ answers what a release contained without reading the release itself.
1273
+ */
1274
+ payload: {
1275
+ content_hash?: string;
1276
+ message?: string;
1277
+ git_sha?: string;
1278
+ git_dirty?: boolean;
1279
+ pointers?: {
1280
+ kind?: string;
1281
+ handle?: string;
1282
+ revision_id?: string;
1283
+ }[];
1284
+ };
1285
+ })
1286
+ | ({
1287
+ /** Managed event id (`evt_<opaque>`). */
1288
+ id: string;
1289
+ /** @pattern ^[a-zA-Z0-9_-]+$ */
1290
+ project_id: string;
1291
+ /** Emit-time team scope, when the actor operated under a team. */
1292
+ team_id?: string | null;
1293
+ /** Semantic event name (dot-separated). Discriminator for the Event union —
1294
+ see docs/design/api/events-catalog.md.
1295
+ */
1296
+ event_type: string;
1297
+ /** Wide-event category. */
1298
+ category: "request" | "auth" | "session" | "admin" | "entity" | "signal";
1299
+ /** When the action happened (server/storage clock, dialect-owned). */
1300
+ occurred_at: string;
1301
+ /** When the row was inserted (server/storage clock, dialect-owned). */
1302
+ created_at: string;
1303
+ /** Who triggered the event. */
1304
+ actor_id?: string | null;
1305
+ /** Actor kind. */
1306
+ actor_type?: "human" | "service" | "system" | "agent" | null;
1307
+ /** Resource type affected. */
1308
+ entity_type?: string | null;
1309
+ /** Resource id affected. */
1310
+ entity_id?: string | null;
1311
+ /** Application or agent that produced the event. */
1312
+ client_id: string;
1313
+ /** Token id present at emit time, when any. */
1314
+ token_id?: string;
1315
+ /** Delegation kind (omit when unset). */
1316
+ delegation_type?: "direct" | "delegated" | "pat_shared" | "exchanged";
1317
+ delegation_id?: string;
1318
+ grantor?: string;
1319
+ /** Device fingerprint correlation id. */
1320
+ fingerprint?: string;
1321
+ /** HTTP request correlation id. */
1322
+ request_id?: string | null;
1323
+ /** Session correlation id. */
1324
+ session_id?: string | null;
1325
+ /** Login flow correlation id. */
1326
+ flow_id?: string | null;
1327
+ /** Emit-time metadata, already redacted at write. Path A request.api may
1328
+ set client (ip, user_agent, origin) for SIEM join on request_id. Not a
1254
1329
  live risk-evaluator input.
1255
1330
  */
1256
1331
  metadata?: {
@@ -7,6 +7,9 @@
7
7
  */
8
8
  import type { ListFlowDefinitions200FlowDefinitionsItem } from "./listFlowDefinitions200FlowDefinitionsItem";
9
9
 
10
+ /**
11
+ * List of flow definitions, newest by creation time first.
12
+ */
10
13
  export type ListFlowDefinitions200 = {
11
14
  flow_definitions: ListFlowDefinitions200FlowDefinitionsItem[];
12
15
  /** The token to retrieve the next page of results. Absent if there are no more results. */
@@ -23,9 +23,11 @@ the purpose + audience when a flow is created via POST /flow.
23
23
  export type ListFlowDefinitions200FlowDefinitionsItemFlowDefinition = {
24
24
  /**
25
25
  * Stable identifier for this flow, used as the target of cross-flow
26
- `switch` and `pivot` transitions. Renaming is not supported the
27
- `name` is part of the public contract another definition may
28
- reference. Acts as the human display label as well; no separate slug.
26
+ `switch` and `pivot` transitions. Every revision of a flow shares its
27
+ `name`; publishing a definition under an existing `name` adds a
28
+ revision to that flow. Renaming is not supported the `name` is part
29
+ of the public contract another definition may reference. Acts as the
30
+ human display label as well; no separate slug.
29
31
 
30
32
  * @pattern ^[a-z][a-z0-9-]*$
31
33
  */
@@ -32,6 +32,14 @@ Its format is opaque and may change between releases.
32
32
  * Filter flow definitions by purpose (e.g., registration, login).
33
33
  */
34
34
  purpose?: ListFlowDefinitionsPurpose;
35
+ /**
36
+ * The flow name to filter by. Every revision of a flow shares its
37
+ `name`, so the result is that flow's revisions, newest by creation
38
+ time first.
39
+
40
+ * @pattern ^[a-z][a-z0-9-]*$
41
+ */
42
+ name?: string;
35
43
  /**
36
44
  * Related entities to embed on each returned flow definition.
37
45
  */
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Generated by orval v8.10.0 🍺
3
+ * Do not edit manually.
4
+ * Zitadel NextGen
5
+ * This is the next generation of the Zitadel identity platform.
6
+ * OpenAPI spec version: 0.0.1
7
+ */
8
+ import type { QueryGrants200GrantsItem } from "./queryGrants200GrantsItem";
9
+
10
+ /**
11
+ * Paginated list of grants.
12
+ */
13
+ export type QueryGrants200 = {
14
+ grants: QueryGrants200GrantsItem[];
15
+ /** Token to pass as `page_token` in the next request to fetch the following page.
16
+ Absent when there are no more results. The follow-up request must repeat the
17
+ same `sorting` that produced this token (omit only when both pages use the default).
18
+ */
19
+ next_page_token?: string | null;
20
+ };
@@ -0,0 +1,66 @@
1
+ /**
2
+ * Generated by orval v8.10.0 🍺
3
+ * Do not edit manually.
4
+ * Zitadel NextGen
5
+ * This is the next generation of the Zitadel identity platform.
6
+ * OpenAPI spec version: 0.0.1
7
+ */
8
+ import type { QueryGrants200GrantsItemObjectType } from "./queryGrants200GrantsItemObjectType";
9
+ import type { QueryGrants200GrantsItemPrincipal } from "./queryGrants200GrantsItemPrincipal";
10
+ import type { QueryGrants200GrantsItemPrincipalType } from "./queryGrants200GrantsItemPrincipalType";
11
+ import type { QueryGrants200GrantsItemRelation } from "./queryGrants200GrantsItemRelation";
12
+ import type { QueryGrants200GrantsItemTeam } from "./queryGrants200GrantsItemTeam";
13
+ import type { QueryGrants200GrantsItemUser } from "./queryGrants200GrantsItemUser";
14
+
15
+ /**
16
+ * A collaboration grant binding a principal to a project relation.
17
+ */
18
+ export type QueryGrants200GrantsItem = {
19
+ /** Managed assignment id (`asgn_<opaque>`). */
20
+ id: string;
21
+ /** Project this grant is scoped to. */
22
+ project_id: string;
23
+ /** Kind of principal bound by this grant. */
24
+ principal_type: QueryGrants200GrantsItemPrincipalType;
25
+ /** Principal id (`user_<opaque>` or `team_<opaque>`). */
26
+ principal_id: string;
27
+ /** Catalog object type. Always `project` for this API. */
28
+ object_type: QueryGrants200GrantsItemObjectType;
29
+ /** Catalog relation on the project. */
30
+ relation: QueryGrants200GrantsItemRelation;
31
+ /** When the grant was created. */
32
+ created_at: string;
33
+ /** When the grant expires. Null when it does not expire. GET still
34
+ returns expired unrevoked grants; authorization ignores them.
35
+ */
36
+ expires_at?: string | null;
37
+ /** A resolved reference to a user (ADR 058 §3). Fields are role-named, not
38
+ property-named, so responses can mix users from different schemas.
39
+ `identifier` and `display` are resolved independently from the user
40
+ schema's `x-identifier` and `x-display` designations, live at read time.
41
+ Clients render `display`, falling back to `identifier`, then `user_id`.
42
+ Missing or deleted users degrade to `user_id` only.
43
+ */
44
+ user?: QueryGrants200GrantsItemUser;
45
+ /** A resolved reference to a team. Carries the team's id and name so a grant
46
+ list is readable without embedding the full Team body. Id and display ride
47
+ `project.read` (ADR 059 rule 8): a reference field carrying only the
48
+ target's id and display strings needs no gate of its own. Missing or
49
+ deleted teams degrade to `team_id` only.
50
+ */
51
+ team?: QueryGrants200GrantsItemTeam;
52
+ /** The principal named by `principal_id`, present only when the request
53
+ asked for it with `expand: ["principal"]` (ADR 059). Absent means it
54
+ was not requested; `null` means the principal cannot be loaded
55
+ (deleted or missing). GET and create never set this field.
56
+
57
+ When present, the body is the same representation `GET /users/{id}`
58
+ serves for `principal_type=user`, or `GET /teams/{id}` for
59
+ `principal_type=team`. Discriminate with the grant's existing
60
+ `principal_type`.
61
+
62
+ Requires `user.read` and `team.read` in addition to `project.read`.
63
+ Both are checked on the whole request before the list.
64
+ */
65
+ readonly principal?: QueryGrants200GrantsItemPrincipal;
66
+ };
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Generated by orval v8.10.0 🍺
3
+ * Do not edit manually.
4
+ * Zitadel NextGen
5
+ * This is the next generation of the Zitadel identity platform.
6
+ * OpenAPI spec version: 0.0.1
7
+ */
8
+
9
+ /**
10
+ * Catalog object type. Always `project` for this API.
11
+ */
12
+ export type QueryGrants200GrantsItemObjectType =
13
+ (typeof QueryGrants200GrantsItemObjectType)[keyof typeof QueryGrants200GrantsItemObjectType];
14
+
15
+ export const QueryGrants200GrantsItemObjectType = {
16
+ project: "project",
17
+ } as const;
@@ -0,0 +1,147 @@
1
+ /**
2
+ * Generated by orval v8.10.0 🍺
3
+ * Do not edit manually.
4
+ * Zitadel NextGen
5
+ * This is the next generation of the Zitadel identity platform.
6
+ * OpenAPI spec version: 0.0.1
7
+ */
8
+
9
+ /**
10
+ * The principal named by `principal_id`, present only when the request
11
+ asked for it with `expand: ["principal"]` (ADR 059). Absent means it
12
+ was not requested; `null` means the principal cannot be loaded
13
+ (deleted or missing). GET and create never set this field.
14
+
15
+ When present, the body is the same representation `GET /users/{id}`
16
+ serves for `principal_type=user`, or `GET /teams/{id}` for
17
+ `principal_type=team`. Discriminate with the grant's existing
18
+ `principal_type`.
19
+
20
+ Requires `user.read` and `team.read` in addition to `project.read`.
21
+ Both are checked on the whole request before the list.
22
+
23
+ */
24
+ export type QueryGrants200GrantsItemPrincipal =
25
+ | {
26
+ /** @pattern ^user_[a-zA-Z0-9_-]+$ */
27
+ id: string;
28
+ /** The schema that defines the content of `attributes`. These schemas can be
29
+ created using the `/schemas` endpoint. A default schema is provided.
30
+ This schema can be retrieved using the same endpoint.
31
+ */
32
+ schema: string;
33
+ /** The user's content, satisfying the schema named by `schema`. Property
34
+ names and types are determined entirely by that schema.
35
+ */
36
+ attributes: { [key: string]: unknown };
37
+ metadata: {
38
+ /** The time when the user was created. */
39
+ created_at: string;
40
+ /** The time when the user was last updated. */
41
+ updated_at: string;
42
+ /** The status of the user. */
43
+ status: "active" | "suspended" | "deactivated" | "pending_purge";
44
+ /** The team that owns this user's identity lifecycle, or `null` when the
45
+ user is self-owned. This is a single team and a different concept from
46
+ the user's team memberships: it decides who may deprovision the user, not
47
+ which teams the user collaborates in. Memberships are their own paginated
48
+ resource — `GET /users/{user_id}/teams`.
49
+ */
50
+ lifecycle_owner_team_id?: string | null;
51
+ /** The team named by `lifecycle_owner_team_id`, present only when the
52
+ request asked for it with `expand: ["lifecycle_owner_team"]` (ADR 059).
53
+ Absent means it was not requested; `null` means the user is self-owned
54
+ and there is no owner to resolve.
55
+
56
+ Requesting it does not guarantee it is present on every user. Today
57
+ `team.read` is checked once for the whole request, so it is; once that
58
+ check is per team, a page may contain a user whose owner the caller may
59
+ not read, and such a row answers with neither the team nor `null` —
60
+ `null` already means self-owned. What it answers with instead is decided
61
+ with the granular scopes (#420); do not read the two cases above as the
62
+ complete set.
63
+
64
+ This is the same representation `GET /teams/{team_id}` serves. It is a
65
+ single team, not a collection, so it carries no cap and no truncation
66
+ flag.
67
+ */
68
+ readonly lifecycle_owner_team?: {
69
+ /** The unique identifier of the team. */
70
+ id: string;
71
+ /** The name of the team. */
72
+ name: string;
73
+ /** The lifecycle state of a team.
74
+
75
+ active: The team is available for use.
76
+ deactivated: The team is no longer active but is retained for historical and audit purposes.
77
+ */
78
+ status: "active" | "deactivated";
79
+ /** The time when the team was created. */
80
+ created_at: string;
81
+ /** The time when the team was last updated. */
82
+ updated_at: string;
83
+ } | null;
84
+ };
85
+ /** The current value of the user schema's designated identifier
86
+ (`x-identifier`), resolved live at read time. Absent when the schema
87
+ designates no identifier or the user carries no value for it.
88
+ */
89
+ readonly identifier?: string;
90
+ /** The schema property `identifier` came from, so clients can reach the
91
+ property's schema for semantics (a mailto link, a field label)
92
+ instead of guessing from the value. Present exactly when
93
+ `identifier` is.
94
+ */
95
+ readonly identifier_property?: string;
96
+ /** The `x-display` rendering — the designated properties' values joined
97
+ in list order, resolved live at read time. Purely presentational.
98
+ Absent when the schema designates no display properties or the user
99
+ carries no values for them. Clients render `display`, falling back
100
+ to `identifier`, then `id`.
101
+ */
102
+ readonly display?: string;
103
+ /** The user's team memberships, present only when the request asked for them with
104
+ `expand: ["teams"]` (ADR 059). Absent means it was not requested; `[]`
105
+ means the user has none.
106
+
107
+ Deliberately outside `metadata`: memberships are a related collection, not
108
+ part of the server-owned envelope, and it is a different concept from
109
+ `metadata.lifecycle_owner_team_id` (ADR 024).
110
+ */
111
+ readonly teams?: readonly {
112
+ /** The unique identifier of the team. */
113
+ id: string;
114
+ /** The name of the team. */
115
+ name: string;
116
+ /** The user's participation state on this team. Memberships the user was
117
+ removed from are not returned.
118
+ */
119
+ membership_status: "pending" | "active" | "inactive";
120
+ /** The time when the user joined this team. */
121
+ created_at: string;
122
+ /** The time when this membership was last changed. */
123
+ updated_at: string;
124
+ }[];
125
+ /** True when the user is on more teams than the embedded list carries. The
126
+ embedded list is capped and cannot be paged; read them all at
127
+ `GET /users/{user_id}/teams`. Present only alongside `teams`.
128
+ */
129
+ readonly teams_truncated?: boolean;
130
+ }
131
+ | {
132
+ /** The unique identifier of the team. */
133
+ id: string;
134
+ /** The name of the team. */
135
+ name: string;
136
+ /** The lifecycle state of a team.
137
+
138
+ active: The team is available for use.
139
+ deactivated: The team is no longer active but is retained for historical and audit purposes.
140
+ */
141
+ status: "active" | "deactivated";
142
+ /** The time when the team was created. */
143
+ created_at: string;
144
+ /** The time when the team was last updated. */
145
+ updated_at: string;
146
+ }
147
+ | null;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Generated by orval v8.10.0 🍺
3
+ * Do not edit manually.
4
+ * Zitadel NextGen
5
+ * This is the next generation of the Zitadel identity platform.
6
+ * OpenAPI spec version: 0.0.1
7
+ */
8
+
9
+ /**
10
+ * Kind of principal bound by this grant.
11
+ */
12
+ export type QueryGrants200GrantsItemPrincipalType =
13
+ (typeof QueryGrants200GrantsItemPrincipalType)[keyof typeof QueryGrants200GrantsItemPrincipalType];
14
+
15
+ export const QueryGrants200GrantsItemPrincipalType = {
16
+ user: "user",
17
+ team: "team",
18
+ } as const;
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Generated by orval v8.10.0 🍺
3
+ * Do not edit manually.
4
+ * Zitadel NextGen
5
+ * This is the next generation of the Zitadel identity platform.
6
+ * OpenAPI spec version: 0.0.1
7
+ */
8
+
9
+ /**
10
+ * Catalog relation on the project.
11
+ */
12
+ export type QueryGrants200GrantsItemRelation =
13
+ (typeof QueryGrants200GrantsItemRelation)[keyof typeof QueryGrants200GrantsItemRelation];
14
+
15
+ export const QueryGrants200GrantsItemRelation = {
16
+ viewer: "viewer",
17
+ editor: "editor",
18
+ admin: "admin",
19
+ } as const;
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Generated by orval v8.10.0 🍺
3
+ * Do not edit manually.
4
+ * Zitadel NextGen
5
+ * This is the next generation of the Zitadel identity platform.
6
+ * OpenAPI spec version: 0.0.1
7
+ */
8
+
9
+ /**
10
+ * A resolved reference to a team. Carries the team's id and name so a grant
11
+ list is readable without embedding the full Team body. Id and display ride
12
+ `project.read` (ADR 059 rule 8): a reference field carrying only the
13
+ target's id and display strings needs no gate of its own. Missing or
14
+ deleted teams degrade to `team_id` only.
15
+
16
+ */
17
+ export type QueryGrants200GrantsItemTeam = {
18
+ /** The referenced team's id (`team_<opaque>`). Always present. */
19
+ team_id: string;
20
+ /** The team's name. Absent when the team can no longer be loaded. */
21
+ name?: string;
22
+ };
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Generated by orval v8.10.0 🍺
3
+ * Do not edit manually.
4
+ * Zitadel NextGen
5
+ * This is the next generation of the Zitadel identity platform.
6
+ * OpenAPI spec version: 0.0.1
7
+ */
8
+
9
+ /**
10
+ * A resolved reference to a user (ADR 058 §3). Fields are role-named, not
11
+ property-named, so responses can mix users from different schemas.
12
+ `identifier` and `display` are resolved independently from the user
13
+ schema's `x-identifier` and `x-display` designations, live at read time.
14
+ Clients render `display`, falling back to `identifier`, then `user_id`.
15
+ Missing or deleted users degrade to `user_id` only.
16
+
17
+ */
18
+ export type QueryGrants200GrantsItemUser = {
19
+ /** @pattern ^user_[a-zA-Z0-9_-]+$ */
20
+ user_id: string;
21
+ /** The current value of the schema's designated identifier
22
+ (`x-identifier`). Absent when the schema designates no identifier or
23
+ the user carries no value for it.
24
+ */
25
+ identifier?: string;
26
+ /** The schema property `identifier` came from, so clients can reach the
27
+ property's schema for semantics (a mailto link, a field label)
28
+ instead of guessing from the value. Present exactly when
29
+ `identifier` is.
30
+ */
31
+ identifier_property?: string;
32
+ /** The `x-display` rendering — the designated properties' values joined
33
+ in list order. Purely presentational, with no source attribution.
34
+ Absent when the schema designates no display properties or the user
35
+ carries no values for them.
36
+ */
37
+ display?: string;
38
+ };
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Generated by orval v8.10.0 🍺
3
+ * Do not edit manually.
4
+ * Zitadel NextGen
5
+ * This is the next generation of the Zitadel identity platform.
6
+ * OpenAPI spec version: 0.0.1
7
+ */
8
+ import type { QueryGrants400Details } from "./queryGrants400Details";
9
+
10
+ /**
11
+ * Standard error payload returned for failed API requests.
12
+ */
13
+ export type QueryGrants400 = {
14
+ /** Stable machine-readable error code. */
15
+ code: string;
16
+ /** Human-readable explanation of the error. */
17
+ message: string;
18
+ /** Additional error-specific context. */
19
+ details?: QueryGrants400Details;
20
+ };
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Generated by orval v8.10.0 🍺
3
+ * Do not edit manually.
4
+ * Zitadel NextGen
5
+ * This is the next generation of the Zitadel identity platform.
6
+ * OpenAPI spec version: 0.0.1
7
+ */
8
+
9
+ /**
10
+ * Additional error-specific context.
11
+ */
12
+ export type QueryGrants400Details = { [key: string]: unknown };