@zitadel/api 0.3.0 → 0.5.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-32Zz3s86.mjs +359 -0
- package/dist/api-factory-32Zz3s86.mjs.map +1 -0
- package/dist/api-factory-DbVEEqxe.d.mts +217 -0
- package/dist/api-factory-DbVEEqxe.d.mts.map +1 -0
- package/dist/{fetch-CtYe0OvX.d.mts → fetch-BzLvdm6C.d.mts} +35 -12
- package/dist/fetch-BzLvdm6C.d.mts.map +1 -0
- package/dist/generated/endpoints/zitadelNextGen.d.mts +1 -1
- package/dist/generated/endpoints/zitadelNextGen.mjs +1099 -733
- package/dist/generated/endpoints/zitadelNextGen.mjs.map +1 -1
- package/dist/generated/endpoints/zitadelNextGen.msw.d.mts +1 -1
- package/dist/generated/endpoints/zitadelNextGen.msw.mjs +9 -9
- package/dist/generated/endpoints/zitadelNextGen.msw.mjs.map +1 -1
- package/dist/generated/endpoints/zitadelNextGen.zod.d.mts +1029 -657
- package/dist/generated/endpoints/zitadelNextGen.zod.d.mts.map +1 -1
- package/dist/generated/endpoints/zitadelNextGen.zod.mjs +4801 -4433
- 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.map +1 -1
- package/dist/generated/operations.d.mts +9 -0
- package/dist/generated/operations.d.mts.map +1 -1
- package/dist/generated/operations.mjs +267 -154
- package/dist/generated/operations.mjs.map +1 -1
- package/dist/{index-DAm3tCA7.d.mts → index-BX80Kl-8.d.mts} +9183 -7757
- package/dist/index-BX80Kl-8.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 +42 -17
- package/dist/runtime/fetch.mjs.map +1 -1
- package/dist/runtime/paging.d.mts +118 -0
- package/dist/runtime/paging.d.mts.map +1 -0
- package/dist/runtime/paging.mjs +138 -0
- package/dist/runtime/paging.mjs.map +1 -0
- package/dist/zitadelNextGen-CFrFhq_h.d.mts +1726 -0
- package/dist/zitadelNextGen-CFrFhq_h.d.mts.map +1 -0
- package/package.json +8 -3
- package/src/generated/endpoints/zitadelNextGen.faker.ts +3 -3
- package/src/generated/endpoints/zitadelNextGen.ts +1112 -746
- package/src/generated/endpoints/zitadelNextGen.zod.ts +4816 -4440
- package/src/generated/model/addOrigin201.ts +5 -0
- package/src/generated/model/addOrigin201Kind.ts +3 -0
- package/src/generated/model/addOriginBody.ts +17 -5
- package/src/generated/model/addOriginBodyKind.ts +4 -0
- package/src/generated/model/beginUserPasskeyRegistration201.ts +3 -3
- package/src/generated/model/beginUserPasskeyRegistrationBody.ts +6 -6
- package/src/generated/model/buildRelease200.ts +15 -15
- package/src/generated/model/buildRelease200Metadata.ts +8 -8
- package/src/generated/model/buildRelease200PointersItem.ts +13 -12
- package/src/generated/model/buildRelease200PointersItemKind.ts +3 -3
- package/src/generated/model/buildRelease201.ts +15 -15
- package/src/generated/model/buildRelease201Metadata.ts +8 -8
- package/src/generated/model/buildRelease201PointersItem.ts +13 -12
- package/src/generated/model/buildRelease201PointersItemKind.ts +3 -3
- package/src/generated/model/buildRelease400.ts +1 -3
- package/src/generated/model/buildRelease400DetailsResourcesItem.ts +3 -3
- package/src/generated/model/buildRelease400DetailsResourcesItemKind.ts +3 -3
- package/src/generated/model/buildReleaseBody.ts +19 -16
- package/src/generated/model/buildReleaseBodyBundle.ts +31 -28
- package/src/generated/model/buildReleaseBodyBundleBranding.ts +24 -22
- package/src/generated/model/buildReleaseBodyBundleBrandingLayout.ts +8 -7
- package/src/generated/model/buildReleaseBodyBundleBrandingShape.ts +1 -1
- package/src/generated/model/buildReleaseBodyBundleBrandingTheme.ts +5 -7
- package/src/generated/model/buildReleaseBodyBundleBrandingThemeDark.ts +7 -7
- package/src/generated/model/buildReleaseBodyBundleBrandingThemeDarkPalette.ts +63 -62
- package/src/generated/model/buildReleaseBodyBundleBrandingThemeLight.ts +7 -7
- package/src/generated/model/buildReleaseBodyBundleBrandingThemeLightPalette.ts +63 -62
- package/src/generated/model/buildReleaseBodyBundleBrandingTypography.ts +4 -4
- package/src/generated/model/buildReleaseBodyBundleFlowDefinitionsItem.ts +47 -26
- package/src/generated/model/buildReleaseBodyBundleFlowDefinitionsItemAudience.ts +1 -1
- package/src/generated/model/buildReleaseBodyBundleFlowDefinitionsItemStatus.ts +2 -2
- package/src/generated/model/buildReleaseBodyBundleFlowDefinitionsItemStepsItem.ts +46 -28
- package/src/generated/model/buildReleaseBodyBundleFlowDefinitionsItemStepsItemActionsItem.ts +9 -7
- package/src/generated/model/buildReleaseBodyBundleFlowDefinitionsItemStepsItemActionsItemKind.ts +2 -2
- package/src/generated/model/buildReleaseBodyBundleFlowDefinitionsItemStepsItemGates.ts +11 -10
- package/src/generated/model/buildReleaseBodyBundleFlowDefinitionsItemStepsItemGatesConfig.ts +1 -1
- package/src/generated/model/buildReleaseBodyBundleFlowDefinitionsItemStepsItemGatesKind.ts +4 -3
- package/src/generated/model/buildReleaseBodyBundleFlowDefinitionsItemStepsItemTransitions.ts +40 -20
- package/src/generated/model/buildReleaseBodyBundleFlowDefinitionsItemStepsItemTransitionsAction.ts +8 -5
- package/src/generated/model/buildReleaseBodyBundleFlowDefinitionsItemStepsItemTransitionsPurpose.ts +7 -8
- package/src/generated/model/buildReleaseBodyBundleIdpsItem.ts +7 -7
- package/src/generated/model/buildReleaseBodyBundleIdpsItemClaimMapping.ts +1 -1
- package/src/generated/model/buildReleaseBodyBundleIdpsItemOidc.ts +7 -7
- package/src/generated/model/buildReleaseBodyBundleIdpsItemOidcStaticAuthorizeParameters.ts +1 -1
- package/src/generated/model/buildReleaseBodyBundleIdpsItemProvisioning.ts +1 -1
- package/src/generated/model/buildReleaseBodyBundleIdpsItemVerifiedClaims.ts +1 -1
- package/src/generated/model/buildReleaseBodyBundlePoliciesItem.ts +3 -3
- package/src/generated/model/buildReleaseBodyBundleSchemasItem.ts +23 -22
- package/src/generated/model/buildReleaseParams.ts +3 -1
- package/src/generated/model/completeClaim409.ts +2 -2
- package/src/generated/model/completeClaimBody.ts +1 -1
- package/src/generated/model/createAuthAttempt201.ts +23 -22
- package/src/generated/model/createAuthAttempt201ChallengesItem.ts +9 -7
- package/src/generated/model/createAuthAttempt201ChallengesItemState.ts +1 -1
- package/src/generated/model/createAuthAttempt201CompletedFactorsItem.ts +2 -2
- package/src/generated/model/createAuthAttempt201CompletedFactorsItemPayload.ts +5 -5
- package/src/generated/model/createAuthAttempt201State.ts +2 -2
- package/src/generated/model/createAuthAttemptBody.ts +3 -3
- package/src/generated/model/createAuthAttemptDefault.ts +63 -0
- package/src/generated/model/createBranding201.ts +10 -10
- package/src/generated/model/createBranding201Branding.ts +24 -22
- package/src/generated/model/createBranding201BrandingLayout.ts +8 -7
- package/src/generated/model/createBranding201BrandingShape.ts +1 -1
- package/src/generated/model/createBranding201BrandingTheme.ts +5 -7
- package/src/generated/model/createBranding201BrandingThemeDark.ts +7 -7
- package/src/generated/model/createBranding201BrandingThemeDarkPalette.ts +63 -62
- package/src/generated/model/createBranding201BrandingThemeLight.ts +7 -7
- package/src/generated/model/createBranding201BrandingThemeLightPalette.ts +63 -62
- package/src/generated/model/createBranding201BrandingTypography.ts +4 -4
- package/src/generated/model/createBrandingBody.ts +24 -22
- package/src/generated/model/createBrandingBodyLayout.ts +8 -7
- package/src/generated/model/createBrandingBodyShape.ts +1 -1
- package/src/generated/model/createBrandingBodyTheme.ts +5 -7
- package/src/generated/model/createBrandingBodyThemeDark.ts +7 -7
- package/src/generated/model/createBrandingBodyThemeDarkPalette.ts +63 -62
- package/src/generated/model/createBrandingBodyThemeLight.ts +7 -7
- package/src/generated/model/createBrandingBodyThemeLightPalette.ts +63 -62
- package/src/generated/model/createBrandingBodyTypography.ts +4 -4
- package/src/generated/model/createBrandingParams.ts +3 -1
- package/src/generated/model/createDeployment200.ts +16 -14
- package/src/generated/model/createDeployment200Metadata.ts +1 -1
- package/src/generated/model/createDeployment200Release.ts +15 -15
- package/src/generated/model/createDeployment200ReleaseMetadata.ts +8 -8
- package/src/generated/model/createDeployment200ReleasePointersItem.ts +13 -12
- package/src/generated/model/createDeployment200ReleasePointersItemKind.ts +3 -3
- package/src/generated/model/createDeployment200Status.ts +3 -3
- package/src/generated/model/createDeployment201.ts +16 -14
- package/src/generated/model/createDeployment201Metadata.ts +1 -1
- package/src/generated/model/createDeployment201Release.ts +15 -15
- package/src/generated/model/createDeployment201ReleaseMetadata.ts +8 -8
- package/src/generated/model/createDeployment201ReleasePointersItem.ts +13 -12
- package/src/generated/model/createDeployment201ReleasePointersItemKind.ts +3 -3
- package/src/generated/model/createDeployment201Status.ts +3 -3
- package/src/generated/model/createDeployment409.ts +41 -40
- package/src/generated/model/createDeploymentBody.ts +4 -10
- package/src/generated/model/createDeploymentParams.ts +3 -1
- package/src/generated/model/createFlow201.ts +16 -12
- package/src/generated/model/createFlow201Branding.ts +24 -22
- package/src/generated/model/createFlow201BrandingLayout.ts +8 -7
- package/src/generated/model/createFlow201BrandingShape.ts +1 -1
- package/src/generated/model/createFlow201BrandingTheme.ts +5 -7
- package/src/generated/model/createFlow201BrandingThemeDark.ts +7 -7
- package/src/generated/model/createFlow201BrandingThemeDarkPalette.ts +63 -62
- package/src/generated/model/createFlow201BrandingThemeLight.ts +7 -7
- package/src/generated/model/createFlow201BrandingThemeLightPalette.ts +63 -62
- package/src/generated/model/createFlow201BrandingTypography.ts +4 -4
- package/src/generated/model/createFlow201Step.ts +36 -31
- package/src/generated/model/createFlow201StepActionsItem.ts +3 -3
- package/src/generated/model/createFlow201StepActionsItemKind.ts +1 -1
- package/src/generated/model/createFlow201StepChallenge.ts +4 -3
- package/src/generated/model/createFlow201StepComplete.ts +1 -1
- package/src/generated/model/createFlow201StepFieldsItem.ts +14 -13
- package/src/generated/model/createFlow201StepFieldsItemType.ts +1 -1
- package/src/generated/model/createFlow201StepFieldsItemValidation.ts +2 -2
- package/src/generated/model/createFlow201StepFieldsItemValidationFormat.ts +1 -1
- package/src/generated/model/createFlow201StepGates.ts +10 -8
- package/src/generated/model/createFlow201StepGatesConfig.ts +1 -1
- package/src/generated/model/createFlow201StepGatesKind.ts +4 -3
- package/src/generated/model/createFlow201StepIdentifier.ts +6 -6
- package/src/generated/model/createFlow201StepSsoProvidersItem.ts +1 -1
- package/src/generated/model/createFlow201StepTexts.ts +1 -1
- package/src/generated/model/createFlowBody.ts +7 -2
- package/src/generated/model/createFlowBodyHint.ts +4 -1
- package/src/generated/model/createFlowBodyPurpose.ts +3 -0
- package/src/generated/model/createFlowDefault.ts +9 -0
- package/src/generated/model/createFlowDefinition201.ts +22 -10
- package/src/generated/model/createFlowDefinition201FlowDefinition.ts +47 -26
- package/src/generated/model/createFlowDefinition201FlowDefinitionAudience.ts +1 -1
- package/src/generated/model/createFlowDefinition201FlowDefinitionStatus.ts +2 -2
- package/src/generated/model/createFlowDefinition201FlowDefinitionStepsItem.ts +46 -28
- package/src/generated/model/createFlowDefinition201FlowDefinitionStepsItemActionsItem.ts +9 -7
- package/src/generated/model/createFlowDefinition201FlowDefinitionStepsItemActionsItemKind.ts +2 -2
- package/src/generated/model/createFlowDefinition201FlowDefinitionStepsItemGates.ts +11 -10
- package/src/generated/model/createFlowDefinition201FlowDefinitionStepsItemGatesConfig.ts +1 -1
- package/src/generated/model/createFlowDefinition201FlowDefinitionStepsItemGatesKind.ts +4 -3
- package/src/generated/model/createFlowDefinition201FlowDefinitionStepsItemTransitions.ts +40 -20
- package/src/generated/model/createFlowDefinition201FlowDefinitionStepsItemTransitionsAction.ts +8 -5
- package/src/generated/model/createFlowDefinition201FlowDefinitionStepsItemTransitionsPurpose.ts +7 -8
- package/src/generated/model/createFlowDefinition201UserSchema.ts +2 -2
- package/src/generated/model/createFlowDefinition201UserSchemaMetadata.ts +2 -1
- package/src/generated/model/createFlowDefinition201UserSchemaSchema.ts +21 -20
- package/src/generated/model/createFlowDefinitionBody.ts +22 -12
- package/src/generated/model/createFlowDefinitionBodyFlowDefinition.ts +47 -26
- package/src/generated/model/createFlowDefinitionBodyFlowDefinitionAudience.ts +1 -1
- package/src/generated/model/createFlowDefinitionBodyFlowDefinitionStatus.ts +2 -2
- package/src/generated/model/createFlowDefinitionBodyFlowDefinitionStepsItem.ts +46 -28
- package/src/generated/model/createFlowDefinitionBodyFlowDefinitionStepsItemActionsItem.ts +9 -7
- package/src/generated/model/createFlowDefinitionBodyFlowDefinitionStepsItemActionsItemKind.ts +2 -2
- package/src/generated/model/createFlowDefinitionBodyFlowDefinitionStepsItemGates.ts +11 -10
- package/src/generated/model/createFlowDefinitionBodyFlowDefinitionStepsItemGatesConfig.ts +1 -1
- package/src/generated/model/createFlowDefinitionBodyFlowDefinitionStepsItemGatesKind.ts +4 -3
- package/src/generated/model/createFlowDefinitionBodyFlowDefinitionStepsItemTransitions.ts +40 -20
- package/src/generated/model/createFlowDefinitionBodyFlowDefinitionStepsItemTransitionsAction.ts +8 -5
- package/src/generated/model/createFlowDefinitionBodyFlowDefinitionStepsItemTransitionsPurpose.ts +7 -8
- package/src/generated/model/createGrant201.ts +14 -14
- package/src/generated/model/createGrant201ObjectType.ts +1 -1
- package/src/generated/model/createGrant201Relation.ts +1 -1
- package/src/generated/model/createGrant201Team.ts +7 -7
- package/src/generated/model/createGrant201TeamStatus.ts +2 -2
- package/src/generated/model/createGrant201User.ts +5 -5
- package/src/generated/model/createGrant201UserMetadata.ts +10 -11
- package/src/generated/model/createGrant201UserMetadataLifecycleOwnerTeam.ts +11 -12
- package/src/generated/model/createGrant201UserMetadataLifecycleOwnerTeamStatus.ts +2 -2
- package/src/generated/model/createGrantBody.ts +12 -12
- package/src/generated/model/createGrantBodyRelation.ts +1 -1
- package/src/generated/model/createGrantBodyTeam.ts +3 -3
- package/src/generated/model/createGrantBodyUser.ts +5 -5
- package/src/generated/model/createGrantDefault.ts +9 -0
- package/src/generated/model/createGrantParams.ts +3 -1
- package/src/generated/model/createHandoff200.ts +9 -10
- package/src/generated/model/createIdp200.ts +10 -9
- package/src/generated/model/createIdp200Definition.ts +7 -7
- package/src/generated/model/createIdp200DefinitionClaimMapping.ts +1 -1
- package/src/generated/model/createIdp200DefinitionOidc.ts +7 -7
- package/src/generated/model/createIdp200DefinitionOidcStaticAuthorizeParameters.ts +1 -1
- package/src/generated/model/createIdp200DefinitionProvisioning.ts +1 -1
- package/src/generated/model/createIdp200DefinitionVerifiedClaims.ts +1 -1
- package/src/generated/model/createIdp201.ts +10 -9
- package/src/generated/model/createIdp201Definition.ts +7 -7
- package/src/generated/model/createIdp201DefinitionClaimMapping.ts +1 -1
- package/src/generated/model/createIdp201DefinitionOidc.ts +7 -7
- package/src/generated/model/createIdp201DefinitionOidcStaticAuthorizeParameters.ts +1 -1
- package/src/generated/model/createIdp201DefinitionProvisioning.ts +1 -1
- package/src/generated/model/createIdp201DefinitionVerifiedClaims.ts +1 -1
- package/src/generated/model/createIdpBody.ts +1 -1
- package/src/generated/model/createIdpBodyIdp.ts +7 -7
- package/src/generated/model/createIdpBodyIdpClaimMapping.ts +1 -1
- package/src/generated/model/createIdpBodyIdpOidc.ts +7 -7
- package/src/generated/model/createIdpBodyIdpOidcStaticAuthorizeParameters.ts +1 -1
- package/src/generated/model/createIdpBodyIdpProvisioning.ts +1 -1
- package/src/generated/model/createIdpBodyIdpVerifiedClaims.ts +1 -1
- package/src/generated/model/createIdpParams.ts +3 -1
- package/src/generated/model/createProject201.ts +10 -5
- package/src/generated/model/createProject201OriginsItem.ts +17 -5
- package/src/generated/model/createProject201OriginsItemKind.ts +4 -0
- package/src/generated/model/createProjectBody.ts +5 -6
- package/src/generated/model/createProjectBodyOriginsItem.ts +17 -5
- package/src/generated/model/createProjectBodyOriginsItemKind.ts +4 -0
- package/src/generated/model/createRelease200.ts +15 -15
- package/src/generated/model/createRelease200Metadata.ts +8 -8
- package/src/generated/model/createRelease200PointersItem.ts +13 -12
- package/src/generated/model/createRelease200PointersItemKind.ts +3 -3
- package/src/generated/model/createRelease201.ts +15 -15
- package/src/generated/model/createRelease201Metadata.ts +8 -8
- package/src/generated/model/createRelease201PointersItem.ts +13 -12
- package/src/generated/model/createRelease201PointersItemKind.ts +3 -3
- package/src/generated/model/createReleaseBody.ts +7 -11
- package/src/generated/model/createReleaseBodyPointersItem.ts +8 -8
- package/src/generated/model/createReleaseBodyPointersItemKind.ts +3 -3
- package/src/generated/model/createReleaseParams.ts +3 -1
- package/src/generated/model/createSchema201.ts +1 -1
- package/src/generated/model/createSchemaBody.ts +23 -22
- package/src/generated/model/createSchemaParams.ts +4 -2
- package/src/generated/model/createSession201.ts +8 -8
- package/src/generated/model/createSession201Session.ts +16 -16
- package/src/generated/model/createSession201SessionFactorsItem.ts +2 -2
- package/src/generated/model/createSession201SessionFactorsItemPayload.ts +5 -5
- package/src/generated/model/createSession201SessionState.ts +1 -1
- package/src/generated/model/createSession201SessionUser.ts +5 -5
- package/src/generated/model/createSessionBody.ts +1 -1
- package/src/generated/model/createTeam201.ts +2 -2
- package/src/generated/model/createTeam201Status.ts +2 -2
- package/src/generated/model/createTeamBody.ts +1 -1
- package/src/generated/model/createTeamParams.ts +3 -1
- package/src/generated/model/createUser201.ts +28 -29
- package/src/generated/model/createUser201Metadata.ts +10 -11
- package/src/generated/model/createUser201MetadataLifecycleOwnerTeam.ts +11 -12
- package/src/generated/model/createUser201MetadataLifecycleOwnerTeamStatus.ts +2 -2
- package/src/generated/model/createUser201TeamsItem.ts +4 -4
- package/src/generated/model/createUserBody.ts +9 -8
- package/src/generated/model/createUserParams.ts +4 -2
- package/src/generated/model/deleteGrantParams.ts +3 -1
- 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/deleteVariableParams.ts +3 -1
- package/src/generated/model/evaluatePolicy200.ts +5 -4
- package/src/generated/model/evaluatePolicy200Violations.ts +4 -3
- package/src/generated/model/evaluatePolicyBody.ts +8 -9
- package/src/generated/model/evaluatePolicyParams.ts +3 -1
- package/src/generated/model/exchangeHandoff200.ts +8 -8
- package/src/generated/model/exchangeHandoff200Session.ts +16 -16
- package/src/generated/model/exchangeHandoff200SessionFactorsItem.ts +2 -2
- package/src/generated/model/exchangeHandoff200SessionFactorsItemPayload.ts +5 -5
- package/src/generated/model/exchangeHandoff200SessionState.ts +1 -1
- package/src/generated/model/exchangeHandoff200SessionUser.ts +5 -5
- package/src/generated/model/exchangeHandoffBody.ts +7 -5
- package/src/generated/model/exchangeHandoffParams.ts +3 -1
- package/src/generated/model/finishUserPasskeyRegistrationBody.ts +1 -1
- package/src/generated/model/getAuthAttempt200.ts +23 -22
- package/src/generated/model/getAuthAttempt200ChallengesItem.ts +9 -7
- package/src/generated/model/getAuthAttempt200ChallengesItemState.ts +1 -1
- package/src/generated/model/getAuthAttempt200CompletedFactorsItem.ts +2 -2
- package/src/generated/model/getAuthAttempt200CompletedFactorsItemPayload.ts +5 -5
- package/src/generated/model/getAuthAttempt200State.ts +2 -2
- package/src/generated/model/getBrandingById200.ts +10 -10
- package/src/generated/model/getBrandingById200Branding.ts +24 -22
- package/src/generated/model/getBrandingById200BrandingLayout.ts +8 -7
- package/src/generated/model/getBrandingById200BrandingShape.ts +1 -1
- package/src/generated/model/getBrandingById200BrandingTheme.ts +5 -7
- package/src/generated/model/getBrandingById200BrandingThemeDark.ts +7 -7
- package/src/generated/model/getBrandingById200BrandingThemeDarkPalette.ts +63 -62
- package/src/generated/model/getBrandingById200BrandingThemeLight.ts +7 -7
- package/src/generated/model/getBrandingById200BrandingThemeLightPalette.ts +63 -62
- package/src/generated/model/getBrandingById200BrandingTypography.ts +4 -4
- package/src/generated/model/getClaimStatus200.ts +4 -5
- package/src/generated/model/getClaimStatusParams.ts +1 -1
- package/src/generated/model/getClaimWindow200.ts +6 -6
- package/src/generated/model/getClaimWindowParams.ts +1 -1
- package/src/generated/model/getDeploymentById200.ts +16 -14
- package/src/generated/model/getDeploymentById200Metadata.ts +1 -1
- package/src/generated/model/getDeploymentById200Release.ts +15 -15
- package/src/generated/model/getDeploymentById200ReleaseMetadata.ts +8 -8
- package/src/generated/model/getDeploymentById200ReleasePointersItem.ts +13 -12
- package/src/generated/model/getDeploymentById200ReleasePointersItemKind.ts +3 -3
- package/src/generated/model/getDeploymentById200Status.ts +3 -3
- package/src/generated/model/getDeploymentByIdParams.ts +3 -1
- package/src/generated/model/getDeploymentVariablesParams.ts +3 -1
- package/src/generated/model/getEvent200.ts +1574 -1323
- package/src/generated/model/getEventParams.ts +3 -1
- package/src/generated/model/getFlowDefinition200.ts +22 -10
- package/src/generated/model/getFlowDefinition200FlowDefinition.ts +47 -26
- package/src/generated/model/getFlowDefinition200FlowDefinitionAudience.ts +1 -1
- package/src/generated/model/getFlowDefinition200FlowDefinitionStatus.ts +2 -2
- package/src/generated/model/getFlowDefinition200FlowDefinitionStepsItem.ts +46 -28
- package/src/generated/model/getFlowDefinition200FlowDefinitionStepsItemActionsItem.ts +9 -7
- package/src/generated/model/getFlowDefinition200FlowDefinitionStepsItemActionsItemKind.ts +2 -2
- package/src/generated/model/getFlowDefinition200FlowDefinitionStepsItemGates.ts +11 -10
- package/src/generated/model/getFlowDefinition200FlowDefinitionStepsItemGatesConfig.ts +1 -1
- package/src/generated/model/getFlowDefinition200FlowDefinitionStepsItemGatesKind.ts +4 -3
- package/src/generated/model/getFlowDefinition200FlowDefinitionStepsItemTransitions.ts +40 -20
- package/src/generated/model/getFlowDefinition200FlowDefinitionStepsItemTransitionsAction.ts +8 -5
- package/src/generated/model/getFlowDefinition200FlowDefinitionStepsItemTransitionsPurpose.ts +7 -8
- package/src/generated/model/getFlowDefinition200UserSchema.ts +2 -2
- package/src/generated/model/getFlowDefinition200UserSchemaMetadata.ts +2 -1
- package/src/generated/model/getFlowDefinition200UserSchemaSchema.ts +21 -20
- package/src/generated/model/getFlowStep200.ts +16 -12
- package/src/generated/model/getFlowStep200Branding.ts +24 -22
- package/src/generated/model/getFlowStep200BrandingLayout.ts +8 -7
- package/src/generated/model/getFlowStep200BrandingShape.ts +1 -1
- package/src/generated/model/getFlowStep200BrandingTheme.ts +5 -7
- package/src/generated/model/getFlowStep200BrandingThemeDark.ts +7 -7
- package/src/generated/model/getFlowStep200BrandingThemeDarkPalette.ts +63 -62
- package/src/generated/model/getFlowStep200BrandingThemeLight.ts +7 -7
- package/src/generated/model/getFlowStep200BrandingThemeLightPalette.ts +63 -62
- package/src/generated/model/getFlowStep200BrandingTypography.ts +4 -4
- package/src/generated/model/getFlowStep200Step.ts +36 -31
- package/src/generated/model/getFlowStep200StepActionsItem.ts +3 -3
- package/src/generated/model/getFlowStep200StepActionsItemKind.ts +1 -1
- package/src/generated/model/getFlowStep200StepChallenge.ts +4 -3
- package/src/generated/model/getFlowStep200StepComplete.ts +1 -1
- package/src/generated/model/getFlowStep200StepFieldsItem.ts +14 -13
- package/src/generated/model/getFlowStep200StepFieldsItemType.ts +1 -1
- package/src/generated/model/getFlowStep200StepFieldsItemValidation.ts +2 -2
- package/src/generated/model/getFlowStep200StepFieldsItemValidationFormat.ts +1 -1
- package/src/generated/model/getFlowStep200StepGates.ts +10 -8
- package/src/generated/model/getFlowStep200StepGatesConfig.ts +1 -1
- package/src/generated/model/getFlowStep200StepGatesKind.ts +4 -3
- package/src/generated/model/getFlowStep200StepIdentifier.ts +6 -6
- package/src/generated/model/getFlowStep200StepSsoProvidersItem.ts +1 -1
- package/src/generated/model/getFlowStep200StepTexts.ts +1 -1
- package/src/generated/model/getFlowStepDefault.ts +27 -0
- package/src/generated/model/getGrant200.ts +14 -14
- package/src/generated/model/getGrant200ObjectType.ts +1 -1
- package/src/generated/model/getGrant200Relation.ts +1 -1
- package/src/generated/model/getGrant200Team.ts +7 -7
- package/src/generated/model/getGrant200TeamStatus.ts +2 -2
- package/src/generated/model/getGrant200User.ts +5 -5
- package/src/generated/model/getGrant200UserMetadata.ts +10 -11
- package/src/generated/model/getGrant200UserMetadataLifecycleOwnerTeam.ts +11 -12
- package/src/generated/model/getGrant200UserMetadataLifecycleOwnerTeamStatus.ts +2 -2
- package/src/generated/model/getGrantDefault.ts +0 -9
- package/src/generated/model/getGrantExpandItem.ts +8 -5
- package/src/generated/model/getGrantParams.ts +6 -3
- package/src/generated/model/getIdpById200.ts +10 -9
- package/src/generated/model/getIdpById200Definition.ts +7 -7
- package/src/generated/model/getIdpById200DefinitionClaimMapping.ts +1 -1
- package/src/generated/model/getIdpById200DefinitionOidc.ts +7 -7
- package/src/generated/model/getIdpById200DefinitionOidcStaticAuthorizeParameters.ts +1 -1
- package/src/generated/model/getIdpById200DefinitionProvisioning.ts +1 -1
- package/src/generated/model/getIdpById200DefinitionVerifiedClaims.ts +1 -1
- package/src/generated/model/getIdpByIdParams.ts +3 -1
- package/src/generated/model/getIdpRevisionById200.ts +10 -9
- package/src/generated/model/getIdpRevisionById200Definition.ts +7 -7
- package/src/generated/model/getIdpRevisionById200DefinitionClaimMapping.ts +1 -1
- package/src/generated/model/getIdpRevisionById200DefinitionOidc.ts +7 -7
- package/src/generated/model/getIdpRevisionById200DefinitionOidcStaticAuthorizeParameters.ts +1 -1
- package/src/generated/model/getIdpRevisionById200DefinitionProvisioning.ts +1 -1
- package/src/generated/model/getIdpRevisionById200DefinitionVerifiedClaims.ts +1 -1
- package/src/generated/model/getIdpRevisionByIdParams.ts +3 -1
- package/src/generated/model/getMyPasswordState200.ts +2 -2
- package/src/generated/model/getMySession200.ts +16 -16
- package/src/generated/model/getMySession200FactorsItem.ts +2 -2
- package/src/generated/model/getMySession200FactorsItemPayload.ts +5 -5
- package/src/generated/model/getMySession200State.ts +1 -1
- package/src/generated/model/getMySession200User.ts +5 -5
- package/src/generated/model/getMySessionCsrfToken200.ts +1 -1
- package/src/generated/model/getMyUser200.ts +28 -29
- package/src/generated/model/getMyUser200Metadata.ts +10 -11
- package/src/generated/model/getMyUser200MetadataLifecycleOwnerTeam.ts +11 -12
- package/src/generated/model/getMyUser200MetadataLifecycleOwnerTeamStatus.ts +2 -2
- package/src/generated/model/getMyUser200TeamsItem.ts +4 -4
- package/src/generated/model/getMyUserSchema200.ts +4 -4
- package/src/generated/model/getMyUserSchema200Metadata.ts +2 -1
- package/src/generated/model/getMyUserSchema200Schema.ts +21 -20
- package/src/generated/model/getPolicy200.ts +3 -3
- package/src/generated/model/getPolicyParams.ts +3 -1
- package/src/generated/model/getPolicyRevision200.ts +3 -3
- package/src/generated/model/getPolicyRevisionParams.ts +3 -1
- package/src/generated/model/getProject200.ts +34 -30
- package/src/generated/model/getReleaseById200.ts +15 -15
- package/src/generated/model/getReleaseById200Metadata.ts +8 -8
- package/src/generated/model/getReleaseById200PointersItem.ts +13 -12
- package/src/generated/model/getReleaseById200PointersItemKind.ts +3 -3
- package/src/generated/model/getReleaseByIdParams.ts +3 -1
- package/src/generated/model/getSchemaById200.ts +4 -4
- package/src/generated/model/getSchemaById200Metadata.ts +2 -1
- package/src/generated/model/getSchemaById200Schema.ts +21 -20
- package/src/generated/model/getSchemaByIdParams.ts +3 -3
- package/src/generated/model/getSession200.ts +16 -16
- package/src/generated/model/getSession200FactorsItem.ts +2 -2
- package/src/generated/model/getSession200FactorsItemPayload.ts +5 -5
- package/src/generated/model/getSession200State.ts +1 -1
- package/src/generated/model/getSession200User.ts +5 -5
- package/src/generated/model/getTeam200.ts +2 -2
- package/src/generated/model/getTeam200Status.ts +2 -2
- package/src/generated/model/getUserByID200.ts +28 -29
- package/src/generated/model/getUserByID200Metadata.ts +10 -11
- package/src/generated/model/getUserByID200MetadataLifecycleOwnerTeam.ts +11 -12
- package/src/generated/model/getUserByID200MetadataLifecycleOwnerTeamStatus.ts +2 -2
- package/src/generated/model/getUserByID200TeamsItem.ts +4 -4
- package/src/generated/model/getUserByIDParams.ts +4 -3
- package/src/generated/model/getUserPasswordState200.ts +2 -2
- package/src/generated/model/getVariable200.ts +4 -4
- package/src/generated/model/getVariable200Preview.ts +2 -2
- package/src/generated/model/getVariable200Primary.ts +2 -2
- package/src/generated/model/getVariableParams.ts +3 -1
- package/src/generated/model/getVariables200.ts +4 -4
- package/src/generated/model/getVariables200Preview.ts +2 -2
- package/src/generated/model/getVariables200Primary.ts +2 -2
- package/src/generated/model/getVariablesParams.ts +3 -1
- package/src/generated/model/index.ts +2 -0
- package/src/generated/model/initClaim201.ts +3 -3
- package/src/generated/model/initClaim409.ts +2 -2
- package/src/generated/model/issueChallenge201.ts +9 -7
- package/src/generated/model/issueChallenge201State.ts +1 -1
- package/src/generated/model/issueChallengeBody.ts +2 -2
- package/src/generated/model/listBrandingParams.ts +3 -1
- package/src/generated/model/listDeployments200DeploymentsItem.ts +16 -14
- package/src/generated/model/listDeployments200DeploymentsItemMetadata.ts +1 -1
- package/src/generated/model/listDeployments200DeploymentsItemRelease.ts +15 -15
- package/src/generated/model/listDeployments200DeploymentsItemReleaseMetadata.ts +8 -8
- package/src/generated/model/listDeployments200DeploymentsItemReleasePointersItem.ts +13 -12
- package/src/generated/model/listDeployments200DeploymentsItemReleasePointersItemKind.ts +3 -3
- package/src/generated/model/listDeployments200DeploymentsItemStatus.ts +3 -3
- package/src/generated/model/listDeploymentsExpandItem.ts +4 -4
- package/src/generated/model/listDeploymentsParams.ts +3 -1
- package/src/generated/model/listEvents200.ts +1 -1
- package/src/generated/model/listEvents200DataItem.ts +1574 -1323
- package/src/generated/model/listEventsParams.ts +34 -6
- package/src/generated/model/listFlowDefinitions200FlowDefinitionsItem.ts +22 -10
- package/src/generated/model/listFlowDefinitions200FlowDefinitionsItemFlowDefinition.ts +47 -26
- package/src/generated/model/listFlowDefinitions200FlowDefinitionsItemFlowDefinitionAudience.ts +1 -1
- package/src/generated/model/listFlowDefinitions200FlowDefinitionsItemFlowDefinitionStatus.ts +2 -2
- package/src/generated/model/listFlowDefinitions200FlowDefinitionsItemFlowDefinitionStepsItem.ts +46 -28
- package/src/generated/model/listFlowDefinitions200FlowDefinitionsItemFlowDefinitionStepsItemActionsItem.ts +9 -7
- package/src/generated/model/listFlowDefinitions200FlowDefinitionsItemFlowDefinitionStepsItemActionsItemKind.ts +2 -2
- package/src/generated/model/listFlowDefinitions200FlowDefinitionsItemFlowDefinitionStepsItemGates.ts +11 -10
- package/src/generated/model/listFlowDefinitions200FlowDefinitionsItemFlowDefinitionStepsItemGatesConfig.ts +1 -1
- package/src/generated/model/listFlowDefinitions200FlowDefinitionsItemFlowDefinitionStepsItemGatesKind.ts +4 -3
- package/src/generated/model/listFlowDefinitions200FlowDefinitionsItemFlowDefinitionStepsItemTransitions.ts +40 -20
- package/src/generated/model/listFlowDefinitions200FlowDefinitionsItemFlowDefinitionStepsItemTransitionsAction.ts +8 -5
- package/src/generated/model/listFlowDefinitions200FlowDefinitionsItemFlowDefinitionStepsItemTransitionsPurpose.ts +7 -8
- package/src/generated/model/listFlowDefinitions200FlowDefinitionsItemUserSchema.ts +2 -2
- package/src/generated/model/listFlowDefinitions200FlowDefinitionsItemUserSchemaMetadata.ts +2 -1
- package/src/generated/model/listFlowDefinitions200FlowDefinitionsItemUserSchemaSchema.ts +21 -20
- package/src/generated/model/listFlowDefinitionsExpandItem.ts +2 -2
- package/src/generated/model/listFlowDefinitionsParams.ts +8 -6
- package/src/generated/model/listIdpRevisions200.ts +1 -2
- package/src/generated/model/listIdpRevisions200RevisionsItem.ts +10 -9
- package/src/generated/model/listIdpRevisions200RevisionsItemDefinition.ts +7 -7
- package/src/generated/model/listIdpRevisions200RevisionsItemDefinitionClaimMapping.ts +1 -1
- package/src/generated/model/listIdpRevisions200RevisionsItemDefinitionOidc.ts +7 -7
- package/src/generated/model/listIdpRevisions200RevisionsItemDefinitionOidcStaticAuthorizeParameters.ts +1 -1
- package/src/generated/model/listIdpRevisions200RevisionsItemDefinitionProvisioning.ts +1 -1
- package/src/generated/model/listIdpRevisions200RevisionsItemDefinitionVerifiedClaims.ts +1 -1
- package/src/generated/model/listIdpRevisionsParams.ts +3 -1
- package/src/generated/model/listMyIdentityLinks200IdentityLinksItem.ts +2 -2
- package/src/generated/model/listMyProjects200.ts +1 -1
- package/src/generated/model/listMyProjects200ProjectsItem.ts +2 -3
- package/src/generated/model/listMyProjects200ProjectsItemOriginsItem.ts +17 -5
- package/src/generated/model/listMyProjects200ProjectsItemOriginsItemKind.ts +4 -0
- package/src/generated/model/listMyProjects200ProjectsItemPasswordHash.ts +12 -15
- package/src/generated/model/listMyProjects200ProjectsItemPasswordHashAlgorithm.ts +1 -1
- package/src/generated/model/listMyProjects200ProjectsItemPasswordHashParams.ts +15 -18
- package/src/generated/model/listMyProjects200ProjectsItemPasswordHashParamsHash.ts +4 -4
- package/src/generated/model/listMyTeams200TeamsItem.ts +4 -4
- package/src/generated/model/listPolicies200.ts +2 -2
- package/src/generated/model/listPolicies200PoliciesItem.ts +3 -3
- package/src/generated/model/listPoliciesParams.ts +3 -1
- package/src/generated/model/listPolicyRevisions200.ts +1 -1
- package/src/generated/model/listPolicyRevisions200RevisionsItem.ts +3 -3
- package/src/generated/model/listPolicyRevisionsParams.ts +3 -1
- package/src/generated/model/listPreviews200PreviewsItem.ts +4 -5
- package/src/generated/model/listProjectAdmins200AdminsItem.ts +3 -3
- package/src/generated/model/listProjectAdmins200AdminsItemSourcesItem.ts +13 -15
- package/src/generated/model/listProjectAdmins200AdminsItemUser.ts +5 -5
- package/src/generated/model/listReleases200.ts +1 -1
- package/src/generated/model/listReleases200ReleasesItem.ts +4 -4
- package/src/generated/model/listReleases200ReleasesItemMetadata.ts +8 -8
- package/src/generated/model/listReleasesParams.ts +4 -2
- package/src/generated/model/listSchemas200.ts +1 -1
- package/src/generated/model/listSchemas200SchemasItem.ts +4 -4
- package/src/generated/model/listSchemas200SchemasItemMetadata.ts +2 -1
- package/src/generated/model/listSchemas200SchemasItemSchema.ts +21 -20
- package/src/generated/model/listSchemasExpandItem.ts +2 -2
- package/src/generated/model/listSchemasParams.ts +7 -5
- package/src/generated/model/listUserIdentityLinks200IdentityLinksItem.ts +2 -2
- package/src/generated/model/listUserTeams200TeamsItem.ts +4 -4
- package/src/generated/model/patchMyUser200.ts +28 -29
- package/src/generated/model/patchMyUser200Metadata.ts +10 -11
- package/src/generated/model/patchMyUser200MetadataLifecycleOwnerTeam.ts +11 -12
- package/src/generated/model/patchMyUser200MetadataLifecycleOwnerTeamStatus.ts +2 -2
- package/src/generated/model/patchMyUser200TeamsItem.ts +4 -4
- package/src/generated/model/patchMyUserBody.ts +2 -2
- package/src/generated/model/patchProject200.ts +34 -30
- package/src/generated/model/patchProjectBody.ts +3 -3
- package/src/generated/model/patchProjectBodyPasswordHash.ts +15 -18
- package/src/generated/model/patchProjectBodyPasswordHashAlgorithm.ts +1 -1
- package/src/generated/model/patchProjectBodyPasswordHashParams.ts +15 -18
- package/src/generated/model/patchProjectBodyPasswordHashParamsHash.ts +4 -4
- package/src/generated/model/patchUserByID200.ts +28 -29
- package/src/generated/model/patchUserByID200Metadata.ts +10 -11
- package/src/generated/model/patchUserByID200MetadataLifecycleOwnerTeam.ts +11 -12
- package/src/generated/model/patchUserByID200MetadataLifecycleOwnerTeamStatus.ts +2 -2
- package/src/generated/model/patchUserByID200TeamsItem.ts +4 -4
- package/src/generated/model/patchUserByIDBody.ts +21 -13
- package/src/generated/model/publishPolicy201.ts +3 -3
- package/src/generated/model/publishPolicyBody.ts +3 -3
- package/src/generated/model/publishPolicyParams.ts +3 -1
- package/src/generated/model/queryGrants200GrantsItem.ts +14 -14
- package/src/generated/model/queryGrants200GrantsItemObjectType.ts +1 -1
- package/src/generated/model/queryGrants200GrantsItemRelation.ts +1 -1
- package/src/generated/model/queryGrants200GrantsItemTeam.ts +7 -7
- package/src/generated/model/queryGrants200GrantsItemTeamStatus.ts +2 -2
- package/src/generated/model/queryGrants200GrantsItemUser.ts +5 -5
- package/src/generated/model/queryGrants200GrantsItemUserMetadata.ts +10 -11
- package/src/generated/model/queryGrants200GrantsItemUserMetadataLifecycleOwnerTeam.ts +11 -12
- package/src/generated/model/queryGrants200GrantsItemUserMetadataLifecycleOwnerTeamStatus.ts +2 -2
- package/src/generated/model/queryGrantsBody.ts +2 -3
- package/src/generated/model/queryGrantsBodyExpandItem.ts +8 -5
- package/src/generated/model/queryGrantsBodyFilterItem.ts +3 -5
- package/src/generated/model/queryGrantsBodyFilterItemOperation.ts +1 -2
- package/src/generated/model/queryGrantsDefault.ts +0 -9
- package/src/generated/model/queryGrantsParams.ts +3 -1
- package/src/generated/model/queryIdps200.ts +1 -1
- package/src/generated/model/queryIdps200IdpsItem.ts +10 -9
- package/src/generated/model/queryIdps200IdpsItemDefinition.ts +7 -7
- package/src/generated/model/queryIdps200IdpsItemDefinitionClaimMapping.ts +1 -1
- package/src/generated/model/queryIdps200IdpsItemDefinitionOidc.ts +7 -7
- package/src/generated/model/queryIdps200IdpsItemDefinitionOidcStaticAuthorizeParameters.ts +1 -1
- package/src/generated/model/queryIdps200IdpsItemDefinitionProvisioning.ts +1 -1
- package/src/generated/model/queryIdps200IdpsItemDefinitionVerifiedClaims.ts +1 -1
- package/src/generated/model/queryIdpsBody.ts +2 -2
- package/src/generated/model/queryIdpsBodyFilterItem.ts +5 -7
- package/src/generated/model/queryIdpsBodyFilterItemField.ts +2 -2
- package/src/generated/model/queryIdpsBodyFilterItemOperation.ts +1 -2
- package/src/generated/model/queryIdpsBodySorting.ts +2 -2
- package/src/generated/model/queryIdpsBodySortingField.ts +2 -2
- package/src/generated/model/queryIdpsParams.ts +3 -1
- package/src/generated/model/queryProjects200ProjectsItem.ts +2 -3
- package/src/generated/model/queryProjects200ProjectsItemOriginsItem.ts +17 -5
- package/src/generated/model/queryProjects200ProjectsItemOriginsItemKind.ts +4 -0
- package/src/generated/model/queryProjects200ProjectsItemPasswordHash.ts +12 -15
- package/src/generated/model/queryProjects200ProjectsItemPasswordHashAlgorithm.ts +1 -1
- package/src/generated/model/queryProjects200ProjectsItemPasswordHashParams.ts +15 -18
- package/src/generated/model/queryProjects200ProjectsItemPasswordHashParamsHash.ts +4 -4
- package/src/generated/model/queryProjectsBodyFilterItem.ts +3 -5
- package/src/generated/model/queryProjectsBodyFilterItemOperation.ts +1 -2
- package/src/generated/model/querySessions200SessionsItem.ts +16 -16
- package/src/generated/model/querySessions200SessionsItemFactorsItem.ts +2 -2
- package/src/generated/model/querySessions200SessionsItemFactorsItemPayload.ts +5 -5
- package/src/generated/model/querySessions200SessionsItemState.ts +1 -1
- package/src/generated/model/querySessions200SessionsItemUser.ts +5 -5
- package/src/generated/model/querySessionsBodyFilterItem.ts +4 -6
- package/src/generated/model/querySessionsBodyFilterItemField.ts +1 -1
- package/src/generated/model/querySessionsBodyFilterItemOperation.ts +1 -2
- package/src/generated/model/querySessionsBodySorting.ts +2 -3
- package/src/generated/model/querySessionsBodySortingField.ts +2 -3
- package/src/generated/model/querySessionsParams.ts +3 -1
- package/src/generated/model/queryTeams200TeamsItem.ts +2 -2
- package/src/generated/model/queryTeams200TeamsItemStatus.ts +2 -2
- package/src/generated/model/queryTeamsBodyFilterItem.ts +3 -5
- package/src/generated/model/queryTeamsBodyFilterItemOperation.ts +1 -2
- package/src/generated/model/queryTeamsParams.ts +3 -2
- package/src/generated/model/queryUsers200UsersItem.ts +28 -29
- package/src/generated/model/queryUsers200UsersItemMetadata.ts +10 -11
- package/src/generated/model/queryUsers200UsersItemMetadataLifecycleOwnerTeam.ts +11 -12
- package/src/generated/model/queryUsers200UsersItemMetadataLifecycleOwnerTeamStatus.ts +2 -2
- package/src/generated/model/queryUsers200UsersItemTeamsItem.ts +4 -4
- package/src/generated/model/queryUsersBody.ts +2 -2
- package/src/generated/model/queryUsersBodyExpandItem.ts +8 -8
- package/src/generated/model/queryUsersBodyFilterItem.ts +13 -16
- package/src/generated/model/queryUsersBodyFilterItemField.ts +10 -11
- package/src/generated/model/queryUsersBodyFilterItemOperation.ts +1 -2
- package/src/generated/model/queryUsersBodySorting.ts +4 -5
- package/src/generated/model/queryUsersBodySortingField.ts +4 -5
- package/src/generated/model/queryUsersParams.ts +2 -2
- package/src/generated/model/removeOriginBody.ts +2 -2
- package/src/generated/model/revokeRelease200.ts +15 -15
- package/src/generated/model/revokeRelease200Metadata.ts +8 -8
- package/src/generated/model/revokeRelease200PointersItem.ts +13 -12
- package/src/generated/model/revokeRelease200PointersItemKind.ts +3 -3
- package/src/generated/model/revokeReleaseParams.ts +3 -1
- package/src/generated/model/rollbackDeployment200.ts +16 -14
- package/src/generated/model/rollbackDeployment200Metadata.ts +1 -1
- package/src/generated/model/rollbackDeployment200Release.ts +15 -15
- package/src/generated/model/rollbackDeployment200ReleaseMetadata.ts +8 -8
- package/src/generated/model/rollbackDeployment200ReleasePointersItem.ts +13 -12
- package/src/generated/model/rollbackDeployment200ReleasePointersItemKind.ts +3 -3
- package/src/generated/model/rollbackDeployment200Status.ts +3 -3
- package/src/generated/model/rollbackDeployment201.ts +16 -14
- package/src/generated/model/rollbackDeployment201Metadata.ts +1 -1
- package/src/generated/model/rollbackDeployment201Release.ts +15 -15
- package/src/generated/model/rollbackDeployment201ReleaseMetadata.ts +8 -8
- package/src/generated/model/rollbackDeployment201ReleasePointersItem.ts +13 -12
- package/src/generated/model/rollbackDeployment201ReleasePointersItemKind.ts +3 -3
- package/src/generated/model/rollbackDeployment201Status.ts +3 -3
- package/src/generated/model/rollbackDeployment409.ts +41 -40
- package/src/generated/model/rollbackDeploymentParams.ts +3 -1
- package/src/generated/model/setUserPasswordBody.ts +1 -1
- package/src/generated/model/setUserPasswordDefault.ts +63 -0
- package/src/generated/model/submitFlowStep200.ts +16 -12
- package/src/generated/model/submitFlowStep200Branding.ts +24 -22
- package/src/generated/model/submitFlowStep200BrandingLayout.ts +8 -7
- package/src/generated/model/submitFlowStep200BrandingShape.ts +1 -1
- package/src/generated/model/submitFlowStep200BrandingTheme.ts +5 -7
- package/src/generated/model/submitFlowStep200BrandingThemeDark.ts +7 -7
- package/src/generated/model/submitFlowStep200BrandingThemeDarkPalette.ts +63 -62
- package/src/generated/model/submitFlowStep200BrandingThemeLight.ts +7 -7
- package/src/generated/model/submitFlowStep200BrandingThemeLightPalette.ts +63 -62
- package/src/generated/model/submitFlowStep200BrandingTypography.ts +4 -4
- package/src/generated/model/submitFlowStep200Step.ts +36 -31
- package/src/generated/model/submitFlowStep200StepActionsItem.ts +3 -3
- package/src/generated/model/submitFlowStep200StepActionsItemKind.ts +1 -1
- package/src/generated/model/submitFlowStep200StepChallenge.ts +4 -3
- package/src/generated/model/submitFlowStep200StepComplete.ts +1 -1
- package/src/generated/model/submitFlowStep200StepFieldsItem.ts +14 -13
- package/src/generated/model/submitFlowStep200StepFieldsItemType.ts +1 -1
- package/src/generated/model/submitFlowStep200StepFieldsItemValidation.ts +2 -2
- package/src/generated/model/submitFlowStep200StepFieldsItemValidationFormat.ts +1 -1
- package/src/generated/model/submitFlowStep200StepGates.ts +10 -8
- package/src/generated/model/submitFlowStep200StepGatesConfig.ts +1 -1
- package/src/generated/model/submitFlowStep200StepGatesKind.ts +4 -3
- package/src/generated/model/submitFlowStep200StepIdentifier.ts +6 -6
- package/src/generated/model/submitFlowStep200StepSsoProvidersItem.ts +1 -1
- package/src/generated/model/submitFlowStep200StepTexts.ts +1 -1
- package/src/generated/model/submitFlowStep400.ts +16 -12
- package/src/generated/model/submitFlowStep400Branding.ts +24 -22
- package/src/generated/model/submitFlowStep400BrandingLayout.ts +8 -7
- package/src/generated/model/submitFlowStep400BrandingShape.ts +1 -1
- package/src/generated/model/submitFlowStep400BrandingTheme.ts +5 -7
- package/src/generated/model/submitFlowStep400BrandingThemeDark.ts +7 -7
- package/src/generated/model/submitFlowStep400BrandingThemeDarkPalette.ts +63 -62
- package/src/generated/model/submitFlowStep400BrandingThemeLight.ts +7 -7
- package/src/generated/model/submitFlowStep400BrandingThemeLightPalette.ts +63 -62
- package/src/generated/model/submitFlowStep400BrandingTypography.ts +4 -4
- package/src/generated/model/submitFlowStep400Step.ts +36 -31
- package/src/generated/model/submitFlowStep400StepActionsItem.ts +3 -3
- package/src/generated/model/submitFlowStep400StepActionsItemKind.ts +1 -1
- package/src/generated/model/submitFlowStep400StepChallenge.ts +4 -3
- package/src/generated/model/submitFlowStep400StepComplete.ts +1 -1
- package/src/generated/model/submitFlowStep400StepFieldsItem.ts +14 -13
- package/src/generated/model/submitFlowStep400StepFieldsItemType.ts +1 -1
- package/src/generated/model/submitFlowStep400StepFieldsItemValidation.ts +2 -2
- package/src/generated/model/submitFlowStep400StepFieldsItemValidationFormat.ts +1 -1
- package/src/generated/model/submitFlowStep400StepGates.ts +10 -8
- package/src/generated/model/submitFlowStep400StepGatesConfig.ts +1 -1
- package/src/generated/model/submitFlowStep400StepGatesKind.ts +4 -3
- package/src/generated/model/submitFlowStep400StepIdentifier.ts +6 -6
- package/src/generated/model/submitFlowStep400StepSsoProvidersItem.ts +1 -1
- package/src/generated/model/submitFlowStep400StepTexts.ts +1 -1
- package/src/generated/model/submitFlowStepBody.ts +10 -7
- package/src/generated/model/submitFlowStepBodyChallengeResponse.ts +2 -2
- package/src/generated/model/submitFlowStepBodyGateProofs.ts +1 -1
- package/src/generated/model/submitFlowStepDefault.ts +27 -0
- package/src/generated/model/updateTeam200.ts +2 -2
- package/src/generated/model/updateTeam200Status.ts +2 -2
- package/src/generated/model/updateTeamBody.ts +1 -1
- package/src/generated/model/updateVariables200.ts +4 -4
- package/src/generated/model/updateVariables200Preview.ts +2 -2
- package/src/generated/model/updateVariables200Primary.ts +2 -2
- package/src/generated/model/updateVariablesBody.ts +14 -14
- package/src/generated/model/updateVariablesParams.ts +3 -1
- package/src/generated/model/userProperty.ts +5 -8
- package/src/generated/model/userPropertyProperties.ts +2 -2
- package/src/generated/model/userPropertyXUnique.ts +1 -1
- package/src/generated/model/verifyChallengeProof200.ts +23 -22
- package/src/generated/model/verifyChallengeProof200ChallengesItem.ts +9 -7
- package/src/generated/model/verifyChallengeProof200ChallengesItemState.ts +1 -1
- package/src/generated/model/verifyChallengeProof200CompletedFactorsItem.ts +2 -2
- package/src/generated/model/verifyChallengeProof200CompletedFactorsItemPayload.ts +5 -5
- package/src/generated/model/verifyChallengeProof200State.ts +2 -2
- package/src/generated/model/verifyChallengeProofBody.ts +2 -2
- package/src/generated/operations.ts +278 -153
- package/src/generated/paging.ts +128 -0
- package/src/runtime/api-factory.spec.ts +328 -0
- package/src/runtime/api-factory.ts +103 -13
- 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 +85 -30
- package/src/runtime/paged.spec.ts +115 -0
- package/src/runtime/paged.ts +62 -0
- package/src/runtime/paging.spec.ts +219 -0
- package/src/runtime/paging.ts +177 -0
- package/dist/fetch-CtYe0OvX.d.mts.map +0 -1
- package/dist/index-DAm3tCA7.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-B_VRpP2W.d.mts +0 -1360
- package/dist/zitadelNextGen-B_VRpP2W.d.mts.map +0 -1
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* OpenAPI spec version: 0.0.1
|
|
7
7
|
*/
|
|
8
8
|
import {
|
|
9
|
-
|
|
9
|
+
getApiBaseUrl
|
|
10
10
|
} from '../../runtime/base-url';
|
|
11
11
|
|
|
12
12
|
import type {
|
|
@@ -212,16 +212,19 @@ export const getGetLiveUrl = () => {
|
|
|
212
212
|
|
|
213
213
|
|
|
214
214
|
|
|
215
|
-
return `${
|
|
215
|
+
return `${getApiBaseUrl()}/livez`
|
|
216
216
|
}
|
|
217
217
|
|
|
218
218
|
/**
|
|
219
|
-
* Answers `ok` while the server process serves HTTP, and checks nothing
|
|
219
|
+
* Answers `ok` while the server process serves HTTP, and checks nothing
|
|
220
|
+
* behind it.
|
|
220
221
|
*
|
|
221
|
-
*
|
|
222
|
-
*
|
|
222
|
+
* A liveness probe tells an orchestrator such as Kubernetes whether to
|
|
223
|
+
* restart the process. Point it at `/livez` at the root, where the probes
|
|
224
|
+
* stay, not under `/api/v1`. It never checks the database, so an outage of
|
|
225
|
+
* the database does not restart every instance. `GET /readyz` takes an
|
|
223
226
|
* instance out of rotation instead.
|
|
224
|
-
* @summary Check server liveness
|
|
227
|
+
* @summary Check the server's liveness
|
|
225
228
|
*/
|
|
226
229
|
export const getLive = async ( options?: Parameters<typeof customFetch>[1]): Promise<GetLiveDefault> => {
|
|
227
230
|
|
|
@@ -241,16 +244,19 @@ export const getGetReadyUrl = () => {
|
|
|
241
244
|
|
|
242
245
|
|
|
243
246
|
|
|
244
|
-
return `${
|
|
247
|
+
return `${getApiBaseUrl()}/readyz`
|
|
245
248
|
}
|
|
246
249
|
|
|
247
250
|
/**
|
|
248
|
-
* Answers
|
|
251
|
+
* Answers `ok` when the server can serve requests, which takes its database
|
|
252
|
+
* answering within a second, and `fail` with `503` otherwise.
|
|
249
253
|
*
|
|
250
|
-
*
|
|
251
|
-
*
|
|
254
|
+
* A readiness probe tells an orchestrator such as Kubernetes whether to send
|
|
255
|
+
* the instance requests. Point it at `/readyz` at the root, where the probes
|
|
256
|
+
* stay, not under `/api/v1`, so that a server whose database does not answer
|
|
257
|
+
* gets no requests until it does. The check is one round trip to the
|
|
252
258
|
* database.
|
|
253
|
-
* @summary Check server readiness
|
|
259
|
+
* @summary Check the server's readiness
|
|
254
260
|
*/
|
|
255
261
|
export const getReady = async ( options?: Parameters<typeof customFetch>[1]): Promise<GetReadyDefault> => {
|
|
256
262
|
|
|
@@ -277,16 +283,18 @@ export const getCreateUserUrl = (params: CreateUserParams,) => {
|
|
|
277
283
|
|
|
278
284
|
const stringifiedParams = normalizedParams.toString();
|
|
279
285
|
|
|
280
|
-
return stringifiedParams.length > 0 ? `${
|
|
286
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users?${stringifiedParams}` : `${getApiBaseUrl()}/users`
|
|
281
287
|
}
|
|
282
288
|
|
|
283
289
|
/**
|
|
284
|
-
* Creates a user whose attributes satisfy the user schema the request
|
|
285
|
-
*
|
|
286
|
-
* The server assigns the user's
|
|
287
|
-
*
|
|
288
|
-
* user
|
|
289
|
-
*
|
|
290
|
+
* Creates a user whose attributes satisfy the user schema named in the request.
|
|
291
|
+
*
|
|
292
|
+
* The server assigns the user's ID and returns it. `schema` is the `id` of a
|
|
293
|
+
* schema, as `createSchema` (`POST /schemas`) returns it or `listSchemas` (`GET /schemas`) lists it. With
|
|
294
|
+
* `team_id`, the user also becomes an active member of that team. A value the
|
|
295
|
+
* schema marks unique that another user already holds is refused with `409`;
|
|
296
|
+
* send a different value.
|
|
297
|
+
* @summary Create a user
|
|
290
298
|
*/
|
|
291
299
|
export const createUser = async (createUserBody: CreateUserBody,
|
|
292
300
|
params: CreateUserParams, options?: Parameters<typeof customFetch>[1]): Promise<CreateUser201> => {
|
|
@@ -328,7 +336,7 @@ export const getQueryUsersUrl = (params?: QueryUsersParams,) => {
|
|
|
328
336
|
|
|
329
337
|
const stringifiedParams = normalizedParams.toString();
|
|
330
338
|
|
|
331
|
-
return stringifiedParams.length > 0 ? `${
|
|
339
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users/query?${stringifiedParams}` : `${getApiBaseUrl()}/users/query`
|
|
332
340
|
}
|
|
333
341
|
|
|
334
342
|
/**
|
|
@@ -337,9 +345,15 @@ export const getQueryUsersUrl = (params?: QueryUsersParams,) => {
|
|
|
337
345
|
* `project_id` names the project to list; without it, the credential's own
|
|
338
346
|
* project is listed.
|
|
339
347
|
*
|
|
340
|
-
* Accepts either a project secret (`oauth2`) or a user-bound
|
|
341
|
-
* session cookie (`
|
|
342
|
-
* follow the scheme's CSRF rules (`
|
|
348
|
+
* Accepts either a project secret (`oauth2`) or a user-bound console
|
|
349
|
+
* session cookie (`sessionCookie`). Cookie-authenticated requests
|
|
350
|
+
* follow the scheme's CSRF rules (`sessionCookie`).
|
|
351
|
+
*
|
|
352
|
+
* With a project secret, embedding `teams` with `expand`, or filtering by
|
|
353
|
+
* `team_id`, also needs `team_membership.read`. Embedding
|
|
354
|
+
* `lifecycle_owner_team` needs `team.read`. A console session carries no
|
|
355
|
+
* scopes: it may do both when it may read the whole project, and gets
|
|
356
|
+
* `403 user.permission_denied` otherwise.
|
|
343
357
|
* @summary Query users
|
|
344
358
|
*/
|
|
345
359
|
export const queryUsers = async (queryUsersBody: QueryUsersBody,
|
|
@@ -383,15 +397,15 @@ export const getGetUserByIDUrl = (userId: string,
|
|
|
383
397
|
|
|
384
398
|
const stringifiedParams = normalizedParams.toString();
|
|
385
399
|
|
|
386
|
-
return stringifiedParams.length > 0 ? `${
|
|
400
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}?${stringifiedParams}` : `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}`
|
|
387
401
|
}
|
|
388
402
|
|
|
389
403
|
/**
|
|
390
|
-
* Returns a user by
|
|
404
|
+
* Returns a user by ID, with the attributes its schema defines.
|
|
391
405
|
*
|
|
392
|
-
* With `team_id`, the user is returned only while they are an active member
|
|
393
|
-
* that team.
|
|
394
|
-
* @summary Get user by ID
|
|
406
|
+
* With `team_id`, the user is returned only while they are an active member
|
|
407
|
+
* of that team.
|
|
408
|
+
* @summary Get a user by ID
|
|
395
409
|
*/
|
|
396
410
|
export const getUserByID = async (userId: string,
|
|
397
411
|
params?: GetUserByIDParams, options?: Parameters<typeof customFetch>[1]): Promise<GetUserByID200> => {
|
|
@@ -412,7 +426,7 @@ export const getPatchUserByIDUrl = (userId: string,) => {
|
|
|
412
426
|
|
|
413
427
|
|
|
414
428
|
|
|
415
|
-
return `${
|
|
429
|
+
return `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}`
|
|
416
430
|
}
|
|
417
431
|
|
|
418
432
|
/**
|
|
@@ -420,7 +434,20 @@ export const getPatchUserByIDUrl = (userId: string,) => {
|
|
|
420
434
|
* moves the user to another registered schema. The merged result is
|
|
421
435
|
* validated against the schema before commit. Concurrent writes are
|
|
422
436
|
* last-write-wins.
|
|
423
|
-
*
|
|
437
|
+
*
|
|
438
|
+
* To move the user, send `schema` with the `id` of a registered schema, as
|
|
439
|
+
* `createSchema` (`POST /schemas`) returns it or `listSchemas` (`GET /schemas`) lists it.
|
|
440
|
+
*
|
|
441
|
+
* To ask whether a patch would succeed, send it with `"dry_run": true`. It takes
|
|
442
|
+
* the same permission and answers the same status and `details` as the real
|
|
443
|
+
* request, and it changes nothing and emits no `user.updated`. The request
|
|
444
|
+
* itself is still recorded as `request.api`, like any other API call. A `200`
|
|
445
|
+
* holds for the moment of the check: a unique value that is free then can be
|
|
446
|
+
* taken before the real request, which then answers `409`.
|
|
447
|
+
*
|
|
448
|
+
* `dry_run` is a body field so that a server from before it refuses the
|
|
449
|
+
* request as malformed (`400 req.invalid`) instead of applying the patch.
|
|
450
|
+
* @summary Update a user by ID
|
|
424
451
|
*/
|
|
425
452
|
export const patchUserByID = async (userId: string,
|
|
426
453
|
patchUserByIDBody: PatchUserByIDBody, options?: Parameters<typeof customFetch>[1]): Promise<PatchUserByID200> => {
|
|
@@ -455,7 +482,7 @@ export const getDeleteUserByIDUrl = (userId: string,) => {
|
|
|
455
482
|
|
|
456
483
|
|
|
457
484
|
|
|
458
|
-
return `${
|
|
485
|
+
return `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}`
|
|
459
486
|
}
|
|
460
487
|
|
|
461
488
|
/**
|
|
@@ -465,8 +492,10 @@ export const getDeleteUserByIDUrl = (userId: string,) => {
|
|
|
465
492
|
* The user is removed, not deactivated, and the deletion emits `user.deleted`,
|
|
466
493
|
* plus `authz.revoked` for each grant on that grant's project.
|
|
467
494
|
* With a project secret the request is idempotent: deleting a user that exists
|
|
468
|
-
* in no project succeeds without changing anything.
|
|
469
|
-
*
|
|
495
|
+
* in no project succeeds without changing anything. Deleting the last active
|
|
496
|
+
* member of a project's owning team returns 409 `proj.last_owner` and changes
|
|
497
|
+
* nothing.
|
|
498
|
+
* @summary Delete a user by ID
|
|
470
499
|
*/
|
|
471
500
|
export const deleteUserByID = async (userId: string, options?: Parameters<typeof customFetch>[1]): Promise<void> => {
|
|
472
501
|
|
|
@@ -494,12 +523,13 @@ export const getListUserIdentityLinksUrl = (userId: string,
|
|
|
494
523
|
|
|
495
524
|
const stringifiedParams = normalizedParams.toString();
|
|
496
525
|
|
|
497
|
-
return stringifiedParams.length > 0 ? `${
|
|
526
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}/identity_links?${stringifiedParams}` : `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}/identity_links`
|
|
498
527
|
}
|
|
499
528
|
|
|
500
529
|
/**
|
|
501
|
-
*
|
|
502
|
-
* The provider's subject and claims
|
|
530
|
+
* Lists the identity provider accounts a sign-in linked to the user, oldest
|
|
531
|
+
* first. The provider's subject and claims, the data it asserts about the
|
|
532
|
+
* account, are never returned.
|
|
503
533
|
* @summary List the provider accounts linked to a user
|
|
504
534
|
*/
|
|
505
535
|
export const listUserIdentityLinks = async (userId: string,
|
|
@@ -529,16 +559,17 @@ export const getListUserPasskeysUrl = (userId: string,
|
|
|
529
559
|
|
|
530
560
|
const stringifiedParams = normalizedParams.toString();
|
|
531
561
|
|
|
532
|
-
return stringifiedParams.length > 0 ? `${
|
|
562
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}/passkeys?${stringifiedParams}` : `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}/passkeys`
|
|
533
563
|
}
|
|
534
564
|
|
|
535
565
|
/**
|
|
536
|
-
*
|
|
537
|
-
* cursor.
|
|
566
|
+
* Lists the passkeys registered for a user, newest first, paginated with a
|
|
567
|
+
* cursor. A passkey is a WebAuthn credential that signs a user in without a
|
|
568
|
+
* password.
|
|
538
569
|
*
|
|
539
|
-
* Each passkey carries its
|
|
570
|
+
* Each passkey carries its ID, its name and when it was registered, never the
|
|
540
571
|
* credential itself.
|
|
541
|
-
* @summary List user passkeys
|
|
572
|
+
* @summary List a user's passkeys
|
|
542
573
|
*/
|
|
543
574
|
export const listUserPasskeys = async (userId: string,
|
|
544
575
|
params?: ListUserPasskeysParams, options?: Parameters<typeof customFetch>[1]): Promise<ListUserPasskeys200> => {
|
|
@@ -559,16 +590,20 @@ export const getBeginUserPasskeyRegistrationUrl = (userId: string,) => {
|
|
|
559
590
|
|
|
560
591
|
|
|
561
592
|
|
|
562
|
-
return `${
|
|
593
|
+
return `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}/passkeys/registrations`
|
|
563
594
|
}
|
|
564
595
|
|
|
565
596
|
/**
|
|
566
597
|
* Starts a WebAuthn registration ceremony for the user and returns the
|
|
567
|
-
* creation options for `navigator.credentials.create()`.
|
|
568
|
-
*
|
|
569
|
-
*
|
|
570
|
-
*
|
|
571
|
-
*
|
|
598
|
+
* creation options for `navigator.credentials.create()`. A passkey is
|
|
599
|
+
* registered in two steps: this one returns options for the browser, and
|
|
600
|
+
* `finishUserPasskeyRegistration` (`POST /users/{user_id}/passkeys/registrations/{registration_id}`) verifies the browser's answer.
|
|
601
|
+
*
|
|
602
|
+
* Complete the ceremony with
|
|
603
|
+
* `POST /users/{user_id}/passkeys/registrations/{registration_id}` within five
|
|
604
|
+
* minutes, using the `registration_id` this response returns. Credentials
|
|
605
|
+
* already registered for the user are excluded automatically.
|
|
606
|
+
* @summary Begin a passkey registration
|
|
572
607
|
*/
|
|
573
608
|
export const beginUserPasskeyRegistration = async (userId: string,
|
|
574
609
|
beginUserPasskeyRegistrationBody: BeginUserPasskeyRegistrationBody, options?: Parameters<typeof customFetch>[1]): Promise<BeginUserPasskeyRegistration201> => {
|
|
@@ -604,17 +639,20 @@ export const getFinishUserPasskeyRegistrationUrl = (userId: string,
|
|
|
604
639
|
|
|
605
640
|
|
|
606
641
|
|
|
607
|
-
return `${
|
|
642
|
+
return `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}/passkeys/registrations/${encodeURIComponent(String(registrationId))}`
|
|
608
643
|
}
|
|
609
644
|
|
|
610
645
|
/**
|
|
611
|
-
* Verifies the attestation against the ceremony
|
|
612
|
-
*
|
|
613
|
-
*
|
|
614
|
-
*
|
|
615
|
-
*
|
|
616
|
-
*
|
|
617
|
-
*
|
|
646
|
+
* Verifies the attestation against the registration ceremony and stores
|
|
647
|
+
* the new passkey for the user. `registration_id` is the one that
|
|
648
|
+
* `beginUserPasskeyRegistration` (`POST /users/{user_id}/passkeys/registrations`)
|
|
649
|
+
* returned when it started the ceremony. The attestation is
|
|
650
|
+
* the browser's answer from `navigator.credentials.create()`.
|
|
651
|
+
*
|
|
652
|
+
* A rejected attestation leaves the ceremony open for a retry. An expired ceremony answers
|
|
653
|
+
* `att.stale_challenge`: begin a new registration. An unknown or
|
|
654
|
+
* already-consumed registration ID answers `att.not_found`.
|
|
655
|
+
* @summary Finish a passkey registration
|
|
618
656
|
*/
|
|
619
657
|
export const finishUserPasskeyRegistration = async (userId: string,
|
|
620
658
|
registrationId: string,
|
|
@@ -650,14 +688,14 @@ export const getGetUserPasswordStateUrl = (userId: string,) => {
|
|
|
650
688
|
|
|
651
689
|
|
|
652
690
|
|
|
653
|
-
return `${
|
|
691
|
+
return `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}/password`
|
|
654
692
|
}
|
|
655
693
|
|
|
656
694
|
/**
|
|
657
|
-
*
|
|
695
|
+
* Returns when the user's current password was set, and leaves `set_at` out
|
|
658
696
|
* when the user has none. The password and its hash are never returned;
|
|
659
|
-
*
|
|
660
|
-
* @summary Get user password state
|
|
697
|
+
* `setUserPassword` (`PUT` on the same path) sets one.
|
|
698
|
+
* @summary Get a user's password state
|
|
661
699
|
*/
|
|
662
700
|
export const getUserPasswordState = async (userId: string, options?: Parameters<typeof customFetch>[1]): Promise<GetUserPasswordState200> => {
|
|
663
701
|
|
|
@@ -677,7 +715,7 @@ export const getSetUserPasswordUrl = (userId: string,) => {
|
|
|
677
715
|
|
|
678
716
|
|
|
679
717
|
|
|
680
|
-
return `${
|
|
718
|
+
return `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}/password`
|
|
681
719
|
}
|
|
682
720
|
|
|
683
721
|
/**
|
|
@@ -685,8 +723,28 @@ export const getSetUserPasswordUrl = (userId: string,) => {
|
|
|
685
723
|
* policy.
|
|
686
724
|
*
|
|
687
725
|
* The new password replaces the current one, and setting it emits
|
|
688
|
-
* `auth.factor.password.set`.
|
|
689
|
-
*
|
|
726
|
+
* `auth.factor.password.set`. A password the project's password policy
|
|
727
|
+
* refuses answers `user.password_policy_violation`; send one that meets the
|
|
728
|
+
* policy.
|
|
729
|
+
*
|
|
730
|
+
* The password policy is the one in the release that serves the caller's
|
|
731
|
+
* `Origin`, chosen as `createFlow` (`POST /flow`) chooses it. A frontend on a
|
|
732
|
+
* preview URL gets that preview's policy, and one on a primary origin the
|
|
733
|
+
* newest primary deployment's. A request with no `Origin`, or from the
|
|
734
|
+
* console when the project does not list the console's origin, gets the
|
|
735
|
+
* project's newest primary deployment.
|
|
736
|
+
*
|
|
737
|
+
* If the request is refused:
|
|
738
|
+
* - `403 proj.origin_not_allowed`: the project admits no such origin. Add it
|
|
739
|
+
* with `zitadel origin add`.
|
|
740
|
+
* - `403 proj.preview_not_live`: the origin matches a preview pattern but has
|
|
741
|
+
* no live preview. Run `zitadel preview` on the branch.
|
|
742
|
+
* - `409 rel.not_deployed`: nothing is deployed to the origin. Run
|
|
743
|
+
* `zitadel deploy`.
|
|
744
|
+
* - `409 rel.no_default`: the request names no origin and the project has no
|
|
745
|
+
* primary deployment. Run `zitadel deploy`.
|
|
746
|
+
* - `409 rel.revoked`: the release that serves the origin is revoked.
|
|
747
|
+
* @summary Set a user's password
|
|
690
748
|
*/
|
|
691
749
|
export const setUserPassword = async (userId: string,
|
|
692
750
|
setUserPasswordBody: SetUserPasswordBody, options?: Parameters<typeof customFetch>[1]): Promise<void> => {
|
|
@@ -729,17 +787,18 @@ export const getListUserTeamsUrl = (userId: string,
|
|
|
729
787
|
|
|
730
788
|
const stringifiedParams = normalizedParams.toString();
|
|
731
789
|
|
|
732
|
-
return stringifiedParams.length > 0 ? `${
|
|
790
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}/teams?${stringifiedParams}` : `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}/teams`
|
|
733
791
|
}
|
|
734
792
|
|
|
735
793
|
/**
|
|
736
|
-
*
|
|
737
|
-
* team's name, so a client renders a page without resolving
|
|
738
|
-
*
|
|
739
|
-
*
|
|
740
|
-
*
|
|
741
|
-
*
|
|
742
|
-
*
|
|
794
|
+
* Lists the teams a user belongs to, ordered by team name. Each entry carries
|
|
795
|
+
* the team's name, so a client renders a page without resolving IDs one by
|
|
796
|
+
* one.
|
|
797
|
+
*
|
|
798
|
+
* This is the user's team memberships, not lifecycle ownership: the single
|
|
799
|
+
* team that owns the user's lifecycle is reported as
|
|
800
|
+
* `metadata.lifecycle_owner_team_id` on the user read endpoints. Memberships
|
|
801
|
+
* the user was removed from are not returned.
|
|
743
802
|
* @summary List the teams a user belongs to
|
|
744
803
|
*/
|
|
745
804
|
export const listUserTeams = async (userId: string,
|
|
@@ -768,7 +827,7 @@ export const getGetMyUserUrl = (params?: GetMyUserParams,) => {
|
|
|
768
827
|
|
|
769
828
|
const stringifiedParams = normalizedParams.toString();
|
|
770
829
|
|
|
771
|
-
return stringifiedParams.length > 0 ? `${
|
|
830
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users/me?${stringifiedParams}` : `${getApiBaseUrl()}/users/me`
|
|
772
831
|
}
|
|
773
832
|
|
|
774
833
|
/**
|
|
@@ -806,7 +865,7 @@ export const getPatchMyUserUrl = (params?: PatchMyUserParams,) => {
|
|
|
806
865
|
|
|
807
866
|
const stringifiedParams = normalizedParams.toString();
|
|
808
867
|
|
|
809
|
-
return stringifiedParams.length > 0 ? `${
|
|
868
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users/me?${stringifiedParams}` : `${getApiBaseUrl()}/users/me`
|
|
810
869
|
}
|
|
811
870
|
|
|
812
871
|
/**
|
|
@@ -858,12 +917,13 @@ export const getListMyIdentityLinksUrl = (params?: ListMyIdentityLinksParams,) =
|
|
|
858
917
|
|
|
859
918
|
const stringifiedParams = normalizedParams.toString();
|
|
860
919
|
|
|
861
|
-
return stringifiedParams.length > 0 ? `${
|
|
920
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users/me/identity_links?${stringifiedParams}` : `${getApiBaseUrl()}/users/me/identity_links`
|
|
862
921
|
}
|
|
863
922
|
|
|
864
923
|
/**
|
|
865
|
-
*
|
|
866
|
-
* oldest first. The provider's subject and claims
|
|
924
|
+
* Lists the identity provider accounts a sign-in linked to the signed-in user,
|
|
925
|
+
* oldest first. The provider's subject and claims, the data it asserts about
|
|
926
|
+
* the account, are never returned.
|
|
867
927
|
*
|
|
868
928
|
* With `project_id`, the links are listed only when the session belongs to
|
|
869
929
|
* that project.
|
|
@@ -894,13 +954,14 @@ export const getListMyPasskeysUrl = (params?: ListMyPasskeysParams,) => {
|
|
|
894
954
|
|
|
895
955
|
const stringifiedParams = normalizedParams.toString();
|
|
896
956
|
|
|
897
|
-
return stringifiedParams.length > 0 ? `${
|
|
957
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users/me/passkeys?${stringifiedParams}` : `${getApiBaseUrl()}/users/me/passkeys`
|
|
898
958
|
}
|
|
899
959
|
|
|
900
960
|
/**
|
|
901
|
-
*
|
|
902
|
-
*
|
|
903
|
-
*
|
|
961
|
+
* Lists the signed-in user's own passkeys, newest first, paginated with a
|
|
962
|
+
* cursor. A passkey is a WebAuthn credential that signs a user in without a
|
|
963
|
+
* password. Each passkey carries its ID, its name and when it was registered,
|
|
964
|
+
* never the credential itself.
|
|
904
965
|
*
|
|
905
966
|
* With `project_id`, the passkeys are listed only when the session belongs to
|
|
906
967
|
* that project.
|
|
@@ -931,11 +992,11 @@ export const getGetMyPasswordStateUrl = (params?: GetMyPasswordStateParams,) =>
|
|
|
931
992
|
|
|
932
993
|
const stringifiedParams = normalizedParams.toString();
|
|
933
994
|
|
|
934
|
-
return stringifiedParams.length > 0 ? `${
|
|
995
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users/me/password?${stringifiedParams}` : `${getApiBaseUrl()}/users/me/password`
|
|
935
996
|
}
|
|
936
997
|
|
|
937
998
|
/**
|
|
938
|
-
*
|
|
999
|
+
* Returns when the signed-in user's current password was set, and leaves
|
|
939
1000
|
* `set_at` out when they have none. The password and its hash are never
|
|
940
1001
|
* returned.
|
|
941
1002
|
*
|
|
@@ -968,16 +1029,16 @@ export const getListMyProjectsUrl = (params?: ListMyProjectsParams,) => {
|
|
|
968
1029
|
|
|
969
1030
|
const stringifiedParams = normalizedParams.toString();
|
|
970
1031
|
|
|
971
|
-
return stringifiedParams.length > 0 ? `${
|
|
1032
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users/me/projects?${stringifiedParams}` : `${getApiBaseUrl()}/users/me/projects`
|
|
972
1033
|
}
|
|
973
1034
|
|
|
974
1035
|
/**
|
|
975
|
-
*
|
|
976
|
-
* on, either directly or through a team they are a member of. For a
|
|
977
|
-
* operator
|
|
978
|
-
* project
|
|
1036
|
+
* Lists the projects the signed-in user can act on: those they hold an active
|
|
1037
|
+
* grant on, either directly or through a team they are a member of. For a
|
|
1038
|
+
* platform operator, someone who runs the deployment, that is every project of
|
|
1039
|
+
* the deployment. Ordered by project ID and paged with an opaque cursor.
|
|
979
1040
|
*
|
|
980
|
-
* This is not the same question as `queryProjects
|
|
1041
|
+
* This is not the same question as `queryProjects` (`POST /projects/query`), which answers with the one
|
|
981
1042
|
* project the calling credential is bound to. Here the session is the caller
|
|
982
1043
|
* and the grants are the answer, so the list spans projects.
|
|
983
1044
|
*
|
|
@@ -1016,11 +1077,11 @@ export const getGetMyUserSchemaUrl = (params?: GetMyUserSchemaParams,) => {
|
|
|
1016
1077
|
|
|
1017
1078
|
const stringifiedParams = normalizedParams.toString();
|
|
1018
1079
|
|
|
1019
|
-
return stringifiedParams.length > 0 ? `${
|
|
1080
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users/me/schema?${stringifiedParams}` : `${getApiBaseUrl()}/users/me/schema`
|
|
1020
1081
|
}
|
|
1021
1082
|
|
|
1022
1083
|
/**
|
|
1023
|
-
*
|
|
1084
|
+
* Returns the schema that validates the signed-in user's own record.
|
|
1024
1085
|
*
|
|
1025
1086
|
* With `project_id`, the schema is returned only when the session belongs to
|
|
1026
1087
|
* that project.
|
|
@@ -1051,11 +1112,11 @@ export const getListMyTeamsUrl = (params?: ListMyTeamsParams,) => {
|
|
|
1051
1112
|
|
|
1052
1113
|
const stringifiedParams = normalizedParams.toString();
|
|
1053
1114
|
|
|
1054
|
-
return stringifiedParams.length > 0 ? `${
|
|
1115
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users/me/teams?${stringifiedParams}` : `${getApiBaseUrl()}/users/me/teams`
|
|
1055
1116
|
}
|
|
1056
1117
|
|
|
1057
1118
|
/**
|
|
1058
|
-
*
|
|
1119
|
+
* Lists the teams the signed-in user belongs to, ordered by team name.
|
|
1059
1120
|
*
|
|
1060
1121
|
* With `project_id`, the teams are listed only when the session belongs to
|
|
1061
1122
|
* that project.
|
|
@@ -1079,38 +1140,60 @@ export const getCreateFlowUrl = () => {
|
|
|
1079
1140
|
|
|
1080
1141
|
|
|
1081
1142
|
|
|
1082
|
-
return `${
|
|
1143
|
+
return `${getApiBaseUrl()}/flow`
|
|
1083
1144
|
}
|
|
1084
1145
|
|
|
1085
1146
|
/**
|
|
1086
|
-
*
|
|
1087
|
-
* the first
|
|
1088
|
-
*
|
|
1089
|
-
*
|
|
1090
|
-
*
|
|
1091
|
-
*
|
|
1092
|
-
* the
|
|
1093
|
-
*
|
|
1094
|
-
*
|
|
1095
|
-
*
|
|
1096
|
-
*
|
|
1097
|
-
*
|
|
1098
|
-
*
|
|
1099
|
-
*
|
|
1100
|
-
*
|
|
1101
|
-
*
|
|
1102
|
-
*
|
|
1103
|
-
*
|
|
1104
|
-
*
|
|
1105
|
-
*
|
|
1106
|
-
*
|
|
1147
|
+
* Starts a flow: resolves a flow definition from the request's purpose and
|
|
1148
|
+
* audience, and returns the first step.
|
|
1149
|
+
*
|
|
1150
|
+
* The flow endpoints are the runtime calls the login component
|
|
1151
|
+
* (`<zitadel-login>`) makes, step by step. It starts a flow here, renders the
|
|
1152
|
+
* step it gets back, and submits the user's input with `submitFlowStep` (`POST /flow/{id}/submit`) to
|
|
1153
|
+
* get the next step. This call creates a new session implicitly, unless
|
|
1154
|
+
* `session_id` is provided together with that session's `session_token`
|
|
1155
|
+
* (for step-up or reauthentication on an existing session).
|
|
1156
|
+
*
|
|
1157
|
+
* The browser `Origin` header selects which deployment serves this attempt.
|
|
1158
|
+
* The server checks the origin against the project's origin patterns and live
|
|
1159
|
+
* previews, and the deployment that origin serves is the target: the
|
|
1160
|
+
* project's newest primary deployment when it names a primary origin, or the
|
|
1161
|
+
* newest live deployment to a preview URL. A
|
|
1162
|
+
* deployment is a release, the immutable bundle of the project's
|
|
1163
|
+
* configuration, made live at an origin. The deployment's release supplies
|
|
1164
|
+
* flow definitions, user schemas and branding. The resolved deployment is
|
|
1165
|
+
* sealed into the `_zflow` cookie so later steps keep the same
|
|
1166
|
+
* configuration.
|
|
1167
|
+
*
|
|
1168
|
+
* - An origin that matches no pattern answers `403` with
|
|
1169
|
+
* `proj.origin_not_allowed`, including when the project lists no origins.
|
|
1170
|
+
* Add the origin with `zitadel origin add`.
|
|
1171
|
+
* - An origin that matches a preview pattern with no live preview answers
|
|
1172
|
+
* `403` with `proj.preview_not_live`. Run `zitadel preview` on the branch.
|
|
1173
|
+
* - Nothing deployed to a listed origin or a live preview answers `409`
|
|
1174
|
+
* with `rel.not_deployed`. Run `zitadel deploy`: a primary origin added
|
|
1175
|
+
* since the last deploy serves nothing until the next one.
|
|
1176
|
+
* - A loopback origin the project does not list answers `409` with
|
|
1177
|
+
* `rel.not_deployed` too, as no deployment can name it. Add it with
|
|
1178
|
+
* `zitadel origin add <origin> --kind primary`, then run `zitadel deploy`.
|
|
1179
|
+
* - A revoked release answers `409` with `rel.revoked`.
|
|
1180
|
+
*
|
|
1181
|
+
* A request with no `Origin` passes the check, and so does the server's own
|
|
1182
|
+
* origin, from which its console previews a project's login. Both are served
|
|
1183
|
+
* the project's newest primary deployment unless the project lists that
|
|
1184
|
+
* origin; with no primary deployment they answer `409` with
|
|
1185
|
+
* `rel.no_default`. A loopback origin passes the check and is its own
|
|
1186
|
+
* target. A step submitted from the server's own origin is still refused
|
|
1187
|
+
* unless the project lists it.
|
|
1188
|
+
*
|
|
1189
|
+
* The response contains an `id` field, the flow handle. Use it as the path
|
|
1107
1190
|
* parameter for all subsequent `/flow/{id}/submit` calls.
|
|
1108
1191
|
*
|
|
1109
1192
|
* The response also sets an encrypted `HttpOnly` cookie (`_zflow`) containing
|
|
1110
1193
|
* the flow's orchestration state (current step, collected data, history).
|
|
1111
|
-
* The server is stateless between requests
|
|
1194
|
+
* The server is stateless between requests: all flow state lives in this
|
|
1112
1195
|
* cookie. The browser sends it automatically on subsequent requests.
|
|
1113
|
-
* @summary Start a
|
|
1196
|
+
* @summary Start a flow
|
|
1114
1197
|
*/
|
|
1115
1198
|
export const createFlow = async (createFlowBody: CreateFlowBody, options?: Parameters<typeof customFetch>[1]): Promise<CreateFlow201> => {
|
|
1116
1199
|
|
|
@@ -1144,17 +1227,21 @@ export const getGetFlowStepUrl = (id: string,) => {
|
|
|
1144
1227
|
|
|
1145
1228
|
|
|
1146
1229
|
|
|
1147
|
-
return `${
|
|
1230
|
+
return `${getApiBaseUrl()}/flow/${encodeURIComponent(String(id))}`
|
|
1148
1231
|
}
|
|
1149
1232
|
|
|
1150
1233
|
/**
|
|
1151
|
-
* Returns the current
|
|
1152
|
-
*
|
|
1234
|
+
* Returns the current step of a flow without advancing it. Use it to render
|
|
1235
|
+
* the step again after a page reload or a network error.
|
|
1236
|
+
*
|
|
1237
|
+
* The flow endpoints are the runtime calls the login component
|
|
1238
|
+
* (`<zitadel-login>`) makes, step by step. `createFlow` (`POST /flow`) starts a flow, and
|
|
1239
|
+
* `submitFlowStep` (`POST /flow/{id}/submit`) advances it.
|
|
1153
1240
|
*
|
|
1154
1241
|
* Reuses the deployment sealed into `_zflow` at `createFlow`; it does not
|
|
1155
1242
|
* re-resolve from `Origin`. If that release was revoked since the attempt
|
|
1156
1243
|
* started, the response is `409` with `rel.revoked`.
|
|
1157
|
-
* @summary Get current step
|
|
1244
|
+
* @summary Get the current step of a flow
|
|
1158
1245
|
*/
|
|
1159
1246
|
export const getFlowStep = async (id: string, options?: Parameters<typeof customFetch>[1]): Promise<GetFlowStep200> => {
|
|
1160
1247
|
|
|
@@ -1174,16 +1261,18 @@ export const getSubmitFlowStepUrl = (id: string,) => {
|
|
|
1174
1261
|
|
|
1175
1262
|
|
|
1176
1263
|
|
|
1177
|
-
return `${
|
|
1264
|
+
return `${getApiBaseUrl()}/flow/${encodeURIComponent(String(id))}/submit`
|
|
1178
1265
|
}
|
|
1179
1266
|
|
|
1180
1267
|
/**
|
|
1181
|
-
* Submits user input for the current step. The server
|
|
1182
|
-
* processes (
|
|
1183
|
-
* through any invisible steps, and returns the next visible step.
|
|
1268
|
+
* Submits the user's input for the current step of a flow. The server
|
|
1269
|
+
* validates it, processes it (for example, verifies a credential), advances
|
|
1270
|
+
* the flow through any invisible steps, and returns the next visible step.
|
|
1271
|
+
* The flow endpoints are the runtime calls the login component
|
|
1272
|
+
* (`<zitadel-login>`) makes, step by step; `createFlow` (`POST /flow`) starts a flow.
|
|
1184
1273
|
*
|
|
1185
1274
|
* The response sets an updated encrypted `HttpOnly` cookie (`_zflow`)
|
|
1186
|
-
* with the new flow state. The server is stateless
|
|
1275
|
+
* with the new flow state. The server is stateless: all orchestration
|
|
1187
1276
|
* state is carried in this cookie between requests.
|
|
1188
1277
|
*
|
|
1189
1278
|
* **Important:** The `id` in the response may differ from the `id` used in
|
|
@@ -1199,17 +1288,17 @@ export const getSubmitFlowStepUrl = (id: string,) => {
|
|
|
1199
1288
|
* | `behavior` | Action |
|
|
1200
1289
|
* |------------- |------------------------------------------------------------|
|
|
1201
1290
|
* | `redirect` | Navigate to `redirect_uri` (OIDC/SAML auth request done). |
|
|
1202
|
-
* | `show` | Render the step as a success screen
|
|
1291
|
+
* | `show` | Render the step as a success screen, such as registration. |
|
|
1203
1292
|
*
|
|
1204
1293
|
* A `complete` step is only returned when the **entire flow stack** is done.
|
|
1205
|
-
* If a stacked flow (
|
|
1206
|
-
* auto-pops to the parent flow and returns the parent's next step
|
|
1207
|
-
* frontend never sees a `complete` for intermediate flows.
|
|
1294
|
+
* If a stacked flow (for example, recovery pivoted from login) finishes, the
|
|
1295
|
+
* server auto-pops to the parent flow and returns the parent's next step.
|
|
1296
|
+
* The frontend never sees a `complete` for intermediate flows.
|
|
1208
1297
|
*
|
|
1209
1298
|
* ## External sign-in
|
|
1210
1299
|
*
|
|
1211
1300
|
* `{action: "sso", sso_provider_id, return_target}` on a step that offers
|
|
1212
|
-
* `sso_providers` returns the
|
|
1301
|
+
* `sso_providers` returns the server-emitted `sso-redirect` step, whose
|
|
1213
1302
|
* `redirect_url` the frontend navigates to.
|
|
1214
1303
|
*
|
|
1215
1304
|
* - The flow state does not change, but `_zflow` is re-sealed like on
|
|
@@ -1222,15 +1311,16 @@ export const getSubmitFlowStepUrl = (id: string,) => {
|
|
|
1222
1311
|
* Safari rejects `Secure`), it is `_zsso` with no `Secure`; the
|
|
1223
1312
|
* `__Host-` prefix is dropped because it requires `Secure`.
|
|
1224
1313
|
*
|
|
1225
|
-
*
|
|
1226
|
-
*
|
|
1227
|
-
* sign-in with, including a
|
|
1228
|
-
* re-renders the step with
|
|
1314
|
+
* An identity provider (an external sign-in such as Google) whose
|
|
1315
|
+
* `client_id` is a `${{ NAME }}` reference has it filled from the project's
|
|
1316
|
+
* variables. A provider the server cannot start a sign-in with, including a
|
|
1317
|
+
* reference with no variable behind it, re-renders the step with
|
|
1318
|
+
* `error.sso_unavailable`.
|
|
1229
1319
|
*
|
|
1230
1320
|
* Reuses the deployment sealed into `_zflow` at `createFlow`; it does not
|
|
1231
1321
|
* re-resolve from `Origin`. If that release was revoked since the attempt
|
|
1232
1322
|
* started, the response is `409` with `rel.revoked`.
|
|
1233
|
-
* @summary Submit
|
|
1323
|
+
* @summary Submit a flow step
|
|
1234
1324
|
*/
|
|
1235
1325
|
export const submitFlowStep = async (id: string,
|
|
1236
1326
|
submitFlowStepBody: SubmitFlowStepBody, options?: Parameters<typeof customFetch>[1]): Promise<SubmitFlowStep200> => {
|
|
@@ -1265,24 +1355,40 @@ export const getCreateAuthAttemptUrl = () => {
|
|
|
1265
1355
|
|
|
1266
1356
|
|
|
1267
1357
|
|
|
1268
|
-
return `${
|
|
1358
|
+
return `${getApiBaseUrl()}/auth_attempts`
|
|
1269
1359
|
}
|
|
1270
1360
|
|
|
1271
1361
|
/**
|
|
1272
|
-
*
|
|
1273
|
-
*
|
|
1274
|
-
* An attempt
|
|
1275
|
-
*
|
|
1276
|
-
*
|
|
1277
|
-
*
|
|
1278
|
-
*
|
|
1279
|
-
*
|
|
1280
|
-
*
|
|
1281
|
-
*
|
|
1282
|
-
*
|
|
1283
|
-
*
|
|
1284
|
-
*
|
|
1285
|
-
*
|
|
1362
|
+
* Creates an authentication attempt, one sign-in round that expires 15 minutes after creation.
|
|
1363
|
+
*
|
|
1364
|
+
* An authentication attempt collects the proofs for one sign-in and ends in a
|
|
1365
|
+
* handoff token. A handoff token is the short-lived, single-use credential that
|
|
1366
|
+
* a completed attempt hands to the session exchange. A client makes these calls
|
|
1367
|
+
* in order:
|
|
1368
|
+
*
|
|
1369
|
+
* 1. `createAuthAttempt` (`POST /auth_attempts`) creates the attempt.
|
|
1370
|
+
* 2. `issueChallenge` (`POST /auth_attempts/{attempt_id}/challenges`) issues a challenge, a request to prove one factor such as
|
|
1371
|
+
* `identifier`, `password` or `passkey`.
|
|
1372
|
+
* 3. `verifyChallengeProof` (`POST /auth_attempts/{attempt_id}/challenges/{challenge_id}/verify`) submits the proof for that challenge: the
|
|
1373
|
+
* credential, code or assertion. Repeat steps 2 and 3 until
|
|
1374
|
+
* `getAuthAttempt` (`GET /auth_attempts/{attempt_id}`) reports state `completed`, which means every factor in
|
|
1375
|
+
* `required_factors` is verified.
|
|
1376
|
+
* 4. `createHandoff` (`POST /auth_attempts/{attempt_id}/handoff`) completes the attempt and returns the `handoff_token`.
|
|
1377
|
+
* 5. `exchangeHandoff` (`POST /sessions/exchange`) exchanges the handoff token
|
|
1378
|
+
* for the session and its `session_token`.
|
|
1379
|
+
*
|
|
1380
|
+
* The body takes a `project_id` and a `challenge_nonce` (from
|
|
1381
|
+
* `POST /bootstrap/challenge`). For step-up authentication, which adds factors
|
|
1382
|
+
* to an existing session, also send that session's `session_id` and its
|
|
1383
|
+
* `session_token`, as `createSession` (`POST /sessions`) or `exchangeHandoff` returned them.
|
|
1384
|
+
* The attempt's `attempt_id` in the response is the ID every later call takes.
|
|
1385
|
+
*
|
|
1386
|
+
* The project comes from the project secret. A body `project_id` that names
|
|
1387
|
+
* another project answers `403` with `proj.mismatch`: send the credential's own
|
|
1388
|
+
* project. The attempt seals the project's newest primary deployment, whatever
|
|
1389
|
+
* the caller's `Origin`. With none it answers `409` with `rel.no_default`, and a
|
|
1390
|
+
* revoked release answers `409` with `rel.revoked`.
|
|
1391
|
+
* @summary Create an authentication attempt
|
|
1286
1392
|
*/
|
|
1287
1393
|
export const createAuthAttempt = async (createAuthAttemptBody: CreateAuthAttemptBody, options?: Parameters<typeof customFetch>[1]): Promise<CreateAuthAttempt201> => {
|
|
1288
1394
|
|
|
@@ -1316,18 +1422,18 @@ export const getGetAuthAttemptUrl = (attemptId: string,) => {
|
|
|
1316
1422
|
|
|
1317
1423
|
|
|
1318
1424
|
|
|
1319
|
-
return `${
|
|
1425
|
+
return `${getApiBaseUrl()}/auth_attempts/${encodeURIComponent(String(attemptId))}`
|
|
1320
1426
|
}
|
|
1321
1427
|
|
|
1322
1428
|
/**
|
|
1323
|
-
*
|
|
1429
|
+
* Returns the current state of an authentication attempt, one sign-in round.
|
|
1324
1430
|
*
|
|
1325
|
-
*
|
|
1326
|
-
* challenges issued so far, and any errors preventing progress.
|
|
1431
|
+
* The response holds the attempt's state, available factors for the next
|
|
1432
|
+
* challenge, challenges issued so far, and any errors preventing progress.
|
|
1327
1433
|
*
|
|
1328
|
-
* Use
|
|
1329
|
-
* a federated IdP callback or a device flow
|
|
1330
|
-
* @summary Get authentication attempt
|
|
1434
|
+
* Use it to poll during long-running factor verifications, for example waiting
|
|
1435
|
+
* for a federated identity provider (IdP) callback or a device flow.
|
|
1436
|
+
* @summary Get an authentication attempt by ID
|
|
1331
1437
|
*/
|
|
1332
1438
|
export const getAuthAttempt = async (attemptId: string, options?: Parameters<typeof customFetch>[1]): Promise<GetAuthAttempt200> => {
|
|
1333
1439
|
|
|
@@ -1347,16 +1453,16 @@ export const getIssueChallengeUrl = (attemptId: string,) => {
|
|
|
1347
1453
|
|
|
1348
1454
|
|
|
1349
1455
|
|
|
1350
|
-
return `${
|
|
1456
|
+
return `${getApiBaseUrl()}/auth_attempts/${encodeURIComponent(String(attemptId))}/challenges`
|
|
1351
1457
|
}
|
|
1352
1458
|
|
|
1353
1459
|
/**
|
|
1354
|
-
* Issues a
|
|
1460
|
+
* Issues a challenge, a request to prove one factor, within an authentication attempt.
|
|
1355
1461
|
*
|
|
1356
|
-
*
|
|
1357
|
-
*
|
|
1358
|
-
*
|
|
1359
|
-
*
|
|
1462
|
+
* A challenge names one factor method, such as password, passkey, TOTP or OTP
|
|
1463
|
+
* via SMS. The response carries the challenge's `challenge_id`, method,
|
|
1464
|
+
* metadata and any UI hints. The client then submits the proof with
|
|
1465
|
+
* `verifyChallengeProof` (`POST /auth_attempts/{attempt_id}/challenges/{challenge_id}/verify`), using that `challenge_id`.
|
|
1360
1466
|
* @summary Issue a factor challenge
|
|
1361
1467
|
*/
|
|
1362
1468
|
export const issueChallenge = async (attemptId: string,
|
|
@@ -1393,21 +1499,26 @@ export const getVerifyChallengeProofUrl = (attemptId: string,
|
|
|
1393
1499
|
|
|
1394
1500
|
|
|
1395
1501
|
|
|
1396
|
-
return `${
|
|
1502
|
+
return `${getApiBaseUrl()}/auth_attempts/${encodeURIComponent(String(attemptId))}/challenges/${encodeURIComponent(String(challengeId))}/verify`
|
|
1397
1503
|
}
|
|
1398
1504
|
|
|
1399
1505
|
/**
|
|
1400
|
-
*
|
|
1506
|
+
* Verifies a challenge by submitting its proof: the credential, code or assertion for the factor.
|
|
1401
1507
|
*
|
|
1402
1508
|
* The proof format depends on the challenge method. For example:
|
|
1509
|
+
*
|
|
1403
1510
|
* - `password` method: { password: "…" }
|
|
1404
1511
|
* - `totp` method: { totp: { code: "123456" } }
|
|
1405
1512
|
* - `passkey` method: { passkey: { assertion: "…" } }
|
|
1406
1513
|
* - `recovery_code` method: { recovery_code: "…" }
|
|
1407
1514
|
*
|
|
1408
|
-
* On
|
|
1409
|
-
*
|
|
1410
|
-
*
|
|
1515
|
+
* On success, the factor is recorded on the authentication attempt. The
|
|
1516
|
+
* attempt moves to the next pending challenge, or completes when every required
|
|
1517
|
+
* factor is verified. Then call `createHandoff` (`POST /auth_attempts/{attempt_id}/handoff`).
|
|
1518
|
+
*
|
|
1519
|
+
* A `409` with `att.proof_rejected` means the proof was wrong. Check it and try
|
|
1520
|
+
* again. There is no retry limit: you can retry until the attempt expires.
|
|
1521
|
+
* @summary Verify a challenge proof
|
|
1411
1522
|
*/
|
|
1412
1523
|
export const verifyChallengeProof = async (attemptId: string,
|
|
1413
1524
|
challengeId: string,
|
|
@@ -1443,23 +1554,28 @@ export const getCreateHandoffUrl = (attemptId: string,) => {
|
|
|
1443
1554
|
|
|
1444
1555
|
|
|
1445
1556
|
|
|
1446
|
-
return `${
|
|
1557
|
+
return `${getApiBaseUrl()}/auth_attempts/${encodeURIComponent(String(attemptId))}/handoff`
|
|
1447
1558
|
}
|
|
1448
1559
|
|
|
1449
1560
|
/**
|
|
1450
|
-
* Completes
|
|
1561
|
+
* Completes an authentication attempt and mints a `handoff_token`.
|
|
1562
|
+
*
|
|
1563
|
+
* A handoff token is the short-lived credential that a completed attempt hands
|
|
1564
|
+
* to the session exchange. Call this after every required factor is verified and
|
|
1565
|
+
* the attempt is in `completed` state. Otherwise it answers `409` with
|
|
1566
|
+
* `att.not_completed`: verify the remaining factors, then call again.
|
|
1451
1567
|
*
|
|
1452
|
-
*
|
|
1453
|
-
*
|
|
1454
|
-
* POST /sessions/exchange to receive the final session and session_token.
|
|
1568
|
+
* Exchange the token at `POST /sessions/exchange` (`exchangeHandoff` (`POST /sessions/exchange`)) within 60
|
|
1569
|
+
* seconds to receive the session and its `session_token`. The handoff token is:
|
|
1455
1570
|
*
|
|
1456
|
-
*
|
|
1457
|
-
* -
|
|
1458
|
-
* -
|
|
1459
|
-
*
|
|
1571
|
+
* - Single-use: exchange it once, with no retry.
|
|
1572
|
+
* - Bound to the project: the exchange needs the same project's credential.
|
|
1573
|
+
* - Created once: a second call answers `409 att.already_handed_off`, even
|
|
1574
|
+
* with the same idempotency key.
|
|
1460
1575
|
*
|
|
1461
|
-
*
|
|
1462
|
-
*
|
|
1576
|
+
* A revoked release is refused when the handoff is exchanged, not here. A
|
|
1577
|
+
* release is the configuration that `zitadel deploy` publishes.
|
|
1578
|
+
* @summary Complete an authentication attempt and create a handoff token
|
|
1463
1579
|
*/
|
|
1464
1580
|
export const createHandoff = async (attemptId: string, options?: Parameters<typeof customFetch>[1]): Promise<CreateHandoff200> => {
|
|
1465
1581
|
|
|
@@ -1479,17 +1595,20 @@ export const getCreateProjectUrl = () => {
|
|
|
1479
1595
|
|
|
1480
1596
|
|
|
1481
1597
|
|
|
1482
|
-
return `${
|
|
1598
|
+
return `${getApiBaseUrl()}/projects`
|
|
1483
1599
|
}
|
|
1484
1600
|
|
|
1485
1601
|
/**
|
|
1486
1602
|
* Creates a project and returns its project secret and preview secret, which no
|
|
1487
1603
|
* other endpoint returns.
|
|
1488
1604
|
*
|
|
1489
|
-
*
|
|
1490
|
-
*
|
|
1491
|
-
*
|
|
1492
|
-
*
|
|
1605
|
+
* A project is the top-level boundary that holds users, sessions and
|
|
1606
|
+
* configuration. It has no owning team until someone claims it; see `initClaim` (`POST /projects/{project_id}/claim/init`).
|
|
1607
|
+
*
|
|
1608
|
+
* The request needs no credential and is rate-limited. On `429`, wait and retry.
|
|
1609
|
+
* Unless `seed_defaults` is `false`, the project starts with a default user schema
|
|
1610
|
+
* and flow. The CLI sets it to `false` and uploads its own from `.zitadel/`.
|
|
1611
|
+
* @summary Create a project
|
|
1493
1612
|
*/
|
|
1494
1613
|
export const createProject = async (createProjectBody: CreateProjectBody, options?: Parameters<typeof customFetch>[1]): Promise<CreateProject201> => {
|
|
1495
1614
|
|
|
@@ -1523,16 +1642,16 @@ export const getQueryProjectsUrl = () => {
|
|
|
1523
1642
|
|
|
1524
1643
|
|
|
1525
1644
|
|
|
1526
|
-
return `${
|
|
1645
|
+
return `${getApiBaseUrl()}/projects/query`
|
|
1527
1646
|
}
|
|
1528
1647
|
|
|
1529
1648
|
/**
|
|
1530
1649
|
* Returns the project the project secret belongs to, as a page of at most one
|
|
1531
1650
|
* project.
|
|
1532
1651
|
*
|
|
1533
|
-
* A credential is scoped to one project
|
|
1534
|
-
*
|
|
1535
|
-
* act on
|
|
1652
|
+
* A credential is scoped to one project today, so the filters and sorting
|
|
1653
|
+
* apply to that project alone. A signed-in person lists the projects they can
|
|
1654
|
+
* act on with `GET /users/me/projects`.
|
|
1536
1655
|
* @summary Query projects
|
|
1537
1656
|
*/
|
|
1538
1657
|
export const queryProjects = async (queryProjectsBody: QueryProjectsBody, options?: Parameters<typeof customFetch>[1]): Promise<QueryProjects200> => {
|
|
@@ -1567,12 +1686,16 @@ export const getGetProjectUrl = (projectId: string,) => {
|
|
|
1567
1686
|
|
|
1568
1687
|
|
|
1569
1688
|
|
|
1570
|
-
return `${
|
|
1689
|
+
return `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}`
|
|
1571
1690
|
}
|
|
1572
1691
|
|
|
1573
1692
|
/**
|
|
1574
|
-
* Returns
|
|
1575
|
-
*
|
|
1693
|
+
* Returns a project's current state: its name, origins, password hashing
|
|
1694
|
+
* method and owning team.
|
|
1695
|
+
*
|
|
1696
|
+
* Authenticate with the project secret, or with the session of a signed-in
|
|
1697
|
+
* person who holds a grant on the project.
|
|
1698
|
+
* @summary Get a project by ID
|
|
1576
1699
|
*/
|
|
1577
1700
|
export const getProject = async (projectId: string, options?: Parameters<typeof customFetch>[1]): Promise<GetProject200> => {
|
|
1578
1701
|
|
|
@@ -1592,12 +1715,20 @@ export const getPatchProjectUrl = (projectId: string,) => {
|
|
|
1592
1715
|
|
|
1593
1716
|
|
|
1594
1717
|
|
|
1595
|
-
return `${
|
|
1718
|
+
return `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}`
|
|
1596
1719
|
}
|
|
1597
1720
|
|
|
1598
1721
|
/**
|
|
1599
|
-
* Updates
|
|
1600
|
-
*
|
|
1722
|
+
* Updates a project's name or password hashing method.
|
|
1723
|
+
*
|
|
1724
|
+
* Fields you leave out keep their value. Sending `password_hash: null` drops
|
|
1725
|
+
* the project's own method and returns to the server default. A change of
|
|
1726
|
+
* method rewrites no stored password: each moves to the new method when its
|
|
1727
|
+
* owner next signs in or sets a new password.
|
|
1728
|
+
*
|
|
1729
|
+
* Authenticate with the project secret, or with the session of a signed-in
|
|
1730
|
+
* person who can act on the project.
|
|
1731
|
+
* @summary Update a project
|
|
1601
1732
|
*/
|
|
1602
1733
|
export const patchProject = async (projectId: string,
|
|
1603
1734
|
patchProjectBody: PatchProjectBody, options?: Parameters<typeof customFetch>[1]): Promise<PatchProject200> => {
|
|
@@ -1640,39 +1771,39 @@ export const getListProjectAdminsUrl = (projectId: string,
|
|
|
1640
1771
|
|
|
1641
1772
|
const stringifiedParams = normalizedParams.toString();
|
|
1642
1773
|
|
|
1643
|
-
return stringifiedParams.length > 0 ? `${
|
|
1774
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/admins?${stringifiedParams}` : `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/admins`
|
|
1644
1775
|
}
|
|
1645
1776
|
|
|
1646
1777
|
/**
|
|
1647
|
-
* Lists the people who can administer
|
|
1648
|
-
*
|
|
1649
|
-
*
|
|
1650
|
-
*
|
|
1651
|
-
*
|
|
1652
|
-
*
|
|
1653
|
-
*
|
|
1654
|
-
*
|
|
1655
|
-
*
|
|
1656
|
-
*
|
|
1657
|
-
*
|
|
1658
|
-
*
|
|
1659
|
-
*
|
|
1660
|
-
*
|
|
1661
|
-
*
|
|
1662
|
-
*
|
|
1663
|
-
*
|
|
1664
|
-
*
|
|
1778
|
+
* Lists the people who can administer a project, and how each of them
|
|
1779
|
+
* holds that access.
|
|
1780
|
+
*
|
|
1781
|
+
* A person appears once, with one entry in `sources` per way they hold it:
|
|
1782
|
+
*
|
|
1783
|
+
* - `owning_team`: an active member of the team that owns the project, the
|
|
1784
|
+
* team a claim attaches the project to. Removing a grant does not remove
|
|
1785
|
+
* this access. It ends only when the person leaves the team or the
|
|
1786
|
+
* project changes owner.
|
|
1787
|
+
* - `grant`: an unexpired `admin` grant on the project, which is a role
|
|
1788
|
+
* given to the person (`grant_id` only) or to a team they are an active
|
|
1789
|
+
* member of (`grant_id` and `team`). Revoking that grant removes this
|
|
1790
|
+
* source.
|
|
1791
|
+
*
|
|
1792
|
+
* The list follows the authorization check. A person who left a team, or
|
|
1793
|
+
* whose team or user was deactivated, is not listed through it. Grants that
|
|
1794
|
+
* expired or carry a lower role are left out. A person whose only access is a
|
|
1795
|
+
* `viewer` or `editor` grant is not an admin and is not listed. Like the
|
|
1796
|
+
* check, the list does not look at a person's user status beyond that, so a
|
|
1797
|
+
* direct grant to a suspended person is listed.
|
|
1665
1798
|
*
|
|
1666
1799
|
* A person whose access comes only through teams the caller is not a
|
|
1667
|
-
* member of is left out
|
|
1668
|
-
*
|
|
1669
|
-
* grants.
|
|
1670
|
-
*
|
|
1671
|
-
* Ordered by `user_id` and paginated with `page_token`.
|
|
1800
|
+
* member of is left out. A team the caller is not in is named by `team_id`
|
|
1801
|
+
* only. The grant to such a team still shows in the project's grants.
|
|
1672
1802
|
*
|
|
1673
|
-
*
|
|
1674
|
-
*
|
|
1675
|
-
*
|
|
1803
|
+
* The list is ordered by `user_id` and paginated with `page_token`.
|
|
1804
|
+
* Authenticate with a project secret (`oauth2`), or with the session cookie
|
|
1805
|
+
* (`sessionCookie`) of a signed-in person who can read the project.
|
|
1806
|
+
* @summary List the admins of a project
|
|
1676
1807
|
*/
|
|
1677
1808
|
export const listProjectAdmins = async (projectId: string,
|
|
1678
1809
|
params?: ListProjectAdminsParams, options?: Parameters<typeof customFetch>[1]): Promise<ListProjectAdmins200> => {
|
|
@@ -1693,15 +1824,26 @@ export const getInitClaimUrl = (projectId: string,) => {
|
|
|
1693
1824
|
|
|
1694
1825
|
|
|
1695
1826
|
|
|
1696
|
-
return `${
|
|
1827
|
+
return `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/claim/init`
|
|
1697
1828
|
}
|
|
1698
1829
|
|
|
1699
1830
|
/**
|
|
1700
|
-
* Starts a claim
|
|
1701
|
-
*
|
|
1702
|
-
*
|
|
1703
|
-
*
|
|
1704
|
-
*
|
|
1831
|
+
* Starts a claim, which attaches a project created before sign-in to a
|
|
1832
|
+
* team, and returns the `claim_url` to open in a browser.
|
|
1833
|
+
*
|
|
1834
|
+
* A claim [attaches a project to a team](https://preview.zitadel.com/docs/concepts/project-team-user#claim)
|
|
1835
|
+
* so that the team's members administer it. This operation mints a
|
|
1836
|
+
* single-use, short-lived challenge for an unclaimed project. The developer
|
|
1837
|
+
* opens `claim_url`, signs in and completes the claim in the browser; see
|
|
1838
|
+
* `completeClaim` (`POST /projects/{project_id}/claim/complete`). Poll `getClaimStatus` (`GET /projects/{project_id}/claim/status`) with the returned `challenge_id`,
|
|
1839
|
+
* as `zitadel claim` does. The response's `expires_at` carries the exact expiry.
|
|
1840
|
+
*
|
|
1841
|
+
* Authenticate with the project secret that `createProject` (`POST /projects`) returns as
|
|
1842
|
+
* `project_secret`.
|
|
1843
|
+
*
|
|
1844
|
+
* A `409` means a team already claimed the project, and its details name
|
|
1845
|
+
* that team. A `410` means the project's 14-day claim window has closed,
|
|
1846
|
+
* which is final.
|
|
1705
1847
|
* @summary Initialize a project claim
|
|
1706
1848
|
*/
|
|
1707
1849
|
export const initClaim = async (projectId: string, options?: Parameters<typeof customFetch>[1]): Promise<InitClaim201> => {
|
|
@@ -1730,19 +1872,27 @@ export const getGetClaimStatusUrl = (projectId: string,
|
|
|
1730
1872
|
|
|
1731
1873
|
const stringifiedParams = normalizedParams.toString();
|
|
1732
1874
|
|
|
1733
|
-
return stringifiedParams.length > 0 ? `${
|
|
1875
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/claim/status?${stringifiedParams}` : `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/claim/status`
|
|
1734
1876
|
}
|
|
1735
1877
|
|
|
1736
1878
|
/**
|
|
1737
|
-
*
|
|
1738
|
-
*
|
|
1739
|
-
*
|
|
1740
|
-
*
|
|
1741
|
-
*
|
|
1742
|
-
*
|
|
1743
|
-
*
|
|
1744
|
-
*
|
|
1745
|
-
*
|
|
1879
|
+
* Returns the status of a claim challenge, `pending` or `completed`, while a
|
|
1880
|
+
* browser completes the claim.
|
|
1881
|
+
*
|
|
1882
|
+
* A [claim attaches a project to a team](https://preview.zitadel.com/docs/concepts/project-team-user#claim).
|
|
1883
|
+
* `zitadel claim` polls this operation after `initClaim` (`POST /projects/{project_id}/claim/init`) starts the claim.
|
|
1884
|
+
* Once the project is claimed, the response is `completed` with the owning
|
|
1885
|
+
* team, the claim timestamp and the dashboard URL.
|
|
1886
|
+
*
|
|
1887
|
+
* The claim itself, not the polled challenge, decides the status. A project
|
|
1888
|
+
* claimed through another concurrent challenge also reports `completed`. A
|
|
1889
|
+
* completed claim keeps reporting `completed` past this challenge's expiry
|
|
1890
|
+
* and past the project's claim window.
|
|
1891
|
+
*
|
|
1892
|
+
* Pass the `challenge_id` that `initClaim` returns. Authenticate with the
|
|
1893
|
+
* project secret that started the challenge. On `410` with `proj.claim_expired`, call
|
|
1894
|
+
* `initClaim` again for a fresh challenge.
|
|
1895
|
+
* @summary Get the status of a project claim
|
|
1746
1896
|
*/
|
|
1747
1897
|
export const getClaimStatus = async (projectId: string,
|
|
1748
1898
|
params: GetClaimStatusParams, options?: Parameters<typeof customFetch>[1]): Promise<GetClaimStatus200> => {
|
|
@@ -1763,14 +1913,22 @@ export const getCompleteClaimUrl = (projectId: string,) => {
|
|
|
1763
1913
|
|
|
1764
1914
|
|
|
1765
1915
|
|
|
1766
|
-
return `${
|
|
1916
|
+
return `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/claim/complete`
|
|
1767
1917
|
}
|
|
1768
1918
|
|
|
1769
1919
|
/**
|
|
1770
|
-
*
|
|
1771
|
-
*
|
|
1772
|
-
*
|
|
1773
|
-
*
|
|
1920
|
+
* Completes a claim by attaching the project to the signed-in developer's
|
|
1921
|
+
* personal team.
|
|
1922
|
+
*
|
|
1923
|
+
* A [claim attaches a project to a team](https://preview.zitadel.com/docs/concepts/project-team-user#claim),
|
|
1924
|
+
* so that the team's members administer it. The claim page in the browser
|
|
1925
|
+
* calls this operation after the developer signs in, with the session cookie.
|
|
1926
|
+
* The `challenge_id` from the claim URL that `initClaim` (`POST /projects/{project_id}/claim/init`) returns is the
|
|
1927
|
+
* request's single-use, browser-safe authorization.
|
|
1928
|
+
*
|
|
1929
|
+
* Claims are first-claim-wins and spend the challenge. If a team already
|
|
1930
|
+
* claimed the project, the request answers `409`. If the challenge lapsed
|
|
1931
|
+
* (`410` with `proj.claim_expired`), call `initClaim` again for a fresh one.
|
|
1774
1932
|
* @summary Complete a project claim
|
|
1775
1933
|
*/
|
|
1776
1934
|
export const completeClaim = async (projectId: string,
|
|
@@ -1814,16 +1972,22 @@ export const getGetClaimWindowUrl = (projectId: string,
|
|
|
1814
1972
|
|
|
1815
1973
|
const stringifiedParams = normalizedParams.toString();
|
|
1816
1974
|
|
|
1817
|
-
return stringifiedParams.length > 0 ? `${
|
|
1975
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/claim/window?${stringifiedParams}` : `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/claim/window`
|
|
1818
1976
|
}
|
|
1819
1977
|
|
|
1820
1978
|
/**
|
|
1821
|
-
*
|
|
1822
|
-
*
|
|
1823
|
-
*
|
|
1824
|
-
* is the
|
|
1825
|
-
*
|
|
1826
|
-
*
|
|
1979
|
+
* Returns when a project's claim window closes and whether it has already
|
|
1980
|
+
* closed.
|
|
1981
|
+
*
|
|
1982
|
+
* The claim window is the 14 days after a project is created during which a
|
|
1983
|
+
* team can [claim it](https://preview.zitadel.com/docs/concepts/project-team-user#claim). The claim page
|
|
1984
|
+
* in the browser calls this operation to show how long is left.
|
|
1985
|
+
*
|
|
1986
|
+
* The request needs no credential, because the claim page calls it before the
|
|
1987
|
+
* developer has signed in. Holding the `challenge_id` from the claim URL that
|
|
1988
|
+
* `initClaim` (`POST /projects/{project_id}/claim/init`) returns is the authorization, the same one `completeClaim` (`POST /projects/{project_id}/claim/complete`)
|
|
1989
|
+
* accepts. The response reveals only the window, never the project itself.
|
|
1990
|
+
* Unlike `completeClaim` it spends nothing, so reloading the page is safe.
|
|
1827
1991
|
* @summary Get the claim window for a project
|
|
1828
1992
|
*/
|
|
1829
1993
|
export const getClaimWindow = async (projectId: string,
|
|
@@ -1845,14 +2009,26 @@ export const getAddOriginUrl = (projectId: string,) => {
|
|
|
1845
2009
|
|
|
1846
2010
|
|
|
1847
2011
|
|
|
1848
|
-
return `${
|
|
2012
|
+
return `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/origins`
|
|
1849
2013
|
}
|
|
1850
2014
|
|
|
1851
2015
|
/**
|
|
1852
|
-
* Adds
|
|
1853
|
-
*
|
|
1854
|
-
*
|
|
1855
|
-
*
|
|
2016
|
+
* Adds an origin pattern, a `pattern` and its `kind`, to the project's origins.
|
|
2017
|
+
*
|
|
2018
|
+
* An origin pattern says which web origins the project accepts. A `primary`
|
|
2019
|
+
* pattern must be an exact URL with no wildcard. A `preview` pattern may
|
|
2020
|
+
* include a single DNS-label wildcard.
|
|
2021
|
+
*
|
|
2022
|
+
* While the project has no patterns, it admits no origin except a loopback
|
|
2023
|
+
* origin, so the first pattern you add opens it to the origins that
|
|
2024
|
+
* pattern matches. Admitting an origin is not serving it: a new `primary`
|
|
2025
|
+
* origin answers `rel.not_deployed` until the next deploy to primary
|
|
2026
|
+
* (`zitadel deploy`).
|
|
2027
|
+
*
|
|
2028
|
+
* Adding a pattern that already exists with the same kind is idempotent and
|
|
2029
|
+
* answers `201` with the stored origin. If the pattern exists with the other
|
|
2030
|
+
* kind, the request is refused with `origin.kind_conflict`: remove it with
|
|
2031
|
+
* `removeOrigin` (`POST /projects/{project_id}/origins/remove`), then add it again.
|
|
1856
2032
|
* @summary Add an origin pattern
|
|
1857
2033
|
*/
|
|
1858
2034
|
export const addOrigin = async (projectId: string,
|
|
@@ -1888,14 +2064,19 @@ export const getRemoveOriginUrl = (projectId: string,) => {
|
|
|
1888
2064
|
|
|
1889
2065
|
|
|
1890
2066
|
|
|
1891
|
-
return `${
|
|
2067
|
+
return `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/origins/remove`
|
|
1892
2068
|
}
|
|
1893
2069
|
|
|
1894
2070
|
/**
|
|
1895
|
-
* Removes one pattern from the project's origins.
|
|
1896
|
-
*
|
|
1897
|
-
*
|
|
1898
|
-
*
|
|
2071
|
+
* Removes one origin pattern from the project's origins.
|
|
2072
|
+
*
|
|
2073
|
+
* Requests from URLs only that pattern admitted are refused from then on.
|
|
2074
|
+
* Live previews and deployment history are untouched. Removing the last
|
|
2075
|
+
* pattern leaves an empty list, which admits no origin except a loopback
|
|
2076
|
+
* origin.
|
|
2077
|
+
* Removing a pattern that is already absent is idempotent and answers `204`.
|
|
2078
|
+
*
|
|
2079
|
+
* The body's `pattern` is a pattern `addOrigin` (`POST /projects/{project_id}/origins`) stored.
|
|
1899
2080
|
* @summary Remove an origin pattern
|
|
1900
2081
|
*/
|
|
1901
2082
|
export const removeOrigin = async (projectId: string,
|
|
@@ -1939,14 +2120,16 @@ export const getListPreviewsUrl = (projectId: string,
|
|
|
1939
2120
|
|
|
1940
2121
|
const stringifiedParams = normalizedParams.toString();
|
|
1941
2122
|
|
|
1942
|
-
return stringifiedParams.length > 0 ? `${
|
|
2123
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/previews?${stringifiedParams}` : `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/previews`
|
|
1943
2124
|
}
|
|
1944
2125
|
|
|
1945
2126
|
/**
|
|
1946
|
-
* Lists the project's live previews, newest first by `created_at`.
|
|
1947
|
-
*
|
|
2127
|
+
* Lists the project's live previews, newest first by `created_at`.
|
|
2128
|
+
*
|
|
2129
|
+
* A preview is a URL with a deployment on it, served until it expires.
|
|
2130
|
+
* An expired or removed preview is not listed. What was deployed to it stays
|
|
1948
2131
|
* in `GET /deployments`.
|
|
1949
|
-
* @summary List previews
|
|
2132
|
+
* @summary List a project's previews
|
|
1950
2133
|
*/
|
|
1951
2134
|
export const listPreviews = async (projectId: string,
|
|
1952
2135
|
params?: ListPreviewsParams, options?: Parameters<typeof customFetch>[1]): Promise<ListPreviews200> => {
|
|
@@ -1967,19 +2150,19 @@ export const getRemovePreviewUrl = (projectId: string,) => {
|
|
|
1967
2150
|
|
|
1968
2151
|
|
|
1969
2152
|
|
|
1970
|
-
return `${
|
|
2153
|
+
return `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/previews/remove`
|
|
1971
2154
|
}
|
|
1972
2155
|
|
|
1973
2156
|
/**
|
|
1974
2157
|
* Ends a preview before it expires: the URL stops being served at once.
|
|
1975
|
-
* The deployments to it stay in the history.
|
|
1976
2158
|
*
|
|
1977
|
-
*
|
|
1978
|
-
*
|
|
1979
|
-
* races the expiry still
|
|
2159
|
+
* The deployments to it stay in the history. The call is idempotent.
|
|
2160
|
+
* A URL with no live preview answers `204` too. That includes one that
|
|
2161
|
+
* expired or was removed before, so a cleanup that races the expiry still
|
|
2162
|
+
* succeeds.
|
|
1980
2163
|
*
|
|
1981
2164
|
* The URL travels in the body rather than the path because an origin
|
|
1982
|
-
* contains `/`.
|
|
2165
|
+
* contains `/`. Take it from `listPreviews` (`GET /projects/{project_id}/previews`).
|
|
1983
2166
|
* @summary Remove a preview
|
|
1984
2167
|
*/
|
|
1985
2168
|
export const removePreview = async (projectId: string,
|
|
@@ -2015,32 +2198,36 @@ export const getCreateSessionUrl = () => {
|
|
|
2015
2198
|
|
|
2016
2199
|
|
|
2017
2200
|
|
|
2018
|
-
return `${
|
|
2201
|
+
return `${getApiBaseUrl()}/sessions`
|
|
2019
2202
|
}
|
|
2020
2203
|
|
|
2021
2204
|
/**
|
|
2022
|
-
* Creates an anonymous session
|
|
2205
|
+
* Creates an anonymous session with no user and no factors (`state: building`).
|
|
2023
2206
|
*
|
|
2024
|
-
*
|
|
2025
|
-
*
|
|
2026
|
-
*
|
|
2207
|
+
* A session is the durable record of a signed-in user. This call is optional: an
|
|
2208
|
+
* authentication attempt creates a session implicitly if none is provided.
|
|
2209
|
+
* Create one explicitly when you want to:
|
|
2210
|
+
*
|
|
2211
|
+
* - Pre-allocate a `session_id` before the user is known, so device and telemetry signals
|
|
2027
2212
|
* can be correlated with the eventual authenticated session from the start.
|
|
2028
2213
|
* - Track anonymous state (bot detection, device fingerprint) that survives until authentication.
|
|
2029
2214
|
*
|
|
2030
|
-
* Creating a session
|
|
2031
|
-
*
|
|
2032
|
-
*
|
|
2033
|
-
* `
|
|
2034
|
-
* `GET /sessions/me` and `DELETE /sessions/me`
|
|
2035
|
-
* by-id operations `GET /sessions/{session_id}`
|
|
2036
|
-
* are operator endpoints and require
|
|
2037
|
-
*
|
|
2038
|
-
*
|
|
2039
|
-
*
|
|
2040
|
-
*
|
|
2041
|
-
*
|
|
2042
|
-
*
|
|
2043
|
-
*
|
|
2215
|
+
* Creating a session runs on the project credential (`session.write`). The returned
|
|
2216
|
+
* `session_token` is a session credential for the end-user client, not a
|
|
2217
|
+
* management scope. It is delivered as the `__Host-zitadel_session` cookie
|
|
2218
|
+
* (`zitadel_session` over plain http to a loopback host) and authorises the
|
|
2219
|
+
* self-service operations `GET /sessions/me` and `DELETE /sessions/me`
|
|
2220
|
+
* (`sessionCookie` scheme). The by-id operations `GET /sessions/{session_id}`
|
|
2221
|
+
* and `DELETE /sessions/{session_id}` are operator endpoints and require
|
|
2222
|
+
* `session.read` / `session.delete` instead.
|
|
2223
|
+
*
|
|
2224
|
+
* The `session_token` is superseded when a handoff exchange completes. Clients
|
|
2225
|
+
* must replace it at that point.
|
|
2226
|
+
*
|
|
2227
|
+
* Anonymous sessions expire after 10 minutes. The lifetime resets to the
|
|
2228
|
+
* configured full session lifetime when a completing authentication attempt
|
|
2229
|
+
* writes the first authentication factor.
|
|
2230
|
+
* @summary Create an anonymous session
|
|
2044
2231
|
*/
|
|
2045
2232
|
export const createSession = async (createSessionBody: CreateSessionBody, options?: Parameters<typeof customFetch>[1]): Promise<CreateSession201> => {
|
|
2046
2233
|
|
|
@@ -2081,13 +2268,14 @@ export const getQuerySessionsUrl = (params: QuerySessionsParams,) => {
|
|
|
2081
2268
|
|
|
2082
2269
|
const stringifiedParams = normalizedParams.toString();
|
|
2083
2270
|
|
|
2084
|
-
return stringifiedParams.length > 0 ? `${
|
|
2271
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/sessions/query?${stringifiedParams}` : `${getApiBaseUrl()}/sessions/query`
|
|
2085
2272
|
}
|
|
2086
2273
|
|
|
2087
2274
|
/**
|
|
2088
|
-
* Returns
|
|
2275
|
+
* Returns a page of a project's sessions.
|
|
2276
|
+
*
|
|
2089
2277
|
* Sessions of every lifecycle state are returned; each carries its `state`.
|
|
2090
|
-
* Requires `session.read`
|
|
2278
|
+
* Requires the `session.read` scope.
|
|
2091
2279
|
* @summary Query sessions
|
|
2092
2280
|
*/
|
|
2093
2281
|
export const querySessions = async (querySessionsBody: QuerySessionsBody,
|
|
@@ -2130,35 +2318,42 @@ export const getExchangeHandoffUrl = (params: ExchangeHandoffParams,) => {
|
|
|
2130
2318
|
|
|
2131
2319
|
const stringifiedParams = normalizedParams.toString();
|
|
2132
2320
|
|
|
2133
|
-
return stringifiedParams.length > 0 ? `${
|
|
2321
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/sessions/exchange?${stringifiedParams}` : `${getApiBaseUrl()}/sessions/exchange`
|
|
2134
2322
|
}
|
|
2135
2323
|
|
|
2136
2324
|
/**
|
|
2137
|
-
*
|
|
2138
|
-
*
|
|
2325
|
+
* Exchanges a handoff token for a session and a `session_token`.
|
|
2326
|
+
*
|
|
2327
|
+
* A handoff token is the short-lived, single-use credential that
|
|
2328
|
+
* `createHandoff` (`POST /auth_attempts/{attempt_id}/handoff`) returns as `handoff_token` once an authentication attempt is
|
|
2329
|
+
* complete. This call consumes it. It is the last step of the sign-in sequence:
|
|
2330
|
+
* create the attempt, issue a challenge, verify the proof, create the handoff,
|
|
2331
|
+
* exchange it.
|
|
2139
2332
|
*
|
|
2140
|
-
* The server resolves the originating
|
|
2333
|
+
* The server resolves the originating authentication attempt from the token and then:
|
|
2141
2334
|
*
|
|
2142
|
-
* | Originating
|
|
2335
|
+
* | Originating authentication attempt | Outcome |
|
|
2143
2336
|
* |---|---|
|
|
2144
2337
|
* | No `session_id` | A new authenticated session is **created**. |
|
|
2145
|
-
* | `session_id` points to an anonymous
|
|
2146
|
-
* | `session_id` points to an active session (step-up) | Existing session is **upgraded
|
|
2338
|
+
* | `session_id` points to an anonymous session | Existing session is **upgraded**: user and factors written in, lifetime reset to the full session lifetime. |
|
|
2339
|
+
* | `session_id` points to an active session (step-up) | Existing session is **upgraded**: new factors merged, `assurance_levels[]` expanded. |
|
|
2147
2340
|
*
|
|
2148
2341
|
* The response shape is identical in all three cases.
|
|
2149
2342
|
*
|
|
2150
|
-
* The `session_token` supersedes any previously issued `session_token` for the
|
|
2151
|
-
* Clients must replace their stored token at this point.
|
|
2343
|
+
* The `session_token` supersedes any previously issued `session_token` for the
|
|
2344
|
+
* same session. Clients must replace their stored token at this point.
|
|
2152
2345
|
*
|
|
2153
|
-
* Requires a project service key (OAuth2 client credentials).
|
|
2346
|
+
* Requires a project service key (OAuth2 client credentials). The project comes
|
|
2347
|
+
* from the project secret. A query `project_id` that disagrees answers `403`
|
|
2348
|
+
* with `proj.mismatch`.
|
|
2154
2349
|
*
|
|
2155
|
-
* The
|
|
2156
|
-
*
|
|
2157
|
-
*
|
|
2158
|
-
*
|
|
2159
|
-
* `
|
|
2160
|
-
* `rel.revoked`.
|
|
2161
|
-
* @summary Exchange handoff token for a session
|
|
2350
|
+
* The exchange resolves a deployment the same way as other runtime operations.
|
|
2351
|
+
* A deployment makes a release live, and a release is the configuration that
|
|
2352
|
+
* `zitadel deploy` publishes. With no browser `Origin` and
|
|
2353
|
+
* nothing deployed to the resolved target, the response is `409` with
|
|
2354
|
+
* `rel.not_deployed`: run `zitadel deploy`, then retry. A revoked release
|
|
2355
|
+
* answers `409` with `rel.revoked`.
|
|
2356
|
+
* @summary Exchange a handoff token for a session
|
|
2162
2357
|
*/
|
|
2163
2358
|
export const exchangeHandoff = async (exchangeHandoffBody: ExchangeHandoffBody,
|
|
2164
2359
|
params: ExchangeHandoffParams, options?: Parameters<typeof customFetch>[1]): Promise<ExchangeHandoff200> => {
|
|
@@ -2193,17 +2388,18 @@ export const getGetSessionUrl = (sessionId: string,) => {
|
|
|
2193
2388
|
|
|
2194
2389
|
|
|
2195
2390
|
|
|
2196
|
-
return `${
|
|
2391
|
+
return `${getApiBaseUrl()}/sessions/${encodeURIComponent(String(sessionId))}`
|
|
2197
2392
|
}
|
|
2198
2393
|
|
|
2199
2394
|
/**
|
|
2200
|
-
* Returns the current state of a session including its factors and all currently
|
|
2201
|
-
*
|
|
2202
|
-
*
|
|
2203
|
-
* `assurance_levels[]` may shrink over time
|
|
2204
|
-
* without the session itself expiring.
|
|
2205
|
-
*
|
|
2206
|
-
*
|
|
2395
|
+
* Returns the current state of a session, including its factors and all currently satisfied assurance levels.
|
|
2396
|
+
*
|
|
2397
|
+
* An assurance level is a profile, such as `urn:nist:aal:2`, that the
|
|
2398
|
+
* session's verified factors satisfy. `assurance_levels[]` may shrink over time
|
|
2399
|
+
* as factor freshness windows expire, without the session itself expiring.
|
|
2400
|
+
* To restore a dropped level, use step-up authentication: create an
|
|
2401
|
+
* authentication attempt with the same `session_id`.
|
|
2402
|
+
* @summary Get a session by ID
|
|
2207
2403
|
*/
|
|
2208
2404
|
export const getSession = async (sessionId: string, options?: Parameters<typeof customFetch>[1]): Promise<GetSession200> => {
|
|
2209
2405
|
|
|
@@ -2223,20 +2419,21 @@ export const getRevokeSessionUrl = (sessionId: string,) => {
|
|
|
2223
2419
|
|
|
2224
2420
|
|
|
2225
2421
|
|
|
2226
|
-
return `${
|
|
2422
|
+
return `${getApiBaseUrl()}/sessions/${encodeURIComponent(String(sessionId))}`
|
|
2227
2423
|
}
|
|
2228
2424
|
|
|
2229
2425
|
/**
|
|
2230
|
-
*
|
|
2426
|
+
* Revokes a session by deleting it, immediately and for good. A later
|
|
2427
|
+
* `getSession` (`GET /sessions/{session_id}`) for it answers `404`.
|
|
2231
2428
|
*
|
|
2232
|
-
* This is the operator revoke path
|
|
2233
|
-
* project-bound credential. End-user
|
|
2234
|
-
* `DELETE /sessions/me` (`
|
|
2429
|
+
* This is the operator revoke path. It requires the `session.delete` scope on a
|
|
2430
|
+
* project-bound credential. End-user sign-out with the session cookie is
|
|
2431
|
+
* `DELETE /sessions/me` (`sessionCookie` scheme).
|
|
2235
2432
|
*
|
|
2236
|
-
* Idempotent:
|
|
2237
|
-
* still returns 204
|
|
2433
|
+
* Idempotent: revoking a session that does not exist, or was already revoked,
|
|
2434
|
+
* still returns `204`. After revocation, any tokens derived from the session are
|
|
2238
2435
|
* invalidated.
|
|
2239
|
-
* @summary Revoke session
|
|
2436
|
+
* @summary Revoke a session
|
|
2240
2437
|
*/
|
|
2241
2438
|
export const revokeSession = async (sessionId: string, options?: Parameters<typeof customFetch>[1]): Promise<void> => {
|
|
2242
2439
|
|
|
@@ -2263,19 +2460,20 @@ export const getGetMySessionUrl = (params?: GetMySessionParams,) => {
|
|
|
2263
2460
|
|
|
2264
2461
|
const stringifiedParams = normalizedParams.toString();
|
|
2265
2462
|
|
|
2266
|
-
return stringifiedParams.length > 0 ? `${
|
|
2463
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/sessions/me?${stringifiedParams}` : `${getApiBaseUrl()}/sessions/me`
|
|
2267
2464
|
}
|
|
2268
2465
|
|
|
2269
2466
|
/**
|
|
2270
|
-
* Returns the current state of the
|
|
2271
|
-
* satisfied assurance levels.
|
|
2467
|
+
* Returns the current state of the caller's session, including its factors and all currently satisfied assurance levels.
|
|
2272
2468
|
*
|
|
2273
2469
|
* With `project_id`, the session is returned only when it belongs to that project.
|
|
2274
2470
|
*
|
|
2275
|
-
*
|
|
2276
|
-
*
|
|
2277
|
-
*
|
|
2278
|
-
*
|
|
2471
|
+
* An assurance level is a profile, such as `urn:nist:aal:2`, that the
|
|
2472
|
+
* session's verified factors satisfy. `assurance_levels[]` may shrink over time
|
|
2473
|
+
* as factor freshness windows expire, without the session itself expiring.
|
|
2474
|
+
* To restore a dropped level, use step-up authentication: create an
|
|
2475
|
+
* authentication attempt with the same `session_id`.
|
|
2476
|
+
* @summary Get my session
|
|
2279
2477
|
*/
|
|
2280
2478
|
export const getMySession = async (params?: GetMySessionParams, options?: Parameters<typeof customFetch>[1]): Promise<GetMySession200> => {
|
|
2281
2479
|
|
|
@@ -2302,19 +2500,19 @@ export const getRevokeMySessionUrl = (params?: RevokeMySessionParams,) => {
|
|
|
2302
2500
|
|
|
2303
2501
|
const stringifiedParams = normalizedParams.toString();
|
|
2304
2502
|
|
|
2305
|
-
return stringifiedParams.length > 0 ? `${
|
|
2503
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/sessions/me?${stringifiedParams}` : `${getApiBaseUrl()}/sessions/me`
|
|
2306
2504
|
}
|
|
2307
2505
|
|
|
2308
2506
|
/**
|
|
2309
|
-
*
|
|
2507
|
+
* Revokes the caller's own session by deleting it, which signs the user out.
|
|
2310
2508
|
*
|
|
2311
|
-
* The
|
|
2312
|
-
* exchange)
|
|
2313
|
-
* in the `X-Zitadel-CSRF` header. Idempotent: if the session is already gone
|
|
2314
|
-
* this still returns 204
|
|
2315
|
-
* and the
|
|
2509
|
+
* The request needs the session cookie issued at creation (or superseded by a
|
|
2510
|
+
* handoff exchange). It also needs the session's CSRF token from
|
|
2511
|
+
* `GET /sessions/me/csrf` in the `X-Zitadel-CSRF` header. Idempotent: if the session is already gone,
|
|
2512
|
+
* this still returns `204`. Any tokens derived from the session are
|
|
2513
|
+
* invalidated, and the response clears the cookie.
|
|
2316
2514
|
*
|
|
2317
|
-
* With `project_id`, only a session of that project is
|
|
2515
|
+
* With `project_id`, only a session of that project is revoked. A session of
|
|
2318
2516
|
* another project is left alone, and so is its cookie.
|
|
2319
2517
|
* @summary Revoke my session
|
|
2320
2518
|
*/
|
|
@@ -2343,17 +2541,17 @@ export const getGetMySessionCsrfTokenUrl = (params?: GetMySessionCsrfTokenParams
|
|
|
2343
2541
|
|
|
2344
2542
|
const stringifiedParams = normalizedParams.toString();
|
|
2345
2543
|
|
|
2346
|
-
return stringifiedParams.length > 0 ? `${
|
|
2544
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/sessions/me/csrf?${stringifiedParams}` : `${getApiBaseUrl()}/sessions/me/csrf`
|
|
2347
2545
|
}
|
|
2348
2546
|
|
|
2349
2547
|
/**
|
|
2350
|
-
* Returns the session-bound token
|
|
2351
|
-
* (
|
|
2352
|
-
* state-changing requests the session cookie authenticates that
|
|
2353
|
-
*
|
|
2354
|
-
* HttpOnly cookie is still the credential, and a cross-site page
|
|
2355
|
-
* read this response. It stays the same for the life of the session,
|
|
2356
|
-
* client fetches it once per session.
|
|
2548
|
+
* Returns the session-bound token that protects against cross-site request
|
|
2549
|
+
* forgery (CSRF). Browser code sends it in the `X-Zitadel-CSRF` header on the
|
|
2550
|
+
* state-changing requests that the session cookie authenticates and that
|
|
2551
|
+
* require it; see the `sessionCookie` scheme. It authorizes nothing on its
|
|
2552
|
+
* own: the HttpOnly cookie is still the credential, and a cross-site page
|
|
2553
|
+
* cannot read this response. It stays the same for the life of the session,
|
|
2554
|
+
* so a client fetches it once per session.
|
|
2357
2555
|
*
|
|
2358
2556
|
* With `project_id`, the token is returned only when the session belongs to
|
|
2359
2557
|
* that project.
|
|
@@ -2384,20 +2582,25 @@ export const getCreateSchemaUrl = (params: CreateSchemaParams,) => {
|
|
|
2384
2582
|
|
|
2385
2583
|
const stringifiedParams = normalizedParams.toString();
|
|
2386
2584
|
|
|
2387
|
-
return stringifiedParams.length > 0 ? `${
|
|
2585
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/schemas?${stringifiedParams}` : `${getApiBaseUrl()}/schemas`
|
|
2388
2586
|
}
|
|
2389
2587
|
|
|
2390
2588
|
/**
|
|
2391
|
-
*
|
|
2392
|
-
*
|
|
2393
|
-
*
|
|
2394
|
-
*
|
|
2395
|
-
*
|
|
2396
|
-
*
|
|
2397
|
-
*
|
|
2398
|
-
* The
|
|
2399
|
-
* schema
|
|
2400
|
-
*
|
|
2589
|
+
* Creates a user schema, the JSON Schema that says which attributes a user
|
|
2590
|
+
* has and which attribute identifies the user.
|
|
2591
|
+
*
|
|
2592
|
+
* The request is either a user schema (`kind: user-schema`) or a schema URL
|
|
2593
|
+
* (`kind: schema-url`) that the server resolves. The response's `id` is what
|
|
2594
|
+
* `createUser` (`POST /users`) takes as `schema`.
|
|
2595
|
+
*
|
|
2596
|
+
* The optional `$id` is the JSON Schema document URI that identifies the
|
|
2597
|
+
* schema in later requests. It is a stable identity for GitOps, not a
|
|
2598
|
+
* free-form resource key. When `$id` is omitted, the server generates a
|
|
2599
|
+
* `sch_*` URL. When provided, `$id` must be unique within the project and
|
|
2600
|
+
* should ideally be a valid URI pointing at where the schema can be accessed.
|
|
2601
|
+
* A `$id` that already exists in the project is refused; pick another or
|
|
2602
|
+
* omit it.
|
|
2603
|
+
* @summary Create a schema
|
|
2401
2604
|
*/
|
|
2402
2605
|
export const createSchema = async (createSchemaBody: CreateSchemaBody,
|
|
2403
2606
|
params: CreateSchemaParams, options?: Parameters<typeof customFetch>[1]): Promise<CreateSchema201> => {
|
|
@@ -2447,13 +2650,16 @@ export const getListSchemasUrl = (params: ListSchemasParams,) => {
|
|
|
2447
2650
|
|
|
2448
2651
|
const stringifiedParams = normalizedParams.toString();
|
|
2449
2652
|
|
|
2450
|
-
return stringifiedParams.length > 0 ? `${
|
|
2653
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/schemas?${stringifiedParams}` : `${getApiBaseUrl()}/schemas`
|
|
2451
2654
|
}
|
|
2452
2655
|
|
|
2453
2656
|
/**
|
|
2454
|
-
*
|
|
2455
|
-
*
|
|
2456
|
-
*
|
|
2657
|
+
* Lists the schemas of a project, newest first, paginated with a cursor.
|
|
2658
|
+
* Filter by `object_type` or `kind`, and choose which revisions to return
|
|
2659
|
+
* with `revisions`.
|
|
2660
|
+
*
|
|
2661
|
+
* A schema's `id` is what `createUser` (`POST /users`) takes as `schema`.
|
|
2662
|
+
* @summary List schemas
|
|
2457
2663
|
*/
|
|
2458
2664
|
export const listSchemas = async (params: ListSchemasParams, options?: Parameters<typeof customFetch>[1]): Promise<ListSchemas200> => {
|
|
2459
2665
|
|
|
@@ -2481,21 +2687,21 @@ export const getGetSchemaByIdUrl = (id: string,
|
|
|
2481
2687
|
|
|
2482
2688
|
const stringifiedParams = normalizedParams.toString();
|
|
2483
2689
|
|
|
2484
|
-
return stringifiedParams.length > 0 ? `${
|
|
2690
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/schemas/${encodeURIComponent(String(id))}?${stringifiedParams}` : `${getApiBaseUrl()}/schemas/${encodeURIComponent(String(id))}`
|
|
2485
2691
|
}
|
|
2486
2692
|
|
|
2487
2693
|
/**
|
|
2488
|
-
*
|
|
2694
|
+
* Returns a schema by ID. A schema ID identifies one immutable revision, so
|
|
2489
2695
|
* this returns exactly that revision. To find the current revision of an
|
|
2490
|
-
* object type,
|
|
2696
|
+
* object type, call `listSchemas` (`GET /schemas`) with `revisions=latest`.
|
|
2491
2697
|
*
|
|
2492
2698
|
* Schema IDs are unique within a project, not across projects (the seeded
|
|
2493
|
-
* default schema carries the same `$id` in every project). A
|
|
2699
|
+
* default schema carries the same `$id` in every project). A console
|
|
2494
2700
|
* session that manages more than one project names the project with
|
|
2495
2701
|
* `project_id`; without it, the ID is resolved in the credential's own
|
|
2496
2702
|
* project when it is ambiguous. A project secret always resolves in its
|
|
2497
2703
|
* own project and ignores `project_id`.
|
|
2498
|
-
* @summary Get schema by ID
|
|
2704
|
+
* @summary Get a schema by ID
|
|
2499
2705
|
*/
|
|
2500
2706
|
export const getSchemaById = async (id: string,
|
|
2501
2707
|
params?: GetSchemaByIdParams, options?: Parameters<typeof customFetch>[1]): Promise<GetSchemaById200> => {
|
|
@@ -2516,21 +2722,26 @@ export const getCreateFlowDefinitionUrl = () => {
|
|
|
2516
2722
|
|
|
2517
2723
|
|
|
2518
2724
|
|
|
2519
|
-
return `${
|
|
2725
|
+
return `${getApiBaseUrl()}/flow_definitions`
|
|
2520
2726
|
}
|
|
2521
2727
|
|
|
2522
2728
|
/**
|
|
2523
|
-
*
|
|
2524
|
-
*
|
|
2525
|
-
*
|
|
2526
|
-
*
|
|
2527
|
-
*
|
|
2528
|
-
*
|
|
2529
|
-
*
|
|
2530
|
-
*
|
|
2531
|
-
*
|
|
2532
|
-
*
|
|
2533
|
-
*
|
|
2729
|
+
* Creates a flow definition by publishing a new revision of it. It records a
|
|
2730
|
+
* `flowdef.created` event.
|
|
2731
|
+
*
|
|
2732
|
+
* A [flow definition](https://preview.zitadel.com/docs/concepts/flows-and-schemas) is a template that
|
|
2733
|
+
* defines the sequence of steps (capabilities) for one user journey, such as
|
|
2734
|
+
* registration, login or password reset. The body follows the flow
|
|
2735
|
+
* definition schema, which includes the flow's purpose, audience and steps.
|
|
2736
|
+
*
|
|
2737
|
+
* Every call allocates a new opaque ID. That `id` is the `revision_id` a
|
|
2738
|
+
* release pins for `kind: flow_definition`.
|
|
2739
|
+
*
|
|
2740
|
+
* Revisions of one flow share its `name`. Posting a definition under an
|
|
2741
|
+
* existing `name` publishes a new revision of that flow, which is not a
|
|
2742
|
+
* conflict. List with `name` to see a flow's revisions, newest by creation
|
|
2743
|
+
* time first.
|
|
2744
|
+
* @summary Create a flow definition
|
|
2534
2745
|
*/
|
|
2535
2746
|
export const createFlowDefinition = async (createFlowDefinitionBody: CreateFlowDefinitionBody, options?: Parameters<typeof customFetch>[1]): Promise<CreateFlowDefinition201> => {
|
|
2536
2747
|
|
|
@@ -2579,13 +2790,16 @@ export const getListFlowDefinitionsUrl = (params: ListFlowDefinitionsParams,) =>
|
|
|
2579
2790
|
|
|
2580
2791
|
const stringifiedParams = normalizedParams.toString();
|
|
2581
2792
|
|
|
2582
|
-
return stringifiedParams.length > 0 ? `${
|
|
2793
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/flow_definitions?${stringifiedParams}` : `${getApiBaseUrl()}/flow_definitions`
|
|
2583
2794
|
}
|
|
2584
2795
|
|
|
2585
2796
|
/**
|
|
2586
|
-
*
|
|
2587
|
-
*
|
|
2588
|
-
*
|
|
2797
|
+
* Lists the project's flow definitions with their configurations, newest by
|
|
2798
|
+
* creation time first. A flow definition sets which step of a sign-in
|
|
2799
|
+
* renders when, and which fields each step collects.
|
|
2800
|
+
*
|
|
2801
|
+
* The `id` of an entry is the flow definition ID that `getFlowDefinition` (`GET /flow_definitions/{id}`)
|
|
2802
|
+
* takes. Filter by `name` to list the revisions of one flow.
|
|
2589
2803
|
* @summary List flow definitions
|
|
2590
2804
|
*/
|
|
2591
2805
|
export const listFlowDefinitions = async (params: ListFlowDefinitionsParams, options?: Parameters<typeof customFetch>[1]): Promise<ListFlowDefinitions200> => {
|
|
@@ -2606,12 +2820,13 @@ export const getGetFlowDefinitionUrl = (id: string,) => {
|
|
|
2606
2820
|
|
|
2607
2821
|
|
|
2608
2822
|
|
|
2609
|
-
return `${
|
|
2823
|
+
return `${getApiBaseUrl()}/flow_definitions/${encodeURIComponent(String(id))}`
|
|
2610
2824
|
}
|
|
2611
2825
|
|
|
2612
2826
|
/**
|
|
2613
|
-
*
|
|
2614
|
-
*
|
|
2827
|
+
* Returns one flow definition revision. Pass the `id` that
|
|
2828
|
+
* `createFlowDefinition` (`POST /flow_definitions`) or `listFlowDefinitions` (`GET /flow_definitions`) returns.
|
|
2829
|
+
* @summary Get a flow definition by ID
|
|
2615
2830
|
*/
|
|
2616
2831
|
export const getFlowDefinition = async (id: string, options?: Parameters<typeof customFetch>[1]): Promise<GetFlowDefinition200> => {
|
|
2617
2832
|
|
|
@@ -2638,15 +2853,16 @@ export const getCreateTeamUrl = (params: CreateTeamParams,) => {
|
|
|
2638
2853
|
|
|
2639
2854
|
const stringifiedParams = normalizedParams.toString();
|
|
2640
2855
|
|
|
2641
|
-
return stringifiedParams.length > 0 ? `${
|
|
2856
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/teams?${stringifiedParams}` : `${getApiBaseUrl()}/teams`
|
|
2642
2857
|
}
|
|
2643
2858
|
|
|
2644
2859
|
/**
|
|
2645
2860
|
* Creates a team in the project, with a name no other team in the project has.
|
|
2646
2861
|
*
|
|
2647
|
-
* A
|
|
2648
|
-
*
|
|
2649
|
-
*
|
|
2862
|
+
* A team groups users inside a project and can represent a customer. A taken
|
|
2863
|
+
* name is refused with `409 team.already_exists`: choose another name. The
|
|
2864
|
+
* new team has no members yet.
|
|
2865
|
+
* @summary Create a team
|
|
2650
2866
|
*/
|
|
2651
2867
|
export const createTeam = async (createTeamBody: CreateTeamBody,
|
|
2652
2868
|
params: CreateTeamParams, options?: Parameters<typeof customFetch>[1]): Promise<CreateTeam201> => {
|
|
@@ -2676,7 +2892,7 @@ return customFetch<CreateTeam201>(getCreateTeamUrl(params),
|
|
|
2676
2892
|
|
|
2677
2893
|
|
|
2678
2894
|
|
|
2679
|
-
export const getQueryTeamsUrl = (params
|
|
2895
|
+
export const getQueryTeamsUrl = (params?: QueryTeamsParams,) => {
|
|
2680
2896
|
const normalizedParams = new URLSearchParams();
|
|
2681
2897
|
|
|
2682
2898
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
@@ -2688,15 +2904,19 @@ export const getQueryTeamsUrl = (params: QueryTeamsParams,) => {
|
|
|
2688
2904
|
|
|
2689
2905
|
const stringifiedParams = normalizedParams.toString();
|
|
2690
2906
|
|
|
2691
|
-
return stringifiedParams.length > 0 ? `${
|
|
2907
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/teams/query?${stringifiedParams}` : `${getApiBaseUrl()}/teams/query`
|
|
2692
2908
|
}
|
|
2693
2909
|
|
|
2694
2910
|
/**
|
|
2695
|
-
* Returns
|
|
2911
|
+
* Returns a page of a project's teams.
|
|
2912
|
+
*
|
|
2913
|
+
* Pass the response's `next_page_token` as `page_token` to fetch the next
|
|
2914
|
+
* page. `project_id` names the project to list; without it, the credential's
|
|
2915
|
+
* own project is listed.
|
|
2696
2916
|
* @summary Query teams
|
|
2697
2917
|
*/
|
|
2698
2918
|
export const queryTeams = async (queryTeamsBody: QueryTeamsBody,
|
|
2699
|
-
params
|
|
2919
|
+
params?: QueryTeamsParams, options?: Parameters<typeof customFetch>[1]): Promise<QueryTeams200> => {
|
|
2700
2920
|
|
|
2701
2921
|
const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
|
|
2702
2922
|
if (!h) return {};
|
|
@@ -2728,12 +2948,14 @@ export const getGetTeamUrl = (teamId: string,) => {
|
|
|
2728
2948
|
|
|
2729
2949
|
|
|
2730
2950
|
|
|
2731
|
-
return `${
|
|
2951
|
+
return `${getApiBaseUrl()}/teams/${encodeURIComponent(String(teamId))}`
|
|
2732
2952
|
}
|
|
2733
2953
|
|
|
2734
2954
|
/**
|
|
2735
|
-
* Returns a
|
|
2736
|
-
*
|
|
2955
|
+
* Returns a team, a group of users inside a project, by ID.
|
|
2956
|
+
*
|
|
2957
|
+
* A deactivated team is still returned, with status `deactivated`.
|
|
2958
|
+
* @summary Get a team by ID
|
|
2737
2959
|
*/
|
|
2738
2960
|
export const getTeam = async (teamId: string, options?: Parameters<typeof customFetch>[1]): Promise<GetTeam200> => {
|
|
2739
2961
|
|
|
@@ -2753,24 +2975,24 @@ export const getDeleteTeamUrl = (teamId: string,) => {
|
|
|
2753
2975
|
|
|
2754
2976
|
|
|
2755
2977
|
|
|
2756
|
-
return `${
|
|
2978
|
+
return `${getApiBaseUrl()}/teams/${encodeURIComponent(String(teamId))}`
|
|
2757
2979
|
}
|
|
2758
2980
|
|
|
2759
2981
|
/**
|
|
2760
|
-
* Deactivates
|
|
2982
|
+
* Deactivates a team and removes its memberships.
|
|
2761
2983
|
*
|
|
2762
|
-
* The team is
|
|
2763
|
-
*
|
|
2764
|
-
*
|
|
2984
|
+
* The team is kept rather than erased: `getTeam` (`GET /teams/{team_id}`) still returns it with
|
|
2985
|
+
* status `deactivated`. The users whose lifecycle the team owns are
|
|
2986
|
+
* deactivated with it.
|
|
2765
2987
|
*
|
|
2766
2988
|
* The request is idempotent. Deleting a team that is already deactivated
|
|
2767
|
-
* or
|
|
2989
|
+
* or does not exist succeeds without changing anything.
|
|
2768
2990
|
*
|
|
2769
|
-
* A team that still owns a project is refused with `409
|
|
2770
|
-
*
|
|
2771
|
-
*
|
|
2772
|
-
*
|
|
2773
|
-
* @summary
|
|
2991
|
+
* A team that still owns a project is refused with `409 team.owns_project`.
|
|
2992
|
+
* Deactivating it would leave the project owned by a deactivated team and so
|
|
2993
|
+
* unmanageable. No endpoint ends a team's ownership of a project yet, so for
|
|
2994
|
+
* now such a team cannot be deactivated through the API.
|
|
2995
|
+
* @summary Deactivate a team
|
|
2774
2996
|
*/
|
|
2775
2997
|
export const deleteTeam = async (teamId: string, options?: Parameters<typeof customFetch>[1]): Promise<void> => {
|
|
2776
2998
|
|
|
@@ -2790,12 +3012,16 @@ export const getUpdateTeamUrl = (teamId: string,) => {
|
|
|
2790
3012
|
|
|
2791
3013
|
|
|
2792
3014
|
|
|
2793
|
-
return `${
|
|
3015
|
+
return `${getApiBaseUrl()}/teams/${encodeURIComponent(String(teamId))}`
|
|
2794
3016
|
}
|
|
2795
3017
|
|
|
2796
3018
|
/**
|
|
2797
|
-
*
|
|
2798
|
-
*
|
|
3019
|
+
* Renames an active team.
|
|
3020
|
+
*
|
|
3021
|
+
* Only active teams can be updated. A deactivated team answers `404`. The new
|
|
3022
|
+
* name must be unique within the project, and a taken name answers `409`:
|
|
3023
|
+
* choose another name.
|
|
3024
|
+
* @summary Update a team
|
|
2799
3025
|
*/
|
|
2800
3026
|
export const updateTeam = async (teamId: string,
|
|
2801
3027
|
updateTeamBody: UpdateTeamBody, options?: Parameters<typeof customFetch>[1]): Promise<UpdateTeam200> => {
|
|
@@ -2837,19 +3063,23 @@ export const getCreateBrandingUrl = (params: CreateBrandingParams,) => {
|
|
|
2837
3063
|
|
|
2838
3064
|
const stringifiedParams = normalizedParams.toString();
|
|
2839
3065
|
|
|
2840
|
-
return stringifiedParams.length > 0 ? `${
|
|
3066
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/branding?${stringifiedParams}` : `${getApiBaseUrl()}/branding`
|
|
2841
3067
|
}
|
|
2842
3068
|
|
|
2843
3069
|
/**
|
|
2844
|
-
* Publishes a new immutable branding revision for the project
|
|
2845
|
-
* revisions cannot be updated or deleted
|
|
2846
|
-
*
|
|
3070
|
+
* Publishes a new immutable branding revision for the project, and records a
|
|
3071
|
+
* `branding.created` event. Branding revisions cannot be updated or deleted.
|
|
3072
|
+
* Every edit publishes a new revision. Flow responses carry the branding
|
|
3073
|
+
* revision the request's release pins.
|
|
3074
|
+
*
|
|
3075
|
+
* The `id` of the new revision is the revision ID a release pins for
|
|
3076
|
+
* `kind: branding`.
|
|
2847
3077
|
*
|
|
2848
3078
|
* The `liquid_template` is validated lexically on save (size, encoding,
|
|
2849
3079
|
* banned patterns such as `<script>` tags, inline event handlers, and the
|
|
2850
3080
|
* `| raw` filter). Authoritative LiquidJS validation runs at authoring
|
|
2851
|
-
* time
|
|
2852
|
-
* @summary Publish a
|
|
3081
|
+
* time, in `zitadel deploy` and `zitadel deploy --dry-run`.
|
|
3082
|
+
* @summary Publish a branding revision
|
|
2853
3083
|
*/
|
|
2854
3084
|
export const createBranding = async (createBrandingBody: CreateBrandingBody,
|
|
2855
3085
|
params: CreateBrandingParams, options?: Parameters<typeof customFetch>[1]): Promise<CreateBranding201> => {
|
|
@@ -2891,15 +3121,15 @@ export const getListBrandingUrl = (params: ListBrandingParams,) => {
|
|
|
2891
3121
|
|
|
2892
3122
|
const stringifiedParams = normalizedParams.toString();
|
|
2893
3123
|
|
|
2894
|
-
return stringifiedParams.length > 0 ? `${
|
|
3124
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/branding?${stringifiedParams}` : `${getApiBaseUrl()}/branding`
|
|
2895
3125
|
}
|
|
2896
3126
|
|
|
2897
3127
|
/**
|
|
2898
|
-
* Lists branding revisions
|
|
2899
|
-
*
|
|
2900
|
-
*
|
|
2901
|
-
*
|
|
2902
|
-
*
|
|
3128
|
+
* Lists a project's branding revisions, newest first, capped at the 100 most
|
|
3129
|
+
* recent and not paginated. The first entry is the newest revision.
|
|
3130
|
+
*
|
|
3131
|
+
* The `id` of an entry is the revision ID that `getBrandingById` (`GET /branding/{id}`) takes and
|
|
3132
|
+
* that a release pins for `kind: branding`.
|
|
2903
3133
|
* @summary List branding revisions
|
|
2904
3134
|
*/
|
|
2905
3135
|
export const listBranding = async (params: ListBrandingParams, options?: Parameters<typeof customFetch>[1]): Promise<ListBranding200Item[]> => {
|
|
@@ -2920,11 +3150,12 @@ export const getGetBrandingByIdUrl = (id: string,) => {
|
|
|
2920
3150
|
|
|
2921
3151
|
|
|
2922
3152
|
|
|
2923
|
-
return `${
|
|
3153
|
+
return `${getApiBaseUrl()}/branding/${encodeURIComponent(String(id))}`
|
|
2924
3154
|
}
|
|
2925
3155
|
|
|
2926
3156
|
/**
|
|
2927
|
-
*
|
|
3157
|
+
* Returns one branding revision, including its stored configuration. Pass the
|
|
3158
|
+
* `id` that `createBranding` (`POST /branding`) or `listBranding` (`GET /branding`) returns.
|
|
2928
3159
|
* @summary Get a branding revision by ID
|
|
2929
3160
|
*/
|
|
2930
3161
|
export const getBrandingById = async (id: string, options?: Parameters<typeof customFetch>[1]): Promise<GetBrandingById200> => {
|
|
@@ -2952,21 +3183,23 @@ export const getCreateIdpUrl = (params: CreateIdpParams,) => {
|
|
|
2952
3183
|
|
|
2953
3184
|
const stringifiedParams = normalizedParams.toString();
|
|
2954
3185
|
|
|
2955
|
-
return stringifiedParams.length > 0 ? `${
|
|
3186
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/idps?${stringifiedParams}` : `${getApiBaseUrl()}/idps`
|
|
2956
3187
|
}
|
|
2957
3188
|
|
|
2958
3189
|
/**
|
|
2959
|
-
* Creates or revises
|
|
2960
|
-
*
|
|
2961
|
-
*
|
|
2962
|
-
*
|
|
2963
|
-
*
|
|
2964
|
-
*
|
|
2965
|
-
*
|
|
2966
|
-
*
|
|
2967
|
-
*
|
|
2968
|
-
*
|
|
2969
|
-
*
|
|
3190
|
+
* Creates or revises an identity provider, an external sign-in such as
|
|
3191
|
+
* Google, from its connection document. If the slug does not already exist,
|
|
3192
|
+
* a new identity provider is created. If one with that slug already exists,
|
|
3193
|
+
* a revision is created.
|
|
3194
|
+
*
|
|
3195
|
+
* A revision gets a new `revision_id` and does not modify the identity
|
|
3196
|
+
* provider's `id`. Identity links, which tie a user to an account at the
|
|
3197
|
+
* provider, keep resolving. Releases and authentication attempts stay pinned
|
|
3198
|
+
* to the revision they captured.
|
|
3199
|
+
*
|
|
3200
|
+
* Identity fields are fixed for the life of the identity provider and a
|
|
3201
|
+
* revision that changes one is rejected: `protocol`, `subject_claim`, and
|
|
3202
|
+
* `issuer`, the field that names the authority. Their values decide which provider
|
|
2970
3203
|
* account a stored subject belongs to, so changing one would silently
|
|
2971
3204
|
* repoint existing identities at a different provider.
|
|
2972
3205
|
*
|
|
@@ -2977,18 +3210,18 @@ export const getCreateIdpUrl = (params: CreateIdpParams,) => {
|
|
|
2977
3210
|
* OIDC is the only protocol.
|
|
2978
3211
|
*
|
|
2979
3212
|
* The document is validated against the `idp-connection.json` schema before
|
|
2980
|
-
* anything is stored. The rules the
|
|
2981
|
-
* then run on the document, so a
|
|
2982
|
-
* refused here
|
|
2983
|
-
*
|
|
2984
|
-
*
|
|
2985
|
-
*
|
|
3213
|
+
* anything is stored. The rules the server applies when it starts a sign-in
|
|
3214
|
+
* then run on the document, so a document that could never start one is
|
|
3215
|
+
* refused here with `idp.endpoints_partial`: the OIDC block sets an endpoint
|
|
3216
|
+
* without the others. Set no endpoint, and discovery fills them, or set
|
|
3217
|
+
* `authorization_endpoint`, `token_endpoint`, `jwks_uri`, and
|
|
3218
|
+
* `userinfo_endpoint`. `userinfo_endpoint` may be left out when
|
|
2986
3219
|
* `id_token_mapping` is on, but setting it alone still counts as setting an
|
|
2987
3220
|
* endpoint. The details list the missing endpoints.
|
|
2988
3221
|
*
|
|
2989
3222
|
* A refused document stores nothing, and on a revise the current revision
|
|
2990
3223
|
* stays unchanged.
|
|
2991
|
-
* @summary Create or revise an identity provider
|
|
3224
|
+
* @summary Create or revise an identity provider
|
|
2992
3225
|
*/
|
|
2993
3226
|
export const createIdp = async (createIdpBody: CreateIdpBody,
|
|
2994
3227
|
params: CreateIdpParams, options?: Parameters<typeof customFetch>[1]): Promise<CreateIdp200 | CreateIdp201> => {
|
|
@@ -3030,13 +3263,14 @@ export const getQueryIdpsUrl = (params: QueryIdpsParams,) => {
|
|
|
3030
3263
|
|
|
3031
3264
|
const stringifiedParams = normalizedParams.toString();
|
|
3032
3265
|
|
|
3033
|
-
return stringifiedParams.length > 0 ? `${
|
|
3266
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/idps/query?${stringifiedParams}` : `${getApiBaseUrl()}/idps/query`
|
|
3034
3267
|
}
|
|
3035
3268
|
|
|
3036
3269
|
/**
|
|
3037
|
-
* Returns the identity
|
|
3038
|
-
* cursor.
|
|
3039
|
-
*
|
|
3270
|
+
* Returns the identity providers of a project, external sign-ins such as
|
|
3271
|
+
* Google, paginated with a cursor. Each identity provider appears once, with
|
|
3272
|
+
* its newest revision.
|
|
3273
|
+
* @summary Query identity providers
|
|
3040
3274
|
*/
|
|
3041
3275
|
export const queryIdps = async (queryIdpsBody: QueryIdpsBody,
|
|
3042
3276
|
params: QueryIdpsParams, options?: Parameters<typeof customFetch>[1]): Promise<QueryIdps200> => {
|
|
@@ -3079,15 +3313,16 @@ export const getGetIdpByIdUrl = (id: string,
|
|
|
3079
3313
|
|
|
3080
3314
|
const stringifiedParams = normalizedParams.toString();
|
|
3081
3315
|
|
|
3082
|
-
return stringifiedParams.length > 0 ? `${
|
|
3316
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/idps/${encodeURIComponent(String(id))}?${stringifiedParams}` : `${getApiBaseUrl()}/idps/${encodeURIComponent(String(id))}`
|
|
3083
3317
|
}
|
|
3084
3318
|
|
|
3085
3319
|
/**
|
|
3086
|
-
*
|
|
3087
|
-
* `GET /idps/{id}/revisions` lists
|
|
3320
|
+
* Returns an identity provider, an external sign-in such as Google, by ID at
|
|
3321
|
+
* its newest revision. `listIdpRevisions` (`GET /idps/{id}/revisions`) lists
|
|
3322
|
+
* every revision of it.
|
|
3088
3323
|
*
|
|
3089
3324
|
* The lookup is scoped to the project in `project_id`.
|
|
3090
|
-
* @summary Get an identity provider
|
|
3325
|
+
* @summary Get an identity provider by ID
|
|
3091
3326
|
*/
|
|
3092
3327
|
export const getIdpById = async (id: string,
|
|
3093
3328
|
params: GetIdpByIdParams, options?: Parameters<typeof customFetch>[1]): Promise<GetIdpById200> => {
|
|
@@ -3116,15 +3351,16 @@ export const getListIdpRevisionsUrl = (id: string,
|
|
|
3116
3351
|
|
|
3117
3352
|
const stringifiedParams = normalizedParams.toString();
|
|
3118
3353
|
|
|
3119
|
-
return stringifiedParams.length > 0 ? `${
|
|
3354
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/idps/${encodeURIComponent(String(id))}/revisions?${stringifiedParams}` : `${getApiBaseUrl()}/idps/${encodeURIComponent(String(id))}/revisions`
|
|
3120
3355
|
}
|
|
3121
3356
|
|
|
3122
3357
|
/**
|
|
3123
|
-
*
|
|
3124
|
-
* cursor. The order is fixed, so there
|
|
3358
|
+
* Lists every revision of one identity provider, an external sign-in such as
|
|
3359
|
+
* Google, newest first, paginated with a cursor. The order is fixed, so there
|
|
3360
|
+
* is no `sorting`.
|
|
3125
3361
|
*
|
|
3126
3362
|
* The lookup is scoped to the project in `project_id`.
|
|
3127
|
-
* @summary List the revisions of an identity provider
|
|
3363
|
+
* @summary List the revisions of an identity provider
|
|
3128
3364
|
*/
|
|
3129
3365
|
export const listIdpRevisions = async (id: string,
|
|
3130
3366
|
params: ListIdpRevisionsParams, options?: Parameters<typeof customFetch>[1]): Promise<ListIdpRevisions200> => {
|
|
@@ -3153,15 +3389,16 @@ export const getGetIdpRevisionByIdUrl = (revisionId: string,
|
|
|
3153
3389
|
|
|
3154
3390
|
const stringifiedParams = normalizedParams.toString();
|
|
3155
3391
|
|
|
3156
|
-
return stringifiedParams.length > 0 ? `${
|
|
3392
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/idps/revisions/${encodeURIComponent(String(revisionId))}?${stringifiedParams}` : `${getApiBaseUrl()}/idps/revisions/${encodeURIComponent(String(revisionId))}`
|
|
3157
3393
|
}
|
|
3158
3394
|
|
|
3159
3395
|
/**
|
|
3160
|
-
*
|
|
3161
|
-
* attempt or a
|
|
3396
|
+
* Returns one revision of an identity provider, an external sign-in such as
|
|
3397
|
+
* Google, by its `revision_id`, the value an authentication attempt or a
|
|
3398
|
+
* release pins.
|
|
3162
3399
|
*
|
|
3163
3400
|
* The lookup is scoped to the project in `project_id`.
|
|
3164
|
-
* @summary Get
|
|
3401
|
+
* @summary Get a revision of an identity provider
|
|
3165
3402
|
*/
|
|
3166
3403
|
export const getIdpRevisionById = async (revisionId: string,
|
|
3167
3404
|
params: GetIdpRevisionByIdParams, options?: Parameters<typeof customFetch>[1]): Promise<GetIdpRevisionById200> => {
|
|
@@ -3189,14 +3426,17 @@ export const getListPoliciesUrl = (params: ListPoliciesParams,) => {
|
|
|
3189
3426
|
|
|
3190
3427
|
const stringifiedParams = normalizedParams.toString();
|
|
3191
3428
|
|
|
3192
|
-
return stringifiedParams.length > 0 ? `${
|
|
3429
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/policies?${stringifiedParams}` : `${getApiBaseUrl()}/policies`
|
|
3193
3430
|
}
|
|
3194
3431
|
|
|
3195
3432
|
/**
|
|
3196
3433
|
* Lists the project's policies, one per operation, each as its newest
|
|
3197
|
-
* revision
|
|
3198
|
-
*
|
|
3199
|
-
*
|
|
3434
|
+
* revision.
|
|
3435
|
+
*
|
|
3436
|
+
* A policy holds a project's rules for one operation, such as setting a
|
|
3437
|
+
* password. The list is ordered by `created_at` (first publish) and then
|
|
3438
|
+
* `id`. Filter by `operation` to read the policy of one operation; a project
|
|
3439
|
+
* that never published one gets an empty list.
|
|
3200
3440
|
*
|
|
3201
3441
|
* The lookup is scoped to the project in `project_id`.
|
|
3202
3442
|
* @summary List policies
|
|
@@ -3226,27 +3466,36 @@ export const getPublishPolicyUrl = (params: PublishPolicyParams,) => {
|
|
|
3226
3466
|
|
|
3227
3467
|
const stringifiedParams = normalizedParams.toString();
|
|
3228
3468
|
|
|
3229
|
-
return stringifiedParams.length > 0 ? `${
|
|
3469
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/policies?${stringifiedParams}` : `${getApiBaseUrl()}/policies`
|
|
3230
3470
|
}
|
|
3231
3471
|
|
|
3232
3472
|
/**
|
|
3233
3473
|
* Publishes the project's policy for an operation as a new immutable
|
|
3234
|
-
* revision, creating the policy on its first publish.
|
|
3235
|
-
*
|
|
3474
|
+
* revision, creating the policy on its first publish. A revision applies
|
|
3475
|
+
* once a deployed release pins it. Nothing already stored is
|
|
3236
3476
|
* re-evaluated, so a stricter password policy applies the next time a
|
|
3237
3477
|
* password is set.
|
|
3238
3478
|
*
|
|
3239
|
-
*
|
|
3479
|
+
* A policy holds a project's rules for one operation, such as setting a
|
|
3480
|
+
* password. The first publish records a `policy.created` event and every
|
|
3481
|
+
* later one a `policy.updated` event.
|
|
3482
|
+
*
|
|
3483
|
+
* The request is typed by `operation`. An unknown operation or setting, or
|
|
3240
3484
|
* a value of the wrong type or outside its bounds, answers `req.invalid`
|
|
3241
|
-
* like any malformed request.
|
|
3242
|
-
*
|
|
3243
|
-
*
|
|
3244
|
-
*
|
|
3245
|
-
*
|
|
3246
|
-
*
|
|
3247
|
-
*
|
|
3248
|
-
* settings
|
|
3249
|
-
* rule
|
|
3485
|
+
* like any malformed request.
|
|
3486
|
+
*
|
|
3487
|
+
* The operation's template then checks the config again, together with the
|
|
3488
|
+
* rules that relate settings to each other (a `min_length` above
|
|
3489
|
+
* `max_length`), and answers `pol.invalid`. Its `details.details.violations`
|
|
3490
|
+
* lists everything that failed, settings first, then rules.
|
|
3491
|
+
* `{"setting": "min_length"}` names one setting. `{"config_rule":
|
|
3492
|
+
* "min_length_not_above_max_length", "settings": ["min_length",
|
|
3493
|
+
* "max_length"]}` names a rule across settings, with the settings it reads.
|
|
3494
|
+
* Fix what the violations list and publish again. To check a config without
|
|
3495
|
+
* publishing it, call `evaluatePolicy` (`POST /policies/evaluate`).
|
|
3496
|
+
*
|
|
3497
|
+
* A setting left out is off, and `{}` switches every rule off; there are no
|
|
3498
|
+
* defaults.
|
|
3250
3499
|
* @summary Publish a policy
|
|
3251
3500
|
*/
|
|
3252
3501
|
export const publishPolicy = async (publishPolicyBody: PublishPolicyBody,
|
|
@@ -3289,29 +3538,32 @@ export const getEvaluatePolicyUrl = (params: EvaluatePolicyParams,) => {
|
|
|
3289
3538
|
|
|
3290
3539
|
const stringifiedParams = normalizedParams.toString();
|
|
3291
3540
|
|
|
3292
|
-
return stringifiedParams.length > 0 ? `${
|
|
3541
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/policies/evaluate?${stringifiedParams}` : `${getApiBaseUrl()}/policies/evaluate`
|
|
3293
3542
|
}
|
|
3294
3543
|
|
|
3295
3544
|
/**
|
|
3296
3545
|
* Evaluates a policy config against one request, without side effects, and
|
|
3297
|
-
* answers the decision the operation would reach.
|
|
3298
|
-
*
|
|
3299
|
-
*
|
|
3300
|
-
*
|
|
3546
|
+
* answers the decision the operation would reach. A policy holds a
|
|
3547
|
+
* project's rules for one operation, such as setting a password.
|
|
3548
|
+
*
|
|
3549
|
+
* Nothing is read from or written to the project. The config is the one in
|
|
3550
|
+
* the body, checked exactly as a publish checks it, so an invalid config
|
|
3551
|
+
* answers `pol.invalid` with the same violations. Fix the settings the
|
|
3552
|
+
* violations list and send the request again.
|
|
3301
3553
|
*
|
|
3302
3554
|
* `input` is what the operation's request carries, in the operation's own
|
|
3303
|
-
* terms (a password, not its length)
|
|
3555
|
+
* terms (a password, not its length). The server derives what the policy
|
|
3304
3556
|
* checks with the code the live operation runs, guards included. `facts`
|
|
3305
3557
|
* states what the operation would look up at runtime, such as whether the
|
|
3306
3558
|
* candidate matches one of the user's kept passwords.
|
|
3307
3559
|
*
|
|
3308
3560
|
* The decision and the names of the failed rules hold wherever the
|
|
3309
|
-
* operation runs. `code` and `violations` are what an API call answers
|
|
3561
|
+
* operation runs. `code` and `violations` are what an API call answers. A
|
|
3310
3562
|
* login flow shows the same rules as field errors on the password field
|
|
3311
3563
|
* (`error.x-auth-methods#password_<rule>` in `step.error`).
|
|
3312
3564
|
*
|
|
3313
|
-
*
|
|
3314
|
-
* and pass its config
|
|
3565
|
+
* This operation does not choose which policy a project or release applies.
|
|
3566
|
+
* Read that policy, for example with `getPolicy` (`GET /policies/{policy_id}`), and pass its `config`.
|
|
3315
3567
|
*
|
|
3316
3568
|
* The caller needs read access to the project in `project_id`.
|
|
3317
3569
|
* @summary Evaluate a policy
|
|
@@ -3357,16 +3609,19 @@ export const getGetPolicyUrl = (policyId: string,
|
|
|
3357
3609
|
|
|
3358
3610
|
const stringifiedParams = normalizedParams.toString();
|
|
3359
3611
|
|
|
3360
|
-
return stringifiedParams.length > 0 ? `${
|
|
3612
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/policies/${encodeURIComponent(String(policyId))}?${stringifiedParams}` : `${getApiBaseUrl()}/policies/${encodeURIComponent(String(policyId))}`
|
|
3361
3613
|
}
|
|
3362
3614
|
|
|
3363
3615
|
/**
|
|
3364
|
-
*
|
|
3365
|
-
*
|
|
3616
|
+
* Returns a policy as its newest revision. A revision applies once a deployed
|
|
3617
|
+
* release pins it.
|
|
3618
|
+
*
|
|
3619
|
+
* A policy holds a project's rules for one operation, such as setting a
|
|
3620
|
+
* password. Pass the `id` that `listPolicies` (`GET /policies`) or `publishPolicy` (`POST /policies`) returns.
|
|
3366
3621
|
*
|
|
3367
3622
|
* The lookup is scoped to the project in `project_id`: a policy of another
|
|
3368
|
-
* project answers not found exactly as an unknown
|
|
3369
|
-
* @summary Get a policy
|
|
3623
|
+
* project answers not found exactly as an unknown ID does.
|
|
3624
|
+
* @summary Get a policy by ID
|
|
3370
3625
|
*/
|
|
3371
3626
|
export const getPolicy = async (policyId: string,
|
|
3372
3627
|
params: GetPolicyParams, options?: Parameters<typeof customFetch>[1]): Promise<GetPolicy200> => {
|
|
@@ -3395,15 +3650,18 @@ export const getListPolicyRevisionsUrl = (policyId: string,
|
|
|
3395
3650
|
|
|
3396
3651
|
const stringifiedParams = normalizedParams.toString();
|
|
3397
3652
|
|
|
3398
|
-
return stringifiedParams.length > 0 ? `${
|
|
3653
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/policies/${encodeURIComponent(String(policyId))}/revisions?${stringifiedParams}` : `${getApiBaseUrl()}/policies/${encodeURIComponent(String(policyId))}/revisions`
|
|
3399
3654
|
}
|
|
3400
3655
|
|
|
3401
3656
|
/**
|
|
3402
|
-
*
|
|
3403
|
-
*
|
|
3657
|
+
* Lists every revision of one policy, newest first, one page at a time. The
|
|
3658
|
+
* order is fixed, so there is no `sorting`.
|
|
3659
|
+
*
|
|
3660
|
+
* Each publish of a policy adds a revision. Pass the policy `id` that
|
|
3661
|
+
* `listPolicies` (`GET /policies`) or `publishPolicy` (`POST /policies`) returns.
|
|
3404
3662
|
*
|
|
3405
3663
|
* The lookup is scoped to the project in `project_id`: a policy of another
|
|
3406
|
-
* project answers not found exactly as an unknown
|
|
3664
|
+
* project answers not found exactly as an unknown ID does.
|
|
3407
3665
|
* @summary List the revisions of a policy
|
|
3408
3666
|
*/
|
|
3409
3667
|
export const listPolicyRevisions = async (policyId: string,
|
|
@@ -3433,15 +3691,18 @@ export const getGetPolicyRevisionUrl = (revisionId: string,
|
|
|
3433
3691
|
|
|
3434
3692
|
const stringifiedParams = normalizedParams.toString();
|
|
3435
3693
|
|
|
3436
|
-
return stringifiedParams.length > 0 ? `${
|
|
3694
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/policies/revisions/${encodeURIComponent(String(revisionId))}?${stringifiedParams}` : `${getApiBaseUrl()}/policies/revisions/${encodeURIComponent(String(revisionId))}`
|
|
3437
3695
|
}
|
|
3438
3696
|
|
|
3439
3697
|
/**
|
|
3440
|
-
*
|
|
3698
|
+
* Returns one revision of a policy, the newest or an older one.
|
|
3699
|
+
*
|
|
3700
|
+
* Pass the `revision_id` that `publishPolicy` (`POST /policies`) or `listPolicyRevisions` (`GET /policies/{policy_id}/revisions`)
|
|
3701
|
+
* returns.
|
|
3441
3702
|
*
|
|
3442
3703
|
* The lookup is scoped to the project in `project_id`: a revision of another
|
|
3443
|
-
* project answers not found exactly as an unknown
|
|
3444
|
-
* @summary Get a policy revision
|
|
3704
|
+
* project answers not found exactly as an unknown ID does.
|
|
3705
|
+
* @summary Get a policy revision by ID
|
|
3445
3706
|
*/
|
|
3446
3707
|
export const getPolicyRevision = async (revisionId: string,
|
|
3447
3708
|
params: GetPolicyRevisionParams, options?: Parameters<typeof customFetch>[1]): Promise<GetPolicyRevision200> => {
|
|
@@ -3469,29 +3730,38 @@ export const getCreateReleaseUrl = (params: CreateReleaseParams,) => {
|
|
|
3469
3730
|
|
|
3470
3731
|
const stringifiedParams = normalizedParams.toString();
|
|
3471
3732
|
|
|
3472
|
-
return stringifiedParams.length > 0 ? `${
|
|
3733
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/releases?${stringifiedParams}` : `${getApiBaseUrl()}/releases`
|
|
3473
3734
|
}
|
|
3474
3735
|
|
|
3475
3736
|
/**
|
|
3476
|
-
*
|
|
3477
|
-
*
|
|
3478
|
-
* `POST /releases/build
|
|
3737
|
+
* Creates a release from existing revisions, given as `(kind, revision_id)`
|
|
3738
|
+
* pairs. To build one from files on disk, use `buildRelease` (`POST /releases/build`)
|
|
3739
|
+
* (`POST /releases/build`).
|
|
3740
|
+
*
|
|
3741
|
+
* A release is a snapshot of the project's configuration: it pins one
|
|
3742
|
+
* revision of each resource it includes, and it is not tied to an origin.
|
|
3743
|
+
* Take each `revision_id` from the operation that created the revision, for
|
|
3744
|
+
* example the `id` that `createBranding` (`POST /branding`) or `createFlowDefinition` (`POST /flow_definitions`) returns.
|
|
3479
3745
|
*
|
|
3480
3746
|
* Each revision must exist in the project and is recorded under the handle
|
|
3481
3747
|
* it declares. The release must be complete and consistent:
|
|
3482
3748
|
*
|
|
3483
3749
|
* - Every handle its revisions name must be in the release: a flow's
|
|
3484
|
-
* `user_schema`, and the
|
|
3485
|
-
* `sso_providers` or a schema's `x-auth-methods.sso.providers`.
|
|
3486
|
-
* one answers `rel.unresolved_reference`, naming the resource and
|
|
3487
|
-
* handle,
|
|
3488
|
-
*
|
|
3489
|
-
*
|
|
3490
|
-
* reason in
|
|
3491
|
-
*
|
|
3492
|
-
*
|
|
3493
|
-
*
|
|
3494
|
-
* `
|
|
3750
|
+
* `user_schema`, and the identity provider (IdP) connections named by a
|
|
3751
|
+
* flow step's `sso_providers` or a schema's `x-auth-methods.sso.providers`.
|
|
3752
|
+
* A missing one answers `rel.unresolved_reference`, naming the resource and
|
|
3753
|
+
* the handle, for example `flow_definition default-login: user_schema
|
|
3754
|
+
* human-user not found`. Add the missing revision to the request.
|
|
3755
|
+
* - Every flow is validated as on save, against the user schema revision in
|
|
3756
|
+
* the release. A flow that fails answers `rel.invalid`, with the reason in
|
|
3757
|
+
* `details`. Fix the flow and send the request again.
|
|
3758
|
+
*
|
|
3759
|
+
* The call is idempotent on the set of revisions: the same revisions with a
|
|
3760
|
+
* different `message` answer `200` with the existing release. A new release
|
|
3761
|
+
* answers `201`.
|
|
3762
|
+
*
|
|
3763
|
+
* Creating a release does not deploy it. Pass the returned `id` to
|
|
3764
|
+
* `createDeployment` (`POST /deployments`) to make the release live.
|
|
3495
3765
|
* @summary Create a release
|
|
3496
3766
|
*/
|
|
3497
3767
|
export const createRelease = async (createReleaseBody: CreateReleaseBody,
|
|
@@ -3534,21 +3804,24 @@ export const getListReleasesUrl = (params: ListReleasesParams,) => {
|
|
|
3534
3804
|
|
|
3535
3805
|
const stringifiedParams = normalizedParams.toString();
|
|
3536
3806
|
|
|
3537
|
-
return stringifiedParams.length > 0 ? `${
|
|
3807
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/releases?${stringifiedParams}` : `${getApiBaseUrl()}/releases`
|
|
3538
3808
|
}
|
|
3539
3809
|
|
|
3540
3810
|
/**
|
|
3541
|
-
* Lists the project's releases, newest first.
|
|
3811
|
+
* Lists the project's releases, newest first. A release is a snapshot of the
|
|
3812
|
+
* project's configuration.
|
|
3542
3813
|
*
|
|
3543
|
-
* Entries carry the digest, the metadata and `revoked_at
|
|
3544
|
-
*
|
|
3545
|
-
*
|
|
3814
|
+
* Entries carry the digest, the metadata and `revoked_at`. The pinned set is
|
|
3815
|
+
* omitted: read one release with `getReleaseById` (`GET /releases/{release_id}`) to get its pointers.
|
|
3816
|
+
*
|
|
3817
|
+
* The `id` of an entry is the release ID that `getReleaseById`,
|
|
3818
|
+
* `revokeRelease` (`POST /releases/{release_id}/revoke`) and `createDeployment` (`POST /deployments`) take.
|
|
3546
3819
|
*
|
|
3547
3820
|
* `content_hash` looks a release up by its content, as the CLI does when a
|
|
3548
3821
|
* person types the digest a transcript printed. The project holds at most
|
|
3549
|
-
* one release per digest, so the filtered list has one entry or none
|
|
3550
|
-
*
|
|
3551
|
-
* `rel_`
|
|
3822
|
+
* one release per digest, so the filtered list has one entry or none. An
|
|
3823
|
+
* unknown digest is an empty list rather than an error. Paths take the
|
|
3824
|
+
* `rel_` ID only, so use the matched entry's `id` there.
|
|
3552
3825
|
* @summary List releases
|
|
3553
3826
|
*/
|
|
3554
3827
|
export const listReleases = async (params: ListReleasesParams, options?: Parameters<typeof customFetch>[1]): Promise<ListReleases200> => {
|
|
@@ -3576,42 +3849,48 @@ export const getBuildReleaseUrl = (params: BuildReleaseParams,) => {
|
|
|
3576
3849
|
|
|
3577
3850
|
const stringifiedParams = normalizedParams.toString();
|
|
3578
3851
|
|
|
3579
|
-
return stringifiedParams.length > 0 ? `${
|
|
3852
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/releases/build?${stringifiedParams}` : `${getApiBaseUrl()}/releases/build`
|
|
3580
3853
|
}
|
|
3581
3854
|
|
|
3582
3855
|
/**
|
|
3583
|
-
* Builds a release from the resources
|
|
3584
|
-
* grouped by kind, in one transaction
|
|
3585
|
-
*
|
|
3856
|
+
* Builds a release from the resources in `.zitadel/` as authored on disk,
|
|
3857
|
+
* grouped by kind, in one transaction.
|
|
3858
|
+
*
|
|
3859
|
+
* A release is a snapshot of the project's configuration. A failure anywhere
|
|
3860
|
+
* leaves no revision and no release. The caller records nothing. The CLI's
|
|
3861
|
+
* `deploy` command builds its release with this operation.
|
|
3586
3862
|
*
|
|
3587
3863
|
* If the project already holds a release with the same content, the same
|
|
3588
|
-
* `content_hash`, the request answers `200` with that release and
|
|
3589
|
-
*
|
|
3590
|
-
* project's newest revision of the same handle: unchanged content reuses
|
|
3591
|
-
* that revision, changed content allocates a new one, and the request
|
|
3592
|
-
* answers `201` with the new release. A policy whose config matches only an
|
|
3593
|
-
* older revision allocates a new one too, so a request that resolves no
|
|
3594
|
-
* release, which reads the newest revision, applies it as well. Metadata is excluded from the
|
|
3864
|
+
* `content_hash`, the request answers `200` with that release and allocates
|
|
3865
|
+
* nothing, however long ago it was built. Metadata is excluded from the
|
|
3595
3866
|
* comparison, so the same content under a different `message` is the same
|
|
3596
3867
|
* release.
|
|
3597
3868
|
*
|
|
3869
|
+
* Otherwise every resource is compared with the project's newest revision of
|
|
3870
|
+
* the same handle. Unchanged content reuses that revision, and changed
|
|
3871
|
+
* content allocates a new one. The request answers `201` with the new
|
|
3872
|
+
* release. A policy whose config matches only an older revision allocates a
|
|
3873
|
+
* new one too, so the policy reads back as the config the build carried.
|
|
3874
|
+
*
|
|
3598
3875
|
* A structurally malformed request is refused while decoding with
|
|
3599
3876
|
* `req.invalid`, naming the offending fields. A well-formed bundle is then
|
|
3600
3877
|
* checked resource by resource, as each kind's create endpoint checks it,
|
|
3601
|
-
* and every failure is reported at once
|
|
3878
|
+
* and every failure is reported at once. The request answers `400` with
|
|
3602
3879
|
* `rel.invalid`, and `details.resources` lists each resource that failed.
|
|
3603
|
-
*
|
|
3604
|
-
*
|
|
3880
|
+
* Fix each listed resource and build again. A handle that resolves neither
|
|
3881
|
+
* in the bundle nor in the project answers `rel.unresolved_reference`,
|
|
3882
|
+
* naming the pointer and the handle. Add the missing resource to the bundle.
|
|
3605
3883
|
*
|
|
3606
3884
|
* Building writes revisions, so besides `release.write` it needs the write
|
|
3607
3885
|
* scope of every kind the bundle carries a resource of: `schema.write`,
|
|
3608
|
-
* `flow_definition.write`, `branding.write`, `idp.write` and
|
|
3609
|
-
*
|
|
3610
|
-
* naming the kind.
|
|
3611
|
-
*
|
|
3612
|
-
*
|
|
3613
|
-
*
|
|
3614
|
-
* origins
|
|
3886
|
+
* `flow_definition.write`, `branding.write`, `idp.write` and `policy.write`,
|
|
3887
|
+
* as the per-kind create endpoints do. A missing scope answers `403` with
|
|
3888
|
+
* `rel.permission_denied`, naming the kind. Request a token with that scope.
|
|
3889
|
+
* An empty kind needs no scope.
|
|
3890
|
+
*
|
|
3891
|
+
* Building a release does not deploy it. A release is not tied to an origin,
|
|
3892
|
+
* and the same release can later be deployed to any number of origins
|
|
3893
|
+
* unchanged. Pass the returned `id` to `createDeployment` (`POST /deployments`).
|
|
3615
3894
|
* @summary Build a release from files
|
|
3616
3895
|
*/
|
|
3617
3896
|
export const buildRelease = async (buildReleaseBody: BuildReleaseBody,
|
|
@@ -3655,24 +3934,27 @@ export const getGetReleaseByIdUrl = (releaseId: string,
|
|
|
3655
3934
|
|
|
3656
3935
|
const stringifiedParams = normalizedParams.toString();
|
|
3657
3936
|
|
|
3658
|
-
return stringifiedParams.length > 0 ? `${
|
|
3937
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/releases/${encodeURIComponent(String(releaseId))}?${stringifiedParams}` : `${getApiBaseUrl()}/releases/${encodeURIComponent(String(releaseId))}`
|
|
3659
3938
|
}
|
|
3660
3939
|
|
|
3661
3940
|
/**
|
|
3662
|
-
*
|
|
3663
|
-
* the `(kind, handle, revision_id)` tuples it pins.
|
|
3664
|
-
*
|
|
3665
|
-
*
|
|
3666
|
-
*
|
|
3667
|
-
*
|
|
3668
|
-
*
|
|
3669
|
-
*
|
|
3670
|
-
*
|
|
3671
|
-
* The
|
|
3672
|
-
*
|
|
3673
|
-
*
|
|
3674
|
-
*
|
|
3675
|
-
*
|
|
3941
|
+
* Returns one release: its digest, its metadata, whether it was revoked, and
|
|
3942
|
+
* the `(kind, handle, revision_id)` tuples it pins. A release is a snapshot
|
|
3943
|
+
* of the project's configuration.
|
|
3944
|
+
*
|
|
3945
|
+
* The path takes the `rel_` ID only: the `id` that `createRelease` (`POST /releases`),
|
|
3946
|
+
* `buildRelease` (`POST /releases/build`) or `listReleases` (`GET /releases`) returns. To find a release from its
|
|
3947
|
+
* digest, list with the `content_hash` filter and read the matched entry's
|
|
3948
|
+
* `id`.
|
|
3949
|
+
*
|
|
3950
|
+
* The response does not embed resource content. Resolve each `revision_id`
|
|
3951
|
+
* through the per-kind read endpoints when the bytes are needed.
|
|
3952
|
+
*
|
|
3953
|
+
* The lookup is scoped to the project in `project_id`. A release ID
|
|
3954
|
+
* belonging to another project answers not found exactly as an unknown ID
|
|
3955
|
+
* does, so the endpoint cannot be used to probe for releases in projects the
|
|
3956
|
+
* caller cannot read.
|
|
3957
|
+
* @summary Get a release by ID
|
|
3676
3958
|
*/
|
|
3677
3959
|
export const getReleaseById = async (releaseId: string,
|
|
3678
3960
|
params: GetReleaseByIdParams, options?: Parameters<typeof customFetch>[1]): Promise<GetReleaseById200> => {
|
|
@@ -3701,29 +3983,33 @@ export const getRevokeReleaseUrl = (releaseId: string,
|
|
|
3701
3983
|
|
|
3702
3984
|
const stringifiedParams = normalizedParams.toString();
|
|
3703
3985
|
|
|
3704
|
-
return stringifiedParams.length > 0 ? `${
|
|
3986
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/releases/${encodeURIComponent(String(releaseId))}/revoke?${stringifiedParams}` : `${getApiBaseUrl()}/releases/${encodeURIComponent(String(releaseId))}/revoke`
|
|
3705
3987
|
}
|
|
3706
3988
|
|
|
3707
3989
|
/**
|
|
3708
|
-
*
|
|
3709
|
-
*
|
|
3710
|
-
*
|
|
3711
|
-
*
|
|
3712
|
-
*
|
|
3713
|
-
*
|
|
3714
|
-
*
|
|
3715
|
-
*
|
|
3716
|
-
*
|
|
3717
|
-
*
|
|
3718
|
-
*
|
|
3719
|
-
*
|
|
3720
|
-
*
|
|
3721
|
-
*
|
|
3722
|
-
*
|
|
3723
|
-
*
|
|
3724
|
-
*
|
|
3725
|
-
*
|
|
3726
|
-
*
|
|
3990
|
+
* Revokes a release, so that its content is never served again. Pass the
|
|
3991
|
+
* `id` that `createRelease` (`POST /releases`), `buildRelease` (`POST /releases/build`) or `listReleases` (`GET /releases`) returns. It
|
|
3992
|
+
* records a `release.revoked` event.
|
|
3993
|
+
*
|
|
3994
|
+
* From then on the release cannot be deployed. Every path that would serve
|
|
3995
|
+
* it refuses it with `rel.revoked`, including a build that pins its digest.
|
|
3996
|
+
*
|
|
3997
|
+
* A release that any origin still serves cannot be revoked. An origin serves
|
|
3998
|
+
* the release of the newest deployment to it, so the call answers `409` with
|
|
3999
|
+
* `rel.in_use`, naming each such origin and that deployment. Deploy another
|
|
4000
|
+
* release there or roll back first, then revoke. Revoking therefore never
|
|
4001
|
+
* takes an origin down. Deployments that named the release earlier stay in
|
|
4002
|
+
* the history.
|
|
4003
|
+
*
|
|
4004
|
+
* The call is idempotent: revoking a release that is already revoked answers
|
|
4005
|
+
* `200` with the release unchanged, and `revoked_at` still names the first
|
|
4006
|
+
* revocation. There is no un-revoke. To serve that configuration again,
|
|
4007
|
+
* change it and build a new release: rebuilding unchanged content returns
|
|
4008
|
+
* the same revoked release.
|
|
4009
|
+
*
|
|
4010
|
+
* The call takes no body. The lookup is scoped to the project in
|
|
4011
|
+
* `project_id`, so a release ID of another project answers not found exactly
|
|
4012
|
+
* as an unknown ID does.
|
|
3727
4013
|
* @summary Revoke a release
|
|
3728
4014
|
*/
|
|
3729
4015
|
export const revokeRelease = async (releaseId: string,
|
|
@@ -3752,30 +4038,36 @@ export const getCreateGrantUrl = (params: CreateGrantParams,) => {
|
|
|
3752
4038
|
|
|
3753
4039
|
const stringifiedParams = normalizedParams.toString();
|
|
3754
4040
|
|
|
3755
|
-
return stringifiedParams.length > 0 ? `${
|
|
4041
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/grants?${stringifiedParams}` : `${getApiBaseUrl()}/grants`
|
|
3756
4042
|
}
|
|
3757
4043
|
|
|
3758
4044
|
/**
|
|
3759
|
-
*
|
|
3760
|
-
*
|
|
3761
|
-
*
|
|
3762
|
-
* (`
|
|
3763
|
-
*
|
|
3764
|
-
*
|
|
3765
|
-
*
|
|
3766
|
-
*
|
|
3767
|
-
*
|
|
3768
|
-
*
|
|
3769
|
-
*
|
|
3770
|
-
*
|
|
3771
|
-
*
|
|
3772
|
-
*
|
|
3773
|
-
*
|
|
3774
|
-
*
|
|
3775
|
-
* session
|
|
3776
|
-
*
|
|
3777
|
-
*
|
|
3778
|
-
*
|
|
4045
|
+
* Creates a grant that gives a user or a team the `project.viewer`, `project.editor` or `project.admin` role on a project.
|
|
4046
|
+
*
|
|
4047
|
+
* The project is the one named by the `project_id` query parameter. Name the
|
|
4048
|
+
* principal with `user` (`user_id` or `identifier`) or `team` (`team_id` or
|
|
4049
|
+
* `name`). The `id` in the response (`asgn_<opaque>`) is the grant ID that
|
|
4050
|
+
* `getGrant` (`GET /grants/{id}`) and `deleteGrant` (`DELETE /grants/{id}`) take. Owning-team (`project.team`) grants are not
|
|
4051
|
+
* created here: a claim, which attaches a project to a team, creates them.
|
|
4052
|
+
*
|
|
4053
|
+
* An unrevoked grant with the same principal and relation holds that binding
|
|
4054
|
+
* even after `expires_at`. Revoke it with `deleteGrant` before you create it
|
|
4055
|
+
* again.
|
|
4056
|
+
*
|
|
4057
|
+
* Create does not accept `expand`. The `user_id` and team locators return `201`,
|
|
4058
|
+
* whose `user` and `team` carry only `user_id` and `team_id`. They still answer
|
|
4059
|
+
* `404` or `409` when the principal is missing or the grant already exists.
|
|
4060
|
+
* Creating by `user.identifier` answers `202` with no body on every outcome.
|
|
4061
|
+
* Granting the session caller's own user is `grant.invalid` on either user
|
|
4062
|
+
* locator. A `201` grant names its user or team by ID only: read it back
|
|
4063
|
+
* with `getGrant` for the identifier and display name. A `202` returns no
|
|
4064
|
+
* grant ID: find the grant with `queryGrants` (`POST /grants/query`), filtered by `user_id`.
|
|
4065
|
+
*
|
|
4066
|
+
* Authenticate with a project secret (`oauth2`) or a console session cookie
|
|
4067
|
+
* (`sessionCookie`). A session caller is authorized as the signed-in person
|
|
4068
|
+
* against the target project, even when the session belongs to another project.
|
|
4069
|
+
* Cookie requests follow that scheme's CSRF rules.
|
|
4070
|
+
* @summary Create a grant
|
|
3779
4071
|
*/
|
|
3780
4072
|
export const createGrant = async (createGrantBody: CreateGrantBody,
|
|
3781
4073
|
params: CreateGrantParams, options?: Parameters<typeof customFetch>[1]): Promise<CreateGrant201 | void> => {
|
|
@@ -3817,26 +4109,24 @@ export const getQueryGrantsUrl = (params: QueryGrantsParams,) => {
|
|
|
3817
4109
|
|
|
3818
4110
|
const stringifiedParams = normalizedParams.toString();
|
|
3819
4111
|
|
|
3820
|
-
return stringifiedParams.length > 0 ? `${
|
|
4112
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/grants/query?${stringifiedParams}` : `${getApiBaseUrl()}/grants/query`
|
|
3821
4113
|
}
|
|
3822
4114
|
|
|
3823
4115
|
/**
|
|
3824
|
-
* Returns
|
|
3825
|
-
*
|
|
3826
|
-
*
|
|
3827
|
-
*
|
|
3828
|
-
*
|
|
3829
|
-
*
|
|
3830
|
-
*
|
|
3831
|
-
*
|
|
3832
|
-
* `
|
|
3833
|
-
*
|
|
3834
|
-
*
|
|
3835
|
-
*
|
|
3836
|
-
*
|
|
3837
|
-
*
|
|
3838
|
-
* session cookie (`nextgenSession`). Cookie-authenticated requests
|
|
3839
|
-
* follow the scheme's CSRF rules (`nextgenSession`).
|
|
4116
|
+
* Returns a page of a project's grants.
|
|
4117
|
+
*
|
|
4118
|
+
* Only unrevoked grants this API manages are listed, which bind a user or team
|
|
4119
|
+
* to the viewer, editor or admin role. Expired grants are included, so a client
|
|
4120
|
+
* can revoke them with `deleteGrant` (`DELETE /grants/{id}`) before it grants the same binding again.
|
|
4121
|
+
* Project-secret setup (`sk_proj`) and owning-team (`relation=team`) rows are
|
|
4122
|
+
* not returned. Requires `project.read`.
|
|
4123
|
+
*
|
|
4124
|
+
* `expand: ["principal"]` adds envelope fields on `user` and `team`. For project
|
|
4125
|
+
* secrets it additionally requires `user.read` and `team.read`. A user-bound
|
|
4126
|
+
* console session that already passed the project check may expand without those scopes.
|
|
4127
|
+
*
|
|
4128
|
+
* Authenticate with a project secret (`oauth2`) or a console session cookie
|
|
4129
|
+
* (`sessionCookie`). Cookie requests follow that scheme's CSRF rules.
|
|
3840
4130
|
* @summary Query grants
|
|
3841
4131
|
*/
|
|
3842
4132
|
export const queryGrants = async (queryGrantsBody: QueryGrantsBody,
|
|
@@ -3888,27 +4178,27 @@ export const getGetGrantUrl = (id: string,
|
|
|
3888
4178
|
|
|
3889
4179
|
const stringifiedParams = normalizedParams.toString();
|
|
3890
4180
|
|
|
3891
|
-
return stringifiedParams.length > 0 ? `${
|
|
4181
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/grants/${encodeURIComponent(String(id))}?${stringifiedParams}` : `${getApiBaseUrl()}/grants/${encodeURIComponent(String(id))}`
|
|
3892
4182
|
}
|
|
3893
4183
|
|
|
3894
4184
|
/**
|
|
3895
|
-
*
|
|
3896
|
-
*
|
|
3897
|
-
*
|
|
3898
|
-
*
|
|
3899
|
-
*
|
|
3900
|
-
*
|
|
3901
|
-
*
|
|
3902
|
-
*
|
|
3903
|
-
*
|
|
3904
|
-
* `
|
|
3905
|
-
* secrets
|
|
3906
|
-
*
|
|
3907
|
-
*
|
|
3908
|
-
*
|
|
3909
|
-
*
|
|
3910
|
-
* follow
|
|
3911
|
-
* @summary Get grant
|
|
4185
|
+
* Returns a grant by ID, when this API manages it and it has not been revoked.
|
|
4186
|
+
*
|
|
4187
|
+
* This API manages grants that bind a user or team to the viewer, editor or
|
|
4188
|
+
* admin role. An expired grant is still returned, so you can revoke it with
|
|
4189
|
+
* `deleteGrant` (`DELETE /grants/{id}`) before you grant the same binding again. Authorization still
|
|
4190
|
+
* ignores expired grants. Send `project_id` as well as the grant ID.
|
|
4191
|
+
* Misses, revoked grants, project-secret setup rows (`sk_proj`), owning-team
|
|
4192
|
+
* (`relation=team`) rows and grants of another project all return `404`.
|
|
4193
|
+
*
|
|
4194
|
+
* `expand=principal` adds envelope fields on `user` or `team`. For project
|
|
4195
|
+
* secrets it requires `user.read` and `team.read` in addition to `project.read`.
|
|
4196
|
+
* A user-bound console session that already passed the project check may expand
|
|
4197
|
+
* without those scopes.
|
|
4198
|
+
*
|
|
4199
|
+
* Authenticate with a project secret (`oauth2`) or a console session cookie
|
|
4200
|
+
* (`sessionCookie`). Cookie requests follow that scheme's CSRF rules.
|
|
4201
|
+
* @summary Get a grant by ID
|
|
3912
4202
|
*/
|
|
3913
4203
|
export const getGrant = async (id: string,
|
|
3914
4204
|
params: GetGrantParams, options?: Parameters<typeof customFetch>[1]): Promise<GetGrant200> => {
|
|
@@ -3937,19 +4227,19 @@ export const getDeleteGrantUrl = (id: string,
|
|
|
3937
4227
|
|
|
3938
4228
|
const stringifiedParams = normalizedParams.toString();
|
|
3939
4229
|
|
|
3940
|
-
return stringifiedParams.length > 0 ? `${
|
|
4230
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/grants/${encodeURIComponent(String(id))}?${stringifiedParams}` : `${getApiBaseUrl()}/grants/${encodeURIComponent(String(id))}`
|
|
3941
4231
|
}
|
|
3942
4232
|
|
|
3943
4233
|
/**
|
|
3944
|
-
*
|
|
3945
|
-
*
|
|
3946
|
-
*
|
|
3947
|
-
*
|
|
3948
|
-
*
|
|
3949
|
-
*
|
|
3950
|
-
*
|
|
3951
|
-
* follow
|
|
3952
|
-
* @summary Revoke grant
|
|
4234
|
+
* Revokes a grant this API manages and emits `authz.revoked`.
|
|
4235
|
+
*
|
|
4236
|
+
* A revoked grant cannot be restored: create a new one. Already-revoked, missing,
|
|
4237
|
+
* project-secret setup and owning-team grants return `404`. Expired grants can
|
|
4238
|
+
* still be revoked, so the binding can be reused.
|
|
4239
|
+
*
|
|
4240
|
+
* Authenticate with a project secret (`oauth2`) or a console session cookie
|
|
4241
|
+
* (`sessionCookie`). Cookie requests follow that scheme's CSRF rules.
|
|
4242
|
+
* @summary Revoke a grant
|
|
3953
4243
|
*/
|
|
3954
4244
|
export const deleteGrant = async (id: string,
|
|
3955
4245
|
params: DeleteGrantParams, options?: Parameters<typeof customFetch>[1]): Promise<void> => {
|
|
@@ -3985,21 +4275,22 @@ export const getListEventsUrl = (params: ListEventsParams,) => {
|
|
|
3985
4275
|
|
|
3986
4276
|
const stringifiedParams = normalizedParams.toString();
|
|
3987
4277
|
|
|
3988
|
-
return stringifiedParams.length > 0 ? `${
|
|
4278
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/events?${stringifiedParams}` : `${getApiBaseUrl()}/events`
|
|
3989
4279
|
}
|
|
3990
4280
|
|
|
3991
4281
|
/**
|
|
3992
|
-
*
|
|
3993
|
-
*
|
|
3994
|
-
* Requires `events.read`.
|
|
4282
|
+
* Lists a project's audit events, newest first. Pass `order=asc` for oldest
|
|
4283
|
+
* first. Requires `events.read`.
|
|
3995
4284
|
*
|
|
3996
|
-
*
|
|
3997
|
-
*
|
|
3998
|
-
*
|
|
3999
|
-
* team-scoped tokens exist).
|
|
4285
|
+
* A project that is not claimed yet returns an empty list: its events are
|
|
4286
|
+
* stored but stay invisible until the
|
|
4287
|
+
* [claim](https://preview.zitadel.com/docs/concepts/project-team-user#claim) succeeds.
|
|
4000
4288
|
*
|
|
4001
|
-
*
|
|
4002
|
-
*
|
|
4289
|
+
* Team-scoped credentials see only the events whose `team_id` matches the
|
|
4290
|
+
* credential's team. Team-scoped credentials are not issued today.
|
|
4291
|
+
*
|
|
4292
|
+
* Each item carries an `event_type` that says which type of event it is, and
|
|
4293
|
+
* the matching `payload`. To read one event, pass its `id` to `getEvent` (`GET /events/{id}`).
|
|
4003
4294
|
* @summary List events
|
|
4004
4295
|
*/
|
|
4005
4296
|
export const listEvents = async (params: ListEventsParams, options?: Parameters<typeof customFetch>[1]): Promise<ListEvents200> => {
|
|
@@ -4028,16 +4319,20 @@ export const getGetEventUrl = (id: string,
|
|
|
4028
4319
|
|
|
4029
4320
|
const stringifiedParams = normalizedParams.toString();
|
|
4030
4321
|
|
|
4031
|
-
return stringifiedParams.length > 0 ? `${
|
|
4322
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/events/${encodeURIComponent(String(id))}?${stringifiedParams}` : `${getApiBaseUrl()}/events/${encodeURIComponent(String(id))}`
|
|
4032
4323
|
}
|
|
4033
4324
|
|
|
4034
4325
|
/**
|
|
4035
|
-
*
|
|
4036
|
-
*
|
|
4037
|
-
*
|
|
4326
|
+
* Returns one event of a project by its ID. Requires `events.read`.
|
|
4327
|
+
*
|
|
4328
|
+
* Pass the `id` of an event that `listEvents` (`GET /events`) returns, with its
|
|
4329
|
+
* `project_id`. An unknown ID and the ID of another project's event both
|
|
4330
|
+
* answer `404`.
|
|
4038
4331
|
*
|
|
4039
|
-
*
|
|
4040
|
-
*
|
|
4332
|
+
* A project that is not claimed yet also answers `404`: its events are
|
|
4333
|
+
* stored but stay invisible until the
|
|
4334
|
+
* [claim](https://preview.zitadel.com/docs/concepts/project-team-user#claim) succeeds.
|
|
4335
|
+
* @summary Get an event by ID
|
|
4041
4336
|
*/
|
|
4042
4337
|
export const getEvent = async (id: string,
|
|
4043
4338
|
params: GetEventParams, options?: Parameters<typeof customFetch>[1]): Promise<GetEvent200> => {
|
|
@@ -4065,16 +4360,17 @@ export const getGetVariablesUrl = (params: GetVariablesParams,) => {
|
|
|
4065
4360
|
|
|
4066
4361
|
const stringifiedParams = normalizedParams.toString();
|
|
4067
4362
|
|
|
4068
|
-
return stringifiedParams.length > 0 ? `${
|
|
4363
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/variables?${stringifiedParams}` : `${getApiBaseUrl()}/variables`
|
|
4069
4364
|
}
|
|
4070
4365
|
|
|
4071
4366
|
/**
|
|
4072
|
-
* Returns the project's variables, keyed by name, each with its value
|
|
4073
|
-
* kind
|
|
4367
|
+
* Returns the project's variables, keyed by name, each with its value for
|
|
4368
|
+
* each kind: `primary` for primary origins and `preview` for preview URLs.
|
|
4369
|
+
* With `kind`, only that kind's values are returned.
|
|
4074
4370
|
*
|
|
4075
4371
|
* Secret values are not returned. A secret appears as `{"secret": true}`,
|
|
4076
4372
|
* which says a value is held without disclosing it.
|
|
4077
|
-
* @summary Get variables
|
|
4373
|
+
* @summary Get a project's variables
|
|
4078
4374
|
*/
|
|
4079
4375
|
export const getVariables = async (params: GetVariablesParams, options?: Parameters<typeof customFetch>[1]): Promise<GetVariables200> => {
|
|
4080
4376
|
|
|
@@ -4101,29 +4397,33 @@ export const getUpdateVariablesUrl = (params: UpdateVariablesParams,) => {
|
|
|
4101
4397
|
|
|
4102
4398
|
const stringifiedParams = normalizedParams.toString();
|
|
4103
4399
|
|
|
4104
|
-
return stringifiedParams.length > 0 ? `${
|
|
4400
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/variables?${stringifiedParams}` : `${getApiBaseUrl()}/variables`
|
|
4105
4401
|
}
|
|
4106
4402
|
|
|
4107
4403
|
/**
|
|
4108
|
-
*
|
|
4109
|
-
* kind. Names not in the body are untouched. Existing
|
|
4110
|
-
* values they froze.
|
|
4111
|
-
*
|
|
4112
|
-
* Without `kind`, a plain value is written for both kinds. A secret is
|
|
4113
|
-
* written for `primary` only and removes the name's `preview` value, so a
|
|
4114
|
-
* preview never keeps a plaintext copy; set a preview secret with
|
|
4115
|
-
* `kind=preview`. `null` removes the name from both.
|
|
4404
|
+
* Sets, replaces and removes the project's variables for the requested
|
|
4405
|
+
* kind, in one request. Names not in the body are untouched. Existing
|
|
4406
|
+
* deployments keep the values they froze.
|
|
4116
4407
|
*
|
|
4117
4408
|
* A bare scalar enters a non-secret value. `{"value": …, "secret": true}`
|
|
4118
4409
|
* stores the value encrypted under the project's active `secret` key, after
|
|
4119
4410
|
* which it can be referenced but not read back. `null` removes the name
|
|
4120
|
-
* (RFC 7386), which is how several variables are removed in one request
|
|
4121
|
-
*
|
|
4411
|
+
* (RFC 7386), which is how several variables are removed in one request.
|
|
4412
|
+
* Removing a name the project does not hold is a no-op rather than an error.
|
|
4413
|
+
*
|
|
4414
|
+
* Without `kind`, a plain value is written for both kinds. A secret is
|
|
4415
|
+
* written for `primary` only and removes the name's `preview` value, so a
|
|
4416
|
+
* preview never keeps a plaintext copy. Set a preview secret with
|
|
4417
|
+
* `kind=preview`. `null` removes the name from both kinds.
|
|
4122
4418
|
*
|
|
4123
4419
|
* The body is applied whole or not at all, so a rejected request leaves the
|
|
4124
|
-
* project's variables exactly as they were.
|
|
4125
|
-
*
|
|
4126
|
-
*
|
|
4420
|
+
* project's variables exactly as they were. Fix what the error reports and
|
|
4421
|
+
* send the request again. Writing the same name twice replaces the value
|
|
4422
|
+
* rather than duplicating it, which makes a retry safe.
|
|
4423
|
+
*
|
|
4424
|
+
* Each kind written records a `variable.set` event, and each kind removed a
|
|
4425
|
+
* `variable.removed` event. The value never appears in either.
|
|
4426
|
+
* @summary Update a project's variables
|
|
4127
4427
|
*/
|
|
4128
4428
|
export const updateVariables = async (updateVariablesBody: UpdateVariablesBody,
|
|
4129
4429
|
params: UpdateVariablesParams, options?: Parameters<typeof customFetch>[1]): Promise<UpdateVariables200> => {
|
|
@@ -4166,14 +4466,18 @@ export const getGetVariableUrl = (variableName: string,
|
|
|
4166
4466
|
|
|
4167
4467
|
const stringifiedParams = normalizedParams.toString();
|
|
4168
4468
|
|
|
4169
|
-
return stringifiedParams.length > 0 ? `${
|
|
4469
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/variables/${encodeURIComponent(String(variableName))}?${stringifiedParams}` : `${getApiBaseUrl()}/variables/${encodeURIComponent(String(variableName))}`
|
|
4170
4470
|
}
|
|
4171
4471
|
|
|
4172
4472
|
/**
|
|
4173
|
-
*
|
|
4174
|
-
*
|
|
4175
|
-
*
|
|
4176
|
-
*
|
|
4473
|
+
* Returns one variable by name, with its value for each kind. A variable
|
|
4474
|
+
* holds a value per kind: `primary` for primary origins and `preview` for
|
|
4475
|
+
* preview URLs.
|
|
4476
|
+
*
|
|
4477
|
+
* Pass the name of a variable the project holds, as `getVariables` (`GET /variables`) lists
|
|
4478
|
+
* it. A name with no value for the requested kind answers `var.not_found`;
|
|
4479
|
+
* set it with `updateVariables` (`PATCH /variables`). A secret reads back as `{"secret": true}`.
|
|
4480
|
+
* @summary Get a variable by name
|
|
4177
4481
|
*/
|
|
4178
4482
|
export const getVariable = async (variableName: string,
|
|
4179
4483
|
params: GetVariableParams, options?: Parameters<typeof customFetch>[1]): Promise<GetVariable200> => {
|
|
@@ -4202,14 +4506,19 @@ export const getDeleteVariableUrl = (variableName: string,
|
|
|
4202
4506
|
|
|
4203
4507
|
const stringifiedParams = normalizedParams.toString();
|
|
4204
4508
|
|
|
4205
|
-
return stringifiedParams.length > 0 ? `${
|
|
4509
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/variables/${encodeURIComponent(String(variableName))}?${stringifiedParams}` : `${getApiBaseUrl()}/variables/${encodeURIComponent(String(variableName))}`
|
|
4206
4510
|
}
|
|
4207
4511
|
|
|
4208
4512
|
/**
|
|
4209
|
-
*
|
|
4210
|
-
* `kind`.
|
|
4211
|
-
*
|
|
4212
|
-
*
|
|
4513
|
+
* Deletes a variable for the requested kind, or for both kinds without
|
|
4514
|
+
* `kind`. Existing deployments keep the values they froze. Each kind removed
|
|
4515
|
+
* records a `variable.removed` event.
|
|
4516
|
+
*
|
|
4517
|
+
* A name with no value for that kind answers `var.not_found`: there is
|
|
4518
|
+
* nothing to delete. `getVariables` (`GET /variables`) lists the names the project holds. To
|
|
4519
|
+
* remove several names in one request, or to remove a name that may already
|
|
4520
|
+
* be absent, send `null` for each name to `updateVariables` (`PATCH /variables`).
|
|
4521
|
+
* @summary Delete a variable by name
|
|
4213
4522
|
*/
|
|
4214
4523
|
export const deleteVariable = async (variableName: string,
|
|
4215
4524
|
params: DeleteVariableParams, options?: Parameters<typeof customFetch>[1]): Promise<void> => {
|
|
@@ -4237,38 +4546,58 @@ export const getCreateDeploymentUrl = (params: CreateDeploymentParams,) => {
|
|
|
4237
4546
|
|
|
4238
4547
|
const stringifiedParams = normalizedParams.toString();
|
|
4239
4548
|
|
|
4240
|
-
return stringifiedParams.length > 0 ? `${
|
|
4549
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/deployments?${stringifiedParams}` : `${getApiBaseUrl()}/deployments`
|
|
4241
4550
|
}
|
|
4242
4551
|
|
|
4243
4552
|
/**
|
|
4244
|
-
*
|
|
4245
|
-
*
|
|
4246
|
-
*
|
|
4247
|
-
*
|
|
4248
|
-
*
|
|
4249
|
-
*
|
|
4250
|
-
*
|
|
4251
|
-
*
|
|
4553
|
+
* Creates a deployment: it makes a release live on the project's primary
|
|
4554
|
+
* origins or on preview URLs.
|
|
4555
|
+
*
|
|
4556
|
+
* A release is a snapshot of the project's configuration. A deployment makes
|
|
4557
|
+
* a release live on origins and freezes the project's variable values for
|
|
4558
|
+
* its kind, with no fallback between primary and preview values. The call is
|
|
4559
|
+
* atomic: on success every target serves the release and the deployment is
|
|
4560
|
+
* recorded, and it records a `deployment.created` event. On failure nothing
|
|
4561
|
+
* changes and nothing is recorded.
|
|
4562
|
+
*
|
|
4563
|
+
* Name the release by exactly one of `release_id` or `content_hash`. Take the
|
|
4564
|
+
* release ID from the `id` that `createRelease` (`POST /releases`), `buildRelease` (`POST /releases/build`) or
|
|
4565
|
+
* `listReleases` (`GET /releases`) returns. The release must already exist in the project.
|
|
4566
|
+
* `targets` is `primary`, which means every primary origin, or a list of
|
|
4567
|
+
* preview URLs. `["primary"]`, which clients released before this shape
|
|
4568
|
+
* send, still deploys to every primary origin until 1.0.0; its answer
|
|
4569
|
+
* carries a `Deprecation` header (RFC 9745) and a `Link` to these docs.
|
|
4570
|
+
*
|
|
4571
|
+
* The project's newest primary deployment also serves every request with no
|
|
4572
|
+
* `Origin`, such as a backend, a native app or the CLI, and the console's
|
|
4573
|
+
* login preview of a project that does not list the console's origin. A
|
|
4574
|
+
* preview URL serves only itself.
|
|
4252
4575
|
*
|
|
4253
4576
|
* A deployment to `primary` changes nothing when the project's newest
|
|
4254
4577
|
* primary deployment has the same release and frozen values and covers
|
|
4255
|
-
* exactly the current primary origins
|
|
4256
|
-
* deployment. Any other request writes a new deployment and answers `201
|
|
4257
|
-
*
|
|
4258
|
-
*
|
|
4259
|
-
*
|
|
4260
|
-
* - `400 dep.invalid`: both or neither of `release_id` and
|
|
4261
|
-
* a primary origin
|
|
4262
|
-
* `primary`
|
|
4263
|
-
* `ttl` above 365 days (`P365D`).
|
|
4264
|
-
*
|
|
4265
|
-
*
|
|
4266
|
-
*
|
|
4267
|
-
*
|
|
4268
|
-
* - `
|
|
4269
|
-
*
|
|
4270
|
-
*
|
|
4271
|
-
*
|
|
4578
|
+
* exactly the current primary origins. The call then answers `200` with that
|
|
4579
|
+
* deployment. Any other request writes a new deployment and answers `201`.
|
|
4580
|
+
* For preview URLs, that deployment renews their previews.
|
|
4581
|
+
*
|
|
4582
|
+
* If the request is refused, fix the cause and send it again:
|
|
4583
|
+
* - `400 dep.invalid`: the request names both or neither of `release_id` and
|
|
4584
|
+
* `content_hash`, names a primary origin among the preview URLs, sends
|
|
4585
|
+
* `primary` for a project with no primary origin, sends
|
|
4586
|
+
* `ttl` with `primary`, or sends a `ttl` above 365 days (`P365D`). Correct
|
|
4587
|
+
* the request.
|
|
4588
|
+
* - `400 dep.variables_missing`: a variable the release references has no
|
|
4589
|
+
* value for the kind. `details` names the kind and every missing variable.
|
|
4590
|
+
* Set each one for that kind with `updateVariables` (`PATCH /variables`), then deploy again.
|
|
4591
|
+
* - `403 proj.origin_not_allowed`: a preview URL matches no preview pattern
|
|
4592
|
+
* of the project, or is a loopback URL. Use a URL that matches a pattern.
|
|
4593
|
+
* - `404 rel.not_found`: the release ID or digest names no release in this
|
|
4594
|
+
* project. List the project's releases with `listReleases`.
|
|
4595
|
+
* - `409 dep.conflict`: `expected_deployment_id` is not the deployment this
|
|
4596
|
+
* write replaces, and `details.deployment` is that deployment. Inspect it,
|
|
4597
|
+
* then retry with its ID as `expected_deployment_id`, or stop.
|
|
4598
|
+
* - `409 rel.revoked`: the release is revoked and cannot be deployed. Change
|
|
4599
|
+
* the configuration and build a new release, or deploy a release that is
|
|
4600
|
+
* not revoked. Rebuilding unchanged content returns the same revoked release.
|
|
4272
4601
|
* @summary Create a deployment
|
|
4273
4602
|
*/
|
|
4274
4603
|
export const createDeployment = async (createDeploymentBody: CreateDeploymentBody,
|
|
@@ -4319,23 +4648,30 @@ export const getListDeploymentsUrl = (params: ListDeploymentsParams,) => {
|
|
|
4319
4648
|
|
|
4320
4649
|
const stringifiedParams = normalizedParams.toString();
|
|
4321
4650
|
|
|
4322
|
-
return stringifiedParams.length > 0 ? `${
|
|
4651
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/deployments?${stringifiedParams}` : `${getApiBaseUrl()}/deployments`
|
|
4323
4652
|
}
|
|
4324
4653
|
|
|
4325
4654
|
/**
|
|
4326
|
-
* Lists what ran where
|
|
4327
|
-
*
|
|
4328
|
-
*
|
|
4329
|
-
*
|
|
4330
|
-
*
|
|
4331
|
-
*
|
|
4332
|
-
*
|
|
4333
|
-
*
|
|
4334
|
-
*
|
|
4335
|
-
* the
|
|
4336
|
-
*
|
|
4337
|
-
*
|
|
4338
|
-
*
|
|
4655
|
+
* Lists the project's deployments: the history of what ran where and when,
|
|
4656
|
+
* or with `live=true` what is served now.
|
|
4657
|
+
*
|
|
4658
|
+
* A deployment makes a release live on origins. By default the list is the
|
|
4659
|
+
* history, newest first: every deployment of the project, with every target
|
|
4660
|
+
* it made the release live on. With `origin`, it is the history of that
|
|
4661
|
+
* origin alone.
|
|
4662
|
+
*
|
|
4663
|
+
* With `live=true`, the list is what is served now, newest first. It holds
|
|
4664
|
+
* the project's newest primary deployment with every origin it names, an
|
|
4665
|
+
* origin the project no longer lists included: that deployment also serves
|
|
4666
|
+
* requests with no `Origin`, so it stays live. It also holds the newest
|
|
4667
|
+
* deployment to each live preview URL, narrowed to the URLs it still
|
|
4668
|
+
* serves. Combined with `origin`, it is the one deployment that origin
|
|
4669
|
+
* serves, or empty, as it is for an origin the project no longer lists.
|
|
4670
|
+
*
|
|
4671
|
+
* The `id` of an entry is the deployment ID that `getDeploymentById` (`GET /deployments/{deployment_id}`),
|
|
4672
|
+
* `getDeploymentVariables` (`GET /deployments/{deployment_id}/variables`) and `rollbackDeployment` (`POST /deployments/{deployment_id}/rollback`) take.
|
|
4673
|
+
*
|
|
4674
|
+
* `expand: ["release"]` embeds the release each deployment made live. It
|
|
4339
4675
|
* requires `release.read` and does not change the ordering or the page
|
|
4340
4676
|
* tokens.
|
|
4341
4677
|
* @summary List deployments
|
|
@@ -4366,17 +4702,21 @@ export const getGetDeploymentByIdUrl = (deploymentId: string,
|
|
|
4366
4702
|
|
|
4367
4703
|
const stringifiedParams = normalizedParams.toString();
|
|
4368
4704
|
|
|
4369
|
-
return stringifiedParams.length > 0 ? `${
|
|
4705
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/deployments/${encodeURIComponent(String(deploymentId))}?${stringifiedParams}` : `${getApiBaseUrl()}/deployments/${encodeURIComponent(String(deploymentId))}`
|
|
4370
4706
|
}
|
|
4371
4707
|
|
|
4372
4708
|
/**
|
|
4373
|
-
*
|
|
4709
|
+
* Returns one deployment: the release it made live, the origins it made it
|
|
4710
|
+
* live on, and whether they still serve it.
|
|
4374
4711
|
*
|
|
4375
|
-
*
|
|
4376
|
-
*
|
|
4712
|
+
* Pass the `id` that `createDeployment` (`POST /deployments`), `rollbackDeployment` (`POST /deployments/{deployment_id}/rollback`) or
|
|
4713
|
+
* `listDeployments` (`GET /deployments`) returns.
|
|
4714
|
+
*
|
|
4715
|
+
* The lookup is scoped to the project in `project_id`. A deployment ID
|
|
4716
|
+
* belonging to another project answers not found exactly as an unknown ID
|
|
4377
4717
|
* does, so the endpoint cannot be used to probe for deployments in projects
|
|
4378
4718
|
* the caller cannot read.
|
|
4379
|
-
* @summary Get a deployment by
|
|
4719
|
+
* @summary Get a deployment by ID
|
|
4380
4720
|
*/
|
|
4381
4721
|
export const getDeploymentById = async (deploymentId: string,
|
|
4382
4722
|
params: GetDeploymentByIdParams, options?: Parameters<typeof customFetch>[1]): Promise<GetDeploymentById200> => {
|
|
@@ -4405,24 +4745,48 @@ export const getRollbackDeploymentUrl = (deploymentId: string,
|
|
|
4405
4745
|
|
|
4406
4746
|
const stringifiedParams = normalizedParams.toString();
|
|
4407
4747
|
|
|
4408
|
-
return stringifiedParams.length > 0 ? `${
|
|
4748
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/deployments/${encodeURIComponent(String(deploymentId))}/rollback?${stringifiedParams}` : `${getApiBaseUrl()}/deployments/${encodeURIComponent(String(deploymentId))}/rollback`
|
|
4409
4749
|
}
|
|
4410
4750
|
|
|
4411
4751
|
/**
|
|
4412
|
-
*
|
|
4413
|
-
* with the variable values
|
|
4414
|
-
*
|
|
4415
|
-
*
|
|
4416
|
-
*
|
|
4417
|
-
*
|
|
4418
|
-
*
|
|
4419
|
-
*
|
|
4420
|
-
*
|
|
4421
|
-
*
|
|
4422
|
-
*
|
|
4752
|
+
* Rolls back to an earlier deployment by deploying its release again to
|
|
4753
|
+
* every current primary origin, with the variable values that deployment
|
|
4754
|
+
* froze.
|
|
4755
|
+
*
|
|
4756
|
+
* A release is a snapshot of the project's configuration. A deployment makes
|
|
4757
|
+
* a release live on origins and freezes the project's variable values with
|
|
4758
|
+
* it.
|
|
4759
|
+
*
|
|
4760
|
+
* The deployment ID in the path is the deployment to return to, not the one
|
|
4761
|
+
* to undo. Take it from the `id` that `listDeployments` (`GET /deployments`) returns, which lists
|
|
4762
|
+
* the newest deployment first.
|
|
4763
|
+
*
|
|
4764
|
+
* A rollback is a new deployment, not an undo. It has `reason: rollback`,
|
|
4765
|
+
* and its `rollback_to` names the deployment you returned to. It uses the
|
|
4766
|
+
* variable values that deployment froze, not the project's current ones, and
|
|
4767
|
+
* creates no release.
|
|
4768
|
+
*
|
|
4769
|
+
* To guard against a deployment that landed since you looked, set
|
|
4770
|
+
* `expected_deployment_id` in the request body to the newest primary
|
|
4771
|
+
* deployment, the one live now. The call then fails with `409 dep.conflict`
|
|
4772
|
+
* if another deployment has replaced it.
|
|
4773
|
+
*
|
|
4774
|
+
* A rollback is idempotent like a deployment to `primary`. When nothing
|
|
4775
|
+
* would change, it answers `200` with the newest primary deployment.
|
|
4776
|
+
*
|
|
4777
|
+
* If the request is refused:
|
|
4778
|
+
* - `400 dep.invalid`: the deployment went to preview URLs, which cannot be
|
|
4779
|
+
* rolled back. Deploy to the preview again with `createDeployment` (`POST /deployments`). The
|
|
4780
|
+
* error also appears when the project has no primary origin. Add one with
|
|
4781
|
+
* `zitadel origin add`.
|
|
4782
|
+
* - `404 dep.not_found`: no deployment of the project has that ID, or that
|
|
4783
|
+
* deployment recorded no variables to restore, so it cannot be a rollback
|
|
4784
|
+
* target. List them with `listDeployments` and pick another.
|
|
4423
4785
|
* - `409 dep.conflict`: `expected_deployment_id` is not the project's
|
|
4424
|
-
* newest primary deployment
|
|
4425
|
-
*
|
|
4786
|
+
* newest primary deployment, and `details.deployment` is that deployment.
|
|
4787
|
+
* Inspect it, then retry with its ID, or stop.
|
|
4788
|
+
* - `409 rel.revoked`: the release of that deployment is revoked and cannot
|
|
4789
|
+
* be deployed. Roll back to a deployment of a release that is not revoked.
|
|
4426
4790
|
* @summary Roll back to a deployment
|
|
4427
4791
|
*/
|
|
4428
4792
|
export const rollbackDeployment = async (deploymentId: string,
|
|
@@ -4467,13 +4831,15 @@ export const getGetDeploymentVariablesUrl = (deploymentId: string,
|
|
|
4467
4831
|
|
|
4468
4832
|
const stringifiedParams = normalizedParams.toString();
|
|
4469
4833
|
|
|
4470
|
-
return stringifiedParams.length > 0 ? `${
|
|
4834
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/deployments/${encodeURIComponent(String(deploymentId))}/variables?${stringifiedParams}` : `${getApiBaseUrl()}/deployments/${encodeURIComponent(String(deploymentId))}/variables`
|
|
4471
4835
|
}
|
|
4472
4836
|
|
|
4473
4837
|
/**
|
|
4474
4838
|
* Returns the variable values the deployment froze when it was made. Later
|
|
4475
4839
|
* changes to the project's variables do not affect them. A secret reads
|
|
4476
4840
|
* back as `{"secret": true}`.
|
|
4841
|
+
*
|
|
4842
|
+
* Pass the `id` that `createDeployment` (`POST /deployments`) or `listDeployments` (`GET /deployments`) returns.
|
|
4477
4843
|
* @summary Get a deployment's variables
|
|
4478
4844
|
*/
|
|
4479
4845
|
export const getDeploymentVariables = async (deploymentId: string,
|