@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
@@ -6,19 +6,24 @@
6
6
  * OpenAPI spec version: 0.0.1
7
7
  */
8
8
 
9
- /**
10
- * The claim challenge has expired
11
-
12
- Error code: proj.claim_expired
13
-
14
- */
15
- export type CompleteClaim410 = {
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_expired";
24
- };
9
+ export type CompleteClaim410 =
10
+ | ({
11
+ /** Stable machine-readable error code. */
12
+ code: string;
13
+ /** Human-readable explanation of the error. */
14
+ message: string;
15
+ /** Additional error-specific context. */
16
+ details?: { [key: string]: unknown };
17
+ } & {
18
+ code: "proj.claim_expired";
19
+ })
20
+ | ({
21
+ /** Stable machine-readable error code. */
22
+ code: string;
23
+ /** Human-readable explanation of the error. */
24
+ message: string;
25
+ /** Additional error-specific context. */
26
+ details?: { [key: string]: unknown };
27
+ } & {
28
+ code: "proj.claim_window_expired";
29
+ });
@@ -23,9 +23,11 @@ the purpose + audience when a flow is created via POST /flow.
23
23
  export type CreateFlowDefinition201FlowDefinition = {
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
  */
@@ -23,9 +23,11 @@ the purpose + audience when a flow is created via POST /flow.
23
23
  export type CreateFlowDefinitionBodyFlowDefinition = {
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
  */
@@ -27,16 +27,6 @@ export type CreateFlowDefinitionDefault =
27
27
  } & {
28
28
  code: "evt.invalid";
29
29
  })
