@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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll } from "../../rolldown-runtime-D7D4PA-g.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { getApiBaseUrl } from "../../runtime/base-url.mjs";
|
|
3
3
|
import { customFetch } from "../../runtime/fetch.mjs";
|
|
4
4
|
//#region src/generated/endpoints/zitadelNextGen.ts
|
|
5
5
|
/**
|
|
@@ -204,15 +204,18 @@ var zitadelNextGen_exports = /* @__PURE__ */ __exportAll({
|
|
|
204
204
|
verifyChallengeProof: () => verifyChallengeProof
|
|
205
205
|
});
|
|
206
206
|
const getGetLiveUrl = () => {
|
|
207
|
-
return `${
|
|
207
|
+
return `${getApiBaseUrl()}/livez`;
|
|
208
208
|
};
|
|
209
209
|
/**
|
|
210
|
-
* Answers `ok` while the server process serves HTTP, and checks nothing
|
|
210
|
+
* Answers `ok` while the server process serves HTTP, and checks nothing
|
|
211
|
+
* behind it.
|
|
211
212
|
*
|
|
212
|
-
*
|
|
213
|
-
*
|
|
213
|
+
* A liveness probe tells an orchestrator such as Kubernetes whether to
|
|
214
|
+
* restart the process. Point it at `/livez` at the root, where the probes
|
|
215
|
+
* stay, not under `/api/v1`. It never checks the database, so an outage of
|
|
216
|
+
* the database does not restart every instance. `GET /readyz` takes an
|
|
214
217
|
* instance out of rotation instead.
|
|
215
|
-
* @summary Check server liveness
|
|
218
|
+
* @summary Check the server's liveness
|
|
216
219
|
*/
|
|
217
220
|
const getLive = async (options) => {
|
|
218
221
|
return customFetch(getGetLiveUrl(), {
|
|
@@ -221,15 +224,18 @@ const getLive = async (options) => {
|
|
|
221
224
|
});
|
|
222
225
|
};
|
|
223
226
|
const getGetReadyUrl = () => {
|
|
224
|
-
return `${
|
|
227
|
+
return `${getApiBaseUrl()}/readyz`;
|
|
225
228
|
};
|
|
226
229
|
/**
|
|
227
|
-
* Answers
|
|
230
|
+
* Answers `ok` when the server can serve requests, which takes its database
|
|
231
|
+
* answering within a second, and `fail` with `503` otherwise.
|
|
228
232
|
*
|
|
229
|
-
*
|
|
230
|
-
*
|
|
233
|
+
* A readiness probe tells an orchestrator such as Kubernetes whether to send
|
|
234
|
+
* the instance requests. Point it at `/readyz` at the root, where the probes
|
|
235
|
+
* stay, not under `/api/v1`, so that a server whose database does not answer
|
|
236
|
+
* gets no requests until it does. The check is one round trip to the
|
|
231
237
|
* database.
|
|
232
|
-
* @summary Check server readiness
|
|
238
|
+
* @summary Check the server's readiness
|
|
233
239
|
*/
|
|
234
240
|
const getReady = async (options) => {
|
|
235
241
|
return customFetch(getGetReadyUrl(), {
|
|
@@ -243,15 +249,17 @@ const getCreateUserUrl = (params) => {
|
|
|
243
249
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
244
250
|
});
|
|
245
251
|
const stringifiedParams = normalizedParams.toString();
|
|
246
|
-
return stringifiedParams.length > 0 ? `${
|
|
252
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users?${stringifiedParams}` : `${getApiBaseUrl()}/users`;
|
|
247
253
|
};
|
|
248
254
|
/**
|
|
249
|
-
* Creates a user whose attributes satisfy the user schema the request
|
|
255
|
+
* Creates a user whose attributes satisfy the user schema named in the request.
|
|
250
256
|
*
|
|
251
|
-
* The server assigns the user's
|
|
252
|
-
*
|
|
253
|
-
* user
|
|
254
|
-
*
|
|
257
|
+
* The server assigns the user's ID and returns it. `schema` is the `id` of a
|
|
258
|
+
* schema, as `createSchema` (`POST /schemas`) returns it or `listSchemas` (`GET /schemas`) lists it. With
|
|
259
|
+
* `team_id`, the user also becomes an active member of that team. A value the
|
|
260
|
+
* schema marks unique that another user already holds is refused with `409`;
|
|
261
|
+
* send a different value.
|
|
262
|
+
* @summary Create a user
|
|
255
263
|
*/
|
|
256
264
|
const createUser = async (createUserBody, params, options) => {
|
|
257
265
|
const getHeaders = (h) => {
|
|
@@ -278,7 +286,7 @@ const getQueryUsersUrl = (params) => {
|
|
|
278
286
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
279
287
|
});
|
|
280
288
|
const stringifiedParams = normalizedParams.toString();
|
|
281
|
-
return stringifiedParams.length > 0 ? `${
|
|
289
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users/query?${stringifiedParams}` : `${getApiBaseUrl()}/users/query`;
|
|
282
290
|
};
|
|
283
291
|
/**
|
|
284
292
|
* Returns the users of a project, paginated with a cursor.
|
|
@@ -286,9 +294,15 @@ const getQueryUsersUrl = (params) => {
|
|
|
286
294
|
* `project_id` names the project to list; without it, the credential's own
|
|
287
295
|
* project is listed.
|
|
288
296
|
*
|
|
289
|
-
* Accepts either a project secret (`oauth2`) or a user-bound
|
|
290
|
-
* session cookie (`
|
|
291
|
-
* follow the scheme's CSRF rules (`
|
|
297
|
+
* Accepts either a project secret (`oauth2`) or a user-bound console
|
|
298
|
+
* session cookie (`sessionCookie`). Cookie-authenticated requests
|
|
299
|
+
* follow the scheme's CSRF rules (`sessionCookie`).
|
|
300
|
+
*
|
|
301
|
+
* With a project secret, embedding `teams` with `expand`, or filtering by
|
|
302
|
+
* `team_id`, also needs `team_membership.read`. Embedding
|
|
303
|
+
* `lifecycle_owner_team` needs `team.read`. A console session carries no
|
|
304
|
+
* scopes: it may do both when it may read the whole project, and gets
|
|
305
|
+
* `403 user.permission_denied` otherwise.
|
|
292
306
|
* @summary Query users
|
|
293
307
|
*/
|
|
294
308
|
const queryUsers = async (queryUsersBody, params, options) => {
|
|
@@ -316,14 +330,14 @@ const getGetUserByIDUrl = (userId, params) => {
|
|
|
316
330
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
317
331
|
});
|
|
318
332
|
const stringifiedParams = normalizedParams.toString();
|
|
319
|
-
return stringifiedParams.length > 0 ? `${
|
|
333
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}?${stringifiedParams}` : `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}`;
|
|
320
334
|
};
|
|
321
335
|
/**
|
|
322
|
-
* Returns a user by
|
|
336
|
+
* Returns a user by ID, with the attributes its schema defines.
|
|
323
337
|
*
|
|
324
|
-
* With `team_id`, the user is returned only while they are an active member
|
|
325
|
-
* that team.
|
|
326
|
-
* @summary Get user by ID
|
|
338
|
+
* With `team_id`, the user is returned only while they are an active member
|
|
339
|
+
* of that team.
|
|
340
|
+
* @summary Get a user by ID
|
|
327
341
|
*/
|
|
328
342
|
const getUserByID = async (userId, params, options) => {
|
|
329
343
|
return customFetch(getGetUserByIDUrl(userId, params), {
|
|
@@ -332,14 +346,27 @@ const getUserByID = async (userId, params, options) => {
|
|
|
332
346
|
});
|
|
333
347
|
};
|
|
334
348
|
const getPatchUserByIDUrl = (userId) => {
|
|
335
|
-
return `${
|
|
349
|
+
return `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}`;
|
|
336
350
|
};
|
|
337
351
|
/**
|
|
338
352
|
* Partially updates a user's schema-defined attributes, and optionally
|
|
339
353
|
* moves the user to another registered schema. The merged result is
|
|
340
354
|
* validated against the schema before commit. Concurrent writes are
|
|
341
355
|
* last-write-wins.
|
|
342
|
-
*
|
|
356
|
+
*
|
|
357
|
+
* To move the user, send `schema` with the `id` of a registered schema, as
|
|
358
|
+
* `createSchema` (`POST /schemas`) returns it or `listSchemas` (`GET /schemas`) lists it.
|
|
359
|
+
*
|
|
360
|
+
* To ask whether a patch would succeed, send it with `"dry_run": true`. It takes
|
|
361
|
+
* the same permission and answers the same status and `details` as the real
|
|
362
|
+
* request, and it changes nothing and emits no `user.updated`. The request
|
|
363
|
+
* itself is still recorded as `request.api`, like any other API call. A `200`
|
|
364
|
+
* holds for the moment of the check: a unique value that is free then can be
|
|
365
|
+
* taken before the real request, which then answers `409`.
|
|
366
|
+
*
|
|
367
|
+
* `dry_run` is a body field so that a server from before it refuses the
|
|
368
|
+
* request as malformed (`400 req.invalid`) instead of applying the patch.
|
|
369
|
+
* @summary Update a user by ID
|
|
343
370
|
*/
|
|
344
371
|
const patchUserByID = async (userId, patchUserByIDBody, options) => {
|
|
345
372
|
const getHeaders = (h) => {
|
|
@@ -361,7 +388,7 @@ const patchUserByID = async (userId, patchUserByIDBody, options) => {
|
|
|
361
388
|
});
|
|
362
389
|
};
|
|
363
390
|
const getDeleteUserByIDUrl = (userId) => {
|
|
364
|
-
return `${
|
|
391
|
+
return `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}`;
|
|
365
392
|
};
|
|
366
393
|
/**
|
|
367
394
|
* Deletes a user, removes them from every team they belong to, and revokes
|
|
@@ -370,8 +397,10 @@ const getDeleteUserByIDUrl = (userId) => {
|
|
|
370
397
|
* The user is removed, not deactivated, and the deletion emits `user.deleted`,
|
|
371
398
|
* plus `authz.revoked` for each grant on that grant's project.
|
|
372
399
|
* With a project secret the request is idempotent: deleting a user that exists
|
|
373
|
-
* in no project succeeds without changing anything.
|
|
374
|
-
*
|
|
400
|
+
* in no project succeeds without changing anything. Deleting the last active
|
|
401
|
+
* member of a project's owning team returns 409 `proj.last_owner` and changes
|
|
402
|
+
* nothing.
|
|
403
|
+
* @summary Delete a user by ID
|
|
375
404
|
*/
|
|
376
405
|
const deleteUserByID = async (userId, options) => {
|
|
377
406
|
return customFetch(getDeleteUserByIDUrl(userId), {
|
|
@@ -385,11 +414,12 @@ const getListUserIdentityLinksUrl = (userId, params) => {
|
|
|
385
414
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
386
415
|
});
|
|
387
416
|
const stringifiedParams = normalizedParams.toString();
|
|
388
|
-
return stringifiedParams.length > 0 ? `${
|
|
417
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}/identity_links?${stringifiedParams}` : `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}/identity_links`;
|
|
389
418
|
};
|
|
390
419
|
/**
|
|
391
|
-
*
|
|
392
|
-
* The provider's subject and claims
|
|
420
|
+
* Lists the identity provider accounts a sign-in linked to the user, oldest
|
|
421
|
+
* first. The provider's subject and claims, the data it asserts about the
|
|
422
|
+
* account, are never returned.
|
|
393
423
|
* @summary List the provider accounts linked to a user
|
|
394
424
|
*/
|
|
395
425
|
const listUserIdentityLinks = async (userId, params, options) => {
|
|
@@ -404,15 +434,16 @@ const getListUserPasskeysUrl = (userId, params) => {
|
|
|
404
434
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
405
435
|
});
|
|
406
436
|
const stringifiedParams = normalizedParams.toString();
|
|
407
|
-
return stringifiedParams.length > 0 ? `${
|
|
437
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}/passkeys?${stringifiedParams}` : `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}/passkeys`;
|
|
408
438
|
};
|
|
409
439
|
/**
|
|
410
|
-
*
|
|
411
|
-
* cursor.
|
|
440
|
+
* Lists the passkeys registered for a user, newest first, paginated with a
|
|
441
|
+
* cursor. A passkey is a WebAuthn credential that signs a user in without a
|
|
442
|
+
* password.
|
|
412
443
|
*
|
|
413
|
-
* Each passkey carries its
|
|
444
|
+
* Each passkey carries its ID, its name and when it was registered, never the
|
|
414
445
|
* credential itself.
|
|
415
|
-
* @summary List user passkeys
|
|
446
|
+
* @summary List a user's passkeys
|
|
416
447
|
*/
|
|
417
448
|
const listUserPasskeys = async (userId, params, options) => {
|
|
418
449
|
return customFetch(getListUserPasskeysUrl(userId, params), {
|
|
@@ -421,15 +452,19 @@ const listUserPasskeys = async (userId, params, options) => {
|
|
|
421
452
|
});
|
|
422
453
|
};
|
|
423
454
|
const getBeginUserPasskeyRegistrationUrl = (userId) => {
|
|
424
|
-
return `${
|
|
455
|
+
return `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}/passkeys/registrations`;
|
|
425
456
|
};
|
|
426
457
|
/**
|
|
427
458
|
* Starts a WebAuthn registration ceremony for the user and returns the
|
|
428
|
-
* creation options for `navigator.credentials.create()`.
|
|
429
|
-
*
|
|
430
|
-
*
|
|
431
|
-
*
|
|
432
|
-
*
|
|
459
|
+
* creation options for `navigator.credentials.create()`. A passkey is
|
|
460
|
+
* registered in two steps: this one returns options for the browser, and
|
|
461
|
+
* `finishUserPasskeyRegistration` (`POST /users/{user_id}/passkeys/registrations/{registration_id}`) verifies the browser's answer.
|
|
462
|
+
*
|
|
463
|
+
* Complete the ceremony with
|
|
464
|
+
* `POST /users/{user_id}/passkeys/registrations/{registration_id}` within five
|
|
465
|
+
* minutes, using the `registration_id` this response returns. Credentials
|
|
466
|
+
* already registered for the user are excluded automatically.
|
|
467
|
+
* @summary Begin a passkey registration
|
|
433
468
|
*/
|
|
434
469
|
const beginUserPasskeyRegistration = async (userId, beginUserPasskeyRegistrationBody, options) => {
|
|
435
470
|
const getHeaders = (h) => {
|
|
@@ -451,16 +486,19 @@ const beginUserPasskeyRegistration = async (userId, beginUserPasskeyRegistration
|
|
|
451
486
|
});
|
|
452
487
|
};
|
|
453
488
|
const getFinishUserPasskeyRegistrationUrl = (userId, registrationId) => {
|
|
454
|
-
return `${
|
|
489
|
+
return `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}/passkeys/registrations/${encodeURIComponent(String(registrationId))}`;
|
|
455
490
|
};
|
|
456
491
|
/**
|
|
457
|
-
* Verifies the attestation against the ceremony
|
|
458
|
-
*
|
|
459
|
-
*
|
|
460
|
-
*
|
|
461
|
-
*
|
|
462
|
-
*
|
|
463
|
-
*
|
|
492
|
+
* Verifies the attestation against the registration ceremony and stores
|
|
493
|
+
* the new passkey for the user. `registration_id` is the one that
|
|
494
|
+
* `beginUserPasskeyRegistration` (`POST /users/{user_id}/passkeys/registrations`)
|
|
495
|
+
* returned when it started the ceremony. The attestation is
|
|
496
|
+
* the browser's answer from `navigator.credentials.create()`.
|
|
497
|
+
*
|
|
498
|
+
* A rejected attestation leaves the ceremony open for a retry. An expired ceremony answers
|
|
499
|
+
* `att.stale_challenge`: begin a new registration. An unknown or
|
|
500
|
+
* already-consumed registration ID answers `att.not_found`.
|
|
501
|
+
* @summary Finish a passkey registration
|
|
464
502
|
*/
|
|
465
503
|
const finishUserPasskeyRegistration = async (userId, registrationId, finishUserPasskeyRegistrationBody, options) => {
|
|
466
504
|
const getHeaders = (h) => {
|
|
@@ -482,13 +520,13 @@ const finishUserPasskeyRegistration = async (userId, registrationId, finishUserP
|
|
|
482
520
|
});
|
|
483
521
|
};
|
|
484
522
|
const getGetUserPasswordStateUrl = (userId) => {
|
|
485
|
-
return `${
|
|
523
|
+
return `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}/password`;
|
|
486
524
|
};
|
|
487
525
|
/**
|
|
488
|
-
*
|
|
526
|
+
* Returns when the user's current password was set, and leaves `set_at` out
|
|
489
527
|
* when the user has none. The password and its hash are never returned;
|
|
490
|
-
*
|
|
491
|
-
* @summary Get user password state
|
|
528
|
+
* `setUserPassword` (`PUT` on the same path) sets one.
|
|
529
|
+
* @summary Get a user's password state
|
|
492
530
|
*/
|
|
493
531
|
const getUserPasswordState = async (userId, options) => {
|
|
494
532
|
return customFetch(getGetUserPasswordStateUrl(userId), {
|
|
@@ -497,15 +535,35 @@ const getUserPasswordState = async (userId, options) => {
|
|
|
497
535
|
});
|
|
498
536
|
};
|
|
499
537
|
const getSetUserPasswordUrl = (userId) => {
|
|
500
|
-
return `${
|
|
538
|
+
return `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}/password`;
|
|
501
539
|
};
|
|
502
540
|
/**
|
|
503
541
|
* Sets a user's password, hashed with the project's current password hashing
|
|
504
542
|
* policy.
|
|
505
543
|
*
|
|
506
544
|
* The new password replaces the current one, and setting it emits
|
|
507
|
-
* `auth.factor.password.set`.
|
|
508
|
-
*
|
|
545
|
+
* `auth.factor.password.set`. A password the project's password policy
|
|
546
|
+
* refuses answers `user.password_policy_violation`; send one that meets the
|
|
547
|
+
* policy.
|
|
548
|
+
*
|
|
549
|
+
* The password policy is the one in the release that serves the caller's
|
|
550
|
+
* `Origin`, chosen as `createFlow` (`POST /flow`) chooses it. A frontend on a
|
|
551
|
+
* preview URL gets that preview's policy, and one on a primary origin the
|
|
552
|
+
* newest primary deployment's. A request with no `Origin`, or from the
|
|
553
|
+
* console when the project does not list the console's origin, gets the
|
|
554
|
+
* project's newest primary deployment.
|
|
555
|
+
*
|
|
556
|
+
* If the request is refused:
|
|
557
|
+
* - `403 proj.origin_not_allowed`: the project admits no such origin. Add it
|
|
558
|
+
* with `zitadel origin add`.
|
|
559
|
+
* - `403 proj.preview_not_live`: the origin matches a preview pattern but has
|
|
560
|
+
* no live preview. Run `zitadel preview` on the branch.
|
|
561
|
+
* - `409 rel.not_deployed`: nothing is deployed to the origin. Run
|
|
562
|
+
* `zitadel deploy`.
|
|
563
|
+
* - `409 rel.no_default`: the request names no origin and the project has no
|
|
564
|
+
* primary deployment. Run `zitadel deploy`.
|
|
565
|
+
* - `409 rel.revoked`: the release that serves the origin is revoked.
|
|
566
|
+
* @summary Set a user's password
|
|
509
567
|
*/
|
|
510
568
|
const setUserPassword = async (userId, setUserPasswordBody, options) => {
|
|
511
569
|
const getHeaders = (h) => {
|
|
@@ -532,16 +590,17 @@ const getListUserTeamsUrl = (userId, params) => {
|
|
|
532
590
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
533
591
|
});
|
|
534
592
|
const stringifiedParams = normalizedParams.toString();
|
|
535
|
-
return stringifiedParams.length > 0 ? `${
|
|
593
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}/teams?${stringifiedParams}` : `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}/teams`;
|
|
536
594
|
};
|
|
537
595
|
/**
|
|
538
|
-
*
|
|
539
|
-
* team's name, so a client renders a page without resolving
|
|
596
|
+
* Lists the teams a user belongs to, ordered by team name. Each entry carries
|
|
597
|
+
* the team's name, so a client renders a page without resolving IDs one by
|
|
598
|
+
* one.
|
|
540
599
|
*
|
|
541
|
-
* This is the
|
|
542
|
-
* that owns the user's lifecycle is reported as
|
|
543
|
-
* on the user read endpoints. Memberships
|
|
544
|
-
* returned.
|
|
600
|
+
* This is the user's team memberships, not lifecycle ownership: the single
|
|
601
|
+
* team that owns the user's lifecycle is reported as
|
|
602
|
+
* `metadata.lifecycle_owner_team_id` on the user read endpoints. Memberships
|
|
603
|
+
* the user was removed from are not returned.
|
|
545
604
|
* @summary List the teams a user belongs to
|
|
546
605
|
*/
|
|
547
606
|
const listUserTeams = async (userId, params, options) => {
|
|
@@ -556,7 +615,7 @@ const getGetMyUserUrl = (params) => {
|
|
|
556
615
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
557
616
|
});
|
|
558
617
|
const stringifiedParams = normalizedParams.toString();
|
|
559
|
-
return stringifiedParams.length > 0 ? `${
|
|
618
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users/me?${stringifiedParams}` : `${getApiBaseUrl()}/users/me`;
|
|
560
619
|
};
|
|
561
620
|
/**
|
|
562
621
|
* Returns the user signed in to the session that authenticates the request.
|
|
@@ -580,7 +639,7 @@ const getPatchMyUserUrl = (params) => {
|
|
|
580
639
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
581
640
|
});
|
|
582
641
|
const stringifiedParams = normalizedParams.toString();
|
|
583
|
-
return stringifiedParams.length > 0 ? `${
|
|
642
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users/me?${stringifiedParams}` : `${getApiBaseUrl()}/users/me`;
|
|
584
643
|
};
|
|
585
644
|
/**
|
|
586
645
|
* Partially updates the caller's own schema-defined attributes. The merged
|
|
@@ -616,11 +675,12 @@ const getListMyIdentityLinksUrl = (params) => {
|
|
|
616
675
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
617
676
|
});
|
|
618
677
|
const stringifiedParams = normalizedParams.toString();
|
|
619
|
-
return stringifiedParams.length > 0 ? `${
|
|
678
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users/me/identity_links?${stringifiedParams}` : `${getApiBaseUrl()}/users/me/identity_links`;
|
|
620
679
|
};
|
|
621
680
|
/**
|
|
622
|
-
*
|
|
623
|
-
* oldest first. The provider's subject and claims
|
|
681
|
+
* Lists the identity provider accounts a sign-in linked to the signed-in user,
|
|
682
|
+
* oldest first. The provider's subject and claims, the data it asserts about
|
|
683
|
+
* the account, are never returned.
|
|
624
684
|
*
|
|
625
685
|
* With `project_id`, the links are listed only when the session belongs to
|
|
626
686
|
* that project.
|
|
@@ -638,12 +698,13 @@ const getListMyPasskeysUrl = (params) => {
|
|
|
638
698
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
639
699
|
});
|
|
640
700
|
const stringifiedParams = normalizedParams.toString();
|
|
641
|
-
return stringifiedParams.length > 0 ? `${
|
|
701
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users/me/passkeys?${stringifiedParams}` : `${getApiBaseUrl()}/users/me/passkeys`;
|
|
642
702
|
};
|
|
643
703
|
/**
|
|
644
|
-
*
|
|
645
|
-
*
|
|
646
|
-
*
|
|
704
|
+
* Lists the signed-in user's own passkeys, newest first, paginated with a
|
|
705
|
+
* cursor. A passkey is a WebAuthn credential that signs a user in without a
|
|
706
|
+
* password. Each passkey carries its ID, its name and when it was registered,
|
|
707
|
+
* never the credential itself.
|
|
647
708
|
*
|
|
648
709
|
* With `project_id`, the passkeys are listed only when the session belongs to
|
|
649
710
|
* that project.
|
|
@@ -661,10 +722,10 @@ const getGetMyPasswordStateUrl = (params) => {
|
|
|
661
722
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
662
723
|
});
|
|
663
724
|
const stringifiedParams = normalizedParams.toString();
|
|
664
|
-
return stringifiedParams.length > 0 ? `${
|
|
725
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users/me/password?${stringifiedParams}` : `${getApiBaseUrl()}/users/me/password`;
|
|
665
726
|
};
|
|
666
727
|
/**
|
|
667
|
-
*
|
|
728
|
+
* Returns when the signed-in user's current password was set, and leaves
|
|
668
729
|
* `set_at` out when they have none. The password and its hash are never
|
|
669
730
|
* returned.
|
|
670
731
|
*
|
|
@@ -684,15 +745,15 @@ const getListMyProjectsUrl = (params) => {
|
|
|
684
745
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
685
746
|
});
|
|
686
747
|
const stringifiedParams = normalizedParams.toString();
|
|
687
|
-
return stringifiedParams.length > 0 ? `${
|
|
748
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users/me/projects?${stringifiedParams}` : `${getApiBaseUrl()}/users/me/projects`;
|
|
688
749
|
};
|
|
689
750
|
/**
|
|
690
|
-
*
|
|
691
|
-
* on, either directly or through a team they are a member of. For a
|
|
692
|
-
* operator
|
|
693
|
-
* project
|
|
751
|
+
* Lists the projects the signed-in user can act on: those they hold an active
|
|
752
|
+
* grant on, either directly or through a team they are a member of. For a
|
|
753
|
+
* platform operator, someone who runs the deployment, that is every project of
|
|
754
|
+
* the deployment. Ordered by project ID and paged with an opaque cursor.
|
|
694
755
|
*
|
|
695
|
-
* This is not the same question as `queryProjects
|
|
756
|
+
* This is not the same question as `queryProjects` (`POST /projects/query`), which answers with the one
|
|
696
757
|
* project the calling credential is bound to. Here the session is the caller
|
|
697
758
|
* and the grants are the answer, so the list spans projects.
|
|
698
759
|
*
|
|
@@ -718,10 +779,10 @@ const getGetMyUserSchemaUrl = (params) => {
|
|
|
718
779
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
719
780
|
});
|
|
720
781
|
const stringifiedParams = normalizedParams.toString();
|
|
721
|
-
return stringifiedParams.length > 0 ? `${
|
|
782
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users/me/schema?${stringifiedParams}` : `${getApiBaseUrl()}/users/me/schema`;
|
|
722
783
|
};
|
|
723
784
|
/**
|
|
724
|
-
*
|
|
785
|
+
* Returns the schema that validates the signed-in user's own record.
|
|
725
786
|
*
|
|
726
787
|
* With `project_id`, the schema is returned only when the session belongs to
|
|
727
788
|
* that project.
|
|
@@ -739,10 +800,10 @@ const getListMyTeamsUrl = (params) => {
|
|
|
739
800
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
740
801
|
});
|
|
741
802
|
const stringifiedParams = normalizedParams.toString();
|
|
742
|
-
return stringifiedParams.length > 0 ? `${
|
|
803
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users/me/teams?${stringifiedParams}` : `${getApiBaseUrl()}/users/me/teams`;
|
|
743
804
|
};
|
|
744
805
|
/**
|
|
745
|
-
*
|
|
806
|
+
* Lists the teams the signed-in user belongs to, ordered by team name.
|
|
746
807
|
*
|
|
747
808
|
* With `project_id`, the teams are listed only when the session belongs to
|
|
748
809
|
* that project.
|
|
@@ -755,37 +816,59 @@ const listMyTeams = async (params, options) => {
|
|
|
755
816
|
});
|
|
756
817
|
};
|
|
757
818
|
const getCreateFlowUrl = () => {
|
|
758
|
-
return `${
|
|
759
|
-
};
|
|
760
|
-
/**
|
|
761
|
-
*
|
|
762
|
-
* the first
|
|
763
|
-
*
|
|
764
|
-
*
|
|
765
|
-
*
|
|
766
|
-
*
|
|
767
|
-
* the
|
|
768
|
-
*
|
|
769
|
-
*
|
|
770
|
-
*
|
|
771
|
-
*
|
|
772
|
-
*
|
|
773
|
-
*
|
|
774
|
-
*
|
|
775
|
-
*
|
|
776
|
-
*
|
|
777
|
-
*
|
|
778
|
-
*
|
|
779
|
-
*
|
|
780
|
-
*
|
|
781
|
-
*
|
|
819
|
+
return `${getApiBaseUrl()}/flow`;
|
|
820
|
+
};
|
|
821
|
+
/**
|
|
822
|
+
* Starts a flow: resolves a flow definition from the request's purpose and
|
|
823
|
+
* audience, and returns the first step.
|
|
824
|
+
*
|
|
825
|
+
* The flow endpoints are the runtime calls the login component
|
|
826
|
+
* (`<zitadel-login>`) makes, step by step. It starts a flow here, renders the
|
|
827
|
+
* step it gets back, and submits the user's input with `submitFlowStep` (`POST /flow/{id}/submit`) to
|
|
828
|
+
* get the next step. This call creates a new session implicitly, unless
|
|
829
|
+
* `session_id` is provided together with that session's `session_token`
|
|
830
|
+
* (for step-up or reauthentication on an existing session).
|
|
831
|
+
*
|
|
832
|
+
* The browser `Origin` header selects which deployment serves this attempt.
|
|
833
|
+
* The server checks the origin against the project's origin patterns and live
|
|
834
|
+
* previews, and the deployment that origin serves is the target: the
|
|
835
|
+
* project's newest primary deployment when it names a primary origin, or the
|
|
836
|
+
* newest live deployment to a preview URL. A
|
|
837
|
+
* deployment is a release, the immutable bundle of the project's
|
|
838
|
+
* configuration, made live at an origin. The deployment's release supplies
|
|
839
|
+
* flow definitions, user schemas and branding. The resolved deployment is
|
|
840
|
+
* sealed into the `_zflow` cookie so later steps keep the same
|
|
841
|
+
* configuration.
|
|
842
|
+
*
|
|
843
|
+
* - An origin that matches no pattern answers `403` with
|
|
844
|
+
* `proj.origin_not_allowed`, including when the project lists no origins.
|
|
845
|
+
* Add the origin with `zitadel origin add`.
|
|
846
|
+
* - An origin that matches a preview pattern with no live preview answers
|
|
847
|
+
* `403` with `proj.preview_not_live`. Run `zitadel preview` on the branch.
|
|
848
|
+
* - Nothing deployed to a listed origin or a live preview answers `409`
|
|
849
|
+
* with `rel.not_deployed`. Run `zitadel deploy`: a primary origin added
|
|
850
|
+
* since the last deploy serves nothing until the next one.
|
|
851
|
+
* - A loopback origin the project does not list answers `409` with
|
|
852
|
+
* `rel.not_deployed` too, as no deployment can name it. Add it with
|
|
853
|
+
* `zitadel origin add <origin> --kind primary`, then run `zitadel deploy`.
|
|
854
|
+
* - A revoked release answers `409` with `rel.revoked`.
|
|
855
|
+
*
|
|
856
|
+
* A request with no `Origin` passes the check, and so does the server's own
|
|
857
|
+
* origin, from which its console previews a project's login. Both are served
|
|
858
|
+
* the project's newest primary deployment unless the project lists that
|
|
859
|
+
* origin; with no primary deployment they answer `409` with
|
|
860
|
+
* `rel.no_default`. A loopback origin passes the check and is its own
|
|
861
|
+
* target. A step submitted from the server's own origin is still refused
|
|
862
|
+
* unless the project lists it.
|
|
863
|
+
*
|
|
864
|
+
* The response contains an `id` field, the flow handle. Use it as the path
|
|
782
865
|
* parameter for all subsequent `/flow/{id}/submit` calls.
|
|
783
866
|
*
|
|
784
867
|
* The response also sets an encrypted `HttpOnly` cookie (`_zflow`) containing
|
|
785
868
|
* the flow's orchestration state (current step, collected data, history).
|
|
786
|
-
* The server is stateless between requests
|
|
869
|
+
* The server is stateless between requests: all flow state lives in this
|
|
787
870
|
* cookie. The browser sends it automatically on subsequent requests.
|
|
788
|
-
* @summary Start a
|
|
871
|
+
* @summary Start a flow
|
|
789
872
|
*/
|
|
790
873
|
const createFlow = async (createFlowBody, options) => {
|
|
791
874
|
const getHeaders = (h) => {
|
|
@@ -807,16 +890,20 @@ const createFlow = async (createFlowBody, options) => {
|
|
|
807
890
|
});
|
|
808
891
|
};
|
|
809
892
|
const getGetFlowStepUrl = (id) => {
|
|
810
|
-
return `${
|
|
893
|
+
return `${getApiBaseUrl()}/flow/${encodeURIComponent(String(id))}`;
|
|
811
894
|
};
|
|
812
895
|
/**
|
|
813
|
-
* Returns the current
|
|
814
|
-
*
|
|
896
|
+
* Returns the current step of a flow without advancing it. Use it to render
|
|
897
|
+
* the step again after a page reload or a network error.
|
|
898
|
+
*
|
|
899
|
+
* The flow endpoints are the runtime calls the login component
|
|
900
|
+
* (`<zitadel-login>`) makes, step by step. `createFlow` (`POST /flow`) starts a flow, and
|
|
901
|
+
* `submitFlowStep` (`POST /flow/{id}/submit`) advances it.
|
|
815
902
|
*
|
|
816
903
|
* Reuses the deployment sealed into `_zflow` at `createFlow`; it does not
|
|
817
904
|
* re-resolve from `Origin`. If that release was revoked since the attempt
|
|
818
905
|
* started, the response is `409` with `rel.revoked`.
|
|
819
|
-
* @summary Get current step
|
|
906
|
+
* @summary Get the current step of a flow
|
|
820
907
|
*/
|
|
821
908
|
const getFlowStep = async (id, options) => {
|
|
822
909
|
return customFetch(getGetFlowStepUrl(id), {
|
|
@@ -825,15 +912,17 @@ const getFlowStep = async (id, options) => {
|
|
|
825
912
|
});
|
|
826
913
|
};
|
|
827
914
|
const getSubmitFlowStepUrl = (id) => {
|
|
828
|
-
return `${
|
|
915
|
+
return `${getApiBaseUrl()}/flow/${encodeURIComponent(String(id))}/submit`;
|
|
829
916
|
};
|
|
830
917
|
/**
|
|
831
|
-
* Submits user input for the current step. The server
|
|
832
|
-
* processes (
|
|
833
|
-
* through any invisible steps, and returns the next visible step.
|
|
918
|
+
* Submits the user's input for the current step of a flow. The server
|
|
919
|
+
* validates it, processes it (for example, verifies a credential), advances
|
|
920
|
+
* the flow through any invisible steps, and returns the next visible step.
|
|
921
|
+
* The flow endpoints are the runtime calls the login component
|
|
922
|
+
* (`<zitadel-login>`) makes, step by step; `createFlow` (`POST /flow`) starts a flow.
|
|
834
923
|
*
|
|
835
924
|
* The response sets an updated encrypted `HttpOnly` cookie (`_zflow`)
|
|
836
|
-
* with the new flow state. The server is stateless
|
|
925
|
+
* with the new flow state. The server is stateless: all orchestration
|
|
837
926
|
* state is carried in this cookie between requests.
|
|
838
927
|
*
|
|
839
928
|
* **Important:** The `id` in the response may differ from the `id` used in
|
|
@@ -849,17 +938,17 @@ const getSubmitFlowStepUrl = (id) => {
|
|
|
849
938
|
* | `behavior` | Action |
|
|
850
939
|
* |------------- |------------------------------------------------------------|
|
|
851
940
|
* | `redirect` | Navigate to `redirect_uri` (OIDC/SAML auth request done). |
|
|
852
|
-
* | `show` | Render the step as a success screen
|
|
941
|
+
* | `show` | Render the step as a success screen, such as registration. |
|
|
853
942
|
*
|
|
854
943
|
* A `complete` step is only returned when the **entire flow stack** is done.
|
|
855
|
-
* If a stacked flow (
|
|
856
|
-
* auto-pops to the parent flow and returns the parent's next step
|
|
857
|
-
* frontend never sees a `complete` for intermediate flows.
|
|
944
|
+
* If a stacked flow (for example, recovery pivoted from login) finishes, the
|
|
945
|
+
* server auto-pops to the parent flow and returns the parent's next step.
|
|
946
|
+
* The frontend never sees a `complete` for intermediate flows.
|
|
858
947
|
*
|
|
859
948
|
* ## External sign-in
|
|
860
949
|
*
|
|
861
950
|
* `{action: "sso", sso_provider_id, return_target}` on a step that offers
|
|
862
|
-
* `sso_providers` returns the
|
|
951
|
+
* `sso_providers` returns the server-emitted `sso-redirect` step, whose
|
|
863
952
|
* `redirect_url` the frontend navigates to.
|
|
864
953
|
*
|
|
865
954
|
* - The flow state does not change, but `_zflow` is re-sealed like on
|
|
@@ -872,15 +961,16 @@ const getSubmitFlowStepUrl = (id) => {
|
|
|
872
961
|
* Safari rejects `Secure`), it is `_zsso` with no `Secure`; the
|
|
873
962
|
* `__Host-` prefix is dropped because it requires `Secure`.
|
|
874
963
|
*
|
|
875
|
-
*
|
|
876
|
-
*
|
|
877
|
-
* sign-in with, including a
|
|
878
|
-
* re-renders the step with
|
|
964
|
+
* An identity provider (an external sign-in such as Google) whose
|
|
965
|
+
* `client_id` is a `${{ NAME }}` reference has it filled from the project's
|
|
966
|
+
* variables. A provider the server cannot start a sign-in with, including a
|
|
967
|
+
* reference with no variable behind it, re-renders the step with
|
|
968
|
+
* `error.sso_unavailable`.
|
|
879
969
|
*
|
|
880
970
|
* Reuses the deployment sealed into `_zflow` at `createFlow`; it does not
|
|
881
971
|
* re-resolve from `Origin`. If that release was revoked since the attempt
|
|
882
972
|
* started, the response is `409` with `rel.revoked`.
|
|
883
|
-
* @summary Submit
|
|
973
|
+
* @summary Submit a flow step
|
|
884
974
|
*/
|
|
885
975
|
const submitFlowStep = async (id, submitFlowStepBody, options) => {
|
|
886
976
|
const getHeaders = (h) => {
|
|
@@ -902,23 +992,39 @@ const submitFlowStep = async (id, submitFlowStepBody, options) => {
|
|
|
902
992
|
});
|
|
903
993
|
};
|
|
904
994
|
const getCreateAuthAttemptUrl = () => {
|
|
905
|
-
return `${
|
|
906
|
-
};
|
|
907
|
-
/**
|
|
908
|
-
*
|
|
909
|
-
*
|
|
910
|
-
* An attempt
|
|
911
|
-
*
|
|
912
|
-
*
|
|
913
|
-
*
|
|
914
|
-
*
|
|
915
|
-
*
|
|
916
|
-
*
|
|
917
|
-
*
|
|
918
|
-
*
|
|
919
|
-
*
|
|
920
|
-
*
|
|
921
|
-
*
|
|
995
|
+
return `${getApiBaseUrl()}/auth_attempts`;
|
|
996
|
+
};
|
|
997
|
+
/**
|
|
998
|
+
* Creates an authentication attempt, one sign-in round that expires 15 minutes after creation.
|
|
999
|
+
*
|
|
1000
|
+
* An authentication attempt collects the proofs for one sign-in and ends in a
|
|
1001
|
+
* handoff token. A handoff token is the short-lived, single-use credential that
|
|
1002
|
+
* a completed attempt hands to the session exchange. A client makes these calls
|
|
1003
|
+
* in order:
|
|
1004
|
+
*
|
|
1005
|
+
* 1. `createAuthAttempt` (`POST /auth_attempts`) creates the attempt.
|
|
1006
|
+
* 2. `issueChallenge` (`POST /auth_attempts/{attempt_id}/challenges`) issues a challenge, a request to prove one factor such as
|
|
1007
|
+
* `identifier`, `password` or `passkey`.
|
|
1008
|
+
* 3. `verifyChallengeProof` (`POST /auth_attempts/{attempt_id}/challenges/{challenge_id}/verify`) submits the proof for that challenge: the
|
|
1009
|
+
* credential, code or assertion. Repeat steps 2 and 3 until
|
|
1010
|
+
* `getAuthAttempt` (`GET /auth_attempts/{attempt_id}`) reports state `completed`, which means every factor in
|
|
1011
|
+
* `required_factors` is verified.
|
|
1012
|
+
* 4. `createHandoff` (`POST /auth_attempts/{attempt_id}/handoff`) completes the attempt and returns the `handoff_token`.
|
|
1013
|
+
* 5. `exchangeHandoff` (`POST /sessions/exchange`) exchanges the handoff token
|
|
1014
|
+
* for the session and its `session_token`.
|
|
1015
|
+
*
|
|
1016
|
+
* The body takes a `project_id` and a `challenge_nonce` (from
|
|
1017
|
+
* `POST /bootstrap/challenge`). For step-up authentication, which adds factors
|
|
1018
|
+
* to an existing session, also send that session's `session_id` and its
|
|
1019
|
+
* `session_token`, as `createSession` (`POST /sessions`) or `exchangeHandoff` returned them.
|
|
1020
|
+
* The attempt's `attempt_id` in the response is the ID every later call takes.
|
|
1021
|
+
*
|
|
1022
|
+
* The project comes from the project secret. A body `project_id` that names
|
|
1023
|
+
* another project answers `403` with `proj.mismatch`: send the credential's own
|
|
1024
|
+
* project. The attempt seals the project's newest primary deployment, whatever
|
|
1025
|
+
* the caller's `Origin`. With none it answers `409` with `rel.no_default`, and a
|
|
1026
|
+
* revoked release answers `409` with `rel.revoked`.
|
|
1027
|
+
* @summary Create an authentication attempt
|
|
922
1028
|
*/
|
|
923
1029
|
const createAuthAttempt = async (createAuthAttemptBody, options) => {
|
|
924
1030
|
const getHeaders = (h) => {
|
|
@@ -940,17 +1046,17 @@ const createAuthAttempt = async (createAuthAttemptBody, options) => {
|
|
|
940
1046
|
});
|
|
941
1047
|
};
|
|
942
1048
|
const getGetAuthAttemptUrl = (attemptId) => {
|
|
943
|
-
return `${
|
|
1049
|
+
return `${getApiBaseUrl()}/auth_attempts/${encodeURIComponent(String(attemptId))}`;
|
|
944
1050
|
};
|
|
945
1051
|
/**
|
|
946
|
-
*
|
|
1052
|
+
* Returns the current state of an authentication attempt, one sign-in round.
|
|
947
1053
|
*
|
|
948
|
-
*
|
|
949
|
-
* challenges issued so far, and any errors preventing progress.
|
|
1054
|
+
* The response holds the attempt's state, available factors for the next
|
|
1055
|
+
* challenge, challenges issued so far, and any errors preventing progress.
|
|
950
1056
|
*
|
|
951
|
-
* Use
|
|
952
|
-
* a federated IdP callback or a device flow
|
|
953
|
-
* @summary Get authentication attempt
|
|
1057
|
+
* Use it to poll during long-running factor verifications, for example waiting
|
|
1058
|
+
* for a federated identity provider (IdP) callback or a device flow.
|
|
1059
|
+
* @summary Get an authentication attempt by ID
|
|
954
1060
|
*/
|
|
955
1061
|
const getAuthAttempt = async (attemptId, options) => {
|
|
956
1062
|
return customFetch(getGetAuthAttemptUrl(attemptId), {
|
|
@@ -959,15 +1065,15 @@ const getAuthAttempt = async (attemptId, options) => {
|
|
|
959
1065
|
});
|
|
960
1066
|
};
|
|
961
1067
|
const getIssueChallengeUrl = (attemptId) => {
|
|
962
|
-
return `${
|
|
1068
|
+
return `${getApiBaseUrl()}/auth_attempts/${encodeURIComponent(String(attemptId))}/challenges`;
|
|
963
1069
|
};
|
|
964
1070
|
/**
|
|
965
|
-
* Issues a
|
|
1071
|
+
* Issues a challenge, a request to prove one factor, within an authentication attempt.
|
|
966
1072
|
*
|
|
967
|
-
*
|
|
968
|
-
*
|
|
969
|
-
*
|
|
970
|
-
*
|
|
1073
|
+
* A challenge names one factor method, such as password, passkey, TOTP or OTP
|
|
1074
|
+
* via SMS. The response carries the challenge's `challenge_id`, method,
|
|
1075
|
+
* metadata and any UI hints. The client then submits the proof with
|
|
1076
|
+
* `verifyChallengeProof` (`POST /auth_attempts/{attempt_id}/challenges/{challenge_id}/verify`), using that `challenge_id`.
|
|
971
1077
|
* @summary Issue a factor challenge
|
|
972
1078
|
*/
|
|
973
1079
|
const issueChallenge = async (attemptId, issueChallengeBody, options) => {
|
|
@@ -990,20 +1096,25 @@ const issueChallenge = async (attemptId, issueChallengeBody, options) => {
|
|
|
990
1096
|
});
|
|
991
1097
|
};
|
|
992
1098
|
const getVerifyChallengeProofUrl = (attemptId, challengeId) => {
|
|
993
|
-
return `${
|
|
1099
|
+
return `${getApiBaseUrl()}/auth_attempts/${encodeURIComponent(String(attemptId))}/challenges/${encodeURIComponent(String(challengeId))}/verify`;
|
|
994
1100
|
};
|
|
995
1101
|
/**
|
|
996
|
-
*
|
|
1102
|
+
* Verifies a challenge by submitting its proof: the credential, code or assertion for the factor.
|
|
997
1103
|
*
|
|
998
1104
|
* The proof format depends on the challenge method. For example:
|
|
1105
|
+
*
|
|
999
1106
|
* - `password` method: { password: "…" }
|
|
1000
1107
|
* - `totp` method: { totp: { code: "123456" } }
|
|
1001
1108
|
* - `passkey` method: { passkey: { assertion: "…" } }
|
|
1002
1109
|
* - `recovery_code` method: { recovery_code: "…" }
|
|
1003
1110
|
*
|
|
1004
|
-
* On
|
|
1005
|
-
*
|
|
1006
|
-
*
|
|
1111
|
+
* On success, the factor is recorded on the authentication attempt. The
|
|
1112
|
+
* attempt moves to the next pending challenge, or completes when every required
|
|
1113
|
+
* factor is verified. Then call `createHandoff` (`POST /auth_attempts/{attempt_id}/handoff`).
|
|
1114
|
+
*
|
|
1115
|
+
* A `409` with `att.proof_rejected` means the proof was wrong. Check it and try
|
|
1116
|
+
* again. There is no retry limit: you can retry until the attempt expires.
|
|
1117
|
+
* @summary Verify a challenge proof
|
|
1007
1118
|
*/
|
|
1008
1119
|
const verifyChallengeProof = async (attemptId, challengeId, verifyChallengeProofBody, options) => {
|
|
1009
1120
|
const getHeaders = (h) => {
|
|
@@ -1025,22 +1136,27 @@ const verifyChallengeProof = async (attemptId, challengeId, verifyChallengeProof
|
|
|
1025
1136
|
});
|
|
1026
1137
|
};
|
|
1027
1138
|
const getCreateHandoffUrl = (attemptId) => {
|
|
1028
|
-
return `${
|
|
1139
|
+
return `${getApiBaseUrl()}/auth_attempts/${encodeURIComponent(String(attemptId))}/handoff`;
|
|
1029
1140
|
};
|
|
1030
1141
|
/**
|
|
1031
|
-
* Completes
|
|
1142
|
+
* Completes an authentication attempt and mints a `handoff_token`.
|
|
1143
|
+
*
|
|
1144
|
+
* A handoff token is the short-lived credential that a completed attempt hands
|
|
1145
|
+
* to the session exchange. Call this after every required factor is verified and
|
|
1146
|
+
* the attempt is in `completed` state. Otherwise it answers `409` with
|
|
1147
|
+
* `att.not_completed`: verify the remaining factors, then call again.
|
|
1032
1148
|
*
|
|
1033
|
-
*
|
|
1034
|
-
*
|
|
1035
|
-
* POST /sessions/exchange to receive the final session and session_token.
|
|
1149
|
+
* Exchange the token at `POST /sessions/exchange` (`exchangeHandoff` (`POST /sessions/exchange`)) within 60
|
|
1150
|
+
* seconds to receive the session and its `session_token`. The handoff token is:
|
|
1036
1151
|
*
|
|
1037
|
-
*
|
|
1038
|
-
* -
|
|
1039
|
-
* -
|
|
1040
|
-
*
|
|
1152
|
+
* - Single-use: exchange it once, with no retry.
|
|
1153
|
+
* - Bound to the project: the exchange needs the same project's credential.
|
|
1154
|
+
* - Created once: a second call answers `409 att.already_handed_off`, even
|
|
1155
|
+
* with the same idempotency key.
|
|
1041
1156
|
*
|
|
1042
|
-
*
|
|
1043
|
-
*
|
|
1157
|
+
* A revoked release is refused when the handoff is exchanged, not here. A
|
|
1158
|
+
* release is the configuration that `zitadel deploy` publishes.
|
|
1159
|
+
* @summary Complete an authentication attempt and create a handoff token
|
|
1044
1160
|
*/
|
|
1045
1161
|
const createHandoff = async (attemptId, options) => {
|
|
1046
1162
|
return customFetch(getCreateHandoffUrl(attemptId), {
|
|
@@ -1049,16 +1165,19 @@ const createHandoff = async (attemptId, options) => {
|
|
|
1049
1165
|
});
|
|
1050
1166
|
};
|
|
1051
1167
|
const getCreateProjectUrl = () => {
|
|
1052
|
-
return `${
|
|
1168
|
+
return `${getApiBaseUrl()}/projects`;
|
|
1053
1169
|
};
|
|
1054
1170
|
/**
|
|
1055
1171
|
* Creates a project and returns its project secret and preview secret, which no
|
|
1056
1172
|
* other endpoint returns.
|
|
1057
1173
|
*
|
|
1058
|
-
*
|
|
1059
|
-
*
|
|
1060
|
-
*
|
|
1061
|
-
*
|
|
1174
|
+
* A project is the top-level boundary that holds users, sessions and
|
|
1175
|
+
* configuration. It has no owning team until someone claims it; see `initClaim` (`POST /projects/{project_id}/claim/init`).
|
|
1176
|
+
*
|
|
1177
|
+
* The request needs no credential and is rate-limited. On `429`, wait and retry.
|
|
1178
|
+
* Unless `seed_defaults` is `false`, the project starts with a default user schema
|
|
1179
|
+
* and flow. The CLI sets it to `false` and uploads its own from `.zitadel/`.
|
|
1180
|
+
* @summary Create a project
|
|
1062
1181
|
*/
|
|
1063
1182
|
const createProject = async (createProjectBody, options) => {
|
|
1064
1183
|
const getHeaders = (h) => {
|
|
@@ -1080,15 +1199,15 @@ const createProject = async (createProjectBody, options) => {
|
|
|
1080
1199
|
});
|
|
1081
1200
|
};
|
|
1082
1201
|
const getQueryProjectsUrl = () => {
|
|
1083
|
-
return `${
|
|
1202
|
+
return `${getApiBaseUrl()}/projects/query`;
|
|
1084
1203
|
};
|
|
1085
1204
|
/**
|
|
1086
1205
|
* Returns the project the project secret belongs to, as a page of at most one
|
|
1087
1206
|
* project.
|
|
1088
1207
|
*
|
|
1089
|
-
* A credential is scoped to one project
|
|
1090
|
-
*
|
|
1091
|
-
* act on
|
|
1208
|
+
* A credential is scoped to one project today, so the filters and sorting
|
|
1209
|
+
* apply to that project alone. A signed-in person lists the projects they can
|
|
1210
|
+
* act on with `GET /users/me/projects`.
|
|
1092
1211
|
* @summary Query projects
|
|
1093
1212
|
*/
|
|
1094
1213
|
const queryProjects = async (queryProjectsBody, options) => {
|
|
@@ -1111,11 +1230,15 @@ const queryProjects = async (queryProjectsBody, options) => {
|
|
|
1111
1230
|
});
|
|
1112
1231
|
};
|
|
1113
1232
|
const getGetProjectUrl = (projectId) => {
|
|
1114
|
-
return `${
|
|
1233
|
+
return `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}`;
|
|
1115
1234
|
};
|
|
1116
1235
|
/**
|
|
1117
|
-
* Returns
|
|
1118
|
-
*
|
|
1236
|
+
* Returns a project's current state: its name, origins, password hashing
|
|
1237
|
+
* method and owning team.
|
|
1238
|
+
*
|
|
1239
|
+
* Authenticate with the project secret, or with the session of a signed-in
|
|
1240
|
+
* person who holds a grant on the project.
|
|
1241
|
+
* @summary Get a project by ID
|
|
1119
1242
|
*/
|
|
1120
1243
|
const getProject = async (projectId, options) => {
|
|
1121
1244
|
return customFetch(getGetProjectUrl(projectId), {
|
|
@@ -1124,11 +1247,19 @@ const getProject = async (projectId, options) => {
|
|
|
1124
1247
|
});
|
|
1125
1248
|
};
|
|
1126
1249
|
const getPatchProjectUrl = (projectId) => {
|
|
1127
|
-
return `${
|
|
1250
|
+
return `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}`;
|
|
1128
1251
|
};
|
|
1129
1252
|
/**
|
|
1130
|
-
* Updates
|
|
1131
|
-
*
|
|
1253
|
+
* Updates a project's name or password hashing method.
|
|
1254
|
+
*
|
|
1255
|
+
* Fields you leave out keep their value. Sending `password_hash: null` drops
|
|
1256
|
+
* the project's own method and returns to the server default. A change of
|
|
1257
|
+
* method rewrites no stored password: each moves to the new method when its
|
|
1258
|
+
* owner next signs in or sets a new password.
|
|
1259
|
+
*
|
|
1260
|
+
* Authenticate with the project secret, or with the session of a signed-in
|
|
1261
|
+
* person who can act on the project.
|
|
1262
|
+
* @summary Update a project
|
|
1132
1263
|
*/
|
|
1133
1264
|
const patchProject = async (projectId, patchProjectBody, options) => {
|
|
1134
1265
|
const getHeaders = (h) => {
|
|
@@ -1155,38 +1286,38 @@ const getListProjectAdminsUrl = (projectId, params) => {
|
|
|
1155
1286
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1156
1287
|
});
|
|
1157
1288
|
const stringifiedParams = normalizedParams.toString();
|
|
1158
|
-
return stringifiedParams.length > 0 ? `${
|
|
1289
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/admins?${stringifiedParams}` : `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/admins`;
|
|
1159
1290
|
};
|
|
1160
1291
|
/**
|
|
1161
|
-
* Lists the people who can administer
|
|
1162
|
-
*
|
|
1163
|
-
* way they hold it:
|
|
1292
|
+
* Lists the people who can administer a project, and how each of them
|
|
1293
|
+
* holds that access.
|
|
1164
1294
|
*
|
|
1165
|
-
*
|
|
1166
|
-
* (ADR 054 §2). Removing a grant does not remove this access; it ends
|
|
1167
|
-
* only when the person leaves the team or the project changes owner.
|
|
1168
|
-
* - `grant`: an unexpired `admin` grant on the project, either to the
|
|
1169
|
-
* person (`grant_id` only) or to a team they are an active member of
|
|
1170
|
-
* (`grant_id` and `team`). Revoking that grant removes this source.
|
|
1295
|
+
* A person appears once, with one entry in `sources` per way they hold it:
|
|
1171
1296
|
*
|
|
1172
|
-
*
|
|
1173
|
-
*
|
|
1174
|
-
*
|
|
1175
|
-
*
|
|
1176
|
-
*
|
|
1177
|
-
*
|
|
1178
|
-
*
|
|
1297
|
+
* - `owning_team`: an active member of the team that owns the project, the
|
|
1298
|
+
* team a claim attaches the project to. Removing a grant does not remove
|
|
1299
|
+
* this access. It ends only when the person leaves the team or the
|
|
1300
|
+
* project changes owner.
|
|
1301
|
+
* - `grant`: an unexpired `admin` grant on the project, which is a role
|
|
1302
|
+
* given to the person (`grant_id` only) or to a team they are an active
|
|
1303
|
+
* member of (`grant_id` and `team`). Revoking that grant removes this
|
|
1304
|
+
* source.
|
|
1179
1305
|
*
|
|
1180
|
-
*
|
|
1181
|
-
*
|
|
1182
|
-
*
|
|
1183
|
-
*
|
|
1306
|
+
* The list follows the authorization check. A person who left a team, or
|
|
1307
|
+
* whose team or user was deactivated, is not listed through it. Grants that
|
|
1308
|
+
* expired or carry a lower role are left out. A person whose only access is a
|
|
1309
|
+
* `viewer` or `editor` grant is not an admin and is not listed. Like the
|
|
1310
|
+
* check, the list does not look at a person's user status beyond that, so a
|
|
1311
|
+
* direct grant to a suspended person is listed.
|
|
1184
1312
|
*
|
|
1185
|
-
*
|
|
1313
|
+
* A person whose access comes only through teams the caller is not a
|
|
1314
|
+
* member of is left out. A team the caller is not in is named by `team_id`
|
|
1315
|
+
* only. The grant to such a team still shows in the project's grants.
|
|
1186
1316
|
*
|
|
1187
|
-
*
|
|
1188
|
-
*
|
|
1189
|
-
*
|
|
1317
|
+
* The list is ordered by `user_id` and paginated with `page_token`.
|
|
1318
|
+
* Authenticate with a project secret (`oauth2`), or with the session cookie
|
|
1319
|
+
* (`sessionCookie`) of a signed-in person who can read the project.
|
|
1320
|
+
* @summary List the admins of a project
|
|
1190
1321
|
*/
|
|
1191
1322
|
const listProjectAdmins = async (projectId, params, options) => {
|
|
1192
1323
|
return customFetch(getListProjectAdminsUrl(projectId, params), {
|
|
@@ -1195,14 +1326,25 @@ const listProjectAdmins = async (projectId, params, options) => {
|
|
|
1195
1326
|
});
|
|
1196
1327
|
};
|
|
1197
1328
|
const getInitClaimUrl = (projectId) => {
|
|
1198
|
-
return `${
|
|
1329
|
+
return `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/claim/init`;
|
|
1199
1330
|
};
|
|
1200
1331
|
/**
|
|
1201
|
-
* Starts a claim
|
|
1202
|
-
*
|
|
1203
|
-
*
|
|
1204
|
-
*
|
|
1205
|
-
*
|
|
1332
|
+
* Starts a claim, which attaches a project created before sign-in to a
|
|
1333
|
+
* team, and returns the `claim_url` to open in a browser.
|
|
1334
|
+
*
|
|
1335
|
+
* A claim [attaches a project to a team](https://preview.zitadel.com/docs/concepts/project-team-user#claim)
|
|
1336
|
+
* so that the team's members administer it. This operation mints a
|
|
1337
|
+
* single-use, short-lived challenge for an unclaimed project. The developer
|
|
1338
|
+
* opens `claim_url`, signs in and completes the claim in the browser; see
|
|
1339
|
+
* `completeClaim` (`POST /projects/{project_id}/claim/complete`). Poll `getClaimStatus` (`GET /projects/{project_id}/claim/status`) with the returned `challenge_id`,
|
|
1340
|
+
* as `zitadel claim` does. The response's `expires_at` carries the exact expiry.
|
|
1341
|
+
*
|
|
1342
|
+
* Authenticate with the project secret that `createProject` (`POST /projects`) returns as
|
|
1343
|
+
* `project_secret`.
|
|
1344
|
+
*
|
|
1345
|
+
* A `409` means a team already claimed the project, and its details name
|
|
1346
|
+
* that team. A `410` means the project's 14-day claim window has closed,
|
|
1347
|
+
* which is final.
|
|
1206
1348
|
* @summary Initialize a project claim
|
|
1207
1349
|
*/
|
|
1208
1350
|
const initClaim = async (projectId, options) => {
|
|
@@ -1217,18 +1359,26 @@ const getGetClaimStatusUrl = (projectId, params) => {
|
|
|
1217
1359
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1218
1360
|
});
|
|
1219
1361
|
const stringifiedParams = normalizedParams.toString();
|
|
1220
|
-
return stringifiedParams.length > 0 ? `${
|
|
1362
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/claim/status?${stringifiedParams}` : `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/claim/status`;
|
|
1221
1363
|
};
|
|
1222
1364
|
/**
|
|
1223
|
-
*
|
|
1224
|
-
*
|
|
1225
|
-
*
|
|
1226
|
-
*
|
|
1227
|
-
*
|
|
1228
|
-
*
|
|
1229
|
-
*
|
|
1230
|
-
*
|
|
1231
|
-
*
|
|
1365
|
+
* Returns the status of a claim challenge, `pending` or `completed`, while a
|
|
1366
|
+
* browser completes the claim.
|
|
1367
|
+
*
|
|
1368
|
+
* A [claim attaches a project to a team](https://preview.zitadel.com/docs/concepts/project-team-user#claim).
|
|
1369
|
+
* `zitadel claim` polls this operation after `initClaim` (`POST /projects/{project_id}/claim/init`) starts the claim.
|
|
1370
|
+
* Once the project is claimed, the response is `completed` with the owning
|
|
1371
|
+
* team, the claim timestamp and the dashboard URL.
|
|
1372
|
+
*
|
|
1373
|
+
* The claim itself, not the polled challenge, decides the status. A project
|
|
1374
|
+
* claimed through another concurrent challenge also reports `completed`. A
|
|
1375
|
+
* completed claim keeps reporting `completed` past this challenge's expiry
|
|
1376
|
+
* and past the project's claim window.
|
|
1377
|
+
*
|
|
1378
|
+
* Pass the `challenge_id` that `initClaim` returns. Authenticate with the
|
|
1379
|
+
* project secret that started the challenge. On `410` with `proj.claim_expired`, call
|
|
1380
|
+
* `initClaim` again for a fresh challenge.
|
|
1381
|
+
* @summary Get the status of a project claim
|
|
1232
1382
|
*/
|
|
1233
1383
|
const getClaimStatus = async (projectId, params, options) => {
|
|
1234
1384
|
return customFetch(getGetClaimStatusUrl(projectId, params), {
|
|
@@ -1237,13 +1387,21 @@ const getClaimStatus = async (projectId, params, options) => {
|
|
|
1237
1387
|
});
|
|
1238
1388
|
};
|
|
1239
1389
|
const getCompleteClaimUrl = (projectId) => {
|
|
1240
|
-
return `${
|
|
1390
|
+
return `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/claim/complete`;
|
|
1241
1391
|
};
|
|
1242
1392
|
/**
|
|
1243
|
-
*
|
|
1244
|
-
*
|
|
1245
|
-
*
|
|
1246
|
-
*
|
|
1393
|
+
* Completes a claim by attaching the project to the signed-in developer's
|
|
1394
|
+
* personal team.
|
|
1395
|
+
*
|
|
1396
|
+
* A [claim attaches a project to a team](https://preview.zitadel.com/docs/concepts/project-team-user#claim),
|
|
1397
|
+
* so that the team's members administer it. The claim page in the browser
|
|
1398
|
+
* calls this operation after the developer signs in, with the session cookie.
|
|
1399
|
+
* The `challenge_id` from the claim URL that `initClaim` (`POST /projects/{project_id}/claim/init`) returns is the
|
|
1400
|
+
* request's single-use, browser-safe authorization.
|
|
1401
|
+
*
|
|
1402
|
+
* Claims are first-claim-wins and spend the challenge. If a team already
|
|
1403
|
+
* claimed the project, the request answers `409`. If the challenge lapsed
|
|
1404
|
+
* (`410` with `proj.claim_expired`), call `initClaim` again for a fresh one.
|
|
1247
1405
|
* @summary Complete a project claim
|
|
1248
1406
|
*/
|
|
1249
1407
|
const completeClaim = async (projectId, completeClaimBody, options) => {
|
|
@@ -1271,15 +1429,21 @@ const getGetClaimWindowUrl = (projectId, params) => {
|
|
|
1271
1429
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1272
1430
|
});
|
|
1273
1431
|
const stringifiedParams = normalizedParams.toString();
|
|
1274
|
-
return stringifiedParams.length > 0 ? `${
|
|
1432
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/claim/window?${stringifiedParams}` : `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/claim/window`;
|
|
1275
1433
|
};
|
|
1276
1434
|
/**
|
|
1277
|
-
*
|
|
1278
|
-
*
|
|
1279
|
-
*
|
|
1280
|
-
* is the
|
|
1281
|
-
*
|
|
1282
|
-
*
|
|
1435
|
+
* Returns when a project's claim window closes and whether it has already
|
|
1436
|
+
* closed.
|
|
1437
|
+
*
|
|
1438
|
+
* The claim window is the 14 days after a project is created during which a
|
|
1439
|
+
* team can [claim it](https://preview.zitadel.com/docs/concepts/project-team-user#claim). The claim page
|
|
1440
|
+
* in the browser calls this operation to show how long is left.
|
|
1441
|
+
*
|
|
1442
|
+
* The request needs no credential, because the claim page calls it before the
|
|
1443
|
+
* developer has signed in. Holding the `challenge_id` from the claim URL that
|
|
1444
|
+
* `initClaim` (`POST /projects/{project_id}/claim/init`) returns is the authorization, the same one `completeClaim` (`POST /projects/{project_id}/claim/complete`)
|
|
1445
|
+
* accepts. The response reveals only the window, never the project itself.
|
|
1446
|
+
* Unlike `completeClaim` it spends nothing, so reloading the page is safe.
|
|
1283
1447
|
* @summary Get the claim window for a project
|
|
1284
1448
|
*/
|
|
1285
1449
|
const getClaimWindow = async (projectId, params, options) => {
|
|
@@ -1289,13 +1453,25 @@ const getClaimWindow = async (projectId, params, options) => {
|
|
|
1289
1453
|
});
|
|
1290
1454
|
};
|
|
1291
1455
|
const getAddOriginUrl = (projectId) => {
|
|
1292
|
-
return `${
|
|
1456
|
+
return `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/origins`;
|
|
1293
1457
|
};
|
|
1294
1458
|
/**
|
|
1295
|
-
* Adds
|
|
1296
|
-
*
|
|
1297
|
-
*
|
|
1298
|
-
*
|
|
1459
|
+
* Adds an origin pattern, a `pattern` and its `kind`, to the project's origins.
|
|
1460
|
+
*
|
|
1461
|
+
* An origin pattern says which web origins the project accepts. A `primary`
|
|
1462
|
+
* pattern must be an exact URL with no wildcard. A `preview` pattern may
|
|
1463
|
+
* include a single DNS-label wildcard.
|
|
1464
|
+
*
|
|
1465
|
+
* While the project has no patterns, it admits no origin except a loopback
|
|
1466
|
+
* origin, so the first pattern you add opens it to the origins that
|
|
1467
|
+
* pattern matches. Admitting an origin is not serving it: a new `primary`
|
|
1468
|
+
* origin answers `rel.not_deployed` until the next deploy to primary
|
|
1469
|
+
* (`zitadel deploy`).
|
|
1470
|
+
*
|
|
1471
|
+
* Adding a pattern that already exists with the same kind is idempotent and
|
|
1472
|
+
* answers `201` with the stored origin. If the pattern exists with the other
|
|
1473
|
+
* kind, the request is refused with `origin.kind_conflict`: remove it with
|
|
1474
|
+
* `removeOrigin` (`POST /projects/{project_id}/origins/remove`), then add it again.
|
|
1299
1475
|
* @summary Add an origin pattern
|
|
1300
1476
|
*/
|
|
1301
1477
|
const addOrigin = async (projectId, addOriginBody, options) => {
|
|
@@ -1318,13 +1494,18 @@ const addOrigin = async (projectId, addOriginBody, options) => {
|
|
|
1318
1494
|
});
|
|
1319
1495
|
};
|
|
1320
1496
|
const getRemoveOriginUrl = (projectId) => {
|
|
1321
|
-
return `${
|
|
1497
|
+
return `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/origins/remove`;
|
|
1322
1498
|
};
|
|
1323
1499
|
/**
|
|
1324
|
-
* Removes one pattern from the project's origins.
|
|
1325
|
-
*
|
|
1326
|
-
*
|
|
1327
|
-
*
|
|
1500
|
+
* Removes one origin pattern from the project's origins.
|
|
1501
|
+
*
|
|
1502
|
+
* Requests from URLs only that pattern admitted are refused from then on.
|
|
1503
|
+
* Live previews and deployment history are untouched. Removing the last
|
|
1504
|
+
* pattern leaves an empty list, which admits no origin except a loopback
|
|
1505
|
+
* origin.
|
|
1506
|
+
* Removing a pattern that is already absent is idempotent and answers `204`.
|
|
1507
|
+
*
|
|
1508
|
+
* The body's `pattern` is a pattern `addOrigin` (`POST /projects/{project_id}/origins`) stored.
|
|
1328
1509
|
* @summary Remove an origin pattern
|
|
1329
1510
|
*/
|
|
1330
1511
|
const removeOrigin = async (projectId, removeOriginBody, options) => {
|
|
@@ -1352,13 +1533,15 @@ const getListPreviewsUrl = (projectId, params) => {
|
|
|
1352
1533
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1353
1534
|
});
|
|
1354
1535
|
const stringifiedParams = normalizedParams.toString();
|
|
1355
|
-
return stringifiedParams.length > 0 ? `${
|
|
1536
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/previews?${stringifiedParams}` : `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/previews`;
|
|
1356
1537
|
};
|
|
1357
1538
|
/**
|
|
1358
|
-
* Lists the project's live previews, newest first by `created_at`.
|
|
1359
|
-
*
|
|
1539
|
+
* Lists the project's live previews, newest first by `created_at`.
|
|
1540
|
+
*
|
|
1541
|
+
* A preview is a URL with a deployment on it, served until it expires.
|
|
1542
|
+
* An expired or removed preview is not listed. What was deployed to it stays
|
|
1360
1543
|
* in `GET /deployments`.
|
|
1361
|
-
* @summary List previews
|
|
1544
|
+
* @summary List a project's previews
|
|
1362
1545
|
*/
|
|
1363
1546
|
const listPreviews = async (projectId, params, options) => {
|
|
1364
1547
|
return customFetch(getListPreviewsUrl(projectId, params), {
|
|
@@ -1367,18 +1550,18 @@ const listPreviews = async (projectId, params, options) => {
|
|
|
1367
1550
|
});
|
|
1368
1551
|
};
|
|
1369
1552
|
const getRemovePreviewUrl = (projectId) => {
|
|
1370
|
-
return `${
|
|
1553
|
+
return `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/previews/remove`;
|
|
1371
1554
|
};
|
|
1372
1555
|
/**
|
|
1373
1556
|
* Ends a preview before it expires: the URL stops being served at once.
|
|
1374
|
-
* The deployments to it stay in the history.
|
|
1375
1557
|
*
|
|
1376
|
-
*
|
|
1377
|
-
*
|
|
1378
|
-
* races the expiry still
|
|
1558
|
+
* The deployments to it stay in the history. The call is idempotent.
|
|
1559
|
+
* A URL with no live preview answers `204` too. That includes one that
|
|
1560
|
+
* expired or was removed before, so a cleanup that races the expiry still
|
|
1561
|
+
* succeeds.
|
|
1379
1562
|
*
|
|
1380
1563
|
* The URL travels in the body rather than the path because an origin
|
|
1381
|
-
* contains `/`.
|
|
1564
|
+
* contains `/`. Take it from `listPreviews` (`GET /projects/{project_id}/previews`).
|
|
1382
1565
|
* @summary Remove a preview
|
|
1383
1566
|
*/
|
|
1384
1567
|
const removePreview = async (projectId, removePreviewBody, options) => {
|
|
@@ -1401,31 +1584,35 @@ const removePreview = async (projectId, removePreviewBody, options) => {
|
|
|
1401
1584
|
});
|
|
1402
1585
|
};
|
|
1403
1586
|
const getCreateSessionUrl = () => {
|
|
1404
|
-
return `${
|
|
1587
|
+
return `${getApiBaseUrl()}/sessions`;
|
|
1405
1588
|
};
|
|
1406
1589
|
/**
|
|
1407
|
-
* Creates an anonymous session
|
|
1590
|
+
* Creates an anonymous session with no user and no factors (`state: building`).
|
|
1591
|
+
*
|
|
1592
|
+
* A session is the durable record of a signed-in user. This call is optional: an
|
|
1593
|
+
* authentication attempt creates a session implicitly if none is provided.
|
|
1594
|
+
* Create one explicitly when you want to:
|
|
1408
1595
|
*
|
|
1409
|
-
*
|
|
1410
|
-
* Use this explicitly when you want to:
|
|
1411
|
-
* - Pre-allocate a `session_id` before the user is known, so device/telemetry signals
|
|
1596
|
+
* - Pre-allocate a `session_id` before the user is known, so device and telemetry signals
|
|
1412
1597
|
* can be correlated with the eventual authenticated session from the start.
|
|
1413
1598
|
* - Track anonymous state (bot detection, device fingerprint) that survives until authentication.
|
|
1414
1599
|
*
|
|
1415
|
-
* Creating a session
|
|
1416
|
-
*
|
|
1417
|
-
*
|
|
1418
|
-
* `
|
|
1419
|
-
* `GET /sessions/me` and `DELETE /sessions/me`
|
|
1420
|
-
* by-id operations `GET /sessions/{session_id}`
|
|
1421
|
-
* are operator endpoints and require
|
|
1600
|
+
* Creating a session runs on the project credential (`session.write`). The returned
|
|
1601
|
+
* `session_token` is a session credential for the end-user client, not a
|
|
1602
|
+
* management scope. It is delivered as the `__Host-zitadel_session` cookie
|
|
1603
|
+
* (`zitadel_session` over plain http to a loopback host) and authorises the
|
|
1604
|
+
* self-service operations `GET /sessions/me` and `DELETE /sessions/me`
|
|
1605
|
+
* (`sessionCookie` scheme). The by-id operations `GET /sessions/{session_id}`
|
|
1606
|
+
* and `DELETE /sessions/{session_id}` are operator endpoints and require
|
|
1607
|
+
* `session.read` / `session.delete` instead.
|
|
1422
1608
|
*
|
|
1423
|
-
* The `session_token` is superseded when a handoff exchange completes
|
|
1424
|
-
* replace it at that point.
|
|
1609
|
+
* The `session_token` is superseded when a handoff exchange completes. Clients
|
|
1610
|
+
* must replace it at that point.
|
|
1425
1611
|
*
|
|
1426
|
-
* Anonymous sessions expire
|
|
1427
|
-
* full session
|
|
1428
|
-
*
|
|
1612
|
+
* Anonymous sessions expire after 10 minutes. The lifetime resets to the
|
|
1613
|
+
* configured full session lifetime when a completing authentication attempt
|
|
1614
|
+
* writes the first authentication factor.
|
|
1615
|
+
* @summary Create an anonymous session
|
|
1429
1616
|
*/
|
|
1430
1617
|
const createSession = async (createSessionBody, options) => {
|
|
1431
1618
|
const getHeaders = (h) => {
|
|
@@ -1452,12 +1639,13 @@ const getQuerySessionsUrl = (params) => {
|
|
|
1452
1639
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1453
1640
|
});
|
|
1454
1641
|
const stringifiedParams = normalizedParams.toString();
|
|
1455
|
-
return stringifiedParams.length > 0 ? `${
|
|
1642
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/sessions/query?${stringifiedParams}` : `${getApiBaseUrl()}/sessions/query`;
|
|
1456
1643
|
};
|
|
1457
1644
|
/**
|
|
1458
|
-
* Returns
|
|
1645
|
+
* Returns a page of a project's sessions.
|
|
1646
|
+
*
|
|
1459
1647
|
* Sessions of every lifecycle state are returned; each carries its `state`.
|
|
1460
|
-
* Requires `session.read`
|
|
1648
|
+
* Requires the `session.read` scope.
|
|
1461
1649
|
* @summary Query sessions
|
|
1462
1650
|
*/
|
|
1463
1651
|
const querySessions = async (querySessionsBody, params, options) => {
|
|
@@ -1485,34 +1673,41 @@ const getExchangeHandoffUrl = (params) => {
|
|
|
1485
1673
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1486
1674
|
});
|
|
1487
1675
|
const stringifiedParams = normalizedParams.toString();
|
|
1488
|
-
return stringifiedParams.length > 0 ? `${
|
|
1676
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/sessions/exchange?${stringifiedParams}` : `${getApiBaseUrl()}/sessions/exchange`;
|
|
1489
1677
|
};
|
|
1490
1678
|
/**
|
|
1491
|
-
*
|
|
1492
|
-
*
|
|
1679
|
+
* Exchanges a handoff token for a session and a `session_token`.
|
|
1680
|
+
*
|
|
1681
|
+
* A handoff token is the short-lived, single-use credential that
|
|
1682
|
+
* `createHandoff` (`POST /auth_attempts/{attempt_id}/handoff`) returns as `handoff_token` once an authentication attempt is
|
|
1683
|
+
* complete. This call consumes it. It is the last step of the sign-in sequence:
|
|
1684
|
+
* create the attempt, issue a challenge, verify the proof, create the handoff,
|
|
1685
|
+
* exchange it.
|
|
1493
1686
|
*
|
|
1494
|
-
* The server resolves the originating
|
|
1687
|
+
* The server resolves the originating authentication attempt from the token and then:
|
|
1495
1688
|
*
|
|
1496
|
-
* | Originating
|
|
1689
|
+
* | Originating authentication attempt | Outcome |
|
|
1497
1690
|
* |---|---|
|
|
1498
1691
|
* | No `session_id` | A new authenticated session is **created**. |
|
|
1499
|
-
* | `session_id` points to an anonymous
|
|
1500
|
-
* | `session_id` points to an active session (step-up) | Existing session is **upgraded
|
|
1692
|
+
* | `session_id` points to an anonymous session | Existing session is **upgraded**: user and factors written in, lifetime reset to the full session lifetime. |
|
|
1693
|
+
* | `session_id` points to an active session (step-up) | Existing session is **upgraded**: new factors merged, `assurance_levels[]` expanded. |
|
|
1501
1694
|
*
|
|
1502
1695
|
* The response shape is identical in all three cases.
|
|
1503
1696
|
*
|
|
1504
|
-
* The `session_token` supersedes any previously issued `session_token` for the
|
|
1505
|
-
* Clients must replace their stored token at this point.
|
|
1697
|
+
* The `session_token` supersedes any previously issued `session_token` for the
|
|
1698
|
+
* same session. Clients must replace their stored token at this point.
|
|
1506
1699
|
*
|
|
1507
|
-
* Requires a project service key (OAuth2 client credentials).
|
|
1700
|
+
* Requires a project service key (OAuth2 client credentials). The project comes
|
|
1701
|
+
* from the project secret. A query `project_id` that disagrees answers `403`
|
|
1702
|
+
* with `proj.mismatch`.
|
|
1508
1703
|
*
|
|
1509
|
-
* The
|
|
1510
|
-
*
|
|
1511
|
-
*
|
|
1512
|
-
*
|
|
1513
|
-
* `
|
|
1514
|
-
* `rel.revoked`.
|
|
1515
|
-
* @summary Exchange handoff token for a session
|
|
1704
|
+
* The exchange resolves a deployment the same way as other runtime operations.
|
|
1705
|
+
* A deployment makes a release live, and a release is the configuration that
|
|
1706
|
+
* `zitadel deploy` publishes. With no browser `Origin` and
|
|
1707
|
+
* nothing deployed to the resolved target, the response is `409` with
|
|
1708
|
+
* `rel.not_deployed`: run `zitadel deploy`, then retry. A revoked release
|
|
1709
|
+
* answers `409` with `rel.revoked`.
|
|
1710
|
+
* @summary Exchange a handoff token for a session
|
|
1516
1711
|
*/
|
|
1517
1712
|
const exchangeHandoff = async (exchangeHandoffBody, params, options) => {
|
|
1518
1713
|
const getHeaders = (h) => {
|
|
@@ -1534,16 +1729,17 @@ const exchangeHandoff = async (exchangeHandoffBody, params, options) => {
|
|
|
1534
1729
|
});
|
|
1535
1730
|
};
|
|
1536
1731
|
const getGetSessionUrl = (sessionId) => {
|
|
1537
|
-
return `${
|
|
1732
|
+
return `${getApiBaseUrl()}/sessions/${encodeURIComponent(String(sessionId))}`;
|
|
1538
1733
|
};
|
|
1539
1734
|
/**
|
|
1540
|
-
* Returns the current state of a session including its factors and all currently
|
|
1541
|
-
* satisfied assurance levels.
|
|
1735
|
+
* Returns the current state of a session, including its factors and all currently satisfied assurance levels.
|
|
1542
1736
|
*
|
|
1543
|
-
*
|
|
1544
|
-
*
|
|
1545
|
-
*
|
|
1546
|
-
*
|
|
1737
|
+
* An assurance level is a profile, such as `urn:nist:aal:2`, that the
|
|
1738
|
+
* session's verified factors satisfy. `assurance_levels[]` may shrink over time
|
|
1739
|
+
* as factor freshness windows expire, without the session itself expiring.
|
|
1740
|
+
* To restore a dropped level, use step-up authentication: create an
|
|
1741
|
+
* authentication attempt with the same `session_id`.
|
|
1742
|
+
* @summary Get a session by ID
|
|
1547
1743
|
*/
|
|
1548
1744
|
const getSession = async (sessionId, options) => {
|
|
1549
1745
|
return customFetch(getGetSessionUrl(sessionId), {
|
|
@@ -1552,19 +1748,20 @@ const getSession = async (sessionId, options) => {
|
|
|
1552
1748
|
});
|
|
1553
1749
|
};
|
|
1554
1750
|
const getRevokeSessionUrl = (sessionId) => {
|
|
1555
|
-
return `${
|
|
1751
|
+
return `${getApiBaseUrl()}/sessions/${encodeURIComponent(String(sessionId))}`;
|
|
1556
1752
|
};
|
|
1557
1753
|
/**
|
|
1558
|
-
*
|
|
1754
|
+
* Revokes a session by deleting it, immediately and for good. A later
|
|
1755
|
+
* `getSession` (`GET /sessions/{session_id}`) for it answers `404`.
|
|
1559
1756
|
*
|
|
1560
|
-
* This is the operator revoke path
|
|
1561
|
-
* project-bound credential. End-user
|
|
1562
|
-
* `DELETE /sessions/me` (`
|
|
1757
|
+
* This is the operator revoke path. It requires the `session.delete` scope on a
|
|
1758
|
+
* project-bound credential. End-user sign-out with the session cookie is
|
|
1759
|
+
* `DELETE /sessions/me` (`sessionCookie` scheme).
|
|
1563
1760
|
*
|
|
1564
|
-
* Idempotent:
|
|
1565
|
-
* still returns 204
|
|
1761
|
+
* Idempotent: revoking a session that does not exist, or was already revoked,
|
|
1762
|
+
* still returns `204`. After revocation, any tokens derived from the session are
|
|
1566
1763
|
* invalidated.
|
|
1567
|
-
* @summary Revoke session
|
|
1764
|
+
* @summary Revoke a session
|
|
1568
1765
|
*/
|
|
1569
1766
|
const revokeSession = async (sessionId, options) => {
|
|
1570
1767
|
return customFetch(getRevokeSessionUrl(sessionId), {
|
|
@@ -1578,18 +1775,19 @@ const getGetMySessionUrl = (params) => {
|
|
|
1578
1775
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1579
1776
|
});
|
|
1580
1777
|
const stringifiedParams = normalizedParams.toString();
|
|
1581
|
-
return stringifiedParams.length > 0 ? `${
|
|
1778
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/sessions/me?${stringifiedParams}` : `${getApiBaseUrl()}/sessions/me`;
|
|
1582
1779
|
};
|
|
1583
1780
|
/**
|
|
1584
|
-
* Returns the current state of the
|
|
1585
|
-
* satisfied assurance levels.
|
|
1781
|
+
* Returns the current state of the caller's session, including its factors and all currently satisfied assurance levels.
|
|
1586
1782
|
*
|
|
1587
1783
|
* With `project_id`, the session is returned only when it belongs to that project.
|
|
1588
1784
|
*
|
|
1589
|
-
*
|
|
1590
|
-
*
|
|
1591
|
-
*
|
|
1592
|
-
*
|
|
1785
|
+
* An assurance level is a profile, such as `urn:nist:aal:2`, that the
|
|
1786
|
+
* session's verified factors satisfy. `assurance_levels[]` may shrink over time
|
|
1787
|
+
* as factor freshness windows expire, without the session itself expiring.
|
|
1788
|
+
* To restore a dropped level, use step-up authentication: create an
|
|
1789
|
+
* authentication attempt with the same `session_id`.
|
|
1790
|
+
* @summary Get my session
|
|
1593
1791
|
*/
|
|
1594
1792
|
const getMySession = async (params, options) => {
|
|
1595
1793
|
return customFetch(getGetMySessionUrl(params), {
|
|
@@ -1603,18 +1801,18 @@ const getRevokeMySessionUrl = (params) => {
|
|
|
1603
1801
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1604
1802
|
});
|
|
1605
1803
|
const stringifiedParams = normalizedParams.toString();
|
|
1606
|
-
return stringifiedParams.length > 0 ? `${
|
|
1804
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/sessions/me?${stringifiedParams}` : `${getApiBaseUrl()}/sessions/me`;
|
|
1607
1805
|
};
|
|
1608
1806
|
/**
|
|
1609
|
-
*
|
|
1807
|
+
* Revokes the caller's own session by deleting it, which signs the user out.
|
|
1610
1808
|
*
|
|
1611
|
-
* The
|
|
1612
|
-
* exchange)
|
|
1613
|
-
* in the `X-Zitadel-CSRF` header. Idempotent: if the session is already gone
|
|
1614
|
-
* this still returns 204
|
|
1615
|
-
* and the
|
|
1809
|
+
* The request needs the session cookie issued at creation (or superseded by a
|
|
1810
|
+
* handoff exchange). It also needs the session's CSRF token from
|
|
1811
|
+
* `GET /sessions/me/csrf` in the `X-Zitadel-CSRF` header. Idempotent: if the session is already gone,
|
|
1812
|
+
* this still returns `204`. Any tokens derived from the session are
|
|
1813
|
+
* invalidated, and the response clears the cookie.
|
|
1616
1814
|
*
|
|
1617
|
-
* With `project_id`, only a session of that project is
|
|
1815
|
+
* With `project_id`, only a session of that project is revoked. A session of
|
|
1618
1816
|
* another project is left alone, and so is its cookie.
|
|
1619
1817
|
* @summary Revoke my session
|
|
1620
1818
|
*/
|
|
@@ -1630,16 +1828,16 @@ const getGetMySessionCsrfTokenUrl = (params) => {
|
|
|
1630
1828
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1631
1829
|
});
|
|
1632
1830
|
const stringifiedParams = normalizedParams.toString();
|
|
1633
|
-
return stringifiedParams.length > 0 ? `${
|
|
1831
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/sessions/me/csrf?${stringifiedParams}` : `${getApiBaseUrl()}/sessions/me/csrf`;
|
|
1634
1832
|
};
|
|
1635
1833
|
/**
|
|
1636
|
-
* Returns the session-bound token
|
|
1637
|
-
* (
|
|
1638
|
-
* state-changing requests the session cookie authenticates that
|
|
1639
|
-
*
|
|
1640
|
-
* HttpOnly cookie is still the credential, and a cross-site page
|
|
1641
|
-
* read this response. It stays the same for the life of the session,
|
|
1642
|
-
* client fetches it once per session.
|
|
1834
|
+
* Returns the session-bound token that protects against cross-site request
|
|
1835
|
+
* forgery (CSRF). Browser code sends it in the `X-Zitadel-CSRF` header on the
|
|
1836
|
+
* state-changing requests that the session cookie authenticates and that
|
|
1837
|
+
* require it; see the `sessionCookie` scheme. It authorizes nothing on its
|
|
1838
|
+
* own: the HttpOnly cookie is still the credential, and a cross-site page
|
|
1839
|
+
* cannot read this response. It stays the same for the life of the session,
|
|
1840
|
+
* so a client fetches it once per session.
|
|
1643
1841
|
*
|
|
1644
1842
|
* With `project_id`, the token is returned only when the session belongs to
|
|
1645
1843
|
* that project.
|
|
@@ -1657,19 +1855,24 @@ const getCreateSchemaUrl = (params) => {
|
|
|
1657
1855
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1658
1856
|
});
|
|
1659
1857
|
const stringifiedParams = normalizedParams.toString();
|
|
1660
|
-
return stringifiedParams.length > 0 ? `${
|
|
1858
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/schemas?${stringifiedParams}` : `${getApiBaseUrl()}/schemas`;
|
|
1661
1859
|
};
|
|
1662
1860
|
/**
|
|
1663
|
-
*
|
|
1664
|
-
*
|
|
1665
|
-
*
|
|
1666
|
-
*
|
|
1667
|
-
*
|
|
1668
|
-
*
|
|
1861
|
+
* Creates a user schema, the JSON Schema that says which attributes a user
|
|
1862
|
+
* has and which attribute identifies the user.
|
|
1863
|
+
*
|
|
1864
|
+
* The request is either a user schema (`kind: user-schema`) or a schema URL
|
|
1865
|
+
* (`kind: schema-url`) that the server resolves. The response's `id` is what
|
|
1866
|
+
* `createUser` (`POST /users`) takes as `schema`.
|
|
1669
1867
|
*
|
|
1670
|
-
* The
|
|
1671
|
-
* schema
|
|
1672
|
-
*
|
|
1868
|
+
* The optional `$id` is the JSON Schema document URI that identifies the
|
|
1869
|
+
* schema in later requests. It is a stable identity for GitOps, not a
|
|
1870
|
+
* free-form resource key. When `$id` is omitted, the server generates a
|
|
1871
|
+
* `sch_*` URL. When provided, `$id` must be unique within the project and
|
|
1872
|
+
* should ideally be a valid URI pointing at where the schema can be accessed.
|
|
1873
|
+
* A `$id` that already exists in the project is refused; pick another or
|
|
1874
|
+
* omit it.
|
|
1875
|
+
* @summary Create a schema
|
|
1673
1876
|
*/
|
|
1674
1877
|
const createSchema = async (createSchemaBody, params, options) => {
|
|
1675
1878
|
const getHeaders = (h) => {
|
|
@@ -1702,12 +1905,15 @@ const getListSchemasUrl = (params) => {
|
|
|
1702
1905
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1703
1906
|
});
|
|
1704
1907
|
const stringifiedParams = normalizedParams.toString();
|
|
1705
|
-
return stringifiedParams.length > 0 ? `${
|
|
1908
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/schemas?${stringifiedParams}` : `${getApiBaseUrl()}/schemas`;
|
|
1706
1909
|
};
|
|
1707
1910
|
/**
|
|
1708
|
-
*
|
|
1709
|
-
*
|
|
1710
|
-
*
|
|
1911
|
+
* Lists the schemas of a project, newest first, paginated with a cursor.
|
|
1912
|
+
* Filter by `object_type` or `kind`, and choose which revisions to return
|
|
1913
|
+
* with `revisions`.
|
|
1914
|
+
*
|
|
1915
|
+
* A schema's `id` is what `createUser` (`POST /users`) takes as `schema`.
|
|
1916
|
+
* @summary List schemas
|
|
1711
1917
|
*/
|
|
1712
1918
|
const listSchemas = async (params, options) => {
|
|
1713
1919
|
return customFetch(getListSchemasUrl(params), {
|
|
@@ -1721,20 +1927,20 @@ const getGetSchemaByIdUrl = (id, params) => {
|
|
|
1721
1927
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1722
1928
|
});
|
|
1723
1929
|
const stringifiedParams = normalizedParams.toString();
|
|
1724
|
-
return stringifiedParams.length > 0 ? `${
|
|
1930
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/schemas/${encodeURIComponent(String(id))}?${stringifiedParams}` : `${getApiBaseUrl()}/schemas/${encodeURIComponent(String(id))}`;
|
|
1725
1931
|
};
|
|
1726
1932
|
/**
|
|
1727
|
-
*
|
|
1933
|
+
* Returns a schema by ID. A schema ID identifies one immutable revision, so
|
|
1728
1934
|
* this returns exactly that revision. To find the current revision of an
|
|
1729
|
-
* object type,
|
|
1935
|
+
* object type, call `listSchemas` (`GET /schemas`) with `revisions=latest`.
|
|
1730
1936
|
*
|
|
1731
1937
|
* Schema IDs are unique within a project, not across projects (the seeded
|
|
1732
|
-
* default schema carries the same `$id` in every project). A
|
|
1938
|
+
* default schema carries the same `$id` in every project). A console
|
|
1733
1939
|
* session that manages more than one project names the project with
|
|
1734
1940
|
* `project_id`; without it, the ID is resolved in the credential's own
|
|
1735
1941
|
* project when it is ambiguous. A project secret always resolves in its
|
|
1736
1942
|
* own project and ignores `project_id`.
|
|
1737
|
-
* @summary Get schema by ID
|
|
1943
|
+
* @summary Get a schema by ID
|
|
1738
1944
|
*/
|
|
1739
1945
|
const getSchemaById = async (id, params, options) => {
|
|
1740
1946
|
return customFetch(getGetSchemaByIdUrl(id, params), {
|
|
@@ -1743,20 +1949,25 @@ const getSchemaById = async (id, params, options) => {
|
|
|
1743
1949
|
});
|
|
1744
1950
|
};
|
|
1745
1951
|
const getCreateFlowDefinitionUrl = () => {
|
|
1746
|
-
return `${
|
|
1952
|
+
return `${getApiBaseUrl()}/flow_definitions`;
|
|
1747
1953
|
};
|
|
1748
1954
|
/**
|
|
1749
|
-
*
|
|
1750
|
-
*
|
|
1751
|
-
*
|
|
1955
|
+
* Creates a flow definition by publishing a new revision of it. It records a
|
|
1956
|
+
* `flowdef.created` event.
|
|
1957
|
+
*
|
|
1958
|
+
* A [flow definition](https://preview.zitadel.com/docs/concepts/flows-and-schemas) is a template that
|
|
1959
|
+
* defines the sequence of steps (capabilities) for one user journey, such as
|
|
1960
|
+
* registration, login or password reset. The body follows the flow
|
|
1961
|
+
* definition schema, which includes the flow's purpose, audience and steps.
|
|
1752
1962
|
*
|
|
1753
|
-
*
|
|
1963
|
+
* Every call allocates a new opaque ID. That `id` is the `revision_id` a
|
|
1964
|
+
* release pins for `kind: flow_definition`.
|
|
1754
1965
|
*
|
|
1755
|
-
*
|
|
1756
|
-
* `name
|
|
1757
|
-
*
|
|
1758
|
-
*
|
|
1759
|
-
* @summary Create a
|
|
1966
|
+
* Revisions of one flow share its `name`. Posting a definition under an
|
|
1967
|
+
* existing `name` publishes a new revision of that flow, which is not a
|
|
1968
|
+
* conflict. List with `name` to see a flow's revisions, newest by creation
|
|
1969
|
+
* time first.
|
|
1970
|
+
* @summary Create a flow definition
|
|
1760
1971
|
*/
|
|
1761
1972
|
const createFlowDefinition = async (createFlowDefinitionBody, options) => {
|
|
1762
1973
|
const getHeaders = (h) => {
|
|
@@ -1789,12 +2000,15 @@ const getListFlowDefinitionsUrl = (params) => {
|
|
|
1789
2000
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1790
2001
|
});
|
|
1791
2002
|
const stringifiedParams = normalizedParams.toString();
|
|
1792
|
-
return stringifiedParams.length > 0 ? `${
|
|
2003
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/flow_definitions?${stringifiedParams}` : `${getApiBaseUrl()}/flow_definitions`;
|
|
1793
2004
|
};
|
|
1794
2005
|
/**
|
|
1795
|
-
*
|
|
1796
|
-
*
|
|
1797
|
-
*
|
|
2006
|
+
* Lists the project's flow definitions with their configurations, newest by
|
|
2007
|
+
* creation time first. A flow definition sets which step of a sign-in
|
|
2008
|
+
* renders when, and which fields each step collects.
|
|
2009
|
+
*
|
|
2010
|
+
* The `id` of an entry is the flow definition ID that `getFlowDefinition` (`GET /flow_definitions/{id}`)
|
|
2011
|
+
* takes. Filter by `name` to list the revisions of one flow.
|
|
1798
2012
|
* @summary List flow definitions
|
|
1799
2013
|
*/
|
|
1800
2014
|
const listFlowDefinitions = async (params, options) => {
|
|
@@ -1804,11 +2018,12 @@ const listFlowDefinitions = async (params, options) => {
|
|
|
1804
2018
|
});
|
|
1805
2019
|
};
|
|
1806
2020
|
const getGetFlowDefinitionUrl = (id) => {
|
|
1807
|
-
return `${
|
|
2021
|
+
return `${getApiBaseUrl()}/flow_definitions/${encodeURIComponent(String(id))}`;
|
|
1808
2022
|
};
|
|
1809
2023
|
/**
|
|
1810
|
-
*
|
|
1811
|
-
*
|
|
2024
|
+
* Returns one flow definition revision. Pass the `id` that
|
|
2025
|
+
* `createFlowDefinition` (`POST /flow_definitions`) or `listFlowDefinitions` (`GET /flow_definitions`) returns.
|
|
2026
|
+
* @summary Get a flow definition by ID
|
|
1812
2027
|
*/
|
|
1813
2028
|
const getFlowDefinition = async (id, options) => {
|
|
1814
2029
|
return customFetch(getGetFlowDefinitionUrl(id), {
|
|
@@ -1822,14 +2037,15 @@ const getCreateTeamUrl = (params) => {
|
|
|
1822
2037
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1823
2038
|
});
|
|
1824
2039
|
const stringifiedParams = normalizedParams.toString();
|
|
1825
|
-
return stringifiedParams.length > 0 ? `${
|
|
2040
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/teams?${stringifiedParams}` : `${getApiBaseUrl()}/teams`;
|
|
1826
2041
|
};
|
|
1827
2042
|
/**
|
|
1828
2043
|
* Creates a team in the project, with a name no other team in the project has.
|
|
1829
2044
|
*
|
|
1830
|
-
* A
|
|
1831
|
-
*
|
|
1832
|
-
*
|
|
2045
|
+
* A team groups users inside a project and can represent a customer. A taken
|
|
2046
|
+
* name is refused with `409 team.already_exists`: choose another name. The
|
|
2047
|
+
* new team has no members yet.
|
|
2048
|
+
* @summary Create a team
|
|
1833
2049
|
*/
|
|
1834
2050
|
const createTeam = async (createTeamBody, params, options) => {
|
|
1835
2051
|
const getHeaders = (h) => {
|
|
@@ -1856,10 +2072,14 @@ const getQueryTeamsUrl = (params) => {
|
|
|
1856
2072
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1857
2073
|
});
|
|
1858
2074
|
const stringifiedParams = normalizedParams.toString();
|
|
1859
|
-
return stringifiedParams.length > 0 ? `${
|
|
2075
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/teams/query?${stringifiedParams}` : `${getApiBaseUrl()}/teams/query`;
|
|
1860
2076
|
};
|
|
1861
2077
|
/**
|
|
1862
|
-
* Returns
|
|
2078
|
+
* Returns a page of a project's teams.
|
|
2079
|
+
*
|
|
2080
|
+
* Pass the response's `next_page_token` as `page_token` to fetch the next
|
|
2081
|
+
* page. `project_id` names the project to list; without it, the credential's
|
|
2082
|
+
* own project is listed.
|
|
1863
2083
|
* @summary Query teams
|
|
1864
2084
|
*/
|
|
1865
2085
|
const queryTeams = async (queryTeamsBody, params, options) => {
|
|
@@ -1882,11 +2102,13 @@ const queryTeams = async (queryTeamsBody, params, options) => {
|
|
|
1882
2102
|
});
|
|
1883
2103
|
};
|
|
1884
2104
|
const getGetTeamUrl = (teamId) => {
|
|
1885
|
-
return `${
|
|
2105
|
+
return `${getApiBaseUrl()}/teams/${encodeURIComponent(String(teamId))}`;
|
|
1886
2106
|
};
|
|
1887
2107
|
/**
|
|
1888
|
-
* Returns a
|
|
1889
|
-
*
|
|
2108
|
+
* Returns a team, a group of users inside a project, by ID.
|
|
2109
|
+
*
|
|
2110
|
+
* A deactivated team is still returned, with status `deactivated`.
|
|
2111
|
+
* @summary Get a team by ID
|
|
1890
2112
|
*/
|
|
1891
2113
|
const getTeam = async (teamId, options) => {
|
|
1892
2114
|
return customFetch(getGetTeamUrl(teamId), {
|
|
@@ -1895,23 +2117,23 @@ const getTeam = async (teamId, options) => {
|
|
|
1895
2117
|
});
|
|
1896
2118
|
};
|
|
1897
2119
|
const getDeleteTeamUrl = (teamId) => {
|
|
1898
|
-
return `${
|
|
2120
|
+
return `${getApiBaseUrl()}/teams/${encodeURIComponent(String(teamId))}`;
|
|
1899
2121
|
};
|
|
1900
2122
|
/**
|
|
1901
|
-
* Deactivates
|
|
2123
|
+
* Deactivates a team and removes its memberships.
|
|
1902
2124
|
*
|
|
1903
|
-
* The team is
|
|
1904
|
-
*
|
|
1905
|
-
*
|
|
2125
|
+
* The team is kept rather than erased: `getTeam` (`GET /teams/{team_id}`) still returns it with
|
|
2126
|
+
* status `deactivated`. The users whose lifecycle the team owns are
|
|
2127
|
+
* deactivated with it.
|
|
1906
2128
|
*
|
|
1907
2129
|
* The request is idempotent. Deleting a team that is already deactivated
|
|
1908
|
-
* or
|
|
2130
|
+
* or does not exist succeeds without changing anything.
|
|
1909
2131
|
*
|
|
1910
|
-
* A team that still owns a project is refused with `409
|
|
1911
|
-
*
|
|
1912
|
-
*
|
|
1913
|
-
*
|
|
1914
|
-
* @summary
|
|
2132
|
+
* A team that still owns a project is refused with `409 team.owns_project`.
|
|
2133
|
+
* Deactivating it would leave the project owned by a deactivated team and so
|
|
2134
|
+
* unmanageable. No endpoint ends a team's ownership of a project yet, so for
|
|
2135
|
+
* now such a team cannot be deactivated through the API.
|
|
2136
|
+
* @summary Deactivate a team
|
|
1915
2137
|
*/
|
|
1916
2138
|
const deleteTeam = async (teamId, options) => {
|
|
1917
2139
|
return customFetch(getDeleteTeamUrl(teamId), {
|
|
@@ -1920,11 +2142,15 @@ const deleteTeam = async (teamId, options) => {
|
|
|
1920
2142
|
});
|
|
1921
2143
|
};
|
|
1922
2144
|
const getUpdateTeamUrl = (teamId) => {
|
|
1923
|
-
return `${
|
|
2145
|
+
return `${getApiBaseUrl()}/teams/${encodeURIComponent(String(teamId))}`;
|
|
1924
2146
|
};
|
|
1925
2147
|
/**
|
|
1926
|
-
*
|
|
1927
|
-
*
|
|
2148
|
+
* Renames an active team.
|
|
2149
|
+
*
|
|
2150
|
+
* Only active teams can be updated. A deactivated team answers `404`. The new
|
|
2151
|
+
* name must be unique within the project, and a taken name answers `409`:
|
|
2152
|
+
* choose another name.
|
|
2153
|
+
* @summary Update a team
|
|
1928
2154
|
*/
|
|
1929
2155
|
const updateTeam = async (teamId, updateTeamBody, options) => {
|
|
1930
2156
|
const getHeaders = (h) => {
|
|
@@ -1951,18 +2177,22 @@ const getCreateBrandingUrl = (params) => {
|
|
|
1951
2177
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1952
2178
|
});
|
|
1953
2179
|
const stringifiedParams = normalizedParams.toString();
|
|
1954
|
-
return stringifiedParams.length > 0 ? `${
|
|
2180
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/branding?${stringifiedParams}` : `${getApiBaseUrl()}/branding`;
|
|
1955
2181
|
};
|
|
1956
2182
|
/**
|
|
1957
|
-
* Publishes a new immutable branding revision for the project
|
|
1958
|
-
* revisions cannot be updated or deleted
|
|
1959
|
-
*
|
|
2183
|
+
* Publishes a new immutable branding revision for the project, and records a
|
|
2184
|
+
* `branding.created` event. Branding revisions cannot be updated or deleted.
|
|
2185
|
+
* Every edit publishes a new revision. Flow responses carry the branding
|
|
2186
|
+
* revision the request's release pins.
|
|
2187
|
+
*
|
|
2188
|
+
* The `id` of the new revision is the revision ID a release pins for
|
|
2189
|
+
* `kind: branding`.
|
|
1960
2190
|
*
|
|
1961
2191
|
* The `liquid_template` is validated lexically on save (size, encoding,
|
|
1962
2192
|
* banned patterns such as `<script>` tags, inline event handlers, and the
|
|
1963
2193
|
* `| raw` filter). Authoritative LiquidJS validation runs at authoring
|
|
1964
|
-
* time
|
|
1965
|
-
* @summary Publish a
|
|
2194
|
+
* time, in `zitadel deploy` and `zitadel deploy --dry-run`.
|
|
2195
|
+
* @summary Publish a branding revision
|
|
1966
2196
|
*/
|
|
1967
2197
|
const createBranding = async (createBrandingBody, params, options) => {
|
|
1968
2198
|
const getHeaders = (h) => {
|
|
@@ -1989,14 +2219,14 @@ const getListBrandingUrl = (params) => {
|
|
|
1989
2219
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1990
2220
|
});
|
|
1991
2221
|
const stringifiedParams = normalizedParams.toString();
|
|
1992
|
-
return stringifiedParams.length > 0 ? `${
|
|
2222
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/branding?${stringifiedParams}` : `${getApiBaseUrl()}/branding`;
|
|
1993
2223
|
};
|
|
1994
2224
|
/**
|
|
1995
|
-
* Lists branding revisions
|
|
1996
|
-
*
|
|
1997
|
-
*
|
|
1998
|
-
*
|
|
1999
|
-
*
|
|
2225
|
+
* Lists a project's branding revisions, newest first, capped at the 100 most
|
|
2226
|
+
* recent and not paginated. The first entry is the newest revision.
|
|
2227
|
+
*
|
|
2228
|
+
* The `id` of an entry is the revision ID that `getBrandingById` (`GET /branding/{id}`) takes and
|
|
2229
|
+
* that a release pins for `kind: branding`.
|
|
2000
2230
|
* @summary List branding revisions
|
|
2001
2231
|
*/
|
|
2002
2232
|
const listBranding = async (params, options) => {
|
|
@@ -2006,10 +2236,11 @@ const listBranding = async (params, options) => {
|
|
|
2006
2236
|
});
|
|
2007
2237
|
};
|
|
2008
2238
|
const getGetBrandingByIdUrl = (id) => {
|
|
2009
|
-
return `${
|
|
2239
|
+
return `${getApiBaseUrl()}/branding/${encodeURIComponent(String(id))}`;
|
|
2010
2240
|
};
|
|
2011
2241
|
/**
|
|
2012
|
-
*
|
|
2242
|
+
* Returns one branding revision, including its stored configuration. Pass the
|
|
2243
|
+
* `id` that `createBranding` (`POST /branding`) or `listBranding` (`GET /branding`) returns.
|
|
2013
2244
|
* @summary Get a branding revision by ID
|
|
2014
2245
|
*/
|
|
2015
2246
|
const getBrandingById = async (id, options) => {
|
|
@@ -2024,20 +2255,22 @@ const getCreateIdpUrl = (params) => {
|
|
|
2024
2255
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2025
2256
|
});
|
|
2026
2257
|
const stringifiedParams = normalizedParams.toString();
|
|
2027
|
-
return stringifiedParams.length > 0 ? `${
|
|
2258
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/idps?${stringifiedParams}` : `${getApiBaseUrl()}/idps`;
|
|
2028
2259
|
};
|
|
2029
2260
|
/**
|
|
2030
|
-
* Creates or revises
|
|
2031
|
-
*
|
|
2032
|
-
*
|
|
2261
|
+
* Creates or revises an identity provider, an external sign-in such as
|
|
2262
|
+
* Google, from its connection document. If the slug does not already exist,
|
|
2263
|
+
* a new identity provider is created. If one with that slug already exists,
|
|
2264
|
+
* a revision is created.
|
|
2033
2265
|
*
|
|
2034
|
-
* A revision gets a new `revision_id` and does not modify the
|
|
2035
|
-
* `id
|
|
2036
|
-
*
|
|
2266
|
+
* A revision gets a new `revision_id` and does not modify the identity
|
|
2267
|
+
* provider's `id`. Identity links, which tie a user to an account at the
|
|
2268
|
+
* provider, keep resolving. Releases and authentication attempts stay pinned
|
|
2269
|
+
* to the revision they captured.
|
|
2037
2270
|
*
|
|
2038
|
-
* Identity fields are fixed for the life of the
|
|
2039
|
-
* that changes one is rejected: `protocol`, `subject_claim`, and
|
|
2040
|
-
* the field that names the authority. Their values decide which provider
|
|
2271
|
+
* Identity fields are fixed for the life of the identity provider and a
|
|
2272
|
+
* revision that changes one is rejected: `protocol`, `subject_claim`, and
|
|
2273
|
+
* `issuer`, the field that names the authority. Their values decide which provider
|
|
2041
2274
|
* account a stored subject belongs to, so changing one would silently
|
|
2042
2275
|
* repoint existing identities at a different provider.
|
|
2043
2276
|
*
|
|
@@ -2048,18 +2281,18 @@ const getCreateIdpUrl = (params) => {
|
|
|
2048
2281
|
* OIDC is the only protocol.
|
|
2049
2282
|
*
|
|
2050
2283
|
* The document is validated against the `idp-connection.json` schema before
|
|
2051
|
-
* anything is stored. The rules the
|
|
2052
|
-
* then run on the document, so a
|
|
2053
|
-
* refused here
|
|
2054
|
-
*
|
|
2055
|
-
*
|
|
2056
|
-
*
|
|
2284
|
+
* anything is stored. The rules the server applies when it starts a sign-in
|
|
2285
|
+
* then run on the document, so a document that could never start one is
|
|
2286
|
+
* refused here with `idp.endpoints_partial`: the OIDC block sets an endpoint
|
|
2287
|
+
* without the others. Set no endpoint, and discovery fills them, or set
|
|
2288
|
+
* `authorization_endpoint`, `token_endpoint`, `jwks_uri`, and
|
|
2289
|
+
* `userinfo_endpoint`. `userinfo_endpoint` may be left out when
|
|
2057
2290
|
* `id_token_mapping` is on, but setting it alone still counts as setting an
|
|
2058
2291
|
* endpoint. The details list the missing endpoints.
|
|
2059
2292
|
*
|
|
2060
2293
|
* A refused document stores nothing, and on a revise the current revision
|
|
2061
2294
|
* stays unchanged.
|
|
2062
|
-
* @summary Create or revise an identity provider
|
|
2295
|
+
* @summary Create or revise an identity provider
|
|
2063
2296
|
*/
|
|
2064
2297
|
const createIdp = async (createIdpBody, params, options) => {
|
|
2065
2298
|
const getHeaders = (h) => {
|
|
@@ -2086,12 +2319,13 @@ const getQueryIdpsUrl = (params) => {
|
|
|
2086
2319
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2087
2320
|
});
|
|
2088
2321
|
const stringifiedParams = normalizedParams.toString();
|
|
2089
|
-
return stringifiedParams.length > 0 ? `${
|
|
2322
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/idps/query?${stringifiedParams}` : `${getApiBaseUrl()}/idps/query`;
|
|
2090
2323
|
};
|
|
2091
2324
|
/**
|
|
2092
|
-
* Returns the identity
|
|
2093
|
-
* cursor.
|
|
2094
|
-
*
|
|
2325
|
+
* Returns the identity providers of a project, external sign-ins such as
|
|
2326
|
+
* Google, paginated with a cursor. Each identity provider appears once, with
|
|
2327
|
+
* its newest revision.
|
|
2328
|
+
* @summary Query identity providers
|
|
2095
2329
|
*/
|
|
2096
2330
|
const queryIdps = async (queryIdpsBody, params, options) => {
|
|
2097
2331
|
const getHeaders = (h) => {
|
|
@@ -2118,14 +2352,15 @@ const getGetIdpByIdUrl = (id, params) => {
|
|
|
2118
2352
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2119
2353
|
});
|
|
2120
2354
|
const stringifiedParams = normalizedParams.toString();
|
|
2121
|
-
return stringifiedParams.length > 0 ? `${
|
|
2355
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/idps/${encodeURIComponent(String(id))}?${stringifiedParams}` : `${getApiBaseUrl()}/idps/${encodeURIComponent(String(id))}`;
|
|
2122
2356
|
};
|
|
2123
2357
|
/**
|
|
2124
|
-
*
|
|
2125
|
-
* `GET /idps/{id}/revisions` lists
|
|
2358
|
+
* Returns an identity provider, an external sign-in such as Google, by ID at
|
|
2359
|
+
* its newest revision. `listIdpRevisions` (`GET /idps/{id}/revisions`) lists
|
|
2360
|
+
* every revision of it.
|
|
2126
2361
|
*
|
|
2127
2362
|
* The lookup is scoped to the project in `project_id`.
|
|
2128
|
-
* @summary Get an identity provider
|
|
2363
|
+
* @summary Get an identity provider by ID
|
|
2129
2364
|
*/
|
|
2130
2365
|
const getIdpById = async (id, params, options) => {
|
|
2131
2366
|
return customFetch(getGetIdpByIdUrl(id, params), {
|
|
@@ -2139,14 +2374,15 @@ const getListIdpRevisionsUrl = (id, params) => {
|
|
|
2139
2374
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2140
2375
|
});
|
|
2141
2376
|
const stringifiedParams = normalizedParams.toString();
|
|
2142
|
-
return stringifiedParams.length > 0 ? `${
|
|
2377
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/idps/${encodeURIComponent(String(id))}/revisions?${stringifiedParams}` : `${getApiBaseUrl()}/idps/${encodeURIComponent(String(id))}/revisions`;
|
|
2143
2378
|
};
|
|
2144
2379
|
/**
|
|
2145
|
-
*
|
|
2146
|
-
* cursor. The order is fixed, so there
|
|
2380
|
+
* Lists every revision of one identity provider, an external sign-in such as
|
|
2381
|
+
* Google, newest first, paginated with a cursor. The order is fixed, so there
|
|
2382
|
+
* is no `sorting`.
|
|
2147
2383
|
*
|
|
2148
2384
|
* The lookup is scoped to the project in `project_id`.
|
|
2149
|
-
* @summary List the revisions of an identity provider
|
|
2385
|
+
* @summary List the revisions of an identity provider
|
|
2150
2386
|
*/
|
|
2151
2387
|
const listIdpRevisions = async (id, params, options) => {
|
|
2152
2388
|
return customFetch(getListIdpRevisionsUrl(id, params), {
|
|
@@ -2160,14 +2396,15 @@ const getGetIdpRevisionByIdUrl = (revisionId, params) => {
|
|
|
2160
2396
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2161
2397
|
});
|
|
2162
2398
|
const stringifiedParams = normalizedParams.toString();
|
|
2163
|
-
return stringifiedParams.length > 0 ? `${
|
|
2399
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/idps/revisions/${encodeURIComponent(String(revisionId))}?${stringifiedParams}` : `${getApiBaseUrl()}/idps/revisions/${encodeURIComponent(String(revisionId))}`;
|
|
2164
2400
|
};
|
|
2165
2401
|
/**
|
|
2166
|
-
*
|
|
2167
|
-
* attempt or a
|
|
2402
|
+
* Returns one revision of an identity provider, an external sign-in such as
|
|
2403
|
+
* Google, by its `revision_id`, the value an authentication attempt or a
|
|
2404
|
+
* release pins.
|
|
2168
2405
|
*
|
|
2169
2406
|
* The lookup is scoped to the project in `project_id`.
|
|
2170
|
-
* @summary Get
|
|
2407
|
+
* @summary Get a revision of an identity provider
|
|
2171
2408
|
*/
|
|
2172
2409
|
const getIdpRevisionById = async (revisionId, params, options) => {
|
|
2173
2410
|
return customFetch(getGetIdpRevisionByIdUrl(revisionId, params), {
|
|
@@ -2181,13 +2418,16 @@ const getListPoliciesUrl = (params) => {
|
|
|
2181
2418
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2182
2419
|
});
|
|
2183
2420
|
const stringifiedParams = normalizedParams.toString();
|
|
2184
|
-
return stringifiedParams.length > 0 ? `${
|
|
2421
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/policies?${stringifiedParams}` : `${getApiBaseUrl()}/policies`;
|
|
2185
2422
|
};
|
|
2186
2423
|
/**
|
|
2187
2424
|
* Lists the project's policies, one per operation, each as its newest
|
|
2188
|
-
* revision
|
|
2189
|
-
*
|
|
2190
|
-
*
|
|
2425
|
+
* revision.
|
|
2426
|
+
*
|
|
2427
|
+
* A policy holds a project's rules for one operation, such as setting a
|
|
2428
|
+
* password. The list is ordered by `created_at` (first publish) and then
|
|
2429
|
+
* `id`. Filter by `operation` to read the policy of one operation; a project
|
|
2430
|
+
* that never published one gets an empty list.
|
|
2191
2431
|
*
|
|
2192
2432
|
* The lookup is scoped to the project in `project_id`.
|
|
2193
2433
|
* @summary List policies
|
|
@@ -2204,26 +2444,35 @@ const getPublishPolicyUrl = (params) => {
|
|
|
2204
2444
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2205
2445
|
});
|
|
2206
2446
|
const stringifiedParams = normalizedParams.toString();
|
|
2207
|
-
return stringifiedParams.length > 0 ? `${
|
|
2447
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/policies?${stringifiedParams}` : `${getApiBaseUrl()}/policies`;
|
|
2208
2448
|
};
|
|
2209
2449
|
/**
|
|
2210
2450
|
* Publishes the project's policy for an operation as a new immutable
|
|
2211
|
-
* revision, creating the policy on its first publish.
|
|
2212
|
-
*
|
|
2451
|
+
* revision, creating the policy on its first publish. A revision applies
|
|
2452
|
+
* once a deployed release pins it. Nothing already stored is
|
|
2213
2453
|
* re-evaluated, so a stricter password policy applies the next time a
|
|
2214
2454
|
* password is set.
|
|
2215
2455
|
*
|
|
2216
|
-
*
|
|
2456
|
+
* A policy holds a project's rules for one operation, such as setting a
|
|
2457
|
+
* password. The first publish records a `policy.created` event and every
|
|
2458
|
+
* later one a `policy.updated` event.
|
|
2459
|
+
*
|
|
2460
|
+
* The request is typed by `operation`. An unknown operation or setting, or
|
|
2217
2461
|
* a value of the wrong type or outside its bounds, answers `req.invalid`
|
|
2218
|
-
* like any malformed request.
|
|
2219
|
-
*
|
|
2220
|
-
*
|
|
2221
|
-
*
|
|
2222
|
-
*
|
|
2223
|
-
*
|
|
2224
|
-
*
|
|
2225
|
-
* settings
|
|
2226
|
-
* rule
|
|
2462
|
+
* like any malformed request.
|
|
2463
|
+
*
|
|
2464
|
+
* The operation's template then checks the config again, together with the
|
|
2465
|
+
* rules that relate settings to each other (a `min_length` above
|
|
2466
|
+
* `max_length`), and answers `pol.invalid`. Its `details.details.violations`
|
|
2467
|
+
* lists everything that failed, settings first, then rules.
|
|
2468
|
+
* `{"setting": "min_length"}` names one setting. `{"config_rule":
|
|
2469
|
+
* "min_length_not_above_max_length", "settings": ["min_length",
|
|
2470
|
+
* "max_length"]}` names a rule across settings, with the settings it reads.
|
|
2471
|
+
* Fix what the violations list and publish again. To check a config without
|
|
2472
|
+
* publishing it, call `evaluatePolicy` (`POST /policies/evaluate`).
|
|
2473
|
+
*
|
|
2474
|
+
* A setting left out is off, and `{}` switches every rule off; there are no
|
|
2475
|
+
* defaults.
|
|
2227
2476
|
* @summary Publish a policy
|
|
2228
2477
|
*/
|
|
2229
2478
|
const publishPolicy = async (publishPolicyBody, params, options) => {
|
|
@@ -2251,28 +2500,31 @@ const getEvaluatePolicyUrl = (params) => {
|
|
|
2251
2500
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2252
2501
|
});
|
|
2253
2502
|
const stringifiedParams = normalizedParams.toString();
|
|
2254
|
-
return stringifiedParams.length > 0 ? `${
|
|
2503
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/policies/evaluate?${stringifiedParams}` : `${getApiBaseUrl()}/policies/evaluate`;
|
|
2255
2504
|
};
|
|
2256
2505
|
/**
|
|
2257
2506
|
* Evaluates a policy config against one request, without side effects, and
|
|
2258
|
-
* answers the decision the operation would reach.
|
|
2259
|
-
*
|
|
2260
|
-
*
|
|
2261
|
-
*
|
|
2507
|
+
* answers the decision the operation would reach. A policy holds a
|
|
2508
|
+
* project's rules for one operation, such as setting a password.
|
|
2509
|
+
*
|
|
2510
|
+
* Nothing is read from or written to the project. The config is the one in
|
|
2511
|
+
* the body, checked exactly as a publish checks it, so an invalid config
|
|
2512
|
+
* answers `pol.invalid` with the same violations. Fix the settings the
|
|
2513
|
+
* violations list and send the request again.
|
|
2262
2514
|
*
|
|
2263
2515
|
* `input` is what the operation's request carries, in the operation's own
|
|
2264
|
-
* terms (a password, not its length)
|
|
2516
|
+
* terms (a password, not its length). The server derives what the policy
|
|
2265
2517
|
* checks with the code the live operation runs, guards included. `facts`
|
|
2266
2518
|
* states what the operation would look up at runtime, such as whether the
|
|
2267
2519
|
* candidate matches one of the user's kept passwords.
|
|
2268
2520
|
*
|
|
2269
2521
|
* The decision and the names of the failed rules hold wherever the
|
|
2270
|
-
* operation runs. `code` and `violations` are what an API call answers
|
|
2522
|
+
* operation runs. `code` and `violations` are what an API call answers. A
|
|
2271
2523
|
* login flow shows the same rules as field errors on the password field
|
|
2272
2524
|
* (`error.x-auth-methods#password_<rule>` in `step.error`).
|
|
2273
2525
|
*
|
|
2274
|
-
*
|
|
2275
|
-
* and pass its config
|
|
2526
|
+
* This operation does not choose which policy a project or release applies.
|
|
2527
|
+
* Read that policy, for example with `getPolicy` (`GET /policies/{policy_id}`), and pass its `config`.
|
|
2276
2528
|
*
|
|
2277
2529
|
* The caller needs read access to the project in `project_id`.
|
|
2278
2530
|
* @summary Evaluate a policy
|
|
@@ -2302,15 +2554,18 @@ const getGetPolicyUrl = (policyId, params) => {
|
|
|
2302
2554
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2303
2555
|
});
|
|
2304
2556
|
const stringifiedParams = normalizedParams.toString();
|
|
2305
|
-
return stringifiedParams.length > 0 ? `${
|
|
2557
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/policies/${encodeURIComponent(String(policyId))}?${stringifiedParams}` : `${getApiBaseUrl()}/policies/${encodeURIComponent(String(policyId))}`;
|
|
2306
2558
|
};
|
|
2307
2559
|
/**
|
|
2308
|
-
*
|
|
2309
|
-
*
|
|
2560
|
+
* Returns a policy as its newest revision. A revision applies once a deployed
|
|
2561
|
+
* release pins it.
|
|
2562
|
+
*
|
|
2563
|
+
* A policy holds a project's rules for one operation, such as setting a
|
|
2564
|
+
* password. Pass the `id` that `listPolicies` (`GET /policies`) or `publishPolicy` (`POST /policies`) returns.
|
|
2310
2565
|
*
|
|
2311
2566
|
* The lookup is scoped to the project in `project_id`: a policy of another
|
|
2312
|
-
* project answers not found exactly as an unknown
|
|
2313
|
-
* @summary Get a policy
|
|
2567
|
+
* project answers not found exactly as an unknown ID does.
|
|
2568
|
+
* @summary Get a policy by ID
|
|
2314
2569
|
*/
|
|
2315
2570
|
const getPolicy = async (policyId, params, options) => {
|
|
2316
2571
|
return customFetch(getGetPolicyUrl(policyId, params), {
|
|
@@ -2324,14 +2579,17 @@ const getListPolicyRevisionsUrl = (policyId, params) => {
|
|
|
2324
2579
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2325
2580
|
});
|
|
2326
2581
|
const stringifiedParams = normalizedParams.toString();
|
|
2327
|
-
return stringifiedParams.length > 0 ? `${
|
|
2582
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/policies/${encodeURIComponent(String(policyId))}/revisions?${stringifiedParams}` : `${getApiBaseUrl()}/policies/${encodeURIComponent(String(policyId))}/revisions`;
|
|
2328
2583
|
};
|
|
2329
2584
|
/**
|
|
2330
|
-
*
|
|
2331
|
-
*
|
|
2585
|
+
* Lists every revision of one policy, newest first, one page at a time. The
|
|
2586
|
+
* order is fixed, so there is no `sorting`.
|
|
2587
|
+
*
|
|
2588
|
+
* Each publish of a policy adds a revision. Pass the policy `id` that
|
|
2589
|
+
* `listPolicies` (`GET /policies`) or `publishPolicy` (`POST /policies`) returns.
|
|
2332
2590
|
*
|
|
2333
2591
|
* The lookup is scoped to the project in `project_id`: a policy of another
|
|
2334
|
-
* project answers not found exactly as an unknown
|
|
2592
|
+
* project answers not found exactly as an unknown ID does.
|
|
2335
2593
|
* @summary List the revisions of a policy
|
|
2336
2594
|
*/
|
|
2337
2595
|
const listPolicyRevisions = async (policyId, params, options) => {
|
|
@@ -2346,14 +2604,17 @@ const getGetPolicyRevisionUrl = (revisionId, params) => {
|
|
|
2346
2604
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2347
2605
|
});
|
|
2348
2606
|
const stringifiedParams = normalizedParams.toString();
|
|
2349
|
-
return stringifiedParams.length > 0 ? `${
|
|
2607
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/policies/revisions/${encodeURIComponent(String(revisionId))}?${stringifiedParams}` : `${getApiBaseUrl()}/policies/revisions/${encodeURIComponent(String(revisionId))}`;
|
|
2350
2608
|
};
|
|
2351
2609
|
/**
|
|
2352
|
-
*
|
|
2610
|
+
* Returns one revision of a policy, the newest or an older one.
|
|
2611
|
+
*
|
|
2612
|
+
* Pass the `revision_id` that `publishPolicy` (`POST /policies`) or `listPolicyRevisions` (`GET /policies/{policy_id}/revisions`)
|
|
2613
|
+
* returns.
|
|
2353
2614
|
*
|
|
2354
2615
|
* The lookup is scoped to the project in `project_id`: a revision of another
|
|
2355
|
-
* project answers not found exactly as an unknown
|
|
2356
|
-
* @summary Get a policy revision
|
|
2616
|
+
* project answers not found exactly as an unknown ID does.
|
|
2617
|
+
* @summary Get a policy revision by ID
|
|
2357
2618
|
*/
|
|
2358
2619
|
const getPolicyRevision = async (revisionId, params, options) => {
|
|
2359
2620
|
return customFetch(getGetPolicyRevisionUrl(revisionId, params), {
|
|
@@ -2367,28 +2628,37 @@ const getCreateReleaseUrl = (params) => {
|
|
|
2367
2628
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2368
2629
|
});
|
|
2369
2630
|
const stringifiedParams = normalizedParams.toString();
|
|
2370
|
-
return stringifiedParams.length > 0 ? `${
|
|
2631
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/releases?${stringifiedParams}` : `${getApiBaseUrl()}/releases`;
|
|
2371
2632
|
};
|
|
2372
2633
|
/**
|
|
2373
|
-
*
|
|
2374
|
-
*
|
|
2375
|
-
* `POST /releases/build
|
|
2634
|
+
* Creates a release from existing revisions, given as `(kind, revision_id)`
|
|
2635
|
+
* pairs. To build one from files on disk, use `buildRelease` (`POST /releases/build`)
|
|
2636
|
+
* (`POST /releases/build`).
|
|
2637
|
+
*
|
|
2638
|
+
* A release is a snapshot of the project's configuration: it pins one
|
|
2639
|
+
* revision of each resource it includes, and it is not tied to an origin.
|
|
2640
|
+
* Take each `revision_id` from the operation that created the revision, for
|
|
2641
|
+
* example the `id` that `createBranding` (`POST /branding`) or `createFlowDefinition` (`POST /flow_definitions`) returns.
|
|
2376
2642
|
*
|
|
2377
2643
|
* Each revision must exist in the project and is recorded under the handle
|
|
2378
2644
|
* it declares. The release must be complete and consistent:
|
|
2379
2645
|
*
|
|
2380
2646
|
* - Every handle its revisions name must be in the release: a flow's
|
|
2381
|
-
* `user_schema`, and the
|
|
2382
|
-
* `sso_providers` or a schema's `x-auth-methods.sso.providers`.
|
|
2383
|
-
* one answers `rel.unresolved_reference`, naming the resource and
|
|
2384
|
-
* handle,
|
|
2385
|
-
*
|
|
2386
|
-
*
|
|
2387
|
-
* reason in
|
|
2388
|
-
*
|
|
2389
|
-
*
|
|
2390
|
-
*
|
|
2391
|
-
* `
|
|
2647
|
+
* `user_schema`, and the identity provider (IdP) connections named by a
|
|
2648
|
+
* flow step's `sso_providers` or a schema's `x-auth-methods.sso.providers`.
|
|
2649
|
+
* A missing one answers `rel.unresolved_reference`, naming the resource and
|
|
2650
|
+
* the handle, for example `flow_definition default-login: user_schema
|
|
2651
|
+
* human-user not found`. Add the missing revision to the request.
|
|
2652
|
+
* - Every flow is validated as on save, against the user schema revision in
|
|
2653
|
+
* the release. A flow that fails answers `rel.invalid`, with the reason in
|
|
2654
|
+
* `details`. Fix the flow and send the request again.
|
|
2655
|
+
*
|
|
2656
|
+
* The call is idempotent on the set of revisions: the same revisions with a
|
|
2657
|
+
* different `message` answer `200` with the existing release. A new release
|
|
2658
|
+
* answers `201`.
|
|
2659
|
+
*
|
|
2660
|
+
* Creating a release does not deploy it. Pass the returned `id` to
|
|
2661
|
+
* `createDeployment` (`POST /deployments`) to make the release live.
|
|
2392
2662
|
* @summary Create a release
|
|
2393
2663
|
*/
|
|
2394
2664
|
const createRelease = async (createReleaseBody, params, options) => {
|
|
@@ -2416,20 +2686,23 @@ const getListReleasesUrl = (params) => {
|
|
|
2416
2686
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2417
2687
|
});
|
|
2418
2688
|
const stringifiedParams = normalizedParams.toString();
|
|
2419
|
-
return stringifiedParams.length > 0 ? `${
|
|
2689
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/releases?${stringifiedParams}` : `${getApiBaseUrl()}/releases`;
|
|
2420
2690
|
};
|
|
2421
2691
|
/**
|
|
2422
|
-
* Lists the project's releases, newest first.
|
|
2692
|
+
* Lists the project's releases, newest first. A release is a snapshot of the
|
|
2693
|
+
* project's configuration.
|
|
2694
|
+
*
|
|
2695
|
+
* Entries carry the digest, the metadata and `revoked_at`. The pinned set is
|
|
2696
|
+
* omitted: read one release with `getReleaseById` (`GET /releases/{release_id}`) to get its pointers.
|
|
2423
2697
|
*
|
|
2424
|
-
*
|
|
2425
|
-
*
|
|
2426
|
-
* Read one release with `GET /releases/{release_id}` to get its pointers.
|
|
2698
|
+
* The `id` of an entry is the release ID that `getReleaseById`,
|
|
2699
|
+
* `revokeRelease` (`POST /releases/{release_id}/revoke`) and `createDeployment` (`POST /deployments`) take.
|
|
2427
2700
|
*
|
|
2428
2701
|
* `content_hash` looks a release up by its content, as the CLI does when a
|
|
2429
2702
|
* person types the digest a transcript printed. The project holds at most
|
|
2430
|
-
* one release per digest, so the filtered list has one entry or none
|
|
2431
|
-
*
|
|
2432
|
-
* `rel_`
|
|
2703
|
+
* one release per digest, so the filtered list has one entry or none. An
|
|
2704
|
+
* unknown digest is an empty list rather than an error. Paths take the
|
|
2705
|
+
* `rel_` ID only, so use the matched entry's `id` there.
|
|
2433
2706
|
* @summary List releases
|
|
2434
2707
|
*/
|
|
2435
2708
|
const listReleases = async (params, options) => {
|
|
@@ -2444,41 +2717,47 @@ const getBuildReleaseUrl = (params) => {
|
|
|
2444
2717
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2445
2718
|
});
|
|
2446
2719
|
const stringifiedParams = normalizedParams.toString();
|
|
2447
|
-
return stringifiedParams.length > 0 ? `${
|
|
2720
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/releases/build?${stringifiedParams}` : `${getApiBaseUrl()}/releases/build`;
|
|
2448
2721
|
};
|
|
2449
2722
|
/**
|
|
2450
|
-
* Builds a release from the resources
|
|
2451
|
-
* grouped by kind, in one transaction
|
|
2452
|
-
*
|
|
2723
|
+
* Builds a release from the resources in `.zitadel/` as authored on disk,
|
|
2724
|
+
* grouped by kind, in one transaction.
|
|
2725
|
+
*
|
|
2726
|
+
* A release is a snapshot of the project's configuration. A failure anywhere
|
|
2727
|
+
* leaves no revision and no release. The caller records nothing. The CLI's
|
|
2728
|
+
* `deploy` command builds its release with this operation.
|
|
2453
2729
|
*
|
|
2454
2730
|
* If the project already holds a release with the same content, the same
|
|
2455
|
-
* `content_hash`, the request answers `200` with that release and
|
|
2456
|
-
*
|
|
2457
|
-
* project's newest revision of the same handle: unchanged content reuses
|
|
2458
|
-
* that revision, changed content allocates a new one, and the request
|
|
2459
|
-
* answers `201` with the new release. A policy whose config matches only an
|
|
2460
|
-
* older revision allocates a new one too, so a request that resolves no
|
|
2461
|
-
* release, which reads the newest revision, applies it as well. Metadata is excluded from the
|
|
2731
|
+
* `content_hash`, the request answers `200` with that release and allocates
|
|
2732
|
+
* nothing, however long ago it was built. Metadata is excluded from the
|
|
2462
2733
|
* comparison, so the same content under a different `message` is the same
|
|
2463
2734
|
* release.
|
|
2464
2735
|
*
|
|
2736
|
+
* Otherwise every resource is compared with the project's newest revision of
|
|
2737
|
+
* the same handle. Unchanged content reuses that revision, and changed
|
|
2738
|
+
* content allocates a new one. The request answers `201` with the new
|
|
2739
|
+
* release. A policy whose config matches only an older revision allocates a
|
|
2740
|
+
* new one too, so the policy reads back as the config the build carried.
|
|
2741
|
+
*
|
|
2465
2742
|
* A structurally malformed request is refused while decoding with
|
|
2466
2743
|
* `req.invalid`, naming the offending fields. A well-formed bundle is then
|
|
2467
2744
|
* checked resource by resource, as each kind's create endpoint checks it,
|
|
2468
|
-
* and every failure is reported at once
|
|
2745
|
+
* and every failure is reported at once. The request answers `400` with
|
|
2469
2746
|
* `rel.invalid`, and `details.resources` lists each resource that failed.
|
|
2470
|
-
*
|
|
2471
|
-
*
|
|
2747
|
+
* Fix each listed resource and build again. A handle that resolves neither
|
|
2748
|
+
* in the bundle nor in the project answers `rel.unresolved_reference`,
|
|
2749
|
+
* naming the pointer and the handle. Add the missing resource to the bundle.
|
|
2472
2750
|
*
|
|
2473
2751
|
* Building writes revisions, so besides `release.write` it needs the write
|
|
2474
2752
|
* scope of every kind the bundle carries a resource of: `schema.write`,
|
|
2475
|
-
* `flow_definition.write`, `branding.write`, `idp.write` and
|
|
2476
|
-
*
|
|
2477
|
-
* naming the kind.
|
|
2478
|
-
*
|
|
2479
|
-
*
|
|
2480
|
-
*
|
|
2481
|
-
* origins
|
|
2753
|
+
* `flow_definition.write`, `branding.write`, `idp.write` and `policy.write`,
|
|
2754
|
+
* as the per-kind create endpoints do. A missing scope answers `403` with
|
|
2755
|
+
* `rel.permission_denied`, naming the kind. Request a token with that scope.
|
|
2756
|
+
* An empty kind needs no scope.
|
|
2757
|
+
*
|
|
2758
|
+
* Building a release does not deploy it. A release is not tied to an origin,
|
|
2759
|
+
* and the same release can later be deployed to any number of origins
|
|
2760
|
+
* unchanged. Pass the returned `id` to `createDeployment` (`POST /deployments`).
|
|
2482
2761
|
* @summary Build a release from files
|
|
2483
2762
|
*/
|
|
2484
2763
|
const buildRelease = async (buildReleaseBody, params, options) => {
|
|
@@ -2506,23 +2785,26 @@ const getGetReleaseByIdUrl = (releaseId, params) => {
|
|
|
2506
2785
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2507
2786
|
});
|
|
2508
2787
|
const stringifiedParams = normalizedParams.toString();
|
|
2509
|
-
return stringifiedParams.length > 0 ? `${
|
|
2788
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/releases/${encodeURIComponent(String(releaseId))}?${stringifiedParams}` : `${getApiBaseUrl()}/releases/${encodeURIComponent(String(releaseId))}`;
|
|
2510
2789
|
};
|
|
2511
2790
|
/**
|
|
2512
|
-
*
|
|
2513
|
-
* the `(kind, handle, revision_id)` tuples it pins.
|
|
2791
|
+
* Returns one release: its digest, its metadata, whether it was revoked, and
|
|
2792
|
+
* the `(kind, handle, revision_id)` tuples it pins. A release is a snapshot
|
|
2793
|
+
* of the project's configuration.
|
|
2514
2794
|
*
|
|
2515
|
-
* The path takes the `rel_`
|
|
2516
|
-
*
|
|
2795
|
+
* The path takes the `rel_` ID only: the `id` that `createRelease` (`POST /releases`),
|
|
2796
|
+
* `buildRelease` (`POST /releases/build`) or `listReleases` (`GET /releases`) returns. To find a release from its
|
|
2797
|
+
* digest, list with the `content_hash` filter and read the matched entry's
|
|
2798
|
+
* `id`.
|
|
2517
2799
|
*
|
|
2518
|
-
*
|
|
2519
|
-
* per-kind read endpoints when the bytes are needed.
|
|
2800
|
+
* The response does not embed resource content. Resolve each `revision_id`
|
|
2801
|
+
* through the per-kind read endpoints when the bytes are needed.
|
|
2520
2802
|
*
|
|
2521
|
-
* The lookup is scoped to the project in `project_id
|
|
2522
|
-
* to another project answers not found exactly as an unknown
|
|
2523
|
-
* endpoint cannot be used to probe for releases in projects the
|
|
2524
|
-
* read.
|
|
2525
|
-
* @summary Get a release by
|
|
2803
|
+
* The lookup is scoped to the project in `project_id`. A release ID
|
|
2804
|
+
* belonging to another project answers not found exactly as an unknown ID
|
|
2805
|
+
* does, so the endpoint cannot be used to probe for releases in projects the
|
|
2806
|
+
* caller cannot read.
|
|
2807
|
+
* @summary Get a release by ID
|
|
2526
2808
|
*/
|
|
2527
2809
|
const getReleaseById = async (releaseId, params, options) => {
|
|
2528
2810
|
return customFetch(getGetReleaseByIdUrl(releaseId, params), {
|
|
@@ -2536,28 +2818,32 @@ const getRevokeReleaseUrl = (releaseId, params) => {
|
|
|
2536
2818
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2537
2819
|
});
|
|
2538
2820
|
const stringifiedParams = normalizedParams.toString();
|
|
2539
|
-
return stringifiedParams.length > 0 ? `${
|
|
2821
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/releases/${encodeURIComponent(String(releaseId))}/revoke?${stringifiedParams}` : `${getApiBaseUrl()}/releases/${encodeURIComponent(String(releaseId))}/revoke`;
|
|
2540
2822
|
};
|
|
2541
2823
|
/**
|
|
2542
|
-
*
|
|
2543
|
-
*
|
|
2544
|
-
*
|
|
2545
|
-
* `rel.revoked`.
|
|
2824
|
+
* Revokes a release, so that its content is never served again. Pass the
|
|
2825
|
+
* `id` that `createRelease` (`POST /releases`), `buildRelease` (`POST /releases/build`) or `listReleases` (`GET /releases`) returns. It
|
|
2826
|
+
* records a `release.revoked` event.
|
|
2546
2827
|
*
|
|
2547
|
-
*
|
|
2548
|
-
*
|
|
2549
|
-
* `409` with `rel.in_use`, naming each such origin and that deployment.
|
|
2550
|
-
* Deploy another release there or roll back first, then revoke. Revoking
|
|
2551
|
-
* therefore never takes an origin down. Deployments that named the release
|
|
2552
|
-
* earlier stay in the history.
|
|
2828
|
+
* From then on the release cannot be deployed. Every path that would serve
|
|
2829
|
+
* it refuses it with `rel.revoked`, including a build that pins its digest.
|
|
2553
2830
|
*
|
|
2554
|
-
*
|
|
2555
|
-
*
|
|
2556
|
-
*
|
|
2831
|
+
* A release that any origin still serves cannot be revoked. An origin serves
|
|
2832
|
+
* the release of the newest deployment to it, so the call answers `409` with
|
|
2833
|
+
* `rel.in_use`, naming each such origin and that deployment. Deploy another
|
|
2834
|
+
* release there or roll back first, then revoke. Revoking therefore never
|
|
2835
|
+
* takes an origin down. Deployments that named the release earlier stay in
|
|
2836
|
+
* the history.
|
|
2557
2837
|
*
|
|
2558
|
-
*
|
|
2559
|
-
*
|
|
2560
|
-
*
|
|
2838
|
+
* The call is idempotent: revoking a release that is already revoked answers
|
|
2839
|
+
* `200` with the release unchanged, and `revoked_at` still names the first
|
|
2840
|
+
* revocation. There is no un-revoke. To serve that configuration again,
|
|
2841
|
+
* change it and build a new release: rebuilding unchanged content returns
|
|
2842
|
+
* the same revoked release.
|
|
2843
|
+
*
|
|
2844
|
+
* The call takes no body. The lookup is scoped to the project in
|
|
2845
|
+
* `project_id`, so a release ID of another project answers not found exactly
|
|
2846
|
+
* as an unknown ID does.
|
|
2561
2847
|
* @summary Revoke a release
|
|
2562
2848
|
*/
|
|
2563
2849
|
const revokeRelease = async (releaseId, params, options) => {
|
|
@@ -2572,29 +2858,35 @@ const getCreateGrantUrl = (params) => {
|
|
|
2572
2858
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2573
2859
|
});
|
|
2574
2860
|
const stringifiedParams = normalizedParams.toString();
|
|
2575
|
-
return stringifiedParams.length > 0 ? `${
|
|
2576
|
-
};
|
|
2577
|
-
/**
|
|
2578
|
-
*
|
|
2579
|
-
*
|
|
2580
|
-
*
|
|
2581
|
-
* (`
|
|
2582
|
-
*
|
|
2583
|
-
*
|
|
2584
|
-
*
|
|
2585
|
-
*
|
|
2586
|
-
*
|
|
2587
|
-
*
|
|
2588
|
-
*
|
|
2589
|
-
*
|
|
2590
|
-
*
|
|
2591
|
-
*
|
|
2592
|
-
*
|
|
2593
|
-
*
|
|
2594
|
-
* session
|
|
2595
|
-
*
|
|
2596
|
-
*
|
|
2597
|
-
*
|
|
2861
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/grants?${stringifiedParams}` : `${getApiBaseUrl()}/grants`;
|
|
2862
|
+
};
|
|
2863
|
+
/**
|
|
2864
|
+
* Creates a grant that gives a user or a team the `project.viewer`, `project.editor` or `project.admin` role on a project.
|
|
2865
|
+
*
|
|
2866
|
+
* The project is the one named by the `project_id` query parameter. Name the
|
|
2867
|
+
* principal with `user` (`user_id` or `identifier`) or `team` (`team_id` or
|
|
2868
|
+
* `name`). The `id` in the response (`asgn_<opaque>`) is the grant ID that
|
|
2869
|
+
* `getGrant` (`GET /grants/{id}`) and `deleteGrant` (`DELETE /grants/{id}`) take. Owning-team (`project.team`) grants are not
|
|
2870
|
+
* created here: a claim, which attaches a project to a team, creates them.
|
|
2871
|
+
*
|
|
2872
|
+
* An unrevoked grant with the same principal and relation holds that binding
|
|
2873
|
+
* even after `expires_at`. Revoke it with `deleteGrant` before you create it
|
|
2874
|
+
* again.
|
|
2875
|
+
*
|
|
2876
|
+
* Create does not accept `expand`. The `user_id` and team locators return `201`,
|
|
2877
|
+
* whose `user` and `team` carry only `user_id` and `team_id`. They still answer
|
|
2878
|
+
* `404` or `409` when the principal is missing or the grant already exists.
|
|
2879
|
+
* Creating by `user.identifier` answers `202` with no body on every outcome.
|
|
2880
|
+
* Granting the session caller's own user is `grant.invalid` on either user
|
|
2881
|
+
* locator. A `201` grant names its user or team by ID only: read it back
|
|
2882
|
+
* with `getGrant` for the identifier and display name. A `202` returns no
|
|
2883
|
+
* grant ID: find the grant with `queryGrants` (`POST /grants/query`), filtered by `user_id`.
|
|
2884
|
+
*
|
|
2885
|
+
* Authenticate with a project secret (`oauth2`) or a console session cookie
|
|
2886
|
+
* (`sessionCookie`). A session caller is authorized as the signed-in person
|
|
2887
|
+
* against the target project, even when the session belongs to another project.
|
|
2888
|
+
* Cookie requests follow that scheme's CSRF rules.
|
|
2889
|
+
* @summary Create a grant
|
|
2598
2890
|
*/
|
|
2599
2891
|
const createGrant = async (createGrantBody, params, options) => {
|
|
2600
2892
|
const getHeaders = (h) => {
|
|
@@ -2621,25 +2913,23 @@ const getQueryGrantsUrl = (params) => {
|
|
|
2621
2913
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2622
2914
|
});
|
|
2623
2915
|
const stringifiedParams = normalizedParams.toString();
|
|
2624
|
-
return stringifiedParams.length > 0 ? `${
|
|
2625
|
-
};
|
|
2626
|
-
/**
|
|
2627
|
-
* Returns
|
|
2628
|
-
*
|
|
2629
|
-
*
|
|
2630
|
-
*
|
|
2631
|
-
*
|
|
2632
|
-
*
|
|
2633
|
-
*
|
|
2634
|
-
*
|
|
2635
|
-
* `
|
|
2636
|
-
*
|
|
2637
|
-
*
|
|
2638
|
-
*
|
|
2639
|
-
*
|
|
2640
|
-
*
|
|
2641
|
-
* session cookie (`nextgenSession`). Cookie-authenticated requests
|
|
2642
|
-
* follow the scheme's CSRF rules (`nextgenSession`).
|
|
2916
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/grants/query?${stringifiedParams}` : `${getApiBaseUrl()}/grants/query`;
|
|
2917
|
+
};
|
|
2918
|
+
/**
|
|
2919
|
+
* Returns a page of a project's grants.
|
|
2920
|
+
*
|
|
2921
|
+
* Only unrevoked grants this API manages are listed, which bind a user or team
|
|
2922
|
+
* to the viewer, editor or admin role. Expired grants are included, so a client
|
|
2923
|
+
* can revoke them with `deleteGrant` (`DELETE /grants/{id}`) before it grants the same binding again.
|
|
2924
|
+
* Project-secret setup (`sk_proj`) and owning-team (`relation=team`) rows are
|
|
2925
|
+
* not returned. Requires `project.read`.
|
|
2926
|
+
*
|
|
2927
|
+
* `expand: ["principal"]` adds envelope fields on `user` and `team`. For project
|
|
2928
|
+
* secrets it additionally requires `user.read` and `team.read`. A user-bound
|
|
2929
|
+
* console session that already passed the project check may expand without those scopes.
|
|
2930
|
+
*
|
|
2931
|
+
* Authenticate with a project secret (`oauth2`) or a console session cookie
|
|
2932
|
+
* (`sessionCookie`). Cookie requests follow that scheme's CSRF rules.
|
|
2643
2933
|
* @summary Query grants
|
|
2644
2934
|
*/
|
|
2645
2935
|
const queryGrants = async (queryGrantsBody, params, options) => {
|
|
@@ -2673,26 +2963,26 @@ const getGetGrantUrl = (id, params) => {
|
|
|
2673
2963
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2674
2964
|
});
|
|
2675
2965
|
const stringifiedParams = normalizedParams.toString();
|
|
2676
|
-
return stringifiedParams.length > 0 ? `${
|
|
2677
|
-
};
|
|
2678
|
-
/**
|
|
2679
|
-
*
|
|
2680
|
-
*
|
|
2681
|
-
*
|
|
2682
|
-
*
|
|
2683
|
-
*
|
|
2684
|
-
*
|
|
2685
|
-
*
|
|
2686
|
-
*
|
|
2687
|
-
*
|
|
2688
|
-
* `
|
|
2689
|
-
* secrets
|
|
2690
|
-
*
|
|
2691
|
-
*
|
|
2692
|
-
*
|
|
2693
|
-
*
|
|
2694
|
-
* follow
|
|
2695
|
-
* @summary Get grant
|
|
2966
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/grants/${encodeURIComponent(String(id))}?${stringifiedParams}` : `${getApiBaseUrl()}/grants/${encodeURIComponent(String(id))}`;
|
|
2967
|
+
};
|
|
2968
|
+
/**
|
|
2969
|
+
* Returns a grant by ID, when this API manages it and it has not been revoked.
|
|
2970
|
+
*
|
|
2971
|
+
* This API manages grants that bind a user or team to the viewer, editor or
|
|
2972
|
+
* admin role. An expired grant is still returned, so you can revoke it with
|
|
2973
|
+
* `deleteGrant` (`DELETE /grants/{id}`) before you grant the same binding again. Authorization still
|
|
2974
|
+
* ignores expired grants. Send `project_id` as well as the grant ID.
|
|
2975
|
+
* Misses, revoked grants, project-secret setup rows (`sk_proj`), owning-team
|
|
2976
|
+
* (`relation=team`) rows and grants of another project all return `404`.
|
|
2977
|
+
*
|
|
2978
|
+
* `expand=principal` adds envelope fields on `user` or `team`. For project
|
|
2979
|
+
* secrets it requires `user.read` and `team.read` in addition to `project.read`.
|
|
2980
|
+
* A user-bound console session that already passed the project check may expand
|
|
2981
|
+
* without those scopes.
|
|
2982
|
+
*
|
|
2983
|
+
* Authenticate with a project secret (`oauth2`) or a console session cookie
|
|
2984
|
+
* (`sessionCookie`). Cookie requests follow that scheme's CSRF rules.
|
|
2985
|
+
* @summary Get a grant by ID
|
|
2696
2986
|
*/
|
|
2697
2987
|
const getGrant = async (id, params, options) => {
|
|
2698
2988
|
return customFetch(getGetGrantUrl(id, params), {
|
|
@@ -2706,18 +2996,18 @@ const getDeleteGrantUrl = (id, params) => {
|
|
|
2706
2996
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2707
2997
|
});
|
|
2708
2998
|
const stringifiedParams = normalizedParams.toString();
|
|
2709
|
-
return stringifiedParams.length > 0 ? `${
|
|
2999
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/grants/${encodeURIComponent(String(id))}?${stringifiedParams}` : `${getApiBaseUrl()}/grants/${encodeURIComponent(String(id))}`;
|
|
2710
3000
|
};
|
|
2711
3001
|
/**
|
|
2712
|
-
*
|
|
2713
|
-
* Already-revoked, missing, project-secret setup, and owning-team grants
|
|
2714
|
-
* return 404. The row is not un-revoked. Expired grants can still be
|
|
2715
|
-
* revoked so the unique binding can be reused.
|
|
3002
|
+
* Revokes a grant this API manages and emits `authz.revoked`.
|
|
2716
3003
|
*
|
|
2717
|
-
*
|
|
2718
|
-
*
|
|
2719
|
-
*
|
|
2720
|
-
*
|
|
3004
|
+
* A revoked grant cannot be restored: create a new one. Already-revoked, missing,
|
|
3005
|
+
* project-secret setup and owning-team grants return `404`. Expired grants can
|
|
3006
|
+
* still be revoked, so the binding can be reused.
|
|
3007
|
+
*
|
|
3008
|
+
* Authenticate with a project secret (`oauth2`) or a console session cookie
|
|
3009
|
+
* (`sessionCookie`). Cookie requests follow that scheme's CSRF rules.
|
|
3010
|
+
* @summary Revoke a grant
|
|
2721
3011
|
*/
|
|
2722
3012
|
const deleteGrant = async (id, params, options) => {
|
|
2723
3013
|
return customFetch(getDeleteGrantUrl(id, params), {
|
|
@@ -2737,20 +3027,21 @@ const getListEventsUrl = (params) => {
|
|
|
2737
3027
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2738
3028
|
});
|
|
2739
3029
|
const stringifiedParams = normalizedParams.toString();
|
|
2740
|
-
return stringifiedParams.length > 0 ? `${
|
|
3030
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/events?${stringifiedParams}` : `${getApiBaseUrl()}/events`;
|
|
2741
3031
|
};
|
|
2742
3032
|
/**
|
|
2743
|
-
*
|
|
2744
|
-
*
|
|
2745
|
-
*
|
|
3033
|
+
* Lists a project's audit events, newest first. Pass `order=asc` for oldest
|
|
3034
|
+
* first. Requires `events.read`.
|
|
3035
|
+
*
|
|
3036
|
+
* A project that is not claimed yet returns an empty list: its events are
|
|
3037
|
+
* stored but stay invisible until the
|
|
3038
|
+
* [claim](https://preview.zitadel.com/docs/concepts/project-team-user#claim) succeeds.
|
|
2746
3039
|
*
|
|
2747
|
-
*
|
|
2748
|
-
*
|
|
2749
|
-
* whose emit-time `team_id` matches the credential team (enforced when
|
|
2750
|
-
* team-scoped tokens exist).
|
|
3040
|
+
* Team-scoped credentials see only the events whose `team_id` matches the
|
|
3041
|
+
* credential's team. Team-scoped credentials are not issued today.
|
|
2751
3042
|
*
|
|
2752
|
-
*
|
|
2753
|
-
*
|
|
3043
|
+
* Each item carries an `event_type` that says which type of event it is, and
|
|
3044
|
+
* the matching `payload`. To read one event, pass its `id` to `getEvent` (`GET /events/{id}`).
|
|
2754
3045
|
* @summary List events
|
|
2755
3046
|
*/
|
|
2756
3047
|
const listEvents = async (params, options) => {
|
|
@@ -2765,15 +3056,19 @@ const getGetEventUrl = (id, params) => {
|
|
|
2765
3056
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2766
3057
|
});
|
|
2767
3058
|
const stringifiedParams = normalizedParams.toString();
|
|
2768
|
-
return stringifiedParams.length > 0 ? `${
|
|
3059
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/events/${encodeURIComponent(String(id))}?${stringifiedParams}` : `${getApiBaseUrl()}/events/${encodeURIComponent(String(id))}`;
|
|
2769
3060
|
};
|
|
2770
3061
|
/**
|
|
2771
|
-
*
|
|
2772
|
-
*
|
|
2773
|
-
*
|
|
3062
|
+
* Returns one event of a project by its ID. Requires `events.read`.
|
|
3063
|
+
*
|
|
3064
|
+
* Pass the `id` of an event that `listEvents` (`GET /events`) returns, with its
|
|
3065
|
+
* `project_id`. An unknown ID and the ID of another project's event both
|
|
3066
|
+
* answer `404`.
|
|
2774
3067
|
*
|
|
2775
|
-
*
|
|
2776
|
-
*
|
|
3068
|
+
* A project that is not claimed yet also answers `404`: its events are
|
|
3069
|
+
* stored but stay invisible until the
|
|
3070
|
+
* [claim](https://preview.zitadel.com/docs/concepts/project-team-user#claim) succeeds.
|
|
3071
|
+
* @summary Get an event by ID
|
|
2777
3072
|
*/
|
|
2778
3073
|
const getEvent = async (id, params, options) => {
|
|
2779
3074
|
return customFetch(getGetEventUrl(id, params), {
|
|
@@ -2787,15 +3082,16 @@ const getGetVariablesUrl = (params) => {
|
|
|
2787
3082
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2788
3083
|
});
|
|
2789
3084
|
const stringifiedParams = normalizedParams.toString();
|
|
2790
|
-
return stringifiedParams.length > 0 ? `${
|
|
3085
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/variables?${stringifiedParams}` : `${getApiBaseUrl()}/variables`;
|
|
2791
3086
|
};
|
|
2792
3087
|
/**
|
|
2793
|
-
* Returns the project's variables, keyed by name, each with its value
|
|
2794
|
-
* kind
|
|
3088
|
+
* Returns the project's variables, keyed by name, each with its value for
|
|
3089
|
+
* each kind: `primary` for primary origins and `preview` for preview URLs.
|
|
3090
|
+
* With `kind`, only that kind's values are returned.
|
|
2795
3091
|
*
|
|
2796
3092
|
* Secret values are not returned. A secret appears as `{"secret": true}`,
|
|
2797
3093
|
* which says a value is held without disclosing it.
|
|
2798
|
-
* @summary Get variables
|
|
3094
|
+
* @summary Get a project's variables
|
|
2799
3095
|
*/
|
|
2800
3096
|
const getVariables = async (params, options) => {
|
|
2801
3097
|
return customFetch(getGetVariablesUrl(params), {
|
|
@@ -2809,28 +3105,32 @@ const getUpdateVariablesUrl = (params) => {
|
|
|
2809
3105
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2810
3106
|
});
|
|
2811
3107
|
const stringifiedParams = normalizedParams.toString();
|
|
2812
|
-
return stringifiedParams.length > 0 ? `${
|
|
3108
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/variables?${stringifiedParams}` : `${getApiBaseUrl()}/variables`;
|
|
2813
3109
|
};
|
|
2814
3110
|
/**
|
|
2815
|
-
*
|
|
2816
|
-
* kind. Names not in the body are untouched. Existing
|
|
2817
|
-
* values they froze.
|
|
2818
|
-
*
|
|
2819
|
-
* Without `kind`, a plain value is written for both kinds. A secret is
|
|
2820
|
-
* written for `primary` only and removes the name's `preview` value, so a
|
|
2821
|
-
* preview never keeps a plaintext copy; set a preview secret with
|
|
2822
|
-
* `kind=preview`. `null` removes the name from both.
|
|
3111
|
+
* Sets, replaces and removes the project's variables for the requested
|
|
3112
|
+
* kind, in one request. Names not in the body are untouched. Existing
|
|
3113
|
+
* deployments keep the values they froze.
|
|
2823
3114
|
*
|
|
2824
3115
|
* A bare scalar enters a non-secret value. `{"value": …, "secret": true}`
|
|
2825
3116
|
* stores the value encrypted under the project's active `secret` key, after
|
|
2826
3117
|
* which it can be referenced but not read back. `null` removes the name
|
|
2827
|
-
* (RFC 7386), which is how several variables are removed in one request
|
|
2828
|
-
*
|
|
3118
|
+
* (RFC 7386), which is how several variables are removed in one request.
|
|
3119
|
+
* Removing a name the project does not hold is a no-op rather than an error.
|
|
3120
|
+
*
|
|
3121
|
+
* Without `kind`, a plain value is written for both kinds. A secret is
|
|
3122
|
+
* written for `primary` only and removes the name's `preview` value, so a
|
|
3123
|
+
* preview never keeps a plaintext copy. Set a preview secret with
|
|
3124
|
+
* `kind=preview`. `null` removes the name from both kinds.
|
|
2829
3125
|
*
|
|
2830
3126
|
* The body is applied whole or not at all, so a rejected request leaves the
|
|
2831
|
-
* project's variables exactly as they were.
|
|
2832
|
-
*
|
|
2833
|
-
*
|
|
3127
|
+
* project's variables exactly as they were. Fix what the error reports and
|
|
3128
|
+
* send the request again. Writing the same name twice replaces the value
|
|
3129
|
+
* rather than duplicating it, which makes a retry safe.
|
|
3130
|
+
*
|
|
3131
|
+
* Each kind written records a `variable.set` event, and each kind removed a
|
|
3132
|
+
* `variable.removed` event. The value never appears in either.
|
|
3133
|
+
* @summary Update a project's variables
|
|
2834
3134
|
*/
|
|
2835
3135
|
const updateVariables = async (updateVariablesBody, params, options) => {
|
|
2836
3136
|
const getHeaders = (h) => {
|
|
@@ -2857,13 +3157,17 @@ const getGetVariableUrl = (variableName, params) => {
|
|
|
2857
3157
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2858
3158
|
});
|
|
2859
3159
|
const stringifiedParams = normalizedParams.toString();
|
|
2860
|
-
return stringifiedParams.length > 0 ? `${
|
|
3160
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/variables/${encodeURIComponent(String(variableName))}?${stringifiedParams}` : `${getApiBaseUrl()}/variables/${encodeURIComponent(String(variableName))}`;
|
|
2861
3161
|
};
|
|
2862
3162
|
/**
|
|
2863
|
-
*
|
|
2864
|
-
*
|
|
2865
|
-
*
|
|
2866
|
-
*
|
|
3163
|
+
* Returns one variable by name, with its value for each kind. A variable
|
|
3164
|
+
* holds a value per kind: `primary` for primary origins and `preview` for
|
|
3165
|
+
* preview URLs.
|
|
3166
|
+
*
|
|
3167
|
+
* Pass the name of a variable the project holds, as `getVariables` (`GET /variables`) lists
|
|
3168
|
+
* it. A name with no value for the requested kind answers `var.not_found`;
|
|
3169
|
+
* set it with `updateVariables` (`PATCH /variables`). A secret reads back as `{"secret": true}`.
|
|
3170
|
+
* @summary Get a variable by name
|
|
2867
3171
|
*/
|
|
2868
3172
|
const getVariable = async (variableName, params, options) => {
|
|
2869
3173
|
return customFetch(getGetVariableUrl(variableName, params), {
|
|
@@ -2877,13 +3181,18 @@ const getDeleteVariableUrl = (variableName, params) => {
|
|
|
2877
3181
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2878
3182
|
});
|
|
2879
3183
|
const stringifiedParams = normalizedParams.toString();
|
|
2880
|
-
return stringifiedParams.length > 0 ? `${
|
|
3184
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/variables/${encodeURIComponent(String(variableName))}?${stringifiedParams}` : `${getApiBaseUrl()}/variables/${encodeURIComponent(String(variableName))}`;
|
|
2881
3185
|
};
|
|
2882
3186
|
/**
|
|
2883
|
-
*
|
|
2884
|
-
* `kind`.
|
|
2885
|
-
*
|
|
2886
|
-
*
|
|
3187
|
+
* Deletes a variable for the requested kind, or for both kinds without
|
|
3188
|
+
* `kind`. Existing deployments keep the values they froze. Each kind removed
|
|
3189
|
+
* records a `variable.removed` event.
|
|
3190
|
+
*
|
|
3191
|
+
* A name with no value for that kind answers `var.not_found`: there is
|
|
3192
|
+
* nothing to delete. `getVariables` (`GET /variables`) lists the names the project holds. To
|
|
3193
|
+
* remove several names in one request, or to remove a name that may already
|
|
3194
|
+
* be absent, send `null` for each name to `updateVariables` (`PATCH /variables`).
|
|
3195
|
+
* @summary Delete a variable by name
|
|
2887
3196
|
*/
|
|
2888
3197
|
const deleteVariable = async (variableName, params, options) => {
|
|
2889
3198
|
return customFetch(getDeleteVariableUrl(variableName, params), {
|
|
@@ -2897,37 +3206,57 @@ const getCreateDeploymentUrl = (params) => {
|
|
|
2897
3206
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2898
3207
|
});
|
|
2899
3208
|
const stringifiedParams = normalizedParams.toString();
|
|
2900
|
-
return stringifiedParams.length > 0 ? `${
|
|
3209
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/deployments?${stringifiedParams}` : `${getApiBaseUrl()}/deployments`;
|
|
2901
3210
|
};
|
|
2902
3211
|
/**
|
|
2903
|
-
*
|
|
2904
|
-
*
|
|
2905
|
-
*
|
|
3212
|
+
* Creates a deployment: it makes a release live on the project's primary
|
|
3213
|
+
* origins or on preview URLs.
|
|
3214
|
+
*
|
|
3215
|
+
* A release is a snapshot of the project's configuration. A deployment makes
|
|
3216
|
+
* a release live on origins and freezes the project's variable values for
|
|
3217
|
+
* its kind, with no fallback between primary and preview values. The call is
|
|
3218
|
+
* atomic: on success every target serves the release and the deployment is
|
|
3219
|
+
* recorded, and it records a `deployment.created` event. On failure nothing
|
|
3220
|
+
* changes and nothing is recorded.
|
|
3221
|
+
*
|
|
3222
|
+
* Name the release by exactly one of `release_id` or `content_hash`. Take the
|
|
3223
|
+
* release ID from the `id` that `createRelease` (`POST /releases`), `buildRelease` (`POST /releases/build`) or
|
|
3224
|
+
* `listReleases` (`GET /releases`) returns. The release must already exist in the project.
|
|
3225
|
+
* `targets` is `primary`, which means every primary origin, or a list of
|
|
3226
|
+
* preview URLs. `["primary"]`, which clients released before this shape
|
|
3227
|
+
* send, still deploys to every primary origin until 1.0.0; its answer
|
|
3228
|
+
* carries a `Deprecation` header (RFC 9745) and a `Link` to these docs.
|
|
2906
3229
|
*
|
|
2907
|
-
*
|
|
2908
|
-
*
|
|
2909
|
-
*
|
|
2910
|
-
*
|
|
3230
|
+
* The project's newest primary deployment also serves every request with no
|
|
3231
|
+
* `Origin`, such as a backend, a native app or the CLI, and the console's
|
|
3232
|
+
* login preview of a project that does not list the console's origin. A
|
|
3233
|
+
* preview URL serves only itself.
|
|
2911
3234
|
*
|
|
2912
3235
|
* A deployment to `primary` changes nothing when the project's newest
|
|
2913
3236
|
* primary deployment has the same release and frozen values and covers
|
|
2914
|
-
* exactly the current primary origins
|
|
2915
|
-
* deployment. Any other request writes a new deployment and answers `201
|
|
2916
|
-
*
|
|
2917
|
-
*
|
|
2918
|
-
*
|
|
2919
|
-
* - `400 dep.invalid`: both or neither of `release_id` and
|
|
2920
|
-
* a primary origin
|
|
2921
|
-
* `primary`
|
|
2922
|
-
* `ttl` above 365 days (`P365D`).
|
|
2923
|
-
*
|
|
2924
|
-
*
|
|
2925
|
-
*
|
|
2926
|
-
*
|
|
2927
|
-
* - `
|
|
2928
|
-
*
|
|
2929
|
-
*
|
|
2930
|
-
*
|
|
3237
|
+
* exactly the current primary origins. The call then answers `200` with that
|
|
3238
|
+
* deployment. Any other request writes a new deployment and answers `201`.
|
|
3239
|
+
* For preview URLs, that deployment renews their previews.
|
|
3240
|
+
*
|
|
3241
|
+
* If the request is refused, fix the cause and send it again:
|
|
3242
|
+
* - `400 dep.invalid`: the request names both or neither of `release_id` and
|
|
3243
|
+
* `content_hash`, names a primary origin among the preview URLs, sends
|
|
3244
|
+
* `primary` for a project with no primary origin, sends
|
|
3245
|
+
* `ttl` with `primary`, or sends a `ttl` above 365 days (`P365D`). Correct
|
|
3246
|
+
* the request.
|
|
3247
|
+
* - `400 dep.variables_missing`: a variable the release references has no
|
|
3248
|
+
* value for the kind. `details` names the kind and every missing variable.
|
|
3249
|
+
* Set each one for that kind with `updateVariables` (`PATCH /variables`), then deploy again.
|
|
3250
|
+
* - `403 proj.origin_not_allowed`: a preview URL matches no preview pattern
|
|
3251
|
+
* of the project, or is a loopback URL. Use a URL that matches a pattern.
|
|
3252
|
+
* - `404 rel.not_found`: the release ID or digest names no release in this
|
|
3253
|
+
* project. List the project's releases with `listReleases`.
|
|
3254
|
+
* - `409 dep.conflict`: `expected_deployment_id` is not the deployment this
|
|
3255
|
+
* write replaces, and `details.deployment` is that deployment. Inspect it,
|
|
3256
|
+
* then retry with its ID as `expected_deployment_id`, or stop.
|
|
3257
|
+
* - `409 rel.revoked`: the release is revoked and cannot be deployed. Change
|
|
3258
|
+
* the configuration and build a new release, or deploy a release that is
|
|
3259
|
+
* not revoked. Rebuilding unchanged content returns the same revoked release.
|
|
2931
3260
|
* @summary Create a deployment
|
|
2932
3261
|
*/
|
|
2933
3262
|
const createDeployment = async (createDeploymentBody, params, options) => {
|
|
@@ -2961,22 +3290,29 @@ const getListDeploymentsUrl = (params) => {
|
|
|
2961
3290
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2962
3291
|
});
|
|
2963
3292
|
const stringifiedParams = normalizedParams.toString();
|
|
2964
|
-
return stringifiedParams.length > 0 ? `${
|
|
3293
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/deployments?${stringifiedParams}` : `${getApiBaseUrl()}/deployments`;
|
|
2965
3294
|
};
|
|
2966
3295
|
/**
|
|
2967
|
-
* Lists what ran where
|
|
3296
|
+
* Lists the project's deployments: the history of what ran where and when,
|
|
3297
|
+
* or with `live=true` what is served now.
|
|
2968
3298
|
*
|
|
2969
|
-
* By default the list is the
|
|
2970
|
-
*
|
|
2971
|
-
* `origin`, the history of that
|
|
3299
|
+
* A deployment makes a release live on origins. By default the list is the
|
|
3300
|
+
* history, newest first: every deployment of the project, with every target
|
|
3301
|
+
* it made the release live on. With `origin`, it is the history of that
|
|
3302
|
+
* origin alone.
|
|
2972
3303
|
*
|
|
2973
|
-
* With `live=true`, the list is what is served now, newest first
|
|
2974
|
-
* project's newest primary deployment
|
|
2975
|
-
*
|
|
2976
|
-
*
|
|
2977
|
-
* deployment
|
|
3304
|
+
* With `live=true`, the list is what is served now, newest first. It holds
|
|
3305
|
+
* the project's newest primary deployment with every origin it names, an
|
|
3306
|
+
* origin the project no longer lists included: that deployment also serves
|
|
3307
|
+
* requests with no `Origin`, so it stays live. It also holds the newest
|
|
3308
|
+
* deployment to each live preview URL, narrowed to the URLs it still
|
|
3309
|
+
* serves. Combined with `origin`, it is the one deployment that origin
|
|
3310
|
+
* serves, or empty, as it is for an origin the project no longer lists.
|
|
2978
3311
|
*
|
|
2979
|
-
*
|
|
3312
|
+
* The `id` of an entry is the deployment ID that `getDeploymentById` (`GET /deployments/{deployment_id}`),
|
|
3313
|
+
* `getDeploymentVariables` (`GET /deployments/{deployment_id}/variables`) and `rollbackDeployment` (`POST /deployments/{deployment_id}/rollback`) take.
|
|
3314
|
+
*
|
|
3315
|
+
* `expand: ["release"]` embeds the release each deployment made live. It
|
|
2980
3316
|
* requires `release.read` and does not change the ordering or the page
|
|
2981
3317
|
* tokens.
|
|
2982
3318
|
* @summary List deployments
|
|
@@ -2993,16 +3329,20 @@ const getGetDeploymentByIdUrl = (deploymentId, params) => {
|
|
|
2993
3329
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2994
3330
|
});
|
|
2995
3331
|
const stringifiedParams = normalizedParams.toString();
|
|
2996
|
-
return stringifiedParams.length > 0 ? `${
|
|
3332
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/deployments/${encodeURIComponent(String(deploymentId))}?${stringifiedParams}` : `${getApiBaseUrl()}/deployments/${encodeURIComponent(String(deploymentId))}`;
|
|
2997
3333
|
};
|
|
2998
3334
|
/**
|
|
2999
|
-
*
|
|
3335
|
+
* Returns one deployment: the release it made live, the origins it made it
|
|
3336
|
+
* live on, and whether they still serve it.
|
|
3337
|
+
*
|
|
3338
|
+
* Pass the `id` that `createDeployment` (`POST /deployments`), `rollbackDeployment` (`POST /deployments/{deployment_id}/rollback`) or
|
|
3339
|
+
* `listDeployments` (`GET /deployments`) returns.
|
|
3000
3340
|
*
|
|
3001
|
-
* The lookup is scoped to the project in `project_id
|
|
3002
|
-
* belonging to another project answers not found exactly as an unknown
|
|
3341
|
+
* The lookup is scoped to the project in `project_id`. A deployment ID
|
|
3342
|
+
* belonging to another project answers not found exactly as an unknown ID
|
|
3003
3343
|
* does, so the endpoint cannot be used to probe for deployments in projects
|
|
3004
3344
|
* the caller cannot read.
|
|
3005
|
-
* @summary Get a deployment by
|
|
3345
|
+
* @summary Get a deployment by ID
|
|
3006
3346
|
*/
|
|
3007
3347
|
const getDeploymentById = async (deploymentId, params, options) => {
|
|
3008
3348
|
return customFetch(getGetDeploymentByIdUrl(deploymentId, params), {
|
|
@@ -3016,23 +3356,47 @@ const getRollbackDeploymentUrl = (deploymentId, params) => {
|
|
|
3016
3356
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
3017
3357
|
});
|
|
3018
3358
|
const stringifiedParams = normalizedParams.toString();
|
|
3019
|
-
return stringifiedParams.length > 0 ? `${
|
|
3020
|
-
};
|
|
3021
|
-
/**
|
|
3022
|
-
*
|
|
3023
|
-
* with the variable values
|
|
3024
|
-
*
|
|
3025
|
-
*
|
|
3026
|
-
*
|
|
3027
|
-
*
|
|
3028
|
-
*
|
|
3029
|
-
*
|
|
3030
|
-
*
|
|
3031
|
-
*
|
|
3032
|
-
*
|
|
3359
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/deployments/${encodeURIComponent(String(deploymentId))}/rollback?${stringifiedParams}` : `${getApiBaseUrl()}/deployments/${encodeURIComponent(String(deploymentId))}/rollback`;
|
|
3360
|
+
};
|
|
3361
|
+
/**
|
|
3362
|
+
* Rolls back to an earlier deployment by deploying its release again to
|
|
3363
|
+
* every current primary origin, with the variable values that deployment
|
|
3364
|
+
* froze.
|
|
3365
|
+
*
|
|
3366
|
+
* A release is a snapshot of the project's configuration. A deployment makes
|
|
3367
|
+
* a release live on origins and freezes the project's variable values with
|
|
3368
|
+
* it.
|
|
3369
|
+
*
|
|
3370
|
+
* The deployment ID in the path is the deployment to return to, not the one
|
|
3371
|
+
* to undo. Take it from the `id` that `listDeployments` (`GET /deployments`) returns, which lists
|
|
3372
|
+
* the newest deployment first.
|
|
3373
|
+
*
|
|
3374
|
+
* A rollback is a new deployment, not an undo. It has `reason: rollback`,
|
|
3375
|
+
* and its `rollback_to` names the deployment you returned to. It uses the
|
|
3376
|
+
* variable values that deployment froze, not the project's current ones, and
|
|
3377
|
+
* creates no release.
|
|
3378
|
+
*
|
|
3379
|
+
* To guard against a deployment that landed since you looked, set
|
|
3380
|
+
* `expected_deployment_id` in the request body to the newest primary
|
|
3381
|
+
* deployment, the one live now. The call then fails with `409 dep.conflict`
|
|
3382
|
+
* if another deployment has replaced it.
|
|
3383
|
+
*
|
|
3384
|
+
* A rollback is idempotent like a deployment to `primary`. When nothing
|
|
3385
|
+
* would change, it answers `200` with the newest primary deployment.
|
|
3386
|
+
*
|
|
3387
|
+
* If the request is refused:
|
|
3388
|
+
* - `400 dep.invalid`: the deployment went to preview URLs, which cannot be
|
|
3389
|
+
* rolled back. Deploy to the preview again with `createDeployment` (`POST /deployments`). The
|
|
3390
|
+
* error also appears when the project has no primary origin. Add one with
|
|
3391
|
+
* `zitadel origin add`.
|
|
3392
|
+
* - `404 dep.not_found`: no deployment of the project has that ID, or that
|
|
3393
|
+
* deployment recorded no variables to restore, so it cannot be a rollback
|
|
3394
|
+
* target. List them with `listDeployments` and pick another.
|
|
3033
3395
|
* - `409 dep.conflict`: `expected_deployment_id` is not the project's
|
|
3034
|
-
* newest primary deployment
|
|
3035
|
-
*
|
|
3396
|
+
* newest primary deployment, and `details.deployment` is that deployment.
|
|
3397
|
+
* Inspect it, then retry with its ID, or stop.
|
|
3398
|
+
* - `409 rel.revoked`: the release of that deployment is revoked and cannot
|
|
3399
|
+
* be deployed. Roll back to a deployment of a release that is not revoked.
|
|
3036
3400
|
* @summary Roll back to a deployment
|
|
3037
3401
|
*/
|
|
3038
3402
|
const rollbackDeployment = async (deploymentId, params, rollbackDeploymentBody, options) => {
|
|
@@ -3060,12 +3424,14 @@ const getGetDeploymentVariablesUrl = (deploymentId, params) => {
|
|
|
3060
3424
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
3061
3425
|
});
|
|
3062
3426
|
const stringifiedParams = normalizedParams.toString();
|
|
3063
|
-
return stringifiedParams.length > 0 ? `${
|
|
3427
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/deployments/${encodeURIComponent(String(deploymentId))}/variables?${stringifiedParams}` : `${getApiBaseUrl()}/deployments/${encodeURIComponent(String(deploymentId))}/variables`;
|
|
3064
3428
|
};
|
|
3065
3429
|
/**
|
|
3066
3430
|
* Returns the variable values the deployment froze when it was made. Later
|
|
3067
3431
|
* changes to the project's variables do not affect them. A secret reads
|
|
3068
3432
|
* back as `{"secret": true}`.
|
|
3433
|
+
*
|
|
3434
|
+
* Pass the `id` that `createDeployment` (`POST /deployments`) or `listDeployments` (`GET /deployments`) returns.
|
|
3069
3435
|
* @summary Get a deployment's variables
|
|
3070
3436
|
*/
|
|
3071
3437
|
const getDeploymentVariables = async (deploymentId, params, options) => {
|