@zitadel/api 0.2.0 → 0.3.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/dist/generated/endpoints/zitadelNextGen.d.mts +2 -2
- package/dist/generated/endpoints/zitadelNextGen.mjs +64 -3
- 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 +71 -2
- package/dist/generated/endpoints/zitadelNextGen.zod.d.mts.map +1 -1
- package/dist/generated/endpoints/zitadelNextGen.zod.mjs +84 -11
- 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 +21 -0
- package/dist/generated/operations.mjs.map +1 -1
- package/dist/{index-D7-l5LV6.d.mts → index-DAm3tCA7.d.mts} +334 -8
- package/dist/index-DAm3tCA7.d.mts.map +1 -0
- package/dist/runtime/api-factory.d.mts +1 -1
- package/dist/{zitadelNextGen-Cw3DrCn1.d.mts → zitadelNextGen-B_VRpP2W.d.mts} +34 -6
- package/dist/zitadelNextGen-B_VRpP2W.d.mts.map +1 -0
- package/package.json +2 -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 +82 -2
- package/src/generated/endpoints/zitadelNextGen.zod.ts +87 -10
- package/src/generated/model/createFlowDefinition201UserSchemaMetadata.ts +5 -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/getMyUserSchema200Metadata.ts +5 -0
- package/src/generated/model/getSchemaById200Metadata.ts +5 -0
- package/src/generated/model/index.ts +6 -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/queryUsersBodyFilterItem.ts +11 -3
- package/src/generated/model/queryUsersBodyFilterItemField.ts +12 -3
- package/src/generated/operations.ts +23 -0
- package/dist/index-D7-l5LV6.d.mts.map +0 -1
- package/dist/zitadelNextGen-Cw3DrCn1.d.mts.map +0 -1
|
@@ -121,7 +121,7 @@ export const QueryUsersBody = zod.object({
|
|
|
121
121
|
"direction": zod.enum(['asc', 'desc'])
|
|
122
122
|
}).optional(),
|
|
123
123
|
"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`
|
|
124
|
+
"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
125
|
"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
126
|
"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
127
|
})).optional().describe('Filter criteria for querying users. Criteria are combined with AND.')
|
|
@@ -276,9 +276,11 @@ export const PatchUserByIDResponse = zod.object({
|
|
|
276
276
|
|
|
277
277
|
|
|
278
278
|
/**
|
|
279
|
-
* Deletes a user
|
|
279
|
+
* Deletes a user, removes them from every team they belong to, and revokes
|
|
280
|
+
* every grant they hold, on any project.
|
|
280
281
|
*
|
|
281
|
-
* The user is removed, not deactivated, and the deletion emits `user.deleted
|
|
282
|
+
* The user is removed, not deactivated, and the deletion emits `user.deleted`,
|
|
283
|
+
* plus `authz.revoked` for each grant on that grant's project.
|
|
282
284
|
* With a project secret the request is idempotent: deleting a user that exists
|
|
283
285
|
* in no project succeeds without changing anything.
|
|
284
286
|
* @summary Delete user by ID
|
|
@@ -808,7 +810,8 @@ export const GetMyUserSchemaResponse = zod.object({
|
|
|
808
810
|
}).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
811
|
}).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
812
|
"metadata": zod.object({
|
|
811
|
-
"created_at": zod.iso.datetime({"offset":true}).describe('The time when the schema was created.')
|
|
813
|
+
"created_at": zod.iso.datetime({"offset":true}).describe('The time when the schema was created.'),
|
|
814
|
+
"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
815
|
})
|
|
813
816
|
}).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
817
|
|
|
@@ -3165,7 +3168,8 @@ export const ListSchemasQueryParams = zod.strictObject({
|
|
|
3165
3168
|
"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
3169
|
"object_type": zod.string().max(listSchemasQueryObjectTypeMax).optional().describe('The type of object of the schema to filter by.'),
|
|
3167
3170
|
"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')
|
|
3171
|
+
"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'),
|
|
3172
|
+
"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
3173
|
})
|
|
3170
3174
|
|
|
3171
3175
|
export const listSchemasResponseSchemasItemSchemaOneObjectTypeMax = 256;
|
|
@@ -3217,7 +3221,8 @@ export const ListSchemasResponse = zod.object({
|
|
|
3217
3221
|
}).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
3222
|
}).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
3223
|
"metadata": zod.object({
|
|
3220
|
-
"created_at": zod.iso.datetime({"offset":true}).describe('The time when the schema was created.')
|
|
3224
|
+
"created_at": zod.iso.datetime({"offset":true}).describe('The time when the schema was created.'),
|
|
3225
|
+
"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
3226
|
})
|
|
3222
3227
|
}).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
3228
|
"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 +3303,8 @@ export const GetSchemaByIdResponse = zod.object({
|
|
|
3298
3303
|
}).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
3304
|
}).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
3305
|
"metadata": zod.object({
|
|
3301
|
-
"created_at": zod.iso.datetime({"offset":true}).describe('The time when the schema was created.')
|
|
3306
|
+
"created_at": zod.iso.datetime({"offset":true}).describe('The time when the schema was created.'),
|
|
3307
|
+
"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
3308
|
})
|
|
3303
3309
|
}).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
3310
|
|
|
@@ -3469,7 +3475,8 @@ export const CreateFlowDefinitionResponse = zod.object({
|
|
|
3469
3475
|
}).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
3476
|
}).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
3477
|
"metadata": zod.object({
|
|
3472
|
-
"created_at": zod.iso.datetime({"offset":true}).describe('The time when the schema was created.')
|
|
3478
|
+
"created_at": zod.iso.datetime({"offset":true}).describe('The time when the schema was created.'),
|
|
3479
|
+
"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
3480
|
})
|
|
3474
3481
|
}).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
3482
|
"created_at": zod.iso.datetime({"offset":true}),
|
|
@@ -3599,7 +3606,8 @@ export const ListFlowDefinitionsResponse = zod.object({
|
|
|
3599
3606
|
}).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
3607
|
}).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
3608
|
"metadata": zod.object({
|
|
3602
|
-
"created_at": zod.iso.datetime({"offset":true}).describe('The time when the schema was created.')
|
|
3609
|
+
"created_at": zod.iso.datetime({"offset":true}).describe('The time when the schema was created.'),
|
|
3610
|
+
"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
3611
|
})
|
|
3604
3612
|
}).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
3613
|
"created_at": zod.iso.datetime({"offset":true}),
|
|
@@ -3715,7 +3723,8 @@ export const GetFlowDefinitionResponse = zod.object({
|
|
|
3715
3723
|
}).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
3724
|
}).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
3725
|
"metadata": zod.object({
|
|
3718
|
-
"created_at": zod.iso.datetime({"offset":true}).describe('The time when the schema was created.')
|
|
3726
|
+
"created_at": zod.iso.datetime({"offset":true}).describe('The time when the schema was created.'),
|
|
3727
|
+
"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
3728
|
})
|
|
3720
3729
|
}).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
3730
|
"created_at": zod.iso.datetime({"offset":true}),
|
|
@@ -5093,6 +5102,74 @@ export const PublishPolicyResponse = zod.object({
|
|
|
5093
5102
|
}).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
5103
|
|
|
5095
5104
|
|
|
5105
|
+
/**
|
|
5106
|
+
* Evaluates a policy config against one request, without side effects, and
|
|
5107
|
+
* answers the decision the operation would reach. Nothing is read from or
|
|
5108
|
+
* written to the project: the config is the one in the body, checked
|
|
5109
|
+
* exactly as a publish checks it, so an invalid config answers `pol.invalid`
|
|
5110
|
+
* with the same violations.
|
|
5111
|
+
*
|
|
5112
|
+
* `input` is what the operation's request carries, in the operation's own
|
|
5113
|
+
* terms (a password, not its length): the server derives what the policy
|
|
5114
|
+
* checks with the code the live operation runs, guards included. `facts`
|
|
5115
|
+
* states what the operation would look up at runtime, such as whether the
|
|
5116
|
+
* candidate matches one of the user's kept passwords.
|
|
5117
|
+
*
|
|
5118
|
+
* The decision and the names of the failed rules hold wherever the
|
|
5119
|
+
* operation runs. `code` and `violations` are what an API call answers; a
|
|
5120
|
+
* login flow shows the same rules as field errors on the password field
|
|
5121
|
+
* (`error.x-auth-methods#password_<rule>` in `step.error`).
|
|
5122
|
+
*
|
|
5123
|
+
* Which policy a project or release applies is not decided here: read it
|
|
5124
|
+
* and pass its config.
|
|
5125
|
+
*
|
|
5126
|
+
* The caller needs read access to the project in `project_id`.
|
|
5127
|
+
* @summary Evaluate a policy
|
|
5128
|
+
*/
|
|
5129
|
+
export const evaluatePolicyQueryProjectIdRegExp = new RegExp('^[a-zA-Z0-9_-]+$');
|
|
5130
|
+
|
|
5131
|
+
|
|
5132
|
+
export const EvaluatePolicyQueryParams = zod.strictObject({
|
|
5133
|
+
"project_id": zod.string().regex(evaluatePolicyQueryProjectIdRegExp).describe('The unique identifier of the project')
|
|
5134
|
+
})
|
|
5135
|
+
|
|
5136
|
+
export const evaluatePolicyBodyOneConfigMinLengthMax = 64;
|
|
5137
|
+
|
|
5138
|
+
export const evaluatePolicyBodyOneConfigMaxLengthMax = 64;
|
|
5139
|
+
|
|
5140
|
+
export const evaluatePolicyBodyOneConfigHistoryDepthMax = 4;
|
|
5141
|
+
|
|
5142
|
+
export const evaluatePolicyBodyOneInputPasswordMax = 4096;
|
|
5143
|
+
|
|
5144
|
+
export const evaluatePolicyBodyOneFactsSelfServiceDefault = true;
|
|
5145
|
+
export const evaluatePolicyBodyOneFactsHistoryMatchesDefault = [];
|
|
5146
|
+
export const evaluatePolicyBodyOneFactsHistoryMatchesMax = 4;
|
|
5147
|
+
|
|
5148
|
+
|
|
5149
|
+
|
|
5150
|
+
export const EvaluatePolicyBody = zod.object({
|
|
5151
|
+
"operation": zod.enum(['auth.factor.password.set']).describe('The operation the policy guards.'),
|
|
5152
|
+
"config": zod.object({
|
|
5153
|
+
"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'),
|
|
5154
|
+
"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'),
|
|
5155
|
+
"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')
|
|
5156
|
+
}).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'),
|
|
5157
|
+
"input": zod.object({
|
|
5158
|
+
"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')
|
|
5159
|
+
}).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'),
|
|
5160
|
+
"facts": zod.object({
|
|
5161
|
+
"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'),
|
|
5162
|
+
"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')
|
|
5163
|
+
}).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')
|
|
5164
|
+
}).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')
|
|
5165
|
+
|
|
5166
|
+
export const EvaluatePolicyResponse = zod.object({
|
|
5167
|
+
"allowed": zod.boolean().describe('Whether the operation would go ahead.'),
|
|
5168
|
+
"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'),
|
|
5169
|
+
"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')
|
|
5170
|
+
}).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')
|
|
5171
|
+
|
|
5172
|
+
|
|
5096
5173
|
/**
|
|
5097
5174
|
* Reads a policy as its newest revision, the one that applies the next time
|
|
5098
5175
|
* its operation runs.
|
|
@@ -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,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
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
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 EvaluatePolicyParams = {
|
|
10
|
+
/**
|
|
11
|
+
* The unique identifier of the project
|
|
12
|
+
* @pattern ^[a-zA-Z0-9_-]+$
|
|
13
|
+
*/
|
|
14
|
+
project_id: string;
|
|
15
|
+
};
|
|
@@ -9,4 +9,9 @@
|
|
|
9
9
|
export type GetFlowDefinition200UserSchemaMetadata = {
|
|
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
|
};
|
|
@@ -9,4 +9,9 @@
|
|
|
9
9
|
export type GetMyUserSchema200Metadata = {
|
|
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
|
};
|
|
@@ -9,4 +9,9 @@
|
|
|
9
9
|
export type GetSchemaById200Metadata = {
|
|
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
|
};
|
|
@@ -423,6 +423,11 @@ export * from './deleteUserByIDDefault.ts';
|
|
|
423
423
|
export * from './deleteVariableDefault.ts';
|
|
424
424
|
export * from './deleteVariableKind.ts';
|
|
425
425
|
export * from './deleteVariableParams.ts';
|
|
426
|
+
export * from './evaluatePolicy200.ts';
|
|
427
|
+
export * from './evaluatePolicy200Violations.ts';
|
|
428
|
+
export * from './evaluatePolicyBody.ts';
|
|
429
|
+
export * from './evaluatePolicyDefault.ts';
|
|
430
|
+
export * from './evaluatePolicyParams.ts';
|
|
426
431
|
export * from './exchangeHandoff200.ts';
|
|
427
432
|
export * from './exchangeHandoff200Session.ts';
|
|
428
433
|
export * from './exchangeHandoff200SessionFactorsItem.ts';
|
|
@@ -944,6 +949,7 @@ export * from './listSchemas200SchemasItem.ts';
|
|
|
944
949
|
export * from './listSchemas200SchemasItemMetadata.ts';
|
|
945
950
|
export * from './listSchemas200SchemasItemSchema.ts';
|
|
946
951
|
export * from './listSchemasDefault.ts';
|
|
952
|
+
export * from './listSchemasExpandItem.ts';
|
|
947
953
|
export * from './listSchemasKind.ts';
|
|
948
954
|
export * from './listSchemasParams.ts';
|
|
949
955
|
export * from './listSchemasRevisions.ts';
|
|
@@ -9,4 +9,9 @@
|
|
|
9
9
|
export type ListFlowDefinitions200FlowDefinitionsItemUserSchemaMetadata = {
|
|
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
|
};
|
|
@@ -9,4 +9,9 @@
|
|
|
9
9
|
export type ListSchemas200SchemasItemMetadata = {
|
|
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,28 @@
|
|
|
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
|
+
* Extra fields to add onto each returned schema (ADR 059).
|
|
11
|
+
*
|
|
12
|
+
* - `in_use`: whether any user of the project is on this revision, as
|
|
13
|
+
* `metadata.in_use`. A revision in use cannot be deleted, and the users on it
|
|
14
|
+
* are found with `POST /users/query` filtering on `schema`. The property is
|
|
15
|
+
* omitted entirely when not requested, so "did not ask" is distinguishable
|
|
16
|
+
* from `false`.
|
|
17
|
+
*
|
|
18
|
+
* The flag counts every user of the project, not only those the caller may
|
|
19
|
+
* list, so it requires read on the whole project, and for a token also
|
|
20
|
+
* `user.read` in addition to `schema.read`. A caller without them is refused
|
|
21
|
+
* with `403`.
|
|
22
|
+
*/
|
|
23
|
+
export type ListSchemasExpandItem = typeof ListSchemasExpandItem[keyof typeof ListSchemasExpandItem];
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
export const ListSchemasExpandItem = {
|
|
27
|
+
in_use: 'in_use',
|
|
28
|
+
} as const;
|
|
@@ -5,6 +5,7 @@
|
|
|
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 { ListSchemasExpandItem } from './listSchemasExpandItem.ts';
|
|
8
9
|
import type { ListSchemasKind } from './listSchemasKind.ts';
|
|
9
10
|
import type { ListSchemasRevisions } from './listSchemasRevisions.ts';
|
|
10
11
|
|
|
@@ -59,4 +60,8 @@ revisions?: ListSchemasRevisions;
|
|
|
59
60
|
* could be read, and is excluded from every filtered result.
|
|
60
61
|
*/
|
|
61
62
|
kind?: ListSchemasKind;
|
|
63
|
+
/**
|
|
64
|
+
* Extra fields to add onto each returned schema.
|
|
65
|
+
*/
|
|
66
|
+
expand?: ListSchemasExpandItem[];
|
|
62
67
|
};
|
|
@@ -14,7 +14,15 @@ export type QueryUsersBodyFilterItem = {
|
|
|
14
14
|
* - `created_at`: RFC3339 timestamp
|
|
15
15
|
* - `id`: user id
|
|
16
16
|
* - `schema`: the schema the user's attributes satisfy, matched against the
|
|
17
|
-
* value the user carries as `schema
|
|
17
|
+
* value the user carries as `schema`. Each revision of a schema has its own
|
|
18
|
+
* URL, so `equals` selects the users on one revision and `not_equals` the
|
|
19
|
+
* users on any other.
|
|
20
|
+
* - `schema_object_type`: the `object_type` of the user's schema, which every
|
|
21
|
+
* revision of that schema shares. It may be repeated, like any field: give
|
|
22
|
+
* `not_equals` once per object type to exclude several. A schema without an
|
|
23
|
+
* object type reads as `""`, so `not_equals` matches its users and `equals`
|
|
24
|
+
* `""` selects them. Combine `equals` here with `schema` `not_equals` the
|
|
25
|
+
* newest revision to find the users still on an older one.
|
|
18
26
|
* - `status`: one of `active`, `suspended`, `deactivated`, `pending_purge`
|
|
19
27
|
* - `team_id`: restricts the result to users holding an **active** membership
|
|
20
28
|
* in that team. A user who has been invited but has not accepted does not
|
|
@@ -31,8 +39,8 @@ export type QueryUsersBodyFilterItem = {
|
|
|
31
39
|
* their own lifecycle, so the two disagree often and neither implies the other
|
|
32
40
|
* (ADR 024).
|
|
33
41
|
*
|
|
34
|
-
* `team_id`
|
|
35
|
-
*
|
|
42
|
+
* `team_id` and `schema_object_type` are filterable but not sortable: neither
|
|
43
|
+
* is a column on the user, so both are absent from the sort-field enum.
|
|
36
44
|
*
|
|
37
45
|
* Filtering on `team_id` requires `team_membership.read` in addition to
|
|
38
46
|
* `user.read`: it reads the same memberships that `expand: ["teams"]` embeds.
|
|
@@ -11,7 +11,15 @@
|
|
|
11
11
|
* - `created_at`: RFC3339 timestamp
|
|
12
12
|
* - `id`: user id
|
|
13
13
|
* - `schema`: the schema the user's attributes satisfy, matched against the
|
|
14
|
-
* value the user carries as `schema
|
|
14
|
+
* value the user carries as `schema`. Each revision of a schema has its own
|
|
15
|
+
* URL, so `equals` selects the users on one revision and `not_equals` the
|
|
16
|
+
* users on any other.
|
|
17
|
+
* - `schema_object_type`: the `object_type` of the user's schema, which every
|
|
18
|
+
* revision of that schema shares. It may be repeated, like any field: give
|
|
19
|
+
* `not_equals` once per object type to exclude several. A schema without an
|
|
20
|
+
* object type reads as `""`, so `not_equals` matches its users and `equals`
|
|
21
|
+
* `""` selects them. Combine `equals` here with `schema` `not_equals` the
|
|
22
|
+
* newest revision to find the users still on an older one.
|
|
15
23
|
* - `status`: one of `active`, `suspended`, `deactivated`, `pending_purge`
|
|
16
24
|
* - `team_id`: restricts the result to users holding an **active** membership
|
|
17
25
|
* in that team. A user who has been invited but has not accepted does not
|
|
@@ -28,8 +36,8 @@
|
|
|
28
36
|
* their own lifecycle, so the two disagree often and neither implies the other
|
|
29
37
|
* (ADR 024).
|
|
30
38
|
*
|
|
31
|
-
* `team_id`
|
|
32
|
-
*
|
|
39
|
+
* `team_id` and `schema_object_type` are filterable but not sortable: neither
|
|
40
|
+
* is a column on the user, so both are absent from the sort-field enum.
|
|
33
41
|
*
|
|
34
42
|
* Filtering on `team_id` requires `team_membership.read` in addition to
|
|
35
43
|
* `user.read`: it reads the same memberships that `expand: ["teams"]` embeds.
|
|
@@ -44,6 +52,7 @@ export const QueryUsersBodyFilterItemField = {
|
|
|
44
52
|
created_at: 'created_at',
|
|
45
53
|
id: 'id',
|
|
46
54
|
schema: 'schema',
|
|
55
|
+
schema_object_type: 'schema_object_type',
|
|
47
56
|
status: 'status',
|
|
48
57
|
team_id: 'team_id',
|
|
49
58
|
lifecycle_owner_team_id: 'lifecycle_owner_team_id',
|