@zitadel/api 0.2.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -3
- package/dist/api-factory-C5b1Gqwv.mjs +357 -0
- package/dist/api-factory-C5b1Gqwv.mjs.map +1 -0
- package/dist/api-factory-Dt5lUjyu.d.mts +212 -0
- package/dist/api-factory-Dt5lUjyu.d.mts.map +1 -0
- package/dist/{fetch-CtYe0OvX.d.mts → fetch-B-lgjlrf.d.mts} +22 -12
- package/dist/fetch-B-lgjlrf.d.mts.map +1 -0
- package/dist/generated/endpoints/zitadelNextGen.d.mts +2 -2
- package/dist/generated/endpoints/zitadelNextGen.mjs +192 -124
- package/dist/generated/endpoints/zitadelNextGen.mjs.map +1 -1
- package/dist/generated/endpoints/zitadelNextGen.msw.d.mts +3 -1
- package/dist/generated/endpoints/zitadelNextGen.msw.d.mts.map +1 -1
- package/dist/generated/endpoints/zitadelNextGen.msw.mjs +40 -7
- package/dist/generated/endpoints/zitadelNextGen.msw.mjs.map +1 -1
- package/dist/generated/endpoints/zitadelNextGen.zod.d.mts +104 -28
- package/dist/generated/endpoints/zitadelNextGen.zod.d.mts.map +1 -1
- package/dist/generated/endpoints/zitadelNextGen.zod.mjs +117 -37
- package/dist/generated/endpoints/zitadelNextGen.zod.mjs.map +1 -1
- package/dist/generated/model/index.d.mts +2 -2
- package/dist/generated/model/index.mjs +5 -1
- package/dist/generated/model/index.mjs.map +1 -1
- package/dist/generated/operations.mjs +22 -1
- package/dist/generated/operations.mjs.map +1 -1
- package/dist/{index-D7-l5LV6.d.mts → index-DGQY1rfH.d.mts} +398 -10
- package/dist/index-DGQY1rfH.d.mts.map +1 -0
- package/dist/runtime/api-factory.d.mts +2 -51
- package/dist/runtime/api-factory.mjs +3 -62
- package/dist/runtime/auth.mjs +1 -1
- package/dist/runtime/auth.mjs.map +1 -1
- package/dist/runtime/base-url.d.mts +14 -0
- package/dist/runtime/base-url.d.mts.map +1 -1
- package/dist/runtime/base-url.mjs +22 -1
- package/dist/runtime/base-url.mjs.map +1 -1
- package/dist/runtime/config.d.mts +1 -1
- package/dist/runtime/config.mjs +1 -1
- package/dist/runtime/fetch.d.mts +2 -2
- package/dist/runtime/fetch.mjs +41 -17
- package/dist/runtime/fetch.mjs.map +1 -1
- package/dist/runtime/paging.d.mts +35 -0
- package/dist/runtime/paging.d.mts.map +1 -0
- package/dist/runtime/paging.mjs +38 -0
- package/dist/runtime/paging.mjs.map +1 -0
- package/dist/{zitadelNextGen-Cw3DrCn1.d.mts → zitadelNextGen-BVO4sdKD.d.mts} +69 -34
- package/dist/zitadelNextGen-BVO4sdKD.d.mts.map +1 -0
- package/package.json +7 -1
- package/src/generated/endpoints/zitadelNextGen.faker.ts +9 -6
- package/src/generated/endpoints/zitadelNextGen.msw.ts +16 -1
- package/src/generated/endpoints/zitadelNextGen.ts +212 -125
- package/src/generated/endpoints/zitadelNextGen.zod.ts +120 -36
- package/src/generated/model/createFlowDefinition201UserSchemaMetadata.ts +5 -0
- package/src/generated/model/deleteUserByID409.ts +20 -0
- package/src/generated/model/deleteUserByID409Details.ts +12 -0
- package/src/generated/model/deleteUserByIDDefault.ts +9 -0
- package/src/generated/model/evaluatePolicy200.ts +30 -0
- package/src/generated/model/evaluatePolicy200Violations.ts +14 -0
- package/src/generated/model/evaluatePolicyBody.ts +82 -0
- package/src/generated/model/evaluatePolicyDefault.ts +90 -0
- package/src/generated/model/evaluatePolicyParams.ts +15 -0
- package/src/generated/model/getFlowDefinition200UserSchemaMetadata.ts +5 -0
- package/src/generated/model/getFlowStepDefault.ts +9 -0
- package/src/generated/model/getMyUserSchema200Metadata.ts +5 -0
- package/src/generated/model/getSchemaById200Metadata.ts +5 -0
- package/src/generated/model/index.ts +8 -0
- package/src/generated/model/listFlowDefinitions200FlowDefinitionsItemUserSchemaMetadata.ts +5 -0
- package/src/generated/model/listSchemas200SchemasItemMetadata.ts +5 -0
- package/src/generated/model/listSchemasExpandItem.ts +28 -0
- package/src/generated/model/listSchemasParams.ts +5 -0
- package/src/generated/model/queryTeamsParams.ts +3 -2
- package/src/generated/model/queryUsersBodyFilterItem.ts +11 -3
- package/src/generated/model/queryUsersBodyFilterItemField.ts +12 -3
- package/src/generated/model/submitFlowStepDefault.ts +9 -0
- package/src/generated/operations.ts +24 -1
- package/src/generated/paging.ts +128 -0
- package/src/runtime/api-factory.spec.ts +278 -0
- package/src/runtime/api-factory.ts +93 -12
- package/src/runtime/auth.ts +1 -1
- package/src/runtime/base-url.spec.ts +40 -4
- package/src/runtime/base-url.ts +28 -0
- package/src/runtime/fetch.spec.ts +51 -0
- package/src/runtime/fetch.ts +69 -30
- package/src/runtime/paged.spec.ts +104 -0
- package/src/runtime/paged.ts +61 -0
- package/src/runtime/paging.spec.ts +94 -0
- package/src/runtime/paging.ts +58 -0
- package/dist/fetch-CtYe0OvX.d.mts.map +0 -1
- package/dist/index-D7-l5LV6.d.mts.map +0 -1
- package/dist/runtime/api-factory.d.mts.map +0 -1
- package/dist/runtime/api-factory.mjs.map +0 -1
- package/dist/zitadelNextGen-Cw3DrCn1.d.mts.map +0 -1
|
@@ -11,9 +11,10 @@ import * as zod from 'zod';
|
|
|
11
11
|
/**
|
|
12
12
|
* Answers `ok` while the server process serves HTTP, and checks nothing behind it.
|
|
13
13
|
*
|
|
14
|
-
* Point a liveness probe
|
|
15
|
-
*
|
|
16
|
-
* instance
|
|
14
|
+
* Point a liveness probe at `/livez` at the root, where the probes stay,
|
|
15
|
+
* not under `/api/v1`. It never checks the database, so an outage of the
|
|
16
|
+
* database does not restart every instance; `GET /readyz` takes an instance
|
|
17
|
+
* out of rotation instead.
|
|
17
18
|
* @summary Check server liveness
|
|
18
19
|
*/
|
|
19
20
|
export const GetLiveResponse = zod.string()
|
|
@@ -22,9 +23,9 @@ export const GetLiveResponse = zod.string()
|
|
|
22
23
|
/**
|
|
23
24
|
* Answers whether the server can serve requests, which takes its database answering within a second.
|
|
24
25
|
*
|
|
25
|
-
* Point a readiness probe
|
|
26
|
-
*
|
|
27
|
-
* database.
|
|
26
|
+
* Point a readiness probe at `/readyz` at the root, where the probes stay,
|
|
27
|
+
* not under `/api/v1`, so that a server whose database does not answer gets
|
|
28
|
+
* no requests until it does. The check is one round trip to the database.
|
|
28
29
|
* @summary Check server readiness
|
|
29
30
|
*/
|
|
30
31
|
export const GetReadyResponse = zod.string()
|
|
@@ -96,8 +97,8 @@ export const CreateUserResponse = zod.object({
|
|
|
96
97
|
* project is listed.
|
|
97
98
|
*
|
|
98
99
|
* Accepts either a project secret (`oauth2`) or a user-bound Console
|
|
99
|
-
* session cookie (`
|
|
100
|
-
* follow the scheme's CSRF rules (`
|
|
100
|
+
* session cookie (`sessionCookie`). Cookie-authenticated requests
|
|
101
|
+
* follow the scheme's CSRF rules (`sessionCookie`).
|
|
101
102
|
* @summary Query users
|
|
102
103
|
*/
|
|
103
104
|
export const queryUsersQueryProjectIdRegExp = new RegExp('^[a-zA-Z0-9_-]+$');
|
|
@@ -121,7 +122,7 @@ export const QueryUsersBody = zod.object({
|
|
|
121
122
|
"direction": zod.enum(['asc', 'desc'])
|
|
122
123
|
}).optional(),
|
|
123
124
|
"filter": zod.array(zod.object({
|
|
124
|
-
"field": zod.enum(['created_at', 'id', 'schema', 'status', 'team_id', 'lifecycle_owner_team_id']).describe('Field to filter users by:\n- `created_at`: RFC3339 timestamp\n- `id`: user id\n- `schema`: the schema the user\'s attributes satisfy, matched against the\n value the user carries as `schema`\n- `status`: one of `active`, `suspended`, `deactivated`, `pending_purge`\n- `team_id`: restricts the result to users holding an **active** membership\n in that team. A user who has been invited but has not accepted does not\n match. `equals` is the only operation, and the field may be given once —\n this names one team, not a set.\n- `lifecycle_owner_team_id`: the team that owns the user\'s identity\n lifecycle. The column is nullable for self-owned users, and a null filter\n value is rejected, so self-owned users cannot be selected by this field.\n\n**The two team fields answer different questions.** `team_id` is membership:\nwhich team the user collaborates in, readable per user at\n`GET /users/{user_id}/teams`. `lifecycle_owner_team_id` is ownership: which\nteam may deprovision the user. A user can belong to many teams while owning\ntheir own lifecycle, so the two disagree often and neither implies the other\n(ADR 024).\n\n`team_id`
|
|
125
|
+
"field": zod.enum(['created_at', 'id', 'schema', 'schema_object_type', 'status', 'team_id', 'lifecycle_owner_team_id']).describe('Field to filter users by:\n- `created_at`: RFC3339 timestamp\n- `id`: user id\n- `schema`: the schema the user\'s attributes satisfy, matched against the\n value the user carries as `schema`. Each revision of a schema has its own\n URL, so `equals` selects the users on one revision and `not_equals` the\n users on any other.\n- `schema_object_type`: the `object_type` of the user\'s schema, which every\n revision of that schema shares. It may be repeated, like any field: give\n `not_equals` once per object type to exclude several. A schema without an\n object type reads as `""`, so `not_equals` matches its users and `equals`\n `""` selects them. Combine `equals` here with `schema` `not_equals` the\n newest revision to find the users still on an older one.\n- `status`: one of `active`, `suspended`, `deactivated`, `pending_purge`\n- `team_id`: restricts the result to users holding an **active** membership\n in that team. A user who has been invited but has not accepted does not\n match. `equals` is the only operation, and the field may be given once —\n this names one team, not a set.\n- `lifecycle_owner_team_id`: the team that owns the user\'s identity\n lifecycle. The column is nullable for self-owned users, and a null filter\n value is rejected, so self-owned users cannot be selected by this field.\n\n**The two team fields answer different questions.** `team_id` is membership:\nwhich team the user collaborates in, readable per user at\n`GET /users/{user_id}/teams`. `lifecycle_owner_team_id` is ownership: which\nteam may deprovision the user. A user can belong to many teams while owning\ntheir own lifecycle, so the two disagree often and neither implies the other\n(ADR 024).\n\n`team_id` and `schema_object_type` are filterable but not sortable: neither\nis a column on the user, so both are absent from the sort-field enum.\n\nFiltering on `team_id` requires `team_membership.read` in addition to\n`user.read`: it reads the same memberships that `expand: ["teams"]` embeds.\nA Console session, which carries no scopes, may filter on it when it may read\nthe whole project (the `viewer` role or above); with a grant covering only\npart of the project the filter is refused with `403 user.permission_denied`.\n'),
|
|
125
126
|
"value": zod.union([zod.string(),zod.number(),zod.boolean(),zod.null()]).optional().describe('Filter-value specifies which values can be filtered by a query endpoint. This\nis a union of types. When a value is specified which is not assignable to the\nfield which is being filtered, a 400 error will be returned.\n'),
|
|
126
127
|
"operation": zod.enum(['equals', 'not_equals', 'contains', 'not_contains', 'less_than', 'less_than_or_equal', 'greater_than', 'greater_than_or_equal']).describe('Filter operation defines the operations which can be used when filtering on a\nquery endpoint.\n\nOn text fields, `contains` is a case-insensitive substring match. `equals`\ncompares the whole value and is case-sensitive unless the field documents\notherwise.\n')
|
|
127
128
|
})).optional().describe('Filter criteria for querying users. Criteria are combined with AND.')
|
|
@@ -276,11 +277,15 @@ export const PatchUserByIDResponse = zod.object({
|
|
|
276
277
|
|
|
277
278
|
|
|
278
279
|
/**
|
|
279
|
-
* Deletes a user
|
|
280
|
+
* Deletes a user, removes them from every team they belong to, and revokes
|
|
281
|
+
* every grant they hold, on any project.
|
|
280
282
|
*
|
|
281
|
-
* The user is removed, not deactivated, and the deletion emits `user.deleted
|
|
283
|
+
* The user is removed, not deactivated, and the deletion emits `user.deleted`,
|
|
284
|
+
* plus `authz.revoked` for each grant on that grant's project.
|
|
282
285
|
* With a project secret the request is idempotent: deleting a user that exists
|
|
283
|
-
* in no project succeeds without changing anything.
|
|
286
|
+
* in no project succeeds without changing anything. Deleting the last active
|
|
287
|
+
* member of a project's owning team returns 409 `proj.last_owner` and changes
|
|
288
|
+
* nothing.
|
|
284
289
|
* @summary Delete user by ID
|
|
285
290
|
*/
|
|
286
291
|
export const deleteUserByIDPathUserIdRegExp = new RegExp('^user_[a-zA-Z0-9_-]+$');
|
|
@@ -808,7 +813,8 @@ export const GetMyUserSchemaResponse = zod.object({
|
|
|
808
813
|
}).describe('The meta-schema one property of a customer\'s user schema is validated\nagainst. The generated `user-property.json` adds\n`allOf: [{$ref: draft-2020-12}]`, which cannot live here because code\ngenerators choke on it.\n\nNative JSON Schema keywords such as `type`, `format`, `title` and `writeOnly`\nare accepted without being listed below. `writeOnly: true` is reserved for a\nvalue that may be written but is never returned by the read API; nothing\nenforces it today, so responses still include write-only properties.\n')).optional().describe('A map of additional properties for the user definition, where the\nkey is the property name and the value is the property schema\n')
|
|
809
814
|
}).describe('The meta-schema a customer\'s user schema document is validated against.\nThe generated `user-schema.json` adds `allOf: [{$ref: draft-2020-12}]`,\nwhich cannot live here because code generators choke on it.\n').describe('The customer-authored JSON Schema document, served verbatim.'),
|
|
810
815
|
"metadata": zod.object({
|
|
811
|
-
"created_at": zod.iso.datetime({"offset":true}).describe('The time when the schema was created.')
|
|
816
|
+
"created_at": zod.iso.datetime({"offset":true}).describe('The time when the schema was created.'),
|
|
817
|
+
"in_use": zod.boolean().optional().describe('Whether any user of the project is on this revision. Only set when\n`GET /schemas` is asked for it with `expand=in_use`; omitted otherwise.\n')
|
|
812
818
|
})
|
|
813
819
|
}).describe('A schema resource: the server-owned envelope around a customer-authored\nJSON Schema document.\n\n`schema` is the customer-authored document, served verbatim: its keys and\ncontents are defined entirely by its author. The rest of the object — `id`,\n`metadata` — is the server-owned envelope. Keeping the two apart means the\ndocument may declare any property (including `id` or `metadata`) without\ncolliding with the envelope, and the resource `id` stays distinguishable\nfrom the document\'s own `$id`.\n')
|
|
814
820
|
|
|
@@ -2326,7 +2332,7 @@ export const PatchProjectResponse = zod.object({
|
|
|
2326
2332
|
* Ordered by `user_id` and paginated with `page_token`.
|
|
2327
2333
|
*
|
|
2328
2334
|
* Accepts either a project secret (`oauth2`) or a user-bound Console
|
|
2329
|
-
* session cookie (`
|
|
2335
|
+
* session cookie (`sessionCookie`) that can read the project.
|
|
2330
2336
|
* @summary List project admins
|
|
2331
2337
|
*/
|
|
2332
2338
|
export const listProjectAdminsPathProjectIdRegExp = new RegExp('^[a-zA-Z0-9_-]+$');
|
|
@@ -2442,7 +2448,7 @@ export const GetClaimStatusResponse = zod.union([zod.object({
|
|
|
2442
2448
|
|
|
2443
2449
|
/**
|
|
2444
2450
|
* Called by the browser after the developer authenticates on the claim page.
|
|
2445
|
-
* Authenticated by the
|
|
2451
|
+
* Authenticated by the session cookie, it attaches the project to
|
|
2446
2452
|
* the developer's personal team using the `challenge_id` from the claim URL as
|
|
2447
2453
|
* its single-use, browser-safe authorization.
|
|
2448
2454
|
* @summary Complete a project claim
|
|
@@ -2630,8 +2636,9 @@ export const RemovePreviewResponse = zod.void()
|
|
|
2630
2636
|
* Creating a session is an app-plane operation on the project credential
|
|
2631
2637
|
* (`session.write`). The returned `session_token` is a session credential for the
|
|
2632
2638
|
* end-user client, not a management scope: it is delivered as the
|
|
2633
|
-
* `
|
|
2634
|
-
*
|
|
2639
|
+
* `__Host-zitadel_session` cookie (`zitadel_session` over plain http to a
|
|
2640
|
+
* loopback host) and authorises the self-service operations
|
|
2641
|
+
* `GET /sessions/me` and `DELETE /sessions/me` (`sessionCookie` scheme). The
|
|
2635
2642
|
* by-id operations `GET /sessions/{session_id}` and `DELETE /sessions/{session_id}`
|
|
2636
2643
|
* are operator endpoints and require `session.read` / `session.delete` instead.
|
|
2637
2644
|
*
|
|
@@ -2941,8 +2948,8 @@ export const GetSessionResponse = zod.object({
|
|
|
2941
2948
|
* Permanently deletes the session, terminating it immediately.
|
|
2942
2949
|
*
|
|
2943
2950
|
* This is the operator revoke path and requires the `session.delete` scope on a
|
|
2944
|
-
* project-bound credential. End-user logout with the
|
|
2945
|
-
* `DELETE /sessions/me` (`
|
|
2951
|
+
* project-bound credential. End-user logout with the session cookie is
|
|
2952
|
+
* `DELETE /sessions/me` (`sessionCookie` scheme).
|
|
2946
2953
|
*
|
|
2947
2954
|
* Idempotent: deleting a session that does not exist (or was already deleted)
|
|
2948
2955
|
* still returns 204. After deletion, any tokens derived from the session are
|
|
@@ -3026,7 +3033,7 @@ export const GetMySessionResponse = zod.object({
|
|
|
3026
3033
|
/**
|
|
3027
3034
|
* Logs out by permanently deleting the session.
|
|
3028
3035
|
*
|
|
3029
|
-
* The
|
|
3036
|
+
* The session cookie issued at creation (or superseded by a handoff
|
|
3030
3037
|
* exchange) is required, with the session's token from `GET /sessions/me/csrf`
|
|
3031
3038
|
* in the `X-Zitadel-CSRF` header. Idempotent: if the session is already gone
|
|
3032
3039
|
* this still returns 204. Any tokens derived from the session are invalidated,
|
|
@@ -3050,7 +3057,7 @@ export const RevokeMySessionResponse = zod.void()
|
|
|
3050
3057
|
* Returns the session-bound token for cross-site request forgery protection
|
|
3051
3058
|
* (ADR 053 §5). Browser code sends it in the `X-Zitadel-CSRF` header on the
|
|
3052
3059
|
* state-changing requests the session cookie authenticates that require it
|
|
3053
|
-
* — see the `
|
|
3060
|
+
* — see the `sessionCookie` scheme. It authorizes nothing on its own: the
|
|
3054
3061
|
* HttpOnly cookie is still the credential, and a cross-site page cannot
|
|
3055
3062
|
* read this response. It stays the same for the life of the session, so a
|
|
3056
3063
|
* client fetches it once per session.
|
|
@@ -3165,7 +3172,8 @@ export const ListSchemasQueryParams = zod.strictObject({
|
|
|
3165
3172
|
"page_token": zod.string().optional().describe('Token for fetching the next page of results.\nObtain this value from `next_page_token` in the previous response.\nOmit to start from the beginning.\nIts format is opaque and may change between releases.\n'),
|
|
3166
3173
|
"object_type": zod.string().max(listSchemasQueryObjectTypeMax).optional().describe('The type of object of the schema to filter by.'),
|
|
3167
3174
|
"revisions": zod.enum(['all', 'latest']).default(listSchemasQueryRevisionsDefault).describe('Which revisions to return. Schemas are immutable and versioned by URL,\nso editing one mints a new row sharing its `objectType`.\n\n`all` (the default) returns every revision — the full history an\nexport, an audit or a GitOps diff needs. `latest` returns the newest\nrevision of each `objectType`, which is one row per schema.\n\nA schema stored without an `objectType` is a revision of nothing, and\nis returned by both.\n\nA `page_token` is bound to the mode it was issued in and is rejected by\nthe other.\n'),
|
|
3168
|
-
"kind": zod.enum(['user-schema']).optional().describe('The kind of schema to filter by, read from the stored document\'s\n`kind` property.\n\n`schema-url` is not a kind: it discriminates the create request body,\nnot a stored schema. A schema registered by URL is stored as whatever\ndocument the URL served, and declares its own kind.\n\nA schema stored without its document being parsed has no kind that\ncould be read, and is excluded from every filtered result.\n')
|
|
3175
|
+
"kind": zod.enum(['user-schema']).optional().describe('The kind of schema to filter by, read from the stored document\'s\n`kind` property.\n\n`schema-url` is not a kind: it discriminates the create request body,\nnot a stored schema. A schema registered by URL is stored as whatever\ndocument the URL served, and declares its own kind.\n\nA schema stored without its document being parsed has no kind that\ncould be read, and is excluded from every filtered result.\n'),
|
|
3176
|
+
"expand": zod.array(zod.enum(['in_use']).describe('Extra fields to add onto each returned schema (ADR 059).\n\n- `in_use`: whether any user of the project is on this revision, as\n `metadata.in_use`. A revision in use cannot be deleted, and the users on it\n are found with `POST /users/query` filtering on `schema`. The property is\n omitted entirely when not requested, so "did not ask" is distinguishable\n from `false`.\n\n The flag counts every user of the project, not only those the caller may\n list, so it requires read on the whole project, and for a token also\n `user.read` in addition to `schema.read`. A caller without them is refused\n with `403`.\n')).optional().describe('Extra fields to add onto each returned schema.')
|
|
3169
3177
|
})
|
|
3170
3178
|
|
|
3171
3179
|
export const listSchemasResponseSchemasItemSchemaOneObjectTypeMax = 256;
|
|
@@ -3217,7 +3225,8 @@ export const ListSchemasResponse = zod.object({
|
|
|
3217
3225
|
}).describe('The meta-schema one property of a customer\'s user schema is validated\nagainst. The generated `user-property.json` adds\n`allOf: [{$ref: draft-2020-12}]`, which cannot live here because code\ngenerators choke on it.\n\nNative JSON Schema keywords such as `type`, `format`, `title` and `writeOnly`\nare accepted without being listed below. `writeOnly: true` is reserved for a\nvalue that may be written but is never returned by the read API; nothing\nenforces it today, so responses still include write-only properties.\n')).optional().describe('A map of additional properties for the user definition, where the\nkey is the property name and the value is the property schema\n')
|
|
3218
3226
|
}).describe('The meta-schema a customer\'s user schema document is validated against.\nThe generated `user-schema.json` adds `allOf: [{$ref: draft-2020-12}]`,\nwhich cannot live here because code generators choke on it.\n').describe('The customer-authored JSON Schema document, served verbatim.'),
|
|
3219
3227
|
"metadata": zod.object({
|
|
3220
|
-
"created_at": zod.iso.datetime({"offset":true}).describe('The time when the schema was created.')
|
|
3228
|
+
"created_at": zod.iso.datetime({"offset":true}).describe('The time when the schema was created.'),
|
|
3229
|
+
"in_use": zod.boolean().optional().describe('Whether any user of the project is on this revision. Only set when\n`GET /schemas` is asked for it with `expand=in_use`; omitted otherwise.\n')
|
|
3221
3230
|
})
|
|
3222
3231
|
}).describe('A schema resource: the server-owned envelope around a customer-authored\nJSON Schema document.\n\n`schema` is the customer-authored document, served verbatim: its keys and\ncontents are defined entirely by its author. The rest of the object — `id`,\n`metadata` — is the server-owned envelope. Keeping the two apart means the\ndocument may declare any property (including `id` or `metadata`) without\ncolliding with the envelope, and the resource `id` stays distinguishable\nfrom the document\'s own `$id`.\n')),
|
|
3223
3232
|
"next_page_token": zod.union([zod.string(),zod.null()]).optional().describe('Token to pass as `page_token` in the next request to fetch the following page.\nAbsent when there are no more results.\n')
|
|
@@ -3298,7 +3307,8 @@ export const GetSchemaByIdResponse = zod.object({
|
|
|
3298
3307
|
}).describe('The meta-schema one property of a customer\'s user schema is validated\nagainst. The generated `user-property.json` adds\n`allOf: [{$ref: draft-2020-12}]`, which cannot live here because code\ngenerators choke on it.\n\nNative JSON Schema keywords such as `type`, `format`, `title` and `writeOnly`\nare accepted without being listed below. `writeOnly: true` is reserved for a\nvalue that may be written but is never returned by the read API; nothing\nenforces it today, so responses still include write-only properties.\n')).optional().describe('A map of additional properties for the user definition, where the\nkey is the property name and the value is the property schema\n')
|
|
3299
3308
|
}).describe('The meta-schema a customer\'s user schema document is validated against.\nThe generated `user-schema.json` adds `allOf: [{$ref: draft-2020-12}]`,\nwhich cannot live here because code generators choke on it.\n').describe('The customer-authored JSON Schema document, served verbatim.'),
|
|
3300
3309
|
"metadata": zod.object({
|
|
3301
|
-
"created_at": zod.iso.datetime({"offset":true}).describe('The time when the schema was created.')
|
|
3310
|
+
"created_at": zod.iso.datetime({"offset":true}).describe('The time when the schema was created.'),
|
|
3311
|
+
"in_use": zod.boolean().optional().describe('Whether any user of the project is on this revision. Only set when\n`GET /schemas` is asked for it with `expand=in_use`; omitted otherwise.\n')
|
|
3302
3312
|
})
|
|
3303
3313
|
}).describe('A schema resource: the server-owned envelope around a customer-authored\nJSON Schema document.\n\n`schema` is the customer-authored document, served verbatim: its keys and\ncontents are defined entirely by its author. The rest of the object — `id`,\n`metadata` — is the server-owned envelope. Keeping the two apart means the\ndocument may declare any property (including `id` or `metadata`) without\ncolliding with the envelope, and the resource `id` stays distinguishable\nfrom the document\'s own `$id`.\n')
|
|
3304
3314
|
|
|
@@ -3469,7 +3479,8 @@ export const CreateFlowDefinitionResponse = zod.object({
|
|
|
3469
3479
|
}).describe('The meta-schema one property of a customer\'s user schema is validated\nagainst. The generated `user-property.json` adds\n`allOf: [{$ref: draft-2020-12}]`, which cannot live here because code\ngenerators choke on it.\n\nNative JSON Schema keywords such as `type`, `format`, `title` and `writeOnly`\nare accepted without being listed below. `writeOnly: true` is reserved for a\nvalue that may be written but is never returned by the read API; nothing\nenforces it today, so responses still include write-only properties.\n')).optional().describe('A map of additional properties for the user definition, where the\nkey is the property name and the value is the property schema\n')
|
|
3470
3480
|
}).describe('The meta-schema a customer\'s user schema document is validated against.\nThe generated `user-schema.json` adds `allOf: [{$ref: draft-2020-12}]`,\nwhich cannot live here because code generators choke on it.\n').describe('The customer-authored JSON Schema document, served verbatim.'),
|
|
3471
3481
|
"metadata": zod.object({
|
|
3472
|
-
"created_at": zod.iso.datetime({"offset":true}).describe('The time when the schema was created.')
|
|
3482
|
+
"created_at": zod.iso.datetime({"offset":true}).describe('The time when the schema was created.'),
|
|
3483
|
+
"in_use": zod.boolean().optional().describe('Whether any user of the project is on this revision. Only set when\n`GET /schemas` is asked for it with `expand=in_use`; omitted otherwise.\n')
|
|
3473
3484
|
})
|
|
3474
3485
|
}).describe('A schema resource: the server-owned envelope around a customer-authored\nJSON Schema document.\n\n`schema` is the customer-authored document, served verbatim: its keys and\ncontents are defined entirely by its author. The rest of the object — `id`,\n`metadata` — is the server-owned envelope. Keeping the two apart means the\ndocument may declare any property (including `id` or `metadata`) without\ncolliding with the envelope, and the resource `id` stays distinguishable\nfrom the document\'s own `$id`.\n'),zod.null()]).optional().describe('The user schema this flow operates on: the same object\n`GET /schemas/{id}` returns. Present only when the request asked for it\nwith `expand=user_schema`; `null` when it was requested but the\nreferenced schema no longer resolves or the caller may not read it.\n'),
|
|
3475
3486
|
"created_at": zod.iso.datetime({"offset":true}),
|
|
@@ -3599,7 +3610,8 @@ export const ListFlowDefinitionsResponse = zod.object({
|
|
|
3599
3610
|
}).describe('The meta-schema one property of a customer\'s user schema is validated\nagainst. The generated `user-property.json` adds\n`allOf: [{$ref: draft-2020-12}]`, which cannot live here because code\ngenerators choke on it.\n\nNative JSON Schema keywords such as `type`, `format`, `title` and `writeOnly`\nare accepted without being listed below. `writeOnly: true` is reserved for a\nvalue that may be written but is never returned by the read API; nothing\nenforces it today, so responses still include write-only properties.\n')).optional().describe('A map of additional properties for the user definition, where the\nkey is the property name and the value is the property schema\n')
|
|
3600
3611
|
}).describe('The meta-schema a customer\'s user schema document is validated against.\nThe generated `user-schema.json` adds `allOf: [{$ref: draft-2020-12}]`,\nwhich cannot live here because code generators choke on it.\n').describe('The customer-authored JSON Schema document, served verbatim.'),
|
|
3601
3612
|
"metadata": zod.object({
|
|
3602
|
-
"created_at": zod.iso.datetime({"offset":true}).describe('The time when the schema was created.')
|
|
3613
|
+
"created_at": zod.iso.datetime({"offset":true}).describe('The time when the schema was created.'),
|
|
3614
|
+
"in_use": zod.boolean().optional().describe('Whether any user of the project is on this revision. Only set when\n`GET /schemas` is asked for it with `expand=in_use`; omitted otherwise.\n')
|
|
3603
3615
|
})
|
|
3604
3616
|
}).describe('A schema resource: the server-owned envelope around a customer-authored\nJSON Schema document.\n\n`schema` is the customer-authored document, served verbatim: its keys and\ncontents are defined entirely by its author. The rest of the object — `id`,\n`metadata` — is the server-owned envelope. Keeping the two apart means the\ndocument may declare any property (including `id` or `metadata`) without\ncolliding with the envelope, and the resource `id` stays distinguishable\nfrom the document\'s own `$id`.\n'),zod.null()]).optional().describe('The user schema this flow operates on: the same object\n`GET /schemas/{id}` returns. Present only when the request asked for it\nwith `expand=user_schema`; `null` when it was requested but the\nreferenced schema no longer resolves or the caller may not read it.\n'),
|
|
3605
3617
|
"created_at": zod.iso.datetime({"offset":true}),
|
|
@@ -3715,7 +3727,8 @@ export const GetFlowDefinitionResponse = zod.object({
|
|
|
3715
3727
|
}).describe('The meta-schema one property of a customer\'s user schema is validated\nagainst. The generated `user-property.json` adds\n`allOf: [{$ref: draft-2020-12}]`, which cannot live here because code\ngenerators choke on it.\n\nNative JSON Schema keywords such as `type`, `format`, `title` and `writeOnly`\nare accepted without being listed below. `writeOnly: true` is reserved for a\nvalue that may be written but is never returned by the read API; nothing\nenforces it today, so responses still include write-only properties.\n')).optional().describe('A map of additional properties for the user definition, where the\nkey is the property name and the value is the property schema\n')
|
|
3716
3728
|
}).describe('The meta-schema a customer\'s user schema document is validated against.\nThe generated `user-schema.json` adds `allOf: [{$ref: draft-2020-12}]`,\nwhich cannot live here because code generators choke on it.\n').describe('The customer-authored JSON Schema document, served verbatim.'),
|
|
3717
3729
|
"metadata": zod.object({
|
|
3718
|
-
"created_at": zod.iso.datetime({"offset":true}).describe('The time when the schema was created.')
|
|
3730
|
+
"created_at": zod.iso.datetime({"offset":true}).describe('The time when the schema was created.'),
|
|
3731
|
+
"in_use": zod.boolean().optional().describe('Whether any user of the project is on this revision. Only set when\n`GET /schemas` is asked for it with `expand=in_use`; omitted otherwise.\n')
|
|
3719
3732
|
})
|
|
3720
3733
|
}).describe('A schema resource: the server-owned envelope around a customer-authored\nJSON Schema document.\n\n`schema` is the customer-authored document, served verbatim: its keys and\ncontents are defined entirely by its author. The rest of the object — `id`,\n`metadata` — is the server-owned envelope. Keeping the two apart means the\ndocument may declare any property (including `id` or `metadata`) without\ncolliding with the envelope, and the resource `id` stays distinguishable\nfrom the document\'s own `$id`.\n'),zod.null()]).optional().describe('The user schema this flow operates on: the same object\n`GET /schemas/{id}` returns. Present only when the request asked for it\nwith `expand=user_schema`; `null` when it was requested but the\nreferenced schema no longer resolves or the caller may not read it.\n'),
|
|
3721
3734
|
"created_at": zod.iso.datetime({"offset":true}),
|
|
@@ -3756,13 +3769,16 @@ export const CreateTeamResponse = zod.object({
|
|
|
3756
3769
|
|
|
3757
3770
|
/**
|
|
3758
3771
|
* Returns the teams of a project, paginated with a cursor.
|
|
3772
|
+
*
|
|
3773
|
+
* `project_id` names the project to list; without it, the credential's own
|
|
3774
|
+
* project is listed.
|
|
3759
3775
|
* @summary Query teams
|
|
3760
3776
|
*/
|
|
3761
3777
|
export const queryTeamsQueryProjectIdRegExp = new RegExp('^[a-zA-Z0-9_-]+$');
|
|
3762
3778
|
|
|
3763
3779
|
|
|
3764
3780
|
export const QueryTeamsQueryParams = zod.strictObject({
|
|
3765
|
-
"project_id": zod.string().regex(queryTeamsQueryProjectIdRegExp).describe('The
|
|
3781
|
+
"project_id": zod.string().regex(queryTeamsQueryProjectIdRegExp).optional().describe('The project the request addresses. Omit it to address the credential\'s own\nproject.\n')
|
|
3766
3782
|
})
|
|
3767
3783
|
|
|
3768
3784
|
export const queryTeamsBodyLimitDefault = 20;
|
|
@@ -5093,6 +5109,74 @@ export const PublishPolicyResponse = zod.object({
|
|
|
5093
5109
|
}).describe('One revision of a project\'s `auth.factor.password.set` policy (ADR 066).\n`id` is shared by every revision of the operation\'s policy; `revision_id`\nnames this revision.\n').describe('One revision of a project\'s policy for an operation (ADR 066), typed by\n`operation`. `id` is shared by every revision of the operation\'s policy;\n`revision_id` names this revision.\n')
|
|
5094
5110
|
|
|
5095
5111
|
|
|
5112
|
+
/**
|
|
5113
|
+
* Evaluates a policy config against one request, without side effects, and
|
|
5114
|
+
* answers the decision the operation would reach. Nothing is read from or
|
|
5115
|
+
* written to the project: the config is the one in the body, checked
|
|
5116
|
+
* exactly as a publish checks it, so an invalid config answers `pol.invalid`
|
|
5117
|
+
* with the same violations.
|
|
5118
|
+
*
|
|
5119
|
+
* `input` is what the operation's request carries, in the operation's own
|
|
5120
|
+
* terms (a password, not its length): the server derives what the policy
|
|
5121
|
+
* checks with the code the live operation runs, guards included. `facts`
|
|
5122
|
+
* states what the operation would look up at runtime, such as whether the
|
|
5123
|
+
* candidate matches one of the user's kept passwords.
|
|
5124
|
+
*
|
|
5125
|
+
* The decision and the names of the failed rules hold wherever the
|
|
5126
|
+
* operation runs. `code` and `violations` are what an API call answers; a
|
|
5127
|
+
* login flow shows the same rules as field errors on the password field
|
|
5128
|
+
* (`error.x-auth-methods#password_<rule>` in `step.error`).
|
|
5129
|
+
*
|
|
5130
|
+
* Which policy a project or release applies is not decided here: read it
|
|
5131
|
+
* and pass its config.
|
|
5132
|
+
*
|
|
5133
|
+
* The caller needs read access to the project in `project_id`.
|
|
5134
|
+
* @summary Evaluate a policy
|
|
5135
|
+
*/
|
|
5136
|
+
export const evaluatePolicyQueryProjectIdRegExp = new RegExp('^[a-zA-Z0-9_-]+$');
|
|
5137
|
+
|
|
5138
|
+
|
|
5139
|
+
export const EvaluatePolicyQueryParams = zod.strictObject({
|
|
5140
|
+
"project_id": zod.string().regex(evaluatePolicyQueryProjectIdRegExp).describe('The unique identifier of the project')
|
|
5141
|
+
})
|
|
5142
|
+
|
|
5143
|
+
export const evaluatePolicyBodyOneConfigMinLengthMax = 64;
|
|
5144
|
+
|
|
5145
|
+
export const evaluatePolicyBodyOneConfigMaxLengthMax = 64;
|
|
5146
|
+
|
|
5147
|
+
export const evaluatePolicyBodyOneConfigHistoryDepthMax = 4;
|
|
5148
|
+
|
|
5149
|
+
export const evaluatePolicyBodyOneInputPasswordMax = 4096;
|
|
5150
|
+
|
|
5151
|
+
export const evaluatePolicyBodyOneFactsSelfServiceDefault = true;
|
|
5152
|
+
export const evaluatePolicyBodyOneFactsHistoryMatchesDefault = [];
|
|
5153
|
+
export const evaluatePolicyBodyOneFactsHistoryMatchesMax = 4;
|
|
5154
|
+
|
|
5155
|
+
|
|
5156
|
+
|
|
5157
|
+
export const EvaluatePolicyBody = zod.object({
|
|
5158
|
+
"operation": zod.enum(['auth.factor.password.set']).describe('The operation the policy guards.'),
|
|
5159
|
+
"config": zod.object({
|
|
5160
|
+
"min_length": zod.int().min(1).max(evaluatePolicyBodyOneConfigMinLengthMax).optional().describe('The fewest Unicode code points a new password may have, counted after\nNFC normalization. At most `max_length` when both are set.\n'),
|
|
5161
|
+
"max_length": zod.int().min(1).max(evaluatePolicyBodyOneConfigMaxLengthMax).optional().describe('The most Unicode code points a new password may have. A password above\n64 code points is refused whether or not this is set.\n'),
|
|
5162
|
+
"history_depth": zod.int().min(1).max(evaluatePolicyBodyOneConfigHistoryDepthMax).optional().describe('How many of the user\'s passwords a new one may not repeat, the current\none included. Checked only when users set their own password.\n')
|
|
5163
|
+
}).describe('The settings of an `auth.factor.password.set` policy. Every setting is\noptional; a setting left out switches its rule off, and `{}` switches every\nrule off. There are no defaults. The bounds are technical limits, not\nrecommendations; the server\'s template checks the same bounds.\n'),
|
|
5164
|
+
"input": zod.object({
|
|
5165
|
+
"password": zod.string().max(evaluatePolicyBodyOneInputPasswordMax).describe('The candidate password. It is evaluated and dropped: never stored,\nlogged or returned. Anything above the server\'s cap of 64 characters is\nrefused as `max_length`, as on a real set; the 4096 bound only keeps a\ndry run\'s body small.\n')
|
|
5166
|
+
}).describe('The password as a user or administrator would set it. The server derives\nwhat the policy checks (its length in code points after NFC normalization)\nwith the same code a password set runs.\n'),
|
|
5167
|
+
"facts": zod.object({
|
|
5168
|
+
"self_service": zod.boolean().default(evaluatePolicyBodyOneFactsSelfServiceDefault).describe('Whether the user sets their own password. Only then is the password\nhistory checked; an administrator\'s set skips it.\n'),
|
|
5169
|
+
"history_matches": zod.array(zod.boolean()).max(evaluatePolicyBodyOneFactsHistoryMatchesMax).default(evaluatePolicyBodyOneFactsHistoryMatchesDefault).describe('Whether the candidate matches each of the user\'s kept passwords,\ncurrent first, newest first. Only the first `history_depth` entries\ncount, so at most 4, the highest `history_depth`.\n')
|
|
5170
|
+
}).optional().describe('What a password set looks up instead of reading from the request. A dry run\nhas no user, so it is stated here.\n')
|
|
5171
|
+
}).describe('A dry run of the password policy for one candidate password.').describe('One dry run of an operation\'s policy. `operation` selects the operation\'s\ntemplate; `config` is the policy to evaluate, checked exactly as a publish\nchecks it; `input` is what the operation\'s request carries, in the\noperation\'s own terms; `facts` states what the operation would look up at\nruntime. The fields each operation accepts are listed in the policy\ncatalog.\n')
|
|
5172
|
+
|
|
5173
|
+
export const EvaluatePolicyResponse = zod.object({
|
|
5174
|
+
"allowed": zod.boolean().describe('Whether the operation would go ahead.'),
|
|
5175
|
+
"code": zod.string().optional().describe('The error code an API call of the operation would answer with, set\nonly when it would refuse, for example `user.password_empty` or\n`user.password_policy_violation`.\n'),
|
|
5176
|
+
"violations": zod.record(zod.string(), zod.unknown()).optional().describe('Every failed rule keyed by name with the value of the setting it is\nnamed after, e.g. `{"min_length": 12}`, as the live error\'s\n`details.violations`. Set only with `user.password_policy_violation`.\n')
|
|
5177
|
+
}).describe('The decision the operation would reach for the request. A refusal carries\nthe error code and violations an API call of the operation would answer\nwith; a login flow shows the same rules as field errors instead.\n')
|
|
5178
|
+
|
|
5179
|
+
|
|
5096
5180
|
/**
|
|
5097
5181
|
* Reads a policy as its newest revision, the one that applies the next time
|
|
5098
5182
|
* its operation runs.
|
|
@@ -6009,9 +6093,9 @@ export const RevokeReleaseResponse = zod.object({
|
|
|
6009
6093
|
* identifier and display.
|
|
6010
6094
|
*
|
|
6011
6095
|
* Accepts either a project secret (`oauth2`) or a user-bound Console
|
|
6012
|
-
* session cookie (`
|
|
6096
|
+
* session cookie (`sessionCookie`). Session callers are authorized as
|
|
6013
6097
|
* the human against the target project (home may differ). Cookie-authenticated
|
|
6014
|
-
* requests follow the scheme's CSRF rules (`
|
|
6098
|
+
* requests follow the scheme's CSRF rules (`sessionCookie`).
|
|
6015
6099
|
* @summary Create grant
|
|
6016
6100
|
*/
|
|
6017
6101
|
export const createGrantQueryProjectIdRegExp = new RegExp('^[a-zA-Z0-9_-]+$');
|
|
@@ -6098,8 +6182,8 @@ export const CreateGrantResponse = zod.object({
|
|
|
6098
6182
|
* the project Check may expand without those scopes.
|
|
6099
6183
|
*
|
|
6100
6184
|
* Accepts either a project secret (`oauth2`) or a user-bound Console
|
|
6101
|
-
* session cookie (`
|
|
6102
|
-
* follow the scheme's CSRF rules (`
|
|
6185
|
+
* session cookie (`sessionCookie`). Cookie-authenticated requests
|
|
6186
|
+
* follow the scheme's CSRF rules (`sessionCookie`).
|
|
6103
6187
|
* @summary Query grants
|
|
6104
6188
|
*/
|
|
6105
6189
|
export const queryGrantsQueryProjectIdRegExp = new RegExp('^[a-zA-Z0-9_-]+$');
|
|
@@ -6190,8 +6274,8 @@ export const QueryGrantsResponse = zod.object({
|
|
|
6190
6274
|
* Check may expand without those scopes.
|
|
6191
6275
|
*
|
|
6192
6276
|
* Accepts either a project secret (`oauth2`) or a user-bound Console
|
|
6193
|
-
* session cookie (`
|
|
6194
|
-
* follow the scheme's CSRF rules (`
|
|
6277
|
+
* session cookie (`sessionCookie`). Cookie-authenticated requests
|
|
6278
|
+
* follow the scheme's CSRF rules (`sessionCookie`).
|
|
6195
6279
|
* @summary Get grant
|
|
6196
6280
|
*/
|
|
6197
6281
|
export const GetGrantParams = zod.object({
|
|
@@ -6256,8 +6340,8 @@ export const GetGrantResponse = zod.object({
|
|
|
6256
6340
|
* revoked so the unique binding can be reused.
|
|
6257
6341
|
*
|
|
6258
6342
|
* Accepts either a project secret (`oauth2`) or a user-bound Console
|
|
6259
|
-
* session cookie (`
|
|
6260
|
-
* follow the scheme's CSRF rules (`
|
|
6343
|
+
* session cookie (`sessionCookie`). Cookie-authenticated requests
|
|
6344
|
+
* follow the scheme's CSRF rules (`sessionCookie`).
|
|
6261
6345
|
* @summary Revoke grant
|
|
6262
6346
|
*/
|
|
6263
6347
|
export const DeleteGrantParams = zod.object({
|
|
@@ -9,4 +9,9 @@
|
|
|
9
9
|
export type CreateFlowDefinition201UserSchemaMetadata = {
|
|
10
10
|
/** The time when the schema was created. */
|
|
11
11
|
created_at: string;
|
|
12
|
+
/**
|
|
13
|
+
* Whether any user of the project is on this revision. Only set when
|
|
14
|
+
* `GET /schemas` is asked for it with `expand=in_use`; omitted otherwise.
|
|
15
|
+
*/
|
|
16
|
+
in_use?: boolean;
|
|
12
17
|
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
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 { DeleteUserByID409Details } from './deleteUserByID409Details.ts';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Standard error payload returned for failed API requests.
|
|
12
|
+
*/
|
|
13
|
+
export type DeleteUserByID409 = {
|
|
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?: DeleteUserByID409Details;
|
|
20
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
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 DeleteUserByID409Details = { [key: string]: unknown };
|
|
@@ -58,6 +58,15 @@ export type DeleteUserByIDDefault = {
|
|
|
58
58
|
message: string;
|
|
59
59
|
/** Additional error-specific context. */
|
|
60
60
|
details?: { [key: string]: unknown };
|
|
61
|
+
} & {
|
|
62
|
+
code: 'proj.last_owner';
|
|
63
|
+
} | {
|
|
64
|
+
/** Stable machine-readable error code. */
|
|
65
|
+
code: string;
|
|
66
|
+
/** Human-readable explanation of the error. */
|
|
67
|
+
message: string;
|
|
68
|
+
/** Additional error-specific context. */
|
|
69
|
+
details?: { [key: string]: unknown };
|
|
61
70
|
} & {
|
|
62
71
|
code: 'req.invalid';
|
|
63
72
|
} | {
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
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 { EvaluatePolicy200Violations } from './evaluatePolicy200Violations.ts';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* The decision the operation would reach for the request. A refusal carries
|
|
12
|
+
* the error code and violations an API call of the operation would answer
|
|
13
|
+
* with; a login flow shows the same rules as field errors instead.
|
|
14
|
+
*/
|
|
15
|
+
export type EvaluatePolicy200 = {
|
|
16
|
+
/** Whether the operation would go ahead. */
|
|
17
|
+
allowed: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* The error code an API call of the operation would answer with, set
|
|
20
|
+
* only when it would refuse, for example `user.password_empty` or
|
|
21
|
+
* `user.password_policy_violation`.
|
|
22
|
+
*/
|
|
23
|
+
code?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Every failed rule keyed by name with the value of the setting it is
|
|
26
|
+
* named after, e.g. `{"min_length": 12}`, as the live error's
|
|
27
|
+
* `details.violations`. Set only with `user.password_policy_violation`.
|
|
28
|
+
*/
|
|
29
|
+
violations?: EvaluatePolicy200Violations;
|
|
30
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
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
|
+
* Every failed rule keyed by name with the value of the setting it is
|
|
11
|
+
* named after, e.g. `{"min_length": 12}`, as the live error's
|
|
12
|
+
* `details.violations`. Set only with `user.password_policy_violation`.
|
|
13
|
+
*/
|
|
14
|
+
export type EvaluatePolicy200Violations = { [key: string]: unknown };
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
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
|
+
* One dry run of an operation's policy. `operation` selects the operation's
|
|
11
|
+
* template; `config` is the policy to evaluate, checked exactly as a publish
|
|
12
|
+
* checks it; `input` is what the operation's request carries, in the
|
|
13
|
+
* operation's own terms; `facts` states what the operation would look up at
|
|
14
|
+
* runtime. The fields each operation accepts are listed in the policy
|
|
15
|
+
* catalog.
|
|
16
|
+
*/
|
|
17
|
+
export type EvaluatePolicyBody = {
|
|
18
|
+
/** The operation the policy guards. */
|
|
19
|
+
operation: 'auth.factor.password.set';
|
|
20
|
+
/**
|
|
21
|
+
* The settings of an `auth.factor.password.set` policy. Every setting is
|
|
22
|
+
* optional; a setting left out switches its rule off, and `{}` switches every
|
|
23
|
+
* rule off. There are no defaults. The bounds are technical limits, not
|
|
24
|
+
* recommendations; the server's template checks the same bounds.
|
|
25
|
+
*/
|
|
26
|
+
config: {
|
|
27
|
+
/**
|
|
28
|
+
* The fewest Unicode code points a new password may have, counted after
|
|
29
|
+
* NFC normalization. At most `max_length` when both are set.
|
|
30
|
+
* @minimum 1
|
|
31
|
+
* @maximum 64
|
|
32
|
+
*/
|
|
33
|
+
min_length?: number;
|
|
34
|
+
/**
|
|
35
|
+
* The most Unicode code points a new password may have. A password above
|
|
36
|
+
* 64 code points is refused whether or not this is set.
|
|
37
|
+
* @minimum 1
|
|
38
|
+
* @maximum 64
|
|
39
|
+
*/
|
|
40
|
+
max_length?: number;
|
|
41
|
+
/**
|
|
42
|
+
* How many of the user's passwords a new one may not repeat, the current
|
|
43
|
+
* one included. Checked only when users set their own password.
|
|
44
|
+
* @minimum 1
|
|
45
|
+
* @maximum 4
|
|
46
|
+
*/
|
|
47
|
+
history_depth?: number;
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* The password as a user or administrator would set it. The server derives
|
|
51
|
+
* what the policy checks (its length in code points after NFC normalization)
|
|
52
|
+
* with the same code a password set runs.
|
|
53
|
+
*/
|
|
54
|
+
input: {
|
|
55
|
+
/**
|
|
56
|
+
* The candidate password. It is evaluated and dropped: never stored,
|
|
57
|
+
* logged or returned. Anything above the server's cap of 64 characters is
|
|
58
|
+
* refused as `max_length`, as on a real set; the 4096 bound only keeps a
|
|
59
|
+
* dry run's body small.
|
|
60
|
+
* @maxLength 4096
|
|
61
|
+
*/
|
|
62
|
+
password: string;
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* What a password set looks up instead of reading from the request. A dry run
|
|
66
|
+
* has no user, so it is stated here.
|
|
67
|
+
*/
|
|
68
|
+
facts?: {
|
|
69
|
+
/**
|
|
70
|
+
* Whether the user sets their own password. Only then is the password
|
|
71
|
+
* history checked; an administrator's set skips it.
|
|
72
|
+
*/
|
|
73
|
+
self_service?: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Whether the candidate matches each of the user's kept passwords,
|
|
76
|
+
* current first, newest first. Only the first `history_depth` entries
|
|
77
|
+
* count, so at most 4, the highest `history_depth`.
|
|
78
|
+
* @maxItems 4
|
|
79
|
+
*/
|
|
80
|
+
history_matches?: boolean[];
|
|
81
|
+
};
|
|
82
|
+
};
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
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
|
+
export type EvaluatePolicyDefault = {
|
|
10
|
+
/** Stable machine-readable error code. */
|
|
11
|
+
code: string;
|
|
12
|
+
/** Human-readable explanation of the error. */
|
|
13
|
+
message: string;
|
|
14
|
+
/** Additional error-specific context. */
|
|
15
|
+
details?: { [key: string]: unknown };
|
|
16
|
+
} & {
|
|
17
|
+
code: 'auth.csrf_invalid';
|
|
18
|
+
} | {
|
|
19
|
+
/** Stable machine-readable error code. */
|
|
20
|
+
code: string;
|
|
21
|
+
/** Human-readable explanation of the error. */
|
|
22
|
+
message: string;
|
|
23
|
+
/** Additional error-specific context. */
|
|
24
|
+
details?: { [key: string]: unknown };
|
|
25
|
+
} & {
|
|
26
|
+
code: 'auth.unauthorized';
|
|
27
|
+
} | {
|
|
28
|
+
/** Stable machine-readable error code. */
|
|
29
|
+
code: string;
|
|
30
|
+
/** Human-readable explanation of the error. */
|
|
31
|
+
message: string;
|
|
32
|
+
/** Additional error-specific context. */
|
|
33
|
+
details?: { [key: string]: unknown };
|
|
34
|
+
} & {
|
|
35
|
+
code: 'internal';
|
|
36
|
+
} | {
|
|
37
|
+
/** Stable machine-readable error code. */
|
|
38
|
+
code: string;
|
|
39
|
+
/** Human-readable explanation of the error. */
|
|
40
|
+
message: string;
|
|
41
|
+
/** Additional error-specific context. */
|
|
42
|
+
details?: { [key: string]: unknown };
|
|
43
|
+
} & {
|
|
44
|
+
code: 'not_implemented';
|
|
45
|
+
} | {
|
|
46
|
+
/** Stable machine-readable error code. */
|
|
47
|
+
code: string;
|
|
48
|
+
/** Human-readable explanation of the error. */
|
|
49
|
+
message: string;
|
|
50
|
+
/** Additional error-specific context. */
|
|
51
|
+
details?: { [key: string]: unknown };
|
|
52
|
+
} & {
|
|
53
|
+
code: 'pol.invalid';
|
|
54
|
+
} | {
|
|
55
|
+
/** Stable machine-readable error code. */
|
|
56
|
+
code: string;
|
|
57
|
+
/** Human-readable explanation of the error. */
|
|
58
|
+
message: string;
|
|
59
|
+
/** Additional error-specific context. */
|
|
60
|
+
details?: { [key: string]: unknown };
|
|
61
|
+
} & {
|
|
62
|
+
code: 'pol.not_found';
|
|
63
|
+
} | {
|
|
64
|
+
/** Stable machine-readable error code. */
|
|
65
|
+
code: string;
|
|
66
|
+
/** Human-readable explanation of the error. */
|
|
67
|
+
message: string;
|
|
68
|
+
/** Additional error-specific context. */
|
|
69
|
+
details?: { [key: string]: unknown };
|
|
70
|
+
} & {
|
|
71
|
+
code: 'pol.permission_denied';
|
|
72
|
+
} | {
|
|
73
|
+
/** Stable machine-readable error code. */
|
|
74
|
+
code: string;
|
|
75
|
+
/** Human-readable explanation of the error. */
|
|
76
|
+
message: string;
|
|
77
|
+
/** Additional error-specific context. */
|
|
78
|
+
details?: { [key: string]: unknown };
|
|
79
|
+
} & {
|
|
80
|
+
code: 'req.invalid';
|
|
81
|
+
} | {
|
|
82
|
+
/** Stable machine-readable error code. */
|
|
83
|
+
code: string;
|
|
84
|
+
/** Human-readable explanation of the error. */
|
|
85
|
+
message: string;
|
|
86
|
+
/** Additional error-specific context. */
|
|
87
|
+
details?: { [key: string]: unknown };
|
|
88
|
+
} & {
|
|
89
|
+
code: 'unavailable';
|
|
90
|
+
};
|