@zitadel/api 0.1.0-alpha.18 → 0.1.0-alpha.19

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 (120) hide show
  1. package/README.md +38 -3
  2. package/dist/generated/endpoints/zitadelNextGen.d.mts +2 -2
  3. package/dist/generated/endpoints/zitadelNextGen.mjs +104 -98
  4. package/dist/generated/endpoints/zitadelNextGen.mjs.map +1 -1
  5. package/dist/generated/endpoints/zitadelNextGen.msw.d.mts +6 -2
  6. package/dist/generated/endpoints/zitadelNextGen.msw.d.mts.map +1 -1
  7. package/dist/generated/endpoints/zitadelNextGen.msw.mjs +5132 -262
  8. package/dist/generated/endpoints/zitadelNextGen.msw.mjs.map +1 -1
  9. package/dist/generated/endpoints/zitadelNextGen.zod.d.mts +2523 -110
  10. package/dist/generated/endpoints/zitadelNextGen.zod.d.mts.map +1 -1
  11. package/dist/generated/endpoints/zitadelNextGen.zod.mjs +2581 -143
  12. package/dist/generated/endpoints/zitadelNextGen.zod.mjs.map +1 -1
  13. package/dist/generated/model/index.d.mts +2 -2
  14. package/dist/generated/model/index.mjs +29 -5
  15. package/dist/generated/model/index.mjs.map +1 -1
  16. package/dist/{index-D6qIOslB.d.mts → index-Dt_0fSH9.d.mts} +2759 -390
  17. package/dist/index-Dt_0fSH9.d.mts.map +1 -0
  18. package/dist/runtime/api-factory.d.mts +1 -1
  19. package/dist/{zitadelNextGen-BCljAZpG.d.mts → zitadelNextGen-BkDpEAS9.d.mts} +62 -35
  20. package/dist/zitadelNextGen-BkDpEAS9.d.mts.map +1 -0
  21. package/package.json +1 -1
  22. package/src/generated/endpoints/zitadelNextGen.msw.ts +5330 -241
  23. package/src/generated/endpoints/zitadelNextGen.ts +129 -209
  24. package/src/generated/endpoints/zitadelNextGen.zod.ts +4635 -336
  25. package/src/generated/model/createAuthAttemptDefault.ts +10 -0
  26. package/src/generated/model/createFlowDefault.ts +10 -0
  27. package/src/generated/model/createFlowDefinition201FlowDefinitionStepsItemTransitions.ts +11 -0
  28. package/src/generated/model/createFlowDefinitionBodyFlowDefinitionStepsItemTransitions.ts +11 -0
  29. package/src/generated/model/createFlowDefinitionDefault.ts +10 -0
  30. package/src/generated/model/createHandoffDefault.ts +10 -0
  31. package/src/generated/model/createProjectDefault.ts +20 -0
  32. package/src/generated/model/createSchemaBody.ts +5 -34
  33. package/src/generated/model/createSession201Session.ts +1 -1
  34. package/src/generated/model/createSession201SessionState.ts +1 -1
  35. package/src/generated/model/createSessionDefault.ts +20 -0
  36. package/src/generated/model/createUser201.ts +24 -4
  37. package/src/generated/model/createUser201Attributes.ts +14 -0
  38. package/src/generated/model/{createUserBodyMetadata.ts → createUser201Metadata.ts} +3 -3
  39. package/src/generated/model/{createUserBodyMetadataStatus.ts → createUser201MetadataStatus.ts} +3 -3
  40. package/src/generated/model/createUser500.ts +20 -0
  41. package/src/generated/model/{deleteTeamParams.ts → createUser500Details.ts} +4 -7
  42. package/src/generated/model/createUserBody.ts +22 -11
  43. package/src/generated/model/createUserBodyAttributes.ts +14 -0
  44. package/src/generated/model/createUserDefault.ts +10 -0
  45. package/src/generated/model/deleteFlowDefinitionDefault.ts +10 -0
  46. package/src/generated/model/deleteUserByIDDefault.ts +10 -0
  47. package/src/generated/model/exchangeHandoff200Session.ts +1 -1
  48. package/src/generated/model/exchangeHandoff200SessionState.ts +1 -1
  49. package/src/generated/model/exchangeHandoffDefault.ts +10 -0
  50. package/src/generated/model/getEvent200.ts +1372 -0
  51. package/src/generated/model/getEvent401.ts +20 -0
  52. package/src/generated/model/{getSessionParams.ts → getEvent401Details.ts} +4 -7
  53. package/src/generated/model/getEvent403.ts +20 -0
  54. package/src/generated/model/getEvent403Details.ts +12 -0
  55. package/src/generated/model/getEvent404.ts +20 -0
  56. package/src/generated/model/getEvent404Details.ts +12 -0
  57. package/src/generated/model/getEventDefault.ts +20 -0
  58. package/src/generated/model/getEventDefaultDetails.ts +12 -0
  59. package/src/generated/model/{getTeamParams.ts → getEventParams.ts} +1 -1
  60. package/src/generated/model/getFlowDefinition200FlowDefinitionStepsItemTransitions.ts +11 -0
  61. package/src/generated/model/getMySession200.ts +1 -1
  62. package/src/generated/model/getMySession200State.ts +1 -1
  63. package/src/generated/model/getMyUser200.ts +20 -7
  64. package/src/generated/model/getMyUser200Attributes.ts +14 -0
  65. package/src/generated/model/getSchemaById200.ts +5 -34
  66. package/src/generated/model/getSchemaByIdParams.ts +0 -5
  67. package/src/generated/model/getSession200.ts +1 -1
  68. package/src/generated/model/getSession200State.ts +1 -1
  69. package/src/generated/model/getUserByID200.ts +20 -7
  70. package/src/generated/model/getUserByID200Attributes.ts +14 -0
  71. package/src/generated/model/getUserByIDParams.ts +0 -5
  72. package/src/generated/model/index.ts +32 -13
  73. package/src/generated/model/listEvents200.ts +19 -0
  74. package/src/generated/model/listEvents200DataItem.ts +1372 -0
  75. package/src/generated/model/listEvents400.ts +20 -0
  76. package/src/generated/model/listEvents400Details.ts +12 -0
  77. package/src/generated/model/listEvents401.ts +20 -0
  78. package/src/generated/model/listEvents401Details.ts +12 -0
  79. package/src/generated/model/listEvents403.ts +20 -0
  80. package/src/generated/model/listEvents403Details.ts +12 -0
  81. package/src/generated/model/listEventsCategoryItem.ts +19 -0
  82. package/src/generated/model/listEventsDefault.ts +20 -0
  83. package/src/generated/model/{getFlowDefinitionParams.ts → listEventsDefaultDetails.ts} +4 -7
  84. package/src/generated/model/{getBrandingByIdParams.ts → listEventsOrder.ts} +6 -7
  85. package/src/generated/model/listEventsParams.ts +67 -0
  86. package/src/generated/model/listUserPasskeysParams.ts +0 -5
  87. package/src/generated/model/listUserTeamsDefault.ts +0 -20
  88. package/src/generated/model/listUserTeamsParams.ts +0 -5
  89. package/src/generated/model/listUsers200UsersItem.ts +20 -7
  90. package/src/generated/model/listUsers200UsersItemAttributes.ts +14 -0
  91. package/src/generated/model/patchProjectDefault.ts +10 -0
  92. package/src/generated/model/queryProjectsBodyFilterItem.ts +4 -0
  93. package/src/generated/model/queryProjectsBodyFilterItemOperation.ts +4 -0
  94. package/src/generated/model/querySessions200SessionsItem.ts +1 -1
  95. package/src/generated/model/querySessions200SessionsItemState.ts +1 -1
  96. package/src/generated/model/querySessionsBodyFilterItem.ts +6 -1
  97. package/src/generated/model/querySessionsBodyFilterItemField.ts +2 -1
  98. package/src/generated/model/querySessionsBodyFilterItemOperation.ts +4 -0
  99. package/src/generated/model/querySessionsDefault.ts +10 -0
  100. package/src/generated/model/queryTeamsBodyFilterItem.ts +9 -0
  101. package/src/generated/model/queryTeamsBodyFilterItemField.ts +9 -0
  102. package/src/generated/model/queryTeamsBodyFilterItemOperation.ts +4 -0
  103. package/src/generated/model/queryTeamsBodySorting.ts +5 -0
  104. package/src/generated/model/queryTeamsBodySortingField.ts +9 -0
  105. package/src/generated/model/revokeMySessionDefault.ts +10 -0
  106. package/src/generated/model/revokeSessionDefault.ts +10 -0
  107. package/src/generated/model/setUserPasswordDefault.ts +10 -0
  108. package/src/generated/model/submitFlowStepDefault.ts +10 -0
  109. package/src/generated/model/updateFlowDefinition200FlowDefinitionStepsItemTransitions.ts +11 -0
  110. package/src/generated/model/updateFlowDefinitionBodyFlowDefinitionStepsItemTransitions.ts +11 -0
  111. package/src/generated/model/updateFlowDefinitionDefault.ts +10 -0
  112. package/src/generated/model/verifyChallengeProofDefault.ts +10 -0
  113. package/dist/index-D6qIOslB.d.mts.map +0 -1
  114. package/dist/zitadelNextGen-BCljAZpG.d.mts.map +0 -1
  115. package/src/generated/model/deleteFlowDefinitionParams.ts +0 -15
  116. package/src/generated/model/deleteUserByIDParams.ts +0 -15
  117. package/src/generated/model/revokeSessionParams.ts +0 -15
  118. package/src/generated/model/setUserPasswordParams.ts +0 -15
  119. package/src/generated/model/updateFlowDefinitionParams.ts +0 -15
  120. package/src/generated/model/updateTeamParams.ts +0 -15