30
- | ({
31
- /** Stable machine-readable error code. */
32
- code: string;
33
- /** Human-readable explanation of the error. */
34
- message: string;
35
- /** Additional error-specific context. */
36
- details?: { [key: string]: unknown };
37
- } & {
38
- code: "flowdef.already_exists";
39
- })
40
30
  | ({
41
31
  /** Stable machine-readable error code. */
42
32
  code: string;
@@ -6,8 +6,11 @@
6
6
  * OpenAPI spec version: 0.0.1
7
7
  */
8
8
  import type { CreateGrant201ObjectType } from "./createGrant201ObjectType";
9
+ import type { CreateGrant201Principal } from "./createGrant201Principal";
9
10
  import type { CreateGrant201PrincipalType } from "./createGrant201PrincipalType";
10
11
  import type { CreateGrant201Relation } from "./createGrant201Relation";
12
+ import type { CreateGrant201Team } from "./createGrant201Team";
13
+ import type { CreateGrant201User } from "./createGrant201User";
11
14
 
12
15
  /**
13
16
  * A collaboration grant binding a principal to a project relation.
@@ -31,4 +34,33 @@ export type CreateGrant201 = {
31
34
  returns expired unrevoked grants; authorization ignores them.
32
35
  */
33
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?: CreateGrant201User;
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?: CreateGrant201Team;
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?: CreateGrant201Principal;
34
66
  };
@@ -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 CreateGrant201Principal =
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,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 CreateGrant201Team = {
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 CreateGrant201User = {
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
+ };
@@ -8,6 +8,7 @@
8
8
  import type { CreateSession201SessionFactorsItem } from "./createSession201SessionFactorsItem";
9
9
  import type { CreateSession201SessionMetadata } from "./createSession201SessionMetadata";
10
10
  import type { CreateSession201SessionState } from "./createSession201SessionState";
11
+ import type { CreateSession201SessionUser } from "./createSession201SessionUser";
11
12
  import type { CreateSession201SessionUserAgent } from "./createSession201SessionUserAgent";
12
13
 
13
14
  /**
@@ -37,23 +38,14 @@ export type CreateSession201Session = {
37
38
  factor has been verified through an `auth_attempt`.
38
39
  */
39
40
  user_id?: string | null;
40
- /** Human-readable name of the authenticated user, resolved from the
41
- conventional user-schema properties: `name` when defined, otherwise
42
- the given and family name parts joined `givenName`/`familyName`
43
- (the shipped presets' spelling) or `given_name`/`family_name`. Only
44
- present on reads that hydrate the user's identity
45
- (`GET /sessions/me`) and only when the session has an authenticated
46
- user whose schema carries those properties; clients fall back to
47
- `email`, then `user_id`.
41
+ /** A resolved reference to a user (ADR 058 §3). Fields are role-named, not
42
+ property-named, so responses can mix users from different schemas.
43
+ `identifier` and `display` are resolved independently from the user
44
+ schema's `x-identifier` and `x-display` designations, live at read time.
45
+ Clients render `display`, falling back to `identifier`, then `user_id`.
46
+ Missing or deleted users degrade to `user_id` only.
48
47
  */
49
- name?: string;
50
- /** Email address of the authenticated user, resolved from the
51
- conventional `email` user-schema property. Only present on reads
52
- that hydrate the user's identity (`GET /sessions/me`) and only when
53
- the session has an authenticated user whose schema carries that
54
- property.
55
- */
56
- email?: string;
48
+ user?: CreateSession201SessionUser;
57
49
  /** Verified authentication factors accumulated by this session.
58
50
  Each key is a factor type (e.g. `password`, `totp`, `passkey`).
59
51
  Each value is a factor event object with at least `verified_at` and
@@ -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 CreateSession201SessionUser = {
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
+ };
@@ -36,6 +36,24 @@ export type CreateUser201 = {
36
36
  */
37
37
  attributes: CreateUser201Attributes;
38
38
  metadata: CreateUser201Metadata;
39
+ /** The current value of the user schema's designated identifier
40
+ (`x-identifier`), resolved live at read time. Absent when the schema
41
+ designates no identifier or the user carries no value for it.
42
+ */
43
+ readonly identifier?: string;
44
+ /** The schema property `identifier` came from, so clients can reach the
45
+ property's schema for semantics (a mailto link, a field label)
46
+ instead of guessing from the value. Present exactly when
47
+ `identifier` is.
48
+ */
49
+ readonly identifier_property?: string;
50
+ /** The `x-display` rendering — the designated properties' values joined
51
+ in list order, resolved live at read time. Purely presentational.
52
+ Absent when the schema designates no display properties or the user
53
+ carries no values for them. Clients render `display`, falling back
54
+ to `identifier`, then `id`.
55
+ */
56
+ readonly display?: string;
39
57
  /** The user's team memberships, present only when the request asked for them with
40
58
  `expand: ["teams"]` (ADR 059). Absent means it was not requested; `[]`
41
59
  means the user has none.
@@ -8,6 +8,7 @@
8
8
  import type { ExchangeHandoff200SessionFactorsItem } from "./exchangeHandoff200SessionFactorsItem";
9
9
  import type { ExchangeHandoff200SessionMetadata } from "./exchangeHandoff200SessionMetadata";
10
10
  import type { ExchangeHandoff200SessionState } from "./exchangeHandoff200SessionState";
11
+ import type { ExchangeHandoff200SessionUser } from "./exchangeHandoff200SessionUser";
11
12
  import type { ExchangeHandoff200SessionUserAgent } from "./exchangeHandoff200SessionUserAgent";
12
13
 
13
14
  /**
@@ -37,23 +38,14 @@ export type ExchangeHandoff200Session = {
37
38
  factor has been verified through an `auth_attempt`.
38
39
  */
39
40
  user_id?: string | null;
40
- /** Human-readable name of the authenticated user, resolved from the
41
- conventional user-schema properties: `name` when defined, otherwise
42
- the given and family name parts joined `givenName`/`familyName`
43
- (the shipped presets' spelling) or `given_name`/`family_name`. Only
44
- present on reads that hydrate the user's identity
45
- (`GET /sessions/me`) and only when the session has an authenticated
46
- user whose schema carries those properties; clients fall back to
47
- `email`, then `user_id`.
41
+ /** A resolved reference to a user (ADR 058 §3). Fields are role-named, not
42
+ property-named, so responses can mix users from different schemas.
43
+ `identifier` and `display` are resolved independently from the user
44
+ schema's `x-identifier` and `x-display` designations, live at read time.
45
+ Clients render `display`, falling back to `identifier`, then `user_id`.
46
+ Missing or deleted users degrade to `user_id` only.
48
47
  */
49
- name?: string;
50
- /** Email address of the authenticated user, resolved from the
51
- conventional `email` user-schema property. Only present on reads
52
- that hydrate the user's identity (`GET /sessions/me`) and only when
53
- the session has an authenticated user whose schema carries that
54
- property.
55
- */
56
- email?: string;
48
+ user?: ExchangeHandoff200SessionUser;
57
49
  /** Verified authentication factors accumulated by this session.
58
50
  Each key is a factor type (e.g. `password`, `totp`, `passkey`).
59
51
  Each value is a factor event object with at least `verified_at` and
@@ -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 ExchangeHandoff200SessionUser = {
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
+ };
@@ -6,19 +6,24 @@
6
6
  * OpenAPI spec version: 0.0.1
7
7
  */
8
8
 
9
- /**
10
- * The claim challenge has expired
11
-
12
- Error code: proj.claim_expired
13
-
14
- */
15
- export type GetClaimStatus410 = {
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_expired";
24
- };
9
+ export type GetClaimStatus410 =
10
+ | ({
11
+ /** Stable machine-readable error code. */
12
+ code: string;
13
+ /** Human-readable explanation of the error. */
14
+ message: string;
15
+ /** Additional error-specific context. */
16
+ details?: { [key: string]: unknown };
17
+ } & {
18
+ code: "proj.claim_expired";
19
+ })
20
+ | ({
21
+ /** Stable machine-readable error code. */
22
+ code: string;
23
+ /** Human-readable explanation of the error. */
24
+ message: string;
25
+ /** Additional error-specific context. */
26
+ details?: { [key: string]: unknown };
27
+ } & {
28
+ code: "proj.claim_window_expired";
29
+ });
@@ -0,0 +1,23 @@
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
+ * How long the project can still be claimed. Derived from the project's
11
+ creation time and the fixed 14-day claim window (ADR 046); it does not
12
+ depend on the challenge, which has its own much shorter expiry.
13
+
14
+ */
15
+ export type GetClaimWindow200 = {
16
+ /** The time when the project's claim window closes. */
17
+ expires_at: string;
18
+ /** Whether the window has already closed. Reported alongside `expires_at`
19
+ rather than left to the client so a skewed browser clock cannot show a
20
+ claimable project as expired, or the reverse.
21
+ */
22
+ expired: boolean;
23
+ };
@@ -5,16 +5,16 @@
5
5
  * This is the next generation of the Zitadel identity platform.
6
6
  * OpenAPI spec version: 0.0.1
7
7
  */
8
- import type { CreateFlowDefinition409Details } from "./createFlowDefinition409Details";
8
+ import type { GetClaimWindow404Details } from "./getClaimWindow404Details";
9
9
 
10
10
  /**
11
11
  * Standard error payload returned for failed API requests.
12
12
  */
13
- export type CreateFlowDefinition409 = {
13
+ export type GetClaimWindow404 = {
14
14
  /** Stable machine-readable error code. */
15
15
  code: string;
16
16
  /** Human-readable explanation of the error. */
17
17
  message: string;
18
18
  /** Additional error-specific context. */
19
- details?: CreateFlowDefinition409Details;
19
+ details?: GetClaimWindow404Details;
20
20
  };
@@ -9,4 +9,4 @@
9
9
  /**
10
10
  * Additional error-specific context.
11
11
  */
12
- export type CreateFlowDefinition409Details = { [key: string]: unknown };
12
+ export type GetClaimWindow404Details = { [key: string]: unknown };
@@ -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 { GetClaimWindow429Details } from "./getClaimWindow429Details";
9
+
10
+ /**
11
+ * Standard error payload returned for failed API requests.
12
+ */
13
+ export type GetClaimWindow429 = {
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?: GetClaimWindow429Details;
20
+ };