@@ -27,6 +27,16 @@ export type CreateAuthAttemptDefault =
27
27
  } & {
28
28
  code: "auth.unauthorized";
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: "evt.invalid";
39
+ })
30
40
  | ({
31
41
  /** Stable machine-readable error code. */
32
42
  code: string;
@@ -47,6 +47,16 @@ export type CreateFlowDefault =
47
47
  } & {
48
48
  code: "enc_key.not_found";
49
49
  })
50
+ | ({
51
+ /** Stable machine-readable error code. */
52
+ code: string;
53
+ /** Human-readable explanation of the error. */
54
+ message: string;
55
+ /** Additional error-specific context. */
56
+ details?: { [key: string]: unknown };
57
+ } & {
58
+ code: "evt.invalid";
59
+ })
50
60
  | ({
51
61
  /** Stable machine-readable error code. */
52
62
  code: string;
@@ -31,5 +31,16 @@ export type CreateFlowDefinition201FlowDefinitionStepsItemTransitions = {
31
31
  Example: login → recovery → back to login.
32
32
  */
33
33
  action?: "switch" | "pivot" | null;
34
+ /** Local re-purposing. When set, taking this transition changes the
35
+ flow's current purpose to this value — the dispatch mode a step's
36
+ challenges run under — while the flow's original purpose stays
37
+ pinned. Must be a purpose this definition serves, and `target`
38
+ must be that purpose's entry step. Mutually exclusive with
39
+ `action`: a transition either re-purposes within this flow or
40
+ targets another flow, never both.
41
+ Example: a "Sign up" navigation on the login identifier step
42
+ (`{ target: register, purpose: register }`).
43
+ */
44
+ purpose?: "login" | "register" | "recovery" | "profiling" | "reauth" | "link_account" | null;
34
45
  };
35
46
  };
@@ -31,5 +31,16 @@ export type CreateFlowDefinitionBodyFlowDefinitionStepsItemTransitions = {
31
31
  Example: login → recovery → back to login.
32
32
  */
33
33
  action?: "switch" | "pivot" | null;
34
+ /** Local re-purposing. When set, taking this transition changes the
35
+ flow's current purpose to this value — the dispatch mode a step's
36
+ challenges run under — while the flow's original purpose stays
37
+ pinned. Must be a purpose this definition serves, and `target`
38
+ must be that purpose's entry step. Mutually exclusive with
39
+ `action`: a transition either re-purposes within this flow or
40
+ targets another flow, never both.
41
+ Example: a "Sign up" navigation on the login identifier step
42
+ (`{ target: register, purpose: register }`).
43
+ */
44
+ purpose?: "login" | "register" | "recovery" | "profiling" | "reauth" | "link_account" | null;
34
45
  };
35
46
  };
@@ -17,6 +17,16 @@ export type CreateFlowDefinitionDefault =
17
17
  } & {
18
18
  code: "auth.unauthorized";
19
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: "evt.invalid";
29
+ })
20
30
  | ({
21
31
  /** Stable machine-readable error code. */
22
32
  code: string;
@@ -57,6 +57,16 @@ export type CreateHandoffDefault =
57
57
  } & {
58
58
  code: "auth.unauthorized";
59
59
  })
60
+ | ({
61
+ /** Stable machine-readable error code. */
62
+ code: string;
63
+ /** Human-readable explanation of the error. */
64
+ message: string;
65
+ /** Additional error-specific context. */
66
+ details?: { [key: string]: unknown };
67
+ } & {
68
+ code: "evt.invalid";
69
+ })
60
70
  | ({
61
71
  /** Stable machine-readable error code. */
62
72
  code: string;
@@ -27,6 +27,16 @@ export type CreateProjectDefault =
27
27
  } & {
28
28
  code: "enc_key.not_found";
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: "evt.invalid";
39
+ })
30
40
  | ({
31
41
  /** Stable machine-readable error code. */
32
42
  code: string;
@@ -47,6 +57,16 @@ export type CreateProjectDefault =
47
57
  } & {
48
58
  code: "tkn.invalid";
49
59
  })
60
+ | ({
61
+ /** Stable machine-readable error code. */
62
+ code: string;
63
+ /** Human-readable explanation of the error. */
64
+ message: string;
65
+ /** Additional error-specific context. */
66
+ details?: { [key: string]: unknown };
67
+ } & {
68
+ code: "tkn.invalid_tknid";
69
+ })
50
70
  | ({
51
71
  /** Stable machine-readable error code. */
52
72
  code: string;
@@ -23,47 +23,22 @@ export type CreateSchemaBody =
23
23
  password?: {
24
24
  /** Whether the authentication method is enabled or not */
25
25
  enabled: boolean;
26
- /**
27
- * The position of the authentication method in the list of supported methods
28
- * @minimum 0
29
- */
30
- position: number;
31
26
  };
32
27
  passkey?: {
33
28
  /** Whether the authentication method is enabled or not */
34
29
  enabled: boolean;
35
- /**
36
- * The position of the authentication method in the list of supported methods
37
- * @minimum 0
38
- */
39
- position: number;
40
30
  };
41
31
  magic_link?: {
42
32
  /** Whether the authentication method is enabled or not */
43
33
  enabled: boolean;
44
- /**
45
- * The position of the authentication method in the list of supported methods
46
- * @minimum 0
47
- */
48
- position: number;
49
34
  };
50
35
  sso?: {
51
36
  /** Whether the authentication method is enabled or not */
52
37
  enabled: boolean;
53
- /**
54
- * The position of the authentication method in the list of supported methods
55
- * @minimum 0
56
- */
57
- position: number;
58
38
  };
59
39
  otp?: {
60
40
  /** Whether the authentication method is enabled or not */
61
41
  enabled: boolean;
62
- /**
63
- * The position of the authentication method in the list of supported methods
64
- * @minimum 0
65
- */
66
- position: number;
67
42
  };
68
43
  };
69
44
  /** A map of additional properties for the user definition, where the
@@ -71,19 +46,15 @@ export type CreateSchemaBody =
71
46
  */
72
47
  properties?: {
73
48
  [key: string]: {
74
- /** The verification method for this property, if applicable */
75
- "x-verify"?: string | null;
76
49
  /** The level of uniqueness for this property, if applicable */
77
50
  "x-unique"?: "unspecified" | "project" | "team" | null;
78
51
  /** The claim name for this property, if applicable */
79
52
  "x-claim"?: string | null;
80
- /** Whether this property is editable by the user or not */
81
- "x-editable"?: boolean;
82
- /** Whether this property contains sensitive information or not */
83
- "x-sensitive"?: boolean;
84
- /** Whether this property is used for multi-factor authentication or not
85
- */
86
- "x-mfa"?: boolean;
53
+ /** Whether this property's value may appear in audit event payloads. Audit
54
+ payloads are deny-by-default: a property without this annotation
55
+ contributes its key but never its value.
56
+ */
57
+ "x-audit"?: boolean;
87
58
  /** A map of additional properties for the user definition, where the key is
88
59
  the property name and the value is the property schema.
89
60
  */
@@ -28,7 +28,7 @@ export type CreateSession201Session = {
28
28
  /** @pattern ^[a-zA-Z0-9_-]+$ */
29
29
  project_id: string;
30
30
  /** Current lifecycle state of the session:
31
- - `building`: has a user factor but is still gathering authentication factors
31
+ - `building`: no verified authentication factors yet
32
32
  - `active`: has at least one verified authentication factor; `assurance_levels[]` may shrink as factors age
33
33
  - `expired`: TTL elapsed
34
34
  */
@@ -8,7 +8,7 @@
8
8
 
9
9
  /**
10
10
  * Current lifecycle state of the session:
11
- - `building`: has a user factor but is still gathering authentication factors
11
+ - `building`: no verified authentication factors yet
12
12
  - `active`: has at least one verified authentication factor; `assurance_levels[]` may shrink as factors age
13
13
  - `expired`: TTL elapsed
14
14
 
@@ -37,6 +37,16 @@ export type CreateSessionDefault =
37
37
  } & {
38
38
  code: "enc_key.not_found";
39
39
  })
40
+ | ({
41
+ /** Stable machine-readable error code. */
42
+ code: string;
43
+ /** Human-readable explanation of the error. */
44
+ message: string;
45
+ /** Additional error-specific context. */
46
+ details?: { [key: string]: unknown };
47
+ } & {
48
+ code: "evt.invalid";
49
+ })
40
50
  | ({
41
51
  /** Stable machine-readable error code. */
42
52
  code: string;
@@ -57,6 +67,16 @@ export type CreateSessionDefault =
57
67
  } & {
58
68
  code: "tkn.invalid";
59
69
  })
70
+ | ({
71
+ /** Stable machine-readable error code. */
72
+ code: string;
73
+ /** Human-readable explanation of the error. */
74
+ message: string;
75
+ /** Additional error-specific context. */
76
+ details?: { [key: string]: unknown };
77
+ } & {
78
+ code: "tkn.invalid_tknid";
79
+ })
60
80
  | ({
61
81
  /** Stable machine-readable error code. */
62
82
  code: string;
@@ -5,14 +5,34 @@
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 { CreateUser201Attributes } from "./createUser201Attributes";
9
+ import type { CreateUser201Metadata } from "./createUser201Metadata";
8
10
 
9
11
  /**
10
- * The content of this response is determined by the configured
11
- schema for users.
12
+ * A user represents an individual identity in the system. It can be used to
13
+ represent a human user, but also a service account or any other type of
14
+ identity.
15
+
16
+ `attributes` is the document that satisfies the user schema named by
17
+ `schema`: its property names and types are defined entirely by that schema,
18
+ and it is what the schema validates. The rest of the object — `id`,
19
+ `schema`, `metadata` — is the server-owned envelope. Keeping the two apart
20
+ means a schema may name a property `id` or `metadata` without colliding with
21
+ the envelope, and closed-world keywords (`additionalProperties: false`,
22
+ `propertyNames`, `unevaluatedProperties`) behave as their author expects.
12
23
 
13
24
  */
14
25
  export type CreateUser201 = {
15
- /** The unique identifier of the created user. */
26
+ /** @pattern ^user_[a-zA-Z0-9_-]+$ */
16
27
  id: string;
17
- [key: string]: unknown;
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: CreateUser201Attributes;
37
+ metadata: CreateUser201Metadata;
18
38
  };
@@ -0,0 +1,14 @@
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 user's content, satisfying the schema named by `schema`. Property
11
+ names and types are determined entirely by that schema.
12
+
13
+ */
14
+ export type CreateUser201Attributes = { [key: string]: unknown };
@@ -5,15 +5,15 @@
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 { CreateUserBodyMetadataStatus } from "./createUserBodyMetadataStatus";
8
+ import type { CreateUser201MetadataStatus } from "./createUser201MetadataStatus";
9
9
 
10
- export type CreateUserBodyMetadata = {
10
+ export type CreateUser201Metadata = {
11
11
  /** The time when the user was created. */
12
12
  created_at: string;
13
13
  /** The time when the user was last updated. */
14
14
  updated_at: string;
15
15
  /** The status of the user. */
16
- status: CreateUserBodyMetadataStatus;
16
+ status: CreateUser201MetadataStatus;
17
17
  /** The team that owns this user's identity lifecycle, or `null` when the
18
18
  user is self-owned. This is a single team and a different concept from
19
19
  the user's team roster: it decides who may deprovision the user, not
@@ -9,10 +9,10 @@
9
9
  /**
10
10
  * The status of the user.
11
11
  */
12
- export type CreateUserBodyMetadataStatus =
13
- (typeof CreateUserBodyMetadataStatus)[keyof typeof CreateUserBodyMetadataStatus];
12
+ export type CreateUser201MetadataStatus =
13
+ (typeof CreateUser201MetadataStatus)[keyof typeof CreateUser201MetadataStatus];
14
14
 
15
- export const CreateUserBodyMetadataStatus = {
15
+ export const CreateUser201MetadataStatus = {
16
16
  active: "active",
17
17
  suspended: "suspended",
18
18
  deactivated: "deactivated",
@@ -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 { CreateUser500Details } from "./createUser500Details";
9
+
10
+ /**
11
+ * Standard error payload returned for failed API requests.
12
+ */
13
+ export type CreateUser500 = {
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?: CreateUser500Details;
20
+ };
@@ -6,10 +6,7 @@
6
6
  * OpenAPI spec version: 0.0.1
7
7
  */
8
8
 
9
- export type DeleteTeamParams = {
10
- /**
11
- * The unique identifier of the project
12
- * @pattern ^[a-zA-Z0-9_-]+$
13
- */
14
- project_id: string;
15
- };
9
+ /**
10
+ * Additional error-specific context.
11
+ */
12
+ export type CreateUser500Details = { [key: string]: unknown };
@@ -5,21 +5,32 @@
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 { CreateUserBodyMetadata } from "./createUserBodyMetadata";
8
+ import type { CreateUserBodyAttributes } from "./createUserBodyAttributes";
9
9
 
10
10
  /**
11
- * A user represents an individual identity in the system. It can be used to
12
- represent a human user, but also a service account or any other type of
13
- identity. The content of a user is determined by the configured schema for
14
- users, this is only a base schema.
11
+ * `attributes` is the document that must satisfy the user schema named by
12
+ `schema`.
15
13
 
16
- The server assigns the resource primary key (`id`) on create. Clients must
17
- not send `id` in the create body; it is returned in the create response.
14
+ The resource primary key is server-assigned and returned in the response, so
15
+ the request carries no `id`; `metadata` is server-owned for the same reason.
16
+ Neither is part of this schema, which is what frees a user schema to declare
17
+ properties of those names.
18
+
19
+ A request carrying any other top-level property is rejected rather than
20
+ ignored. `attributes` stays open, since the user schema is what determines
21
+ what belongs in it.
18
22
 
19
23
  */
20
24
  export type CreateUserBody = {
21
- /** @pattern ^user_[a-zA-Z0-9_-]+$ */
22
- id?: string;
23
- metadata?: CreateUserBodyMetadata;
24
- [key: string]: unknown;
25
+ /**
26
+ * The schema that defines the content of `attributes`. These schemas can be
27
+ created using the `/schemas` endpoint. A default schema is provided.
28
+
29
+ * @minLength 1
30
+ */
31
+ schema: string;
32
+ /** The user's schema-defined content. Validated against `schema`; a
33
+ property the schema does not permit is rejected with `user.invalid`.
34
+ */
35
+ attributes: CreateUserBodyAttributes;
25
36
  };
@@ -0,0 +1,14 @@
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 user's schema-defined content. Validated against `schema`; a
11
+ property the schema does not permit is rejected with `user.invalid`.
12
+
13
+ */
14
+ export type CreateUserBodyAttributes = { [key: string]: unknown };
@@ -17,6 +17,16 @@ export type CreateUserDefault =
17
17
  } & {
18
18
  code: "auth.unauthorized";
19
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: "evt.invalid";
29
+ })
20
30
  | ({
21
31
  /** Stable machine-readable error code. */
22
32
  code: string;
@@ -17,6 +17,16 @@ export type DeleteFlowDefinitionDefault =
17
17
  } & {
18
18
  code: "auth.unauthorized";
19
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: "evt.invalid";
29
+ })
20
30
  | ({
21
31
  /** Stable machine-readable error code. */
22
32
  code: string;
@@ -17,6 +17,16 @@ export type DeleteUserByIDDefault =
17
17
  } & {
18
18
  code: "auth.unauthorized";
19
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: "evt.invalid";
29
+ })
20
30
  | ({
21
31
  /** Stable machine-readable error code. */
22
32
  code: string;
@@ -28,7 +28,7 @@ export type ExchangeHandoff200Session = {
28
28
  /** @pattern ^[a-zA-Z0-9_-]+$ */
29
29
  project_id: string;
30
30
  /** Current lifecycle state of the session:
31
- - `building`: has a user factor but is still gathering authentication factors
31
+ - `building`: no verified authentication factors yet
32
32
  - `active`: has at least one verified authentication factor; `assurance_levels[]` may shrink as factors age
33
33
  - `expired`: TTL elapsed
34
34
  */
@@ -8,7 +8,7 @@
8
8
 
9
9
  /**
10
10
  * Current lifecycle state of the session:
11
- - `building`: has a user factor but is still gathering authentication factors
11
+ - `building`: no verified authentication factors yet
12
12
  - `active`: has at least one verified authentication factor; `assurance_levels[]` may shrink as factors age
13
13
  - `expired`: TTL elapsed
14
14
 
@@ -47,6 +47,16 @@ export type ExchangeHandoffDefault =
47
47
  } & {
48
48
  code: "enc_key.not_found";
49
49
  })
50
+ | ({
51
+ /** Stable machine-readable error code. */
52
+ code: string;
53
+ /** Human-readable explanation of the error. */
54
+ message: string;
55
+ /** Additional error-specific context. */
56
+ details?: { [key: string]: unknown };
57
+ } & {
58
+ code: "evt.invalid";
59
+ })
50
60
  | ({
51
61
  /** Stable machine-readable error code. */
52
62
  code: string;