@zitadel/api 1.0.0-alpha.22 → 1.0.0-alpha.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/fetch-DEQBdRAE.d.mts +44 -0
- package/dist/fetch-DEQBdRAE.d.mts.map +1 -0
- package/dist/generated/endpoints/zitadelNextGen.d.mts +2 -2
- package/dist/generated/endpoints/zitadelNextGen.mjs +1128 -458
- package/dist/generated/endpoints/zitadelNextGen.mjs.map +1 -1
- package/dist/generated/endpoints/zitadelNextGen.msw.d.mts +35 -7
- package/dist/generated/endpoints/zitadelNextGen.msw.d.mts.map +1 -1
- package/dist/generated/endpoints/zitadelNextGen.msw.mjs +4286 -1990
- package/dist/generated/endpoints/zitadelNextGen.msw.mjs.map +1 -1
- package/dist/generated/endpoints/zitadelNextGen.zod.d.mts +3716 -818
- package/dist/generated/endpoints/zitadelNextGen.zod.d.mts.map +1 -1
- package/dist/generated/endpoints/zitadelNextGen.zod.mjs +3603 -852
- 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 +792 -87
- package/dist/generated/model/index.mjs.map +1 -1
- package/dist/index-DCCtHY7q.d.mts +34169 -0
- package/dist/index-DCCtHY7q.d.mts.map +1 -0
- package/dist/runtime/api-factory.d.mts +1 -1
- package/dist/runtime/fetch.d.mts +2 -44
- package/dist/zitadelNextGen-NzRGHVHl.d.mts +894 -0
- package/dist/zitadelNextGen-NzRGHVHl.d.mts.map +1 -0
- package/package.json +5 -3
- package/src/generated/endpoints/zitadelNextGen.faker.ts +12297 -0
- package/src/generated/endpoints/zitadelNextGen.msw.ts +536 -10060
- package/src/generated/endpoints/zitadelNextGen.ts +1761 -533
- package/src/generated/endpoints/zitadelNextGen.zod.ts +14429 -6012
- package/src/generated/model/beginUserPasskeyRegistration201.ts +8 -6
- package/src/generated/model/beginUserPasskeyRegistration201Options.ts +2 -3
- package/src/generated/model/beginUserPasskeyRegistration400.ts +1 -1
- package/src/generated/model/beginUserPasskeyRegistration400Details.ts +1 -1
- package/src/generated/model/beginUserPasskeyRegistration401.ts +1 -1
- package/src/generated/model/beginUserPasskeyRegistration401Details.ts +1 -1
- package/src/generated/model/beginUserPasskeyRegistration403.ts +1 -1
- package/src/generated/model/beginUserPasskeyRegistration403Details.ts +1 -1
- package/src/generated/model/beginUserPasskeyRegistration404.ts +1 -1
- package/src/generated/model/beginUserPasskeyRegistration404Details.ts +1 -1
- package/src/generated/model/beginUserPasskeyRegistration500.ts +1 -1
- package/src/generated/model/beginUserPasskeyRegistration500Details.ts +1 -1
- package/src/generated/model/beginUserPasskeyRegistrationBody.ts +7 -7
- package/src/generated/model/beginUserPasskeyRegistrationDefault.ts +1 -1
- package/src/generated/model/completeClaim200.ts +1 -1
- package/src/generated/model/completeClaim400.ts +1 -1
- package/src/generated/model/completeClaim400Details.ts +1 -1
- package/src/generated/model/completeClaim401.ts +3 -4
- package/src/generated/model/completeClaim403.ts +1 -1
- package/src/generated/model/completeClaim404.ts +1 -1
- package/src/generated/model/completeClaim404Details.ts +1 -1
- package/src/generated/model/completeClaim409.ts +2 -3
- package/src/generated/model/completeClaim409Details.ts +1 -1
- package/src/generated/model/completeClaim410.ts +1 -1
- package/src/generated/model/completeClaim429.ts +1 -1
- package/src/generated/model/completeClaim429Details.ts +1 -1
- package/src/generated/model/completeClaimBody.ts +1 -1
- package/src/generated/model/completeClaimDefault.ts +1 -1
- package/src/generated/model/completeClaimDefaultDetails.ts +1 -1
- package/src/generated/model/createAuthAttempt201.ts +36 -31
- package/src/generated/model/createAuthAttempt201ChallengesItem.ts +14 -13
- package/src/generated/model/createAuthAttempt201ChallengesItemMethod.ts +1 -1
- package/src/generated/model/createAuthAttempt201ChallengesItemPayload.ts +8 -8
- package/src/generated/model/createAuthAttempt201ChallengesItemState.ts +4 -5
- package/src/generated/model/createAuthAttempt201CompletedFactorsItem.ts +7 -7
- package/src/generated/model/createAuthAttempt201CompletedFactorsItemMethod.ts +1 -1
- package/src/generated/model/createAuthAttempt201CompletedFactorsItemPayload.ts +12 -6
- package/src/generated/model/createAuthAttempt201RequiredFactorsItem.ts +1 -1
- package/src/generated/model/createAuthAttempt201State.ts +5 -6
- package/src/generated/model/createAuthAttemptBody.ts +8 -6
- package/src/generated/model/createAuthAttemptDefault.ts +1 -1
- package/src/generated/model/createBranding201.ts +13 -12
- package/src/generated/model/createBranding201Branding.ts +59 -30
- package/src/generated/model/createBranding201BrandingLayout.ts +10 -6
- package/src/generated/model/createBranding201BrandingShape.ts +30 -0
- package/src/generated/model/createBranding201BrandingShapeDensity.ts +19 -0
- package/src/generated/model/createBranding201BrandingTheme.ts +43 -0
- package/src/generated/model/createBranding201BrandingThemeDark.ts +34 -0
- package/src/generated/model/createBranding201BrandingThemeDarkPalette.ts +209 -0
- package/src/generated/model/createBranding201BrandingThemeLight.ts +34 -0
- package/src/generated/model/createBranding201BrandingThemeLightPalette.ts +209 -0
- package/src/generated/model/createBranding201BrandingThemeMode.ts +19 -0
- package/src/generated/model/createBranding201BrandingTypography.ts +47 -0
- package/src/generated/model/createBranding400.ts +1 -1
- package/src/generated/model/createBranding400Details.ts +1 -1
- package/src/generated/model/createBrandingBody.ts +59 -30
- package/src/generated/model/createBrandingBodyLayout.ts +10 -6
- package/src/generated/model/createBrandingBodyShape.ts +30 -0
- package/src/generated/model/createBrandingBodyShapeDensity.ts +19 -0
- package/src/generated/model/createBrandingBodyTheme.ts +43 -0
- package/src/generated/model/createBrandingBodyThemeDark.ts +34 -0
- package/src/generated/model/createBrandingBodyThemeDarkPalette.ts +209 -0
- package/src/generated/model/createBrandingBodyThemeLight.ts +34 -0
- package/src/generated/model/createBrandingBodyThemeLightPalette.ts +209 -0
- package/src/generated/model/createBrandingBodyThemeMode.ts +19 -0
- package/src/generated/model/createBrandingBodyTypography.ts +47 -0
- package/src/generated/model/createBrandingDefault.ts +1 -1
- package/src/generated/model/createBrandingDefaultDetails.ts +1 -1
- package/src/generated/model/createBrandingParams.ts +1 -1
- package/src/generated/model/createDeployment200.ts +62 -0
- package/src/generated/model/createDeployment200Metadata.ts +58 -0
- package/src/generated/model/createDeployment200MetadataDeployedByType.ts +21 -0
- package/src/generated/model/createDeployment200MetadataReason.ts +26 -0
- package/src/generated/model/createDeployment200Release.ts +44 -0
- package/src/generated/model/createDeployment200ReleaseMetadata.ts +43 -0
- package/src/generated/model/createDeployment200ReleaseMetadataCreatedByType.ts +21 -0
- package/src/generated/model/createDeployment200ReleasePointersItem.ts +56 -0
- package/src/generated/model/createDeployment200ReleasePointersItemKind.ts +26 -0
- package/src/generated/model/createDeployment201.ts +62 -0
- package/src/generated/model/createDeployment201Metadata.ts +58 -0
- package/src/generated/model/createDeployment201MetadataDeployedByType.ts +21 -0
- package/src/generated/model/createDeployment201MetadataReason.ts +26 -0
- package/src/generated/model/createDeployment201Release.ts +44 -0
- package/src/generated/model/createDeployment201ReleaseMetadata.ts +43 -0
- package/src/generated/model/createDeployment201ReleaseMetadataCreatedByType.ts +21 -0
- package/src/generated/model/createDeployment201ReleasePointersItem.ts +56 -0
- package/src/generated/model/createDeployment201ReleasePointersItemKind.ts +26 -0
- package/src/generated/model/createDeploymentBody.ts +71 -0
- package/src/generated/model/createDeploymentBodyReason.ts +26 -0
- package/src/generated/model/createDeploymentDefault.ts +109 -0
- package/src/generated/model/createDeploymentParams.ts +15 -0
- package/src/generated/model/createFlow201.ts +27 -21
- package/src/generated/model/createFlow201Branding.ts +59 -30
- package/src/generated/model/createFlow201BrandingLayout.ts +10 -6
- package/src/generated/model/createFlow201BrandingShape.ts +30 -0
- package/src/generated/model/createFlow201BrandingShapeDensity.ts +19 -0
- package/src/generated/model/createFlow201BrandingTheme.ts +43 -0
- package/src/generated/model/createFlow201BrandingThemeDark.ts +34 -0
- package/src/generated/model/createFlow201BrandingThemeDarkPalette.ts +209 -0
- package/src/generated/model/createFlow201BrandingThemeLight.ts +34 -0
- package/src/generated/model/createFlow201BrandingThemeLightPalette.ts +209 -0
- package/src/generated/model/createFlow201BrandingThemeMode.ts +19 -0
- package/src/generated/model/createFlow201BrandingTypography.ts +47 -0
- package/src/generated/model/createFlow201Step.ts +42 -36
- package/src/generated/model/createFlow201StepActionsItem.ts +22 -23
- package/src/generated/model/createFlow201StepActionsItemKind.ts +8 -12
- package/src/generated/model/createFlow201StepChallenge.ts +15 -14
- package/src/generated/model/createFlow201StepChallengeMethod.ts +1 -1
- package/src/generated/model/createFlow201StepChallengeOptions.ts +4 -5
- package/src/generated/model/createFlow201StepComplete.ts +3 -4
- package/src/generated/model/createFlow201StepFieldsItem.ts +23 -20
- package/src/generated/model/createFlow201StepFieldsItemType.ts +5 -6
- package/src/generated/model/createFlow201StepFieldsItemValidation.ts +19 -18
- package/src/generated/model/createFlow201StepFieldsItemValidationFormat.ts +5 -6
- package/src/generated/model/createFlow201StepGates.ts +17 -15
- package/src/generated/model/createFlow201StepGatesConfig.ts +2 -3
- package/src/generated/model/createFlow201StepGatesKind.ts +3 -4
- package/src/generated/model/createFlow201StepSsoProvidersItem.ts +1 -1
- package/src/generated/model/createFlow201StepTexts.ts +2 -3
- package/src/generated/model/createFlow400.ts +1 -1
- package/src/generated/model/createFlow400Details.ts +1 -1
- package/src/generated/model/createFlowBody.ts +21 -20
- package/src/generated/model/createFlowBodyHint.ts +1 -1
- package/src/generated/model/createFlowBodyPurpose.ts +1 -1
- package/src/generated/model/createFlowDefault.ts +1 -1
- package/src/generated/model/createFlowDefinition201.ts +15 -13
- package/src/generated/model/createFlowDefinition201FlowDefinition.ts +43 -44
- package/src/generated/model/createFlowDefinition201FlowDefinitionAudience.ts +4 -5
- package/src/generated/model/createFlowDefinition201FlowDefinitionStatus.ts +6 -9
- package/src/generated/model/createFlowDefinition201FlowDefinitionStepsItem.ts +54 -40
- package/src/generated/model/createFlowDefinition201FlowDefinitionStepsItemActionsItem.ts +28 -23
- package/src/generated/model/createFlowDefinition201FlowDefinitionStepsItemActionsItemKind.ts +11 -13
- package/src/generated/model/createFlowDefinition201FlowDefinitionStepsItemComplete.ts +3 -4
- package/src/generated/model/createFlowDefinition201FlowDefinitionStepsItemGates.ts +18 -16
- package/src/generated/model/createFlowDefinition201FlowDefinitionStepsItemGatesConfig.ts +2 -3
- package/src/generated/model/createFlowDefinition201FlowDefinitionStepsItemGatesKind.ts +3 -4
- package/src/generated/model/createFlowDefinition201FlowDefinitionStepsItemOnSuccess.ts +4 -5
- package/src/generated/model/createFlowDefinition201FlowDefinitionStepsItemTransitions.ts +35 -31
- package/src/generated/model/createFlowDefinition201FlowDefinitionStepsItemTransitionsAction.ts +26 -0
- package/src/generated/model/createFlowDefinition201FlowDefinitionStepsItemTransitionsPurpose.ts +31 -0
- package/src/generated/model/createFlowDefinition201UserSchema.ts +11 -88
- package/src/generated/model/createFlowDefinition201UserSchemaMetadata.ts +12 -0
- package/src/generated/model/createFlowDefinition201UserSchemaSchema.ts +99 -0
- package/src/generated/model/createFlowDefinition400.ts +1 -1
- package/src/generated/model/createFlowDefinition400Details.ts +1 -1
- package/src/generated/model/createFlowDefinitionBody.ts +16 -15
- package/src/generated/model/createFlowDefinitionBodyFlowDefinition.ts +43 -44
- package/src/generated/model/createFlowDefinitionBodyFlowDefinitionAudience.ts +4 -5
- package/src/generated/model/createFlowDefinitionBodyFlowDefinitionStatus.ts +6 -9
- package/src/generated/model/createFlowDefinitionBodyFlowDefinitionStepsItem.ts +54 -40
- package/src/generated/model/createFlowDefinitionBodyFlowDefinitionStepsItemActionsItem.ts +28 -23
- package/src/generated/model/createFlowDefinitionBodyFlowDefinitionStepsItemActionsItemKind.ts +11 -13
- package/src/generated/model/createFlowDefinitionBodyFlowDefinitionStepsItemComplete.ts +3 -4
- package/src/generated/model/createFlowDefinitionBodyFlowDefinitionStepsItemGates.ts +18 -16
- package/src/generated/model/createFlowDefinitionBodyFlowDefinitionStepsItemGatesConfig.ts +2 -3
- package/src/generated/model/createFlowDefinitionBodyFlowDefinitionStepsItemGatesKind.ts +3 -4
- package/src/generated/model/createFlowDefinitionBodyFlowDefinitionStepsItemOnSuccess.ts +4 -5
- package/src/generated/model/createFlowDefinitionBodyFlowDefinitionStepsItemTransitions.ts +35 -31
- package/src/generated/model/createFlowDefinitionBodyFlowDefinitionStepsItemTransitionsAction.ts +26 -0
- package/src/generated/model/createFlowDefinitionBodyFlowDefinitionStepsItemTransitionsPurpose.ts +31 -0
- package/src/generated/model/createFlowDefinitionDefault.ts +11 -1
- package/src/generated/model/createGrant201.ts +18 -35
- package/src/generated/model/createGrant201ObjectType.ts +1 -1
- package/src/generated/model/createGrant201Relation.ts +1 -1
- package/src/generated/model/createGrant201Team.ts +18 -7
- package/src/generated/model/createGrant201TeamStatus.ts +21 -0
- package/src/generated/model/createGrant201User.ts +33 -19
- package/src/generated/model/createGrant201UserAttributes.ts +13 -0
- package/src/generated/model/createGrant201UserMetadata.ts +45 -0
- package/src/generated/model/createGrant201UserMetadataLifecycleOwnerTeam.ts +44 -0
- package/src/generated/model/createGrant201UserMetadataLifecycleOwnerTeamStatus.ts +21 -0
- package/src/generated/model/createGrant201UserMetadataStatus.ts +20 -0
- package/src/generated/model/createGrant400.ts +1 -1
- package/src/generated/model/createGrant400Details.ts +1 -1
- package/src/generated/model/createGrant401.ts +1 -1
- package/src/generated/model/createGrant401Details.ts +1 -1
- package/src/generated/model/createGrant403.ts +1 -1
- package/src/generated/model/createGrant403Details.ts +1 -1
- package/src/generated/model/createGrant404.ts +1 -1
- package/src/generated/model/createGrant404Details.ts +1 -1
- package/src/generated/model/createGrant409.ts +1 -1
- package/src/generated/model/createGrant409Details.ts +1 -1
- package/src/generated/model/createGrant429.ts +1 -1
- package/src/generated/model/createGrant429Details.ts +1 -1
- package/src/generated/model/createGrantBody.ts +24 -14
- package/src/generated/model/createGrantBodyRelation.ts +1 -1
- package/src/generated/model/createGrantBodyTeam.ts +23 -0
- package/src/generated/model/createGrantBodyUser.ts +27 -0
- package/src/generated/model/createGrantDefault.ts +1 -1
- package/src/generated/model/createGrantParams.ts +1 -1
- package/src/generated/model/createHandoff200.ts +15 -15
- package/src/generated/model/createHandoffDefault.ts +1 -1
- package/src/generated/model/createIdp200.ts +38 -0
- package/src/generated/model/createIdp200Definition.ts +47 -0
- package/src/generated/model/createIdp200DefinitionClaimMapping.ts +12 -0
- package/src/generated/model/createIdp200DefinitionOauth2.ts +55 -0
- package/src/generated/model/createIdp200DefinitionOauth2StaticAuthorizeParameters.ts +12 -0
- package/src/generated/model/createIdp200DefinitionOauth2SupplementaryFetch.ts +17 -0
- package/src/generated/model/createIdp200DefinitionOauth2TokenEndpointAuthMethod.ts +18 -0
- package/src/generated/model/createIdp200DefinitionOidc.ts +65 -0
- package/src/generated/model/createIdp200DefinitionOidcStaticAuthorizeParameters.ts +12 -0
- package/src/generated/model/createIdp200DefinitionOidcTokenEndpointAuthMethod.ts +18 -0
- package/src/generated/model/createIdp200DefinitionProtocol.ts +18 -0
- package/src/generated/model/createIdp200DefinitionProvisioning.ts +15 -0
- package/src/generated/model/createIdp200DefinitionProvisioningCreation.ts +15 -0
- package/src/generated/model/createIdp200DefinitionVerifiedClaims.ts +12 -0
- package/src/generated/model/createIdp201.ts +38 -0
- package/src/generated/model/createIdp201Definition.ts +47 -0
- package/src/generated/model/createIdp201DefinitionClaimMapping.ts +12 -0
- package/src/generated/model/createIdp201DefinitionOauth2.ts +55 -0
- package/src/generated/model/createIdp201DefinitionOauth2StaticAuthorizeParameters.ts +12 -0
- package/src/generated/model/createIdp201DefinitionOauth2SupplementaryFetch.ts +17 -0
- package/src/generated/model/createIdp201DefinitionOauth2TokenEndpointAuthMethod.ts +18 -0
- package/src/generated/model/createIdp201DefinitionOidc.ts +65 -0
- package/src/generated/model/createIdp201DefinitionOidcStaticAuthorizeParameters.ts +12 -0
- package/src/generated/model/createIdp201DefinitionOidcTokenEndpointAuthMethod.ts +18 -0
- package/src/generated/model/createIdp201DefinitionProtocol.ts +18 -0
- package/src/generated/model/createIdp201DefinitionProvisioning.ts +15 -0
- package/src/generated/model/createIdp201DefinitionProvisioningCreation.ts +15 -0
- package/src/generated/model/createIdp201DefinitionVerifiedClaims.ts +12 -0
- package/src/generated/model/{createSchema400.ts → createIdp400.ts} +4 -4
- package/src/generated/model/{createSchema409Details.ts → createIdp400Details.ts} +2 -2
- package/src/generated/model/{createSchema409.ts → createIdp401.ts} +4 -4
- package/src/generated/model/{createSchema400Details.ts → createIdp401Details.ts} +2 -2
- package/src/generated/model/createIdp403.ts +20 -0
- package/src/generated/model/createIdp403Details.ts +12 -0
- package/src/generated/model/createIdp404.ts +20 -0
- package/src/generated/model/createIdp404Details.ts +12 -0
- package/src/generated/model/createIdpBody.ts +15 -0
- package/src/generated/model/createIdpBodyIdp.ts +47 -0
- package/src/generated/model/createIdpBodyIdpClaimMapping.ts +12 -0
- package/src/generated/model/createIdpBodyIdpOauth2.ts +55 -0
- package/src/generated/model/createIdpBodyIdpOauth2StaticAuthorizeParameters.ts +12 -0
- package/src/generated/model/createIdpBodyIdpOauth2SupplementaryFetch.ts +17 -0
- package/src/generated/model/createIdpBodyIdpOauth2TokenEndpointAuthMethod.ts +18 -0
- package/src/generated/model/createIdpBodyIdpOidc.ts +65 -0
- package/src/generated/model/createIdpBodyIdpOidcStaticAuthorizeParameters.ts +12 -0
- package/src/generated/model/createIdpBodyIdpOidcTokenEndpointAuthMethod.ts +18 -0
- package/src/generated/model/createIdpBodyIdpProtocol.ts +18 -0
- package/src/generated/model/createIdpBodyIdpProvisioning.ts +15 -0
- package/src/generated/model/createIdpBodyIdpProvisioningCreation.ts +15 -0
- package/src/generated/model/createIdpBodyIdpVerifiedClaims.ts +12 -0
- package/src/generated/model/{deleteFlowDefinitionDefault.ts → createIdpDefault.ts} +7 -7
- package/src/generated/model/createIdpParams.ts +15 -0
- package/src/generated/model/createProject201.ts +4 -7
- package/src/generated/model/createProject429.ts +1 -1
- package/src/generated/model/createProject429Details.ts +1 -1
- package/src/generated/model/createProjectBody.ts +6 -6
- package/src/generated/model/createProjectDefault.ts +1 -1
- package/src/generated/model/createRelease200.ts +19 -18
- package/src/generated/model/createRelease200Metadata.ts +20 -16
- package/src/generated/model/createRelease200MetadataCreatedByType.ts +21 -0
- package/src/generated/model/createRelease200PointersItem.ts +37 -39
- package/src/generated/model/createRelease200PointersItemKind.ts +8 -9
- package/src/generated/model/createRelease201.ts +19 -18
- package/src/generated/model/createRelease201Metadata.ts +20 -16
- package/src/generated/model/createRelease201MetadataCreatedByType.ts +21 -0
- package/src/generated/model/createRelease201PointersItem.ts +37 -39
- package/src/generated/model/createRelease201PointersItemKind.ts +8 -9
- package/src/generated/model/createReleaseBody.ts +30 -24
- package/src/generated/model/createReleaseBodyPointersItem.ts +21 -22
- package/src/generated/model/createReleaseBodyPointersItemKind.ts +8 -9
- package/src/generated/model/createReleaseDefault.ts +71 -1
- package/src/generated/model/createReleaseParams.ts +1 -1
- package/src/generated/model/createSchema201.ts +1 -1
- package/src/generated/model/createSchemaBody.ts +43 -32
- package/src/generated/model/createSchemaDefault.ts +142 -13
- package/src/generated/model/createSchemaParams.ts +1 -1
- package/src/generated/model/createSession201.ts +13 -12
- package/src/generated/model/createSession201Session.ts +34 -29
- package/src/generated/model/createSession201SessionFactorsItem.ts +7 -7
- package/src/generated/model/createSession201SessionFactorsItemMethod.ts +1 -1
- package/src/generated/model/createSession201SessionFactorsItemPayload.ts +12 -6
- package/src/generated/model/createSession201SessionMetadata.ts +1 -1
- package/src/generated/model/createSession201SessionState.ts +4 -5
- package/src/generated/model/createSession201SessionUser.ts +20 -18
- package/src/generated/model/createSession201SessionUserAgent.ts +1 -1
- package/src/generated/model/createSession400.ts +1 -1
- package/src/generated/model/createSession400Details.ts +1 -1
- package/src/generated/model/createSessionBody.ts +5 -4
- package/src/generated/model/createSessionBodyUserAgent.ts +3 -4
- package/src/generated/model/createSessionDefault.ts +1 -1
- package/src/generated/model/createTeam201.ts +6 -5
- package/src/generated/model/createTeam201Status.ts +4 -5
- package/src/generated/model/createTeam400.ts +1 -1
- package/src/generated/model/createTeam400Details.ts +1 -1
- package/src/generated/model/createTeam401.ts +1 -1
- package/src/generated/model/createTeam401Details.ts +1 -1
- package/src/generated/model/createTeam403.ts +1 -1
- package/src/generated/model/createTeam403Details.ts +1 -1
- package/src/generated/model/createTeam404.ts +1 -1
- package/src/generated/model/createTeam404Details.ts +1 -1
- package/src/generated/model/createTeam409.ts +1 -1
- package/src/generated/model/createTeam409Details.ts +1 -1
- package/src/generated/model/createTeam429.ts +1 -1
- package/src/generated/model/createTeam429Details.ts +1 -1
- package/src/generated/model/createTeamBody.ts +1 -1
- package/src/generated/model/createTeamDefault.ts +1 -1
- package/src/generated/model/createTeamDefaultDetails.ts +1 -1
- package/src/generated/model/createTeamParams.ts +1 -1
- package/src/generated/model/createUser201.ts +45 -39
- package/src/generated/model/createUser201Attributes.ts +2 -3
- package/src/generated/model/createUser201Metadata.ts +24 -22
- package/src/generated/model/createUser201MetadataLifecycleOwnerTeam.ts +23 -22
- package/src/generated/model/createUser201MetadataLifecycleOwnerTeamStatus.ts +21 -0
- package/src/generated/model/createUser201MetadataStatus.ts +1 -1
- package/src/generated/model/createUser201TeamsItem.ts +10 -10
- package/src/generated/model/createUser201TeamsItemMembershipStatus.ts +2 -3
- package/src/generated/model/createUser400.ts +1 -1
- package/src/generated/model/createUser400Details.ts +1 -1
- package/src/generated/model/createUser401.ts +1 -1
- package/src/generated/model/createUser401Details.ts +1 -1
- package/src/generated/model/createUser403.ts +1 -1
- package/src/generated/model/createUser403Details.ts +1 -1
- package/src/generated/model/createUser409.ts +1 -1
- package/src/generated/model/createUser409Details.ts +1 -1
- package/src/generated/model/createUser500.ts +1 -1
- package/src/generated/model/createUser500Details.ts +1 -1
- package/src/generated/model/createUserBody.ts +18 -19
- package/src/generated/model/createUserBodyAttributes.ts +2 -3
- package/src/generated/model/createUserDefault.ts +1 -1
- package/src/generated/model/createUserParams.ts +15 -16
- package/src/generated/model/deleteGrant401.ts +1 -1
- package/src/generated/model/deleteGrant401Details.ts +1 -1
- package/src/generated/model/deleteGrant403.ts +1 -1
- package/src/generated/model/deleteGrant403Details.ts +1 -1
- package/src/generated/model/deleteGrant404.ts +1 -1
- package/src/generated/model/deleteGrant404Details.ts +1 -1
- package/src/generated/model/deleteGrantDefault.ts +1 -1
- package/src/generated/model/deleteGrantParams.ts +1 -1
- package/src/generated/model/deleteTeam400.ts +1 -1
- package/src/generated/model/deleteTeam400Details.ts +1 -1
- package/src/generated/model/deleteTeam401.ts +1 -1
- package/src/generated/model/deleteTeam401Details.ts +1 -1
- package/src/generated/model/deleteTeam403.ts +1 -1
- package/src/generated/model/deleteTeam403Details.ts +1 -1
- package/src/generated/model/deleteTeam409.ts +20 -0
- package/src/generated/model/deleteTeam409Details.ts +12 -0
- package/src/generated/model/deleteTeamDefault.ts +1 -1
- package/src/generated/model/deleteTeamDefaultDetails.ts +1 -1
- package/src/generated/model/deleteUserByID401.ts +1 -1
- package/src/generated/model/deleteUserByID401Details.ts +1 -1
- package/src/generated/model/deleteUserByID404.ts +1 -1
- package/src/generated/model/deleteUserByID404Details.ts +1 -1
- package/src/generated/model/deleteUserByIDDefault.ts +1 -1
- package/src/generated/model/deleteVariableDefault.ts +69 -0
- package/src/generated/model/deleteVariableParams.ts +25 -0
- package/src/generated/model/exchangeHandoff200.ts +13 -12
- package/src/generated/model/exchangeHandoff200Session.ts +34 -29
- package/src/generated/model/exchangeHandoff200SessionFactorsItem.ts +7 -7
- package/src/generated/model/exchangeHandoff200SessionFactorsItemMethod.ts +1 -1
- package/src/generated/model/exchangeHandoff200SessionFactorsItemPayload.ts +12 -6
- package/src/generated/model/exchangeHandoff200SessionMetadata.ts +1 -1
- package/src/generated/model/exchangeHandoff200SessionState.ts +4 -5
- package/src/generated/model/exchangeHandoff200SessionUser.ts +20 -18
- package/src/generated/model/exchangeHandoff200SessionUserAgent.ts +1 -1
- package/src/generated/model/exchangeHandoff400.ts +1 -1
- package/src/generated/model/exchangeHandoff400Details.ts +1 -1
- package/src/generated/model/exchangeHandoff401.ts +1 -1
- package/src/generated/model/exchangeHandoff401Details.ts +1 -1
- package/src/generated/model/exchangeHandoff410.ts +1 -1
- package/src/generated/model/exchangeHandoff410Details.ts +1 -1
- package/src/generated/model/exchangeHandoffBody.ts +7 -5
- package/src/generated/model/exchangeHandoffDefault.ts +1 -1
- package/src/generated/model/exchangeHandoffParams.ts +1 -1
- package/src/generated/model/finishUserPasskeyRegistration201.ts +1 -1
- package/src/generated/model/finishUserPasskeyRegistration400.ts +1 -1
- package/src/generated/model/finishUserPasskeyRegistration400Details.ts +1 -1
- package/src/generated/model/finishUserPasskeyRegistration401.ts +1 -1
- package/src/generated/model/finishUserPasskeyRegistration401Details.ts +1 -1
- package/src/generated/model/finishUserPasskeyRegistration403.ts +1 -1
- package/src/generated/model/finishUserPasskeyRegistration403Details.ts +1 -1
- package/src/generated/model/finishUserPasskeyRegistration404.ts +1 -1
- package/src/generated/model/finishUserPasskeyRegistration404Details.ts +1 -1
- package/src/generated/model/finishUserPasskeyRegistration500.ts +1 -1
- package/src/generated/model/finishUserPasskeyRegistration500Details.ts +1 -1
- package/src/generated/model/finishUserPasskeyRegistrationBody.ts +4 -3
- package/src/generated/model/finishUserPasskeyRegistrationBodyAttestation.ts +1 -1
- package/src/generated/model/finishUserPasskeyRegistrationDefault.ts +1 -1
- package/src/generated/model/getAuthAttempt200.ts +36 -31
- package/src/generated/model/getAuthAttempt200ChallengesItem.ts +14 -13
- package/src/generated/model/getAuthAttempt200ChallengesItemMethod.ts +1 -1
- package/src/generated/model/getAuthAttempt200ChallengesItemPayload.ts +8 -8
- package/src/generated/model/getAuthAttempt200ChallengesItemState.ts +4 -5
- package/src/generated/model/getAuthAttempt200CompletedFactorsItem.ts +7 -7
- package/src/generated/model/getAuthAttempt200CompletedFactorsItemMethod.ts +1 -1
- package/src/generated/model/getAuthAttempt200CompletedFactorsItemPayload.ts +12 -6
- package/src/generated/model/getAuthAttempt200RequiredFactorsItem.ts +1 -1
- package/src/generated/model/getAuthAttempt200State.ts +5 -6
- package/src/generated/model/getAuthAttemptDefault.ts +1 -1
- package/src/generated/model/getBrandingById200.ts +13 -12
- package/src/generated/model/getBrandingById200Branding.ts +59 -30
- package/src/generated/model/getBrandingById200BrandingLayout.ts +10 -6
- package/src/generated/model/getBrandingById200BrandingShape.ts +30 -0
- package/src/generated/model/getBrandingById200BrandingShapeDensity.ts +19 -0
- package/src/generated/model/getBrandingById200BrandingTheme.ts +43 -0
- package/src/generated/model/getBrandingById200BrandingThemeDark.ts +34 -0
- package/src/generated/model/getBrandingById200BrandingThemeDarkPalette.ts +209 -0
- package/src/generated/model/getBrandingById200BrandingThemeLight.ts +34 -0
- package/src/generated/model/getBrandingById200BrandingThemeLightPalette.ts +209 -0
- package/src/generated/model/getBrandingById200BrandingThemeMode.ts +19 -0
- package/src/generated/model/getBrandingById200BrandingTypography.ts +47 -0
- package/src/generated/model/getBrandingById404.ts +1 -1
- package/src/generated/model/getBrandingById404Details.ts +1 -1
- package/src/generated/model/getBrandingByIdDefault.ts +1 -1
- package/src/generated/model/getBrandingByIdDefaultDetails.ts +1 -1
- package/src/generated/model/getClaimStatus200.ts +5 -6
- package/src/generated/model/getClaimStatus401.ts +1 -1
- package/src/generated/model/getClaimStatus401Details.ts +1 -1
- package/src/generated/model/getClaimStatus403.ts +3 -4
- package/src/generated/model/getClaimStatus404.ts +1 -1
- package/src/generated/model/getClaimStatus404Details.ts +1 -1
- package/src/generated/model/getClaimStatus410.ts +1 -1
- package/src/generated/model/getClaimStatus429.ts +1 -1
- package/src/generated/model/getClaimStatus429Details.ts +1 -1
- package/src/generated/model/getClaimStatusDefault.ts +1 -1
- package/src/generated/model/getClaimStatusDefaultDetails.ts +1 -1
- package/src/generated/model/getClaimStatusParams.ts +1 -1
- package/src/generated/model/getClaimWindow200.ts +7 -7
- package/src/generated/model/getClaimWindow404.ts +1 -1
- package/src/generated/model/getClaimWindow404Details.ts +1 -1
- package/src/generated/model/getClaimWindow429.ts +1 -1
- package/src/generated/model/getClaimWindow429Details.ts +1 -1
- package/src/generated/model/getClaimWindowDefault.ts +1 -1
- package/src/generated/model/getClaimWindowDefaultDetails.ts +1 -1
- package/src/generated/model/getClaimWindowParams.ts +1 -1
- package/src/generated/model/getDeploymentById200.ts +62 -0
- package/src/generated/model/getDeploymentById200Metadata.ts +58 -0
- package/src/generated/model/getDeploymentById200MetadataDeployedByType.ts +21 -0
- package/src/generated/model/getDeploymentById200MetadataReason.ts +26 -0
- package/src/generated/model/getDeploymentById200Release.ts +44 -0
- package/src/generated/model/getDeploymentById200ReleaseMetadata.ts +43 -0
- package/src/generated/model/getDeploymentById200ReleaseMetadataCreatedByType.ts +21 -0
- package/src/generated/model/getDeploymentById200ReleasePointersItem.ts +56 -0
- package/src/generated/model/getDeploymentById200ReleasePointersItemKind.ts +26 -0
- package/src/generated/model/getDeploymentByIdDefault.ts +59 -0
- package/src/generated/model/getDeploymentByIdParams.ts +15 -0
- package/src/generated/model/getEnvironmentByName200.ts +21 -17
- package/src/generated/model/getEnvironmentByName200CurrentDeployment.ts +38 -0
- package/src/generated/model/getEnvironmentByName200CurrentDeploymentReason.ts +26 -0
- package/src/generated/model/getEnvironmentByNameDefault.ts +1 -1
- package/src/generated/model/getEnvironmentByNameParams.ts +1 -1
- package/src/generated/model/getEvent200.ts +667 -273
- package/src/generated/model/getEvent401.ts +1 -1
- package/src/generated/model/getEvent401Details.ts +1 -1
- package/src/generated/model/getEvent403.ts +1 -1
- package/src/generated/model/getEvent403Details.ts +1 -1
- package/src/generated/model/getEvent404.ts +1 -1
- package/src/generated/model/getEvent404Details.ts +1 -1
- package/src/generated/model/getEventDefault.ts +1 -1
- package/src/generated/model/getEventDefaultDetails.ts +1 -1
- package/src/generated/model/getEventParams.ts +1 -1
- package/src/generated/model/getFlowDefinition200.ts +15 -13
- package/src/generated/model/getFlowDefinition200FlowDefinition.ts +43 -44
- package/src/generated/model/getFlowDefinition200FlowDefinitionAudience.ts +4 -5
- package/src/generated/model/getFlowDefinition200FlowDefinitionStatus.ts +6 -9
- package/src/generated/model/getFlowDefinition200FlowDefinitionStepsItem.ts +54 -40
- package/src/generated/model/getFlowDefinition200FlowDefinitionStepsItemActionsItem.ts +28 -23
- package/src/generated/model/getFlowDefinition200FlowDefinitionStepsItemActionsItemKind.ts +11 -13
- package/src/generated/model/getFlowDefinition200FlowDefinitionStepsItemComplete.ts +3 -4
- package/src/generated/model/getFlowDefinition200FlowDefinitionStepsItemGates.ts +18 -16
- package/src/generated/model/getFlowDefinition200FlowDefinitionStepsItemGatesConfig.ts +2 -3
- package/src/generated/model/getFlowDefinition200FlowDefinitionStepsItemGatesKind.ts +3 -4
- package/src/generated/model/getFlowDefinition200FlowDefinitionStepsItemOnSuccess.ts +4 -5
- package/src/generated/model/getFlowDefinition200FlowDefinitionStepsItemTransitions.ts +35 -31
- package/src/generated/model/getFlowDefinition200FlowDefinitionStepsItemTransitionsAction.ts +26 -0
- package/src/generated/model/getFlowDefinition200FlowDefinitionStepsItemTransitionsPurpose.ts +31 -0
- package/src/generated/model/getFlowDefinition200UserSchema.ts +11 -88
- package/src/generated/model/getFlowDefinition200UserSchemaMetadata.ts +12 -0
- package/src/generated/model/getFlowDefinition200UserSchemaSchema.ts +99 -0
- package/src/generated/model/getFlowDefinitionDefault.ts +1 -1
- package/src/generated/model/getFlowStep200.ts +27 -21
- package/src/generated/model/getFlowStep200Branding.ts +59 -30
- package/src/generated/model/getFlowStep200BrandingLayout.ts +10 -6
- package/src/generated/model/getFlowStep200BrandingShape.ts +30 -0
- package/src/generated/model/getFlowStep200BrandingShapeDensity.ts +19 -0
- package/src/generated/model/getFlowStep200BrandingTheme.ts +43 -0
- package/src/generated/model/getFlowStep200BrandingThemeDark.ts +34 -0
- package/src/generated/model/getFlowStep200BrandingThemeDarkPalette.ts +209 -0
- package/src/generated/model/getFlowStep200BrandingThemeLight.ts +34 -0
- package/src/generated/model/getFlowStep200BrandingThemeLightPalette.ts +209 -0
- package/src/generated/model/getFlowStep200BrandingThemeMode.ts +19 -0
- package/src/generated/model/getFlowStep200BrandingTypography.ts +47 -0
- package/src/generated/model/getFlowStep200Step.ts +42 -36
- package/src/generated/model/getFlowStep200StepActionsItem.ts +22 -23
- package/src/generated/model/getFlowStep200StepActionsItemKind.ts +8 -12
- package/src/generated/model/getFlowStep200StepChallenge.ts +15 -14
- package/src/generated/model/getFlowStep200StepChallengeMethod.ts +1 -1
- package/src/generated/model/getFlowStep200StepChallengeOptions.ts +4 -5
- package/src/generated/model/getFlowStep200StepComplete.ts +3 -4
- package/src/generated/model/getFlowStep200StepFieldsItem.ts +23 -20
- package/src/generated/model/getFlowStep200StepFieldsItemType.ts +5 -6
- package/src/generated/model/getFlowStep200StepFieldsItemValidation.ts +19 -18
- package/src/generated/model/getFlowStep200StepFieldsItemValidationFormat.ts +5 -6
- package/src/generated/model/getFlowStep200StepGates.ts +17 -15
- package/src/generated/model/getFlowStep200StepGatesConfig.ts +2 -3
- package/src/generated/model/getFlowStep200StepGatesKind.ts +3 -4
- package/src/generated/model/getFlowStep200StepSsoProvidersItem.ts +1 -1
- package/src/generated/model/getFlowStep200StepTexts.ts +2 -3
- package/src/generated/model/getFlowStep404.ts +1 -1
- package/src/generated/model/getFlowStep404Details.ts +1 -1
- package/src/generated/model/getFlowStep410.ts +1 -1
- package/src/generated/model/getFlowStep410Details.ts +1 -1
- package/src/generated/model/getFlowStepDefault.ts +1 -1
- package/src/generated/model/getGrant200.ts +18 -35
- package/src/generated/model/getGrant200ObjectType.ts +1 -1
- package/src/generated/model/getGrant200Relation.ts +1 -1
- package/src/generated/model/getGrant200Team.ts +18 -7
- package/src/generated/model/getGrant200TeamStatus.ts +21 -0
- package/src/generated/model/getGrant200User.ts +33 -19
- package/src/generated/model/getGrant200UserAttributes.ts +13 -0
- package/src/generated/model/getGrant200UserMetadata.ts +45 -0
- package/src/generated/model/getGrant200UserMetadataLifecycleOwnerTeam.ts +44 -0
- package/src/generated/model/getGrant200UserMetadataLifecycleOwnerTeamStatus.ts +21 -0
- package/src/generated/model/getGrant200UserMetadataStatus.ts +20 -0
- package/src/generated/model/getGrant401.ts +1 -1
- package/src/generated/model/getGrant401Details.ts +1 -1
- package/src/generated/model/getGrant403.ts +1 -1
- package/src/generated/model/getGrant403Details.ts +1 -1
- package/src/generated/model/getGrant404.ts +1 -1
- package/src/generated/model/getGrant404Details.ts +1 -1
- package/src/generated/model/getGrantDefault.ts +21 -1
- package/src/generated/model/getGrantExpandItem.ts +28 -0
- package/src/generated/model/getGrantParams.ts +7 -1
- package/src/generated/model/getHealth4xx.ts +1 -1
- package/src/generated/model/getHealth4xxDetails.ts +1 -1
- package/src/generated/model/getHealthDefault.ts +1 -1
- package/src/generated/model/getHealthDefaultDetails.ts +1 -1
- package/src/generated/model/getIdpById200.ts +38 -0
- package/src/generated/model/getIdpById200Definition.ts +47 -0
- package/src/generated/model/getIdpById200DefinitionClaimMapping.ts +12 -0
- package/src/generated/model/getIdpById200DefinitionOauth2.ts +55 -0
- package/src/generated/model/getIdpById200DefinitionOauth2StaticAuthorizeParameters.ts +12 -0
- package/src/generated/model/getIdpById200DefinitionOauth2SupplementaryFetch.ts +17 -0
- package/src/generated/model/getIdpById200DefinitionOauth2TokenEndpointAuthMethod.ts +18 -0
- package/src/generated/model/getIdpById200DefinitionOidc.ts +65 -0
- package/src/generated/model/getIdpById200DefinitionOidcStaticAuthorizeParameters.ts +12 -0
- package/src/generated/model/getIdpById200DefinitionOidcTokenEndpointAuthMethod.ts +18 -0
- package/src/generated/model/getIdpById200DefinitionProtocol.ts +18 -0
- package/src/generated/model/getIdpById200DefinitionProvisioning.ts +15 -0
- package/src/generated/model/getIdpById200DefinitionProvisioningCreation.ts +15 -0
- package/src/generated/model/getIdpById200DefinitionVerifiedClaims.ts +12 -0
- package/src/generated/model/getIdpById401.ts +20 -0
- package/src/generated/model/getIdpById401Details.ts +12 -0
- package/src/generated/model/getIdpById403.ts +20 -0
- package/src/generated/model/getIdpById403Details.ts +12 -0
- package/src/generated/model/getIdpById404.ts +20 -0
- package/src/generated/model/getIdpById404Details.ts +12 -0
- package/src/generated/model/getIdpByIdDefault.ts +59 -0
- package/src/generated/model/getIdpByIdParams.ts +15 -0
- package/src/generated/model/getIdpRevisionById200.ts +38 -0
- package/src/generated/model/getIdpRevisionById200Definition.ts +47 -0
- package/src/generated/model/getIdpRevisionById200DefinitionClaimMapping.ts +12 -0
- package/src/generated/model/getIdpRevisionById200DefinitionOauth2.ts +55 -0
- package/src/generated/model/getIdpRevisionById200DefinitionOauth2StaticAuthorizeParameters.ts +14 -0
- package/src/generated/model/getIdpRevisionById200DefinitionOauth2SupplementaryFetch.ts +17 -0
- package/src/generated/model/getIdpRevisionById200DefinitionOauth2TokenEndpointAuthMethod.ts +18 -0
- package/src/generated/model/getIdpRevisionById200DefinitionOidc.ts +65 -0
- package/src/generated/model/getIdpRevisionById200DefinitionOidcStaticAuthorizeParameters.ts +14 -0
- package/src/generated/model/getIdpRevisionById200DefinitionOidcTokenEndpointAuthMethod.ts +18 -0
- package/src/generated/model/getIdpRevisionById200DefinitionProtocol.ts +18 -0
- package/src/generated/model/getIdpRevisionById200DefinitionProvisioning.ts +15 -0
- package/src/generated/model/getIdpRevisionById200DefinitionProvisioningCreation.ts +15 -0
- package/src/generated/model/getIdpRevisionById200DefinitionVerifiedClaims.ts +12 -0
- package/src/generated/model/getIdpRevisionById401.ts +20 -0
- package/src/generated/model/getIdpRevisionById401Details.ts +12 -0
- package/src/generated/model/getIdpRevisionById403.ts +20 -0
- package/src/generated/model/getIdpRevisionById403Details.ts +12 -0
- package/src/generated/model/getIdpRevisionById404.ts +20 -0
- package/src/generated/model/getIdpRevisionById404Details.ts +12 -0
- package/src/generated/model/getIdpRevisionByIdDefault.ts +59 -0
- package/src/generated/model/getIdpRevisionByIdParams.ts +15 -0
- package/src/generated/model/getLive4xx.ts +1 -1
- package/src/generated/model/getLive4xxDetails.ts +1 -1
- package/src/generated/model/getLiveDefault.ts +1 -1
- package/src/generated/model/getLiveDefaultDetails.ts +1 -1
- package/src/generated/model/getMySession200.ts +34 -29
- package/src/generated/model/getMySession200FactorsItem.ts +7 -7
- package/src/generated/model/getMySession200FactorsItemMethod.ts +1 -1
- package/src/generated/model/getMySession200FactorsItemPayload.ts +12 -6
- package/src/generated/model/getMySession200Metadata.ts +1 -1
- package/src/generated/model/getMySession200State.ts +4 -5
- package/src/generated/model/getMySession200User.ts +20 -18
- package/src/generated/model/getMySession200UserAgent.ts +1 -1
- package/src/generated/model/getMySession401.ts +3 -4
- package/src/generated/model/getMySession404.ts +3 -4
- package/src/generated/model/getMySessionDefault.ts +1 -1
- package/src/generated/model/getMyUser200.ts +45 -39
- package/src/generated/model/getMyUser200Attributes.ts +2 -3
- package/src/generated/model/getMyUser200Metadata.ts +24 -22
- package/src/generated/model/getMyUser200MetadataLifecycleOwnerTeam.ts +23 -22
- package/src/generated/model/getMyUser200MetadataLifecycleOwnerTeamStatus.ts +21 -0
- package/src/generated/model/getMyUser200MetadataStatus.ts +1 -1
- package/src/generated/model/getMyUser200TeamsItem.ts +10 -10
- package/src/generated/model/getMyUser200TeamsItemMembershipStatus.ts +2 -3
- package/src/generated/model/getMyUser401.ts +1 -1
- package/src/generated/model/getMyUser401Details.ts +1 -1
- package/src/generated/model/getMyUser404.ts +3 -4
- package/src/generated/model/getMyUserDefault.ts +1 -1
- package/src/generated/model/getProject200.ts +8 -3
- package/src/generated/model/getProject200PasswordHash.ts +42 -0
- package/src/generated/model/getProject200PasswordHashAlgorithm.ts +24 -0
- package/src/generated/model/getProject200PasswordHashParams.ts +47 -0
- package/src/generated/model/getProject200PasswordHashParamsHash.ts +24 -0
- package/src/generated/model/getProject401.ts +1 -1
- package/src/generated/model/getProject401Details.ts +1 -1
- package/src/generated/model/getProject404.ts +1 -1
- package/src/generated/model/getProject404Details.ts +1 -1
- package/src/generated/model/getProjectDefault.ts +1 -1
- package/src/generated/model/getReady4xx.ts +1 -1
- package/src/generated/model/getReady4xxDetails.ts +1 -1
- package/src/generated/model/getReadyDefault.ts +1 -1
- package/src/generated/model/getReadyDefaultDetails.ts +1 -1
- package/src/generated/model/getReleaseById200.ts +19 -18
- package/src/generated/model/getReleaseById200Metadata.ts +20 -16
- package/src/generated/model/getReleaseById200MetadataCreatedByType.ts +21 -0
- package/src/generated/model/getReleaseById200PointersItem.ts +37 -39
- package/src/generated/model/getReleaseById200PointersItemKind.ts +8 -9
- package/src/generated/model/getReleaseByIdDefault.ts +21 -1
- package/src/generated/model/getReleaseByIdParams.ts +1 -1
- package/src/generated/model/getSchemaById200.ts +12 -12
- package/src/generated/model/getSchemaById200Metadata.ts +1 -1
- package/src/generated/model/getSchemaById200Schema.ts +42 -31
- package/src/generated/model/getSchemaByIdDefault.ts +52 -13
- package/src/generated/model/getSchemaByIdParams.ts +7 -1
- package/src/generated/model/getSession200.ts +34 -29
- package/src/generated/model/getSession200FactorsItem.ts +7 -7
- package/src/generated/model/getSession200FactorsItemMethod.ts +1 -1
- package/src/generated/model/getSession200FactorsItemPayload.ts +12 -6
- package/src/generated/model/getSession200Metadata.ts +1 -1
- package/src/generated/model/getSession200State.ts +4 -5
- package/src/generated/model/getSession200User.ts +20 -18
- package/src/generated/model/getSession200UserAgent.ts +1 -1
- package/src/generated/model/getSession401.ts +1 -1
- package/src/generated/model/getSession401Details.ts +1 -1
- package/src/generated/model/getSession403.ts +1 -1
- package/src/generated/model/getSession403Details.ts +1 -1
- package/src/generated/model/getSession404.ts +1 -1
- package/src/generated/model/getSession404Details.ts +1 -1
- package/src/generated/model/getSessionDefault.ts +1 -1
- package/src/generated/model/getTeam200.ts +6 -5
- package/src/generated/model/getTeam200Status.ts +4 -5
- package/src/generated/model/getTeam401.ts +1 -1
- package/src/generated/model/getTeam401Details.ts +1 -1
- package/src/generated/model/getTeam404.ts +1 -1
- package/src/generated/model/getTeam404Details.ts +1 -1
- package/src/generated/model/getTeamDefault.ts +1 -1
- package/src/generated/model/getTeamDefaultDetails.ts +1 -1
- package/src/generated/model/getUserByID200.ts +45 -39
- package/src/generated/model/getUserByID200Attributes.ts +2 -3
- package/src/generated/model/getUserByID200Metadata.ts +24 -22
- package/src/generated/model/getUserByID200MetadataLifecycleOwnerTeam.ts +23 -22
- package/src/generated/model/getUserByID200MetadataLifecycleOwnerTeamStatus.ts +21 -0
- package/src/generated/model/getUserByID200MetadataStatus.ts +1 -1
- package/src/generated/model/getUserByID200TeamsItem.ts +10 -10
- package/src/generated/model/getUserByID200TeamsItemMembershipStatus.ts +2 -3
- package/src/generated/model/getUserByID401.ts +1 -1
- package/src/generated/model/getUserByID401Details.ts +1 -1
- package/src/generated/model/getUserByID404.ts +1 -1
- package/src/generated/model/getUserByID404Details.ts +1 -1
- package/src/generated/model/getUserByIDDefault.ts +1 -1
- package/src/generated/model/getUserByIDParams.ts +14 -15
- package/src/generated/model/getVariable200.ts +24 -0
- package/src/generated/model/getVariableDefault.ts +69 -0
- package/src/generated/model/getVariableParams.ts +25 -0
- package/src/generated/model/getVariables200.ts +28 -0
- package/src/generated/model/getVariablesDefault.ts +69 -0
- package/src/generated/model/getVariablesParams.ts +25 -0
- package/src/generated/model/index.ts +392 -60
- package/src/generated/model/initClaim201.ts +4 -3
- package/src/generated/model/initClaim401.ts +1 -1
- package/src/generated/model/initClaim401Details.ts +1 -1
- package/src/generated/model/initClaim404.ts +3 -4
- package/src/generated/model/initClaim409.ts +2 -3
- package/src/generated/model/initClaim409Details.ts +1 -1
- package/src/generated/model/initClaim410.ts +3 -4
- package/src/generated/model/initClaimDefault.ts +1 -1
- package/src/generated/model/initClaimDefaultDetails.ts +1 -1
- package/src/generated/model/issueChallenge201.ts +14 -13
- package/src/generated/model/issueChallenge201Method.ts +1 -1
- package/src/generated/model/issueChallenge201Payload.ts +8 -8
- package/src/generated/model/issueChallenge201State.ts +4 -5
- package/src/generated/model/issueChallengeBody.ts +7 -8
- package/src/generated/model/issueChallengeBodyMethod.ts +1 -1
- package/src/generated/model/issueChallengeBodyPasskeyOptions.ts +1 -1
- package/src/generated/model/issueChallengeBodyPasskeyOptionsUserVerification.ts +1 -1
- package/src/generated/model/issueChallengeDefault.ts +1 -1
- package/src/generated/model/listBranding200Item.ts +1 -1
- package/src/generated/model/listBrandingDefault.ts +1 -1
- package/src/generated/model/listBrandingDefaultDetails.ts +1 -1
- package/src/generated/model/listBrandingParams.ts +1 -1
- package/src/generated/model/listDeployments200.ts +25 -0
- package/src/generated/model/listDeployments200DeploymentsItem.ts +62 -0
- package/src/generated/model/listDeployments200DeploymentsItemMetadata.ts +58 -0
- package/src/generated/model/listDeployments200DeploymentsItemMetadataDeployedByType.ts +21 -0
- package/src/generated/model/listDeployments200DeploymentsItemMetadataReason.ts +26 -0
- package/src/generated/model/listDeployments200DeploymentsItemRelease.ts +44 -0
- package/src/generated/model/listDeployments200DeploymentsItemReleaseMetadata.ts +43 -0
- package/src/generated/model/listDeployments200DeploymentsItemReleaseMetadataCreatedByType.ts +21 -0
- package/src/generated/model/listDeployments200DeploymentsItemReleasePointersItem.ts +56 -0
- package/src/generated/model/listDeployments200DeploymentsItemReleasePointersItemKind.ts +26 -0
- package/src/generated/model/listDeploymentsDefault.ts +69 -0
- package/src/generated/model/listDeploymentsExpandItem.ts +25 -0
- package/src/generated/model/listDeploymentsParams.ts +43 -0
- package/src/generated/model/listEnvironments200.ts +4 -3
- package/src/generated/model/listEnvironments200EnvironmentsItem.ts +21 -17
- package/src/generated/model/listEnvironments200EnvironmentsItemCurrentDeployment.ts +38 -0
- package/src/generated/model/listEnvironments200EnvironmentsItemCurrentDeploymentReason.ts +26 -0
- package/src/generated/model/listEnvironmentsDefault.ts +1 -1
- package/src/generated/model/listEnvironmentsParams.ts +6 -7
- package/src/generated/model/listEvents200.ts +4 -3
- package/src/generated/model/listEvents200DataItem.ts +667 -273
- package/src/generated/model/listEvents400.ts +1 -1
- package/src/generated/model/listEvents400Details.ts +1 -1
- package/src/generated/model/listEvents401.ts +1 -1
- package/src/generated/model/listEvents401Details.ts +1 -1
- package/src/generated/model/listEvents403.ts +1 -1
- package/src/generated/model/listEvents403Details.ts +1 -1
- package/src/generated/model/listEventsCategoryItem.ts +1 -1
- package/src/generated/model/listEventsDefault.ts +1 -1
- package/src/generated/model/listEventsDefaultDetails.ts +1 -1
- package/src/generated/model/listEventsOrder.ts +1 -1
- package/src/generated/model/listEventsParams.ts +13 -17
- package/src/generated/model/listFlowDefinitions200.ts +1 -1
- package/src/generated/model/listFlowDefinitions200FlowDefinitionsItem.ts +15 -13
- package/src/generated/model/listFlowDefinitions200FlowDefinitionsItemFlowDefinition.ts +43 -44
- package/src/generated/model/listFlowDefinitions200FlowDefinitionsItemFlowDefinitionAudience.ts +4 -5
- package/src/generated/model/listFlowDefinitions200FlowDefinitionsItemFlowDefinitionStatus.ts +6 -9
- package/src/generated/model/listFlowDefinitions200FlowDefinitionsItemFlowDefinitionStepsItem.ts +54 -40
- package/src/generated/model/listFlowDefinitions200FlowDefinitionsItemFlowDefinitionStepsItemActionsItem.ts +28 -23
- package/src/generated/model/listFlowDefinitions200FlowDefinitionsItemFlowDefinitionStepsItemActionsItemKind.ts +11 -13
- package/src/generated/model/listFlowDefinitions200FlowDefinitionsItemFlowDefinitionStepsItemComplete.ts +3 -4
- package/src/generated/model/listFlowDefinitions200FlowDefinitionsItemFlowDefinitionStepsItemGates.ts +18 -16
- package/src/generated/model/listFlowDefinitions200FlowDefinitionsItemFlowDefinitionStepsItemGatesConfig.ts +2 -3
- package/src/generated/model/listFlowDefinitions200FlowDefinitionsItemFlowDefinitionStepsItemGatesKind.ts +3 -4
- package/src/generated/model/listFlowDefinitions200FlowDefinitionsItemFlowDefinitionStepsItemOnSuccess.ts +4 -5
- package/src/generated/model/listFlowDefinitions200FlowDefinitionsItemFlowDefinitionStepsItemTransitions.ts +35 -31
- package/src/generated/model/listFlowDefinitions200FlowDefinitionsItemFlowDefinitionStepsItemTransitionsAction.ts +26 -0
- package/src/generated/model/listFlowDefinitions200FlowDefinitionsItemFlowDefinitionStepsItemTransitionsPurpose.ts +31 -0
- package/src/generated/model/listFlowDefinitions200FlowDefinitionsItemUserSchema.ts +11 -88
- package/src/generated/model/listFlowDefinitions200FlowDefinitionsItemUserSchemaMetadata.ts +12 -0
- package/src/generated/model/listFlowDefinitions200FlowDefinitionsItemUserSchemaSchema.ts +99 -0
- package/src/generated/model/listFlowDefinitions400.ts +1 -1
- package/src/generated/model/listFlowDefinitions400Details.ts +1 -1
- package/src/generated/model/listFlowDefinitionsDefault.ts +1 -1
- package/src/generated/model/listFlowDefinitionsExpandItem.ts +8 -9
- package/src/generated/model/listFlowDefinitionsParams.ts +25 -13
- package/src/generated/model/listFlowDefinitionsPurpose.ts +1 -1
- package/src/generated/model/listFlowDefinitionsRevisions.ts +15 -0
- package/src/generated/model/listIdpRevisions200.ts +21 -0
- package/src/generated/model/listIdpRevisions200RevisionsItem.ts +38 -0
- package/src/generated/model/listIdpRevisions200RevisionsItemDefinition.ts +47 -0
- package/src/generated/model/listIdpRevisions200RevisionsItemDefinitionClaimMapping.ts +12 -0
- package/src/generated/model/listIdpRevisions200RevisionsItemDefinitionOauth2.ts +55 -0
- package/src/generated/model/listIdpRevisions200RevisionsItemDefinitionOauth2StaticAuthorizeParameters.ts +14 -0
- package/src/generated/model/listIdpRevisions200RevisionsItemDefinitionOauth2SupplementaryFetch.ts +17 -0
- package/src/generated/model/listIdpRevisions200RevisionsItemDefinitionOauth2TokenEndpointAuthMethod.ts +18 -0
- package/src/generated/model/listIdpRevisions200RevisionsItemDefinitionOidc.ts +65 -0
- package/src/generated/model/listIdpRevisions200RevisionsItemDefinitionOidcStaticAuthorizeParameters.ts +14 -0
- package/src/generated/model/listIdpRevisions200RevisionsItemDefinitionOidcTokenEndpointAuthMethod.ts +18 -0
- package/src/generated/model/listIdpRevisions200RevisionsItemDefinitionProtocol.ts +18 -0
- package/src/generated/model/listIdpRevisions200RevisionsItemDefinitionProvisioning.ts +15 -0
- package/src/generated/model/listIdpRevisions200RevisionsItemDefinitionProvisioningCreation.ts +15 -0
- package/src/generated/model/listIdpRevisions200RevisionsItemDefinitionVerifiedClaims.ts +14 -0
- package/src/generated/model/listIdpRevisions401.ts +20 -0
- package/src/generated/model/{createSchemaDefaultDetails.ts → listIdpRevisions401Details.ts} +2 -2
- package/src/generated/model/listIdpRevisions403.ts +20 -0
- package/src/generated/model/listIdpRevisions403Details.ts +12 -0
- package/src/generated/model/listIdpRevisions404.ts +20 -0
- package/src/generated/model/listIdpRevisions404Details.ts +12 -0
- package/src/generated/model/listIdpRevisionsDefault.ts +59 -0
- package/src/generated/model/listIdpRevisionsParams.ts +28 -0
- package/src/generated/model/listMyProjects200.ts +21 -0
- package/src/generated/model/listMyProjects200ProjectsItem.ts +29 -0
- package/src/generated/model/listMyProjects200ProjectsItemPasswordHash.ts +42 -0
- package/src/generated/model/listMyProjects200ProjectsItemPasswordHashAlgorithm.ts +24 -0
- package/src/generated/model/listMyProjects200ProjectsItemPasswordHashParams.ts +47 -0
- package/src/generated/model/listMyProjects200ProjectsItemPasswordHashParamsHash.ts +24 -0
- package/src/generated/model/listMyProjects400.ts +20 -0
- package/src/generated/model/listMyProjects400Details.ts +12 -0
- package/src/generated/model/listMyProjects401.ts +23 -0
- package/src/generated/model/listMyProjects500.ts +20 -0
- package/src/generated/model/listMyProjects500Details.ts +12 -0
- package/src/generated/model/listMyProjectsDefault.ts +39 -0
- package/src/generated/model/listMyProjectsParams.ts +23 -0
- package/src/generated/model/listReleases200.ts +4 -3
- package/src/generated/model/listReleases200ReleasesItem.ts +8 -8
- package/src/generated/model/listReleases200ReleasesItemMetadata.ts +20 -16
- package/src/generated/model/listReleases200ReleasesItemMetadataCreatedByType.ts +21 -0
- package/src/generated/model/listReleasesDefault.ts +21 -1
- package/src/generated/model/listReleasesParams.ts +6 -7
- package/src/generated/model/listSchemas200.ts +4 -3
- package/src/generated/model/listSchemas200SchemasItem.ts +12 -12
- package/src/generated/model/listSchemas200SchemasItemMetadata.ts +1 -1
- package/src/generated/model/listSchemas200SchemasItemSchema.ts +42 -31
- package/src/generated/model/listSchemasDefault.ts +52 -13
- package/src/generated/model/listSchemasKind.ts +1 -1
- package/src/generated/model/listSchemasParams.ts +29 -32
- package/src/generated/model/listSchemasRevisions.ts +1 -1
- package/src/generated/model/listUserPasskeys200.ts +4 -3
- package/src/generated/model/listUserPasskeys200PasskeysItem.ts +1 -1
- package/src/generated/model/listUserPasskeys400.ts +1 -1
- package/src/generated/model/listUserPasskeys400Details.ts +1 -1
- package/src/generated/model/listUserPasskeys401.ts +1 -1
- package/src/generated/model/listUserPasskeys401Details.ts +1 -1
- package/src/generated/model/listUserPasskeys403.ts +1 -1
- package/src/generated/model/listUserPasskeys403Details.ts +1 -1
- package/src/generated/model/listUserPasskeys404.ts +1 -1
- package/src/generated/model/listUserPasskeys404Details.ts +1 -1
- package/src/generated/model/listUserPasskeys500.ts +1 -1
- package/src/generated/model/listUserPasskeys500Details.ts +1 -1
- package/src/generated/model/listUserPasskeysDefault.ts +1 -1
- package/src/generated/model/listUserPasskeysParams.ts +6 -7
- package/src/generated/model/listUserTeams200.ts +4 -3
- package/src/generated/model/listUserTeams200TeamsItem.ts +10 -10
- package/src/generated/model/listUserTeams200TeamsItemMembershipStatus.ts +2 -3
- package/src/generated/model/listUserTeams400.ts +1 -1
- package/src/generated/model/listUserTeams400Details.ts +1 -1
- package/src/generated/model/listUserTeams401.ts +1 -1
- package/src/generated/model/listUserTeams401Details.ts +1 -1
- package/src/generated/model/listUserTeams403.ts +1 -1
- package/src/generated/model/listUserTeams403Details.ts +1 -1
- package/src/generated/model/listUserTeams404.ts +1 -1
- package/src/generated/model/listUserTeams404Details.ts +1 -1
- package/src/generated/model/listUserTeams500.ts +1 -1
- package/src/generated/model/listUserTeams500Details.ts +1 -1
- package/src/generated/model/listUserTeamsDefault.ts +1 -1
- package/src/generated/model/listUserTeamsParams.ts +6 -7
- package/src/generated/model/patchMyUser200.ts +77 -0
- package/src/generated/model/patchMyUser200Attributes.ts +13 -0
- package/src/generated/model/patchMyUser200Metadata.ts +45 -0
- package/src/generated/model/patchMyUser200MetadataLifecycleOwnerTeam.ts +44 -0
- package/src/generated/model/patchMyUser200MetadataLifecycleOwnerTeamStatus.ts +21 -0
- package/src/generated/model/patchMyUser200MetadataStatus.ts +20 -0
- package/src/generated/model/patchMyUser200TeamsItem.ts +33 -0
- package/src/generated/model/patchMyUser200TeamsItemMembershipStatus.ts +20 -0
- package/src/generated/model/patchMyUser400.ts +20 -0
- package/src/generated/model/patchMyUser400Details.ts +12 -0
- package/src/generated/model/patchMyUser401.ts +20 -0
- package/src/generated/model/patchMyUser401Details.ts +12 -0
- package/src/generated/model/patchMyUser404.ts +23 -0
- package/src/generated/model/patchMyUser409.ts +20 -0
- package/src/generated/model/patchMyUser409Details.ts +12 -0
- package/src/generated/model/patchMyUserBody.ts +25 -0
- package/src/generated/model/patchMyUserBodyAttributes.ts +13 -0
- package/src/generated/model/patchMyUserDefault.ts +99 -0
- package/src/generated/model/patchProject200.ts +8 -3
- package/src/generated/model/patchProject200PasswordHash.ts +42 -0
- package/src/generated/model/patchProject200PasswordHashAlgorithm.ts +24 -0
- package/src/generated/model/patchProject200PasswordHashParams.ts +47 -0
- package/src/generated/model/patchProject200PasswordHashParamsHash.ts +24 -0
- package/src/generated/model/patchProject400.ts +1 -1
- package/src/generated/model/patchProject400Details.ts +1 -1
- package/src/generated/model/patchProject401.ts +1 -1
- package/src/generated/model/patchProject401Details.ts +1 -1
- package/src/generated/model/patchProject404.ts +1 -1
- package/src/generated/model/patchProject404Details.ts +1 -1
- package/src/generated/model/patchProjectBody.ts +8 -1
- package/src/generated/model/patchProjectBodyPasswordHash.ts +43 -0
- package/src/generated/model/patchProjectBodyPasswordHashAlgorithm.ts +24 -0
- package/src/generated/model/patchProjectBodyPasswordHashParams.ts +47 -0
- package/src/generated/model/patchProjectBodyPasswordHashParamsHash.ts +24 -0
- package/src/generated/model/patchProjectDefault.ts +11 -1
- package/src/generated/model/patchUserByID200.ts +77 -0
- package/src/generated/model/patchUserByID200Attributes.ts +13 -0
- package/src/generated/model/patchUserByID200Metadata.ts +45 -0
- package/src/generated/model/patchUserByID200MetadataLifecycleOwnerTeam.ts +44 -0
- package/src/generated/model/patchUserByID200MetadataLifecycleOwnerTeamStatus.ts +21 -0
- package/src/generated/model/patchUserByID200MetadataStatus.ts +20 -0
- package/src/generated/model/patchUserByID200TeamsItem.ts +33 -0
- package/src/generated/model/patchUserByID200TeamsItemMembershipStatus.ts +20 -0
- package/src/generated/model/{getSchemaById404.ts → patchUserByID400.ts} +4 -4
- package/src/generated/model/{getSchemaById400Details.ts → patchUserByID400Details.ts} +2 -2
- package/src/generated/model/{getSchemaById400.ts → patchUserByID401.ts} +4 -4
- package/src/generated/model/{getSchemaById404Details.ts → patchUserByID401Details.ts} +2 -2
- package/src/generated/model/patchUserByID403.ts +20 -0
- package/src/generated/model/patchUserByID403Details.ts +12 -0
- package/src/generated/model/patchUserByID404.ts +20 -0
- package/src/generated/model/patchUserByID404Details.ts +12 -0
- package/src/generated/model/patchUserByID409.ts +20 -0
- package/src/generated/model/patchUserByID409Details.ts +12 -0
- package/src/generated/model/patchUserByIDBody.ts +38 -0
- package/src/generated/model/patchUserByIDBodyAttributes.ts +13 -0
- package/src/generated/model/patchUserByIDDefault.ts +99 -0
- package/src/generated/model/queryGrants200.ts +5 -4
- package/src/generated/model/queryGrants200GrantsItem.ts +18 -35
- package/src/generated/model/queryGrants200GrantsItemObjectType.ts +1 -1
- package/src/generated/model/queryGrants200GrantsItemRelation.ts +1 -1
- package/src/generated/model/queryGrants200GrantsItemTeam.ts +18 -7
- package/src/generated/model/queryGrants200GrantsItemTeamStatus.ts +21 -0
- package/src/generated/model/queryGrants200GrantsItemUser.ts +33 -19
- package/src/generated/model/queryGrants200GrantsItemUserAttributes.ts +13 -0
- package/src/generated/model/queryGrants200GrantsItemUserMetadata.ts +45 -0
- package/src/generated/model/queryGrants200GrantsItemUserMetadataLifecycleOwnerTeam.ts +44 -0
- package/src/generated/model/queryGrants200GrantsItemUserMetadataLifecycleOwnerTeamStatus.ts +21 -0
- package/src/generated/model/queryGrants200GrantsItemUserMetadataStatus.ts +20 -0
- package/src/generated/model/queryGrants400.ts +1 -1
- package/src/generated/model/queryGrants400Details.ts +1 -1
- package/src/generated/model/queryGrants401.ts +1 -1
- package/src/generated/model/queryGrants401Details.ts +1 -1
- package/src/generated/model/queryGrants403.ts +1 -1
- package/src/generated/model/queryGrants403Details.ts +1 -1
- package/src/generated/model/queryGrantsBody.ts +9 -6
- package/src/generated/model/queryGrantsBodyExpandItem.ts +14 -15
- package/src/generated/model/queryGrantsBodyFilterItem.ts +19 -16
- package/src/generated/model/queryGrantsBodyFilterItemField.ts +8 -9
- package/src/generated/model/queryGrantsBodyFilterItemOperation.ts +6 -7
- package/src/generated/model/queryGrantsBodySorting.ts +4 -3
- package/src/generated/model/queryGrantsBodySortingDirection.ts +1 -1
- package/src/generated/model/queryGrantsBodySortingField.ts +2 -3
- package/src/generated/model/queryGrantsDefault.ts +1 -1
- package/src/generated/model/queryGrantsParams.ts +1 -1
- package/src/generated/model/queryIdps200.ts +21 -0
- package/src/generated/model/queryIdps200IdpsItem.ts +38 -0
- package/src/generated/model/queryIdps200IdpsItemDefinition.ts +47 -0
- package/src/generated/model/queryIdps200IdpsItemDefinitionClaimMapping.ts +12 -0
- package/src/generated/model/queryIdps200IdpsItemDefinitionOauth2.ts +55 -0
- package/src/generated/model/queryIdps200IdpsItemDefinitionOauth2StaticAuthorizeParameters.ts +14 -0
- package/src/generated/model/queryIdps200IdpsItemDefinitionOauth2SupplementaryFetch.ts +17 -0
- package/src/generated/model/queryIdps200IdpsItemDefinitionOauth2TokenEndpointAuthMethod.ts +18 -0
- package/src/generated/model/queryIdps200IdpsItemDefinitionOidc.ts +65 -0
- package/src/generated/model/queryIdps200IdpsItemDefinitionOidcStaticAuthorizeParameters.ts +12 -0
- package/src/generated/model/queryIdps200IdpsItemDefinitionOidcTokenEndpointAuthMethod.ts +18 -0
- package/src/generated/model/queryIdps200IdpsItemDefinitionProtocol.ts +18 -0
- package/src/generated/model/queryIdps200IdpsItemDefinitionProvisioning.ts +15 -0
- package/src/generated/model/queryIdps200IdpsItemDefinitionProvisioningCreation.ts +15 -0
- package/src/generated/model/queryIdps200IdpsItemDefinitionVerifiedClaims.ts +12 -0
- package/src/generated/model/queryIdps400.ts +20 -0
- package/src/generated/model/queryIdps400Details.ts +12 -0
- package/src/generated/model/queryIdps401.ts +20 -0
- package/src/generated/model/queryIdps401Details.ts +12 -0
- package/src/generated/model/queryIdps403.ts +20 -0
- package/src/generated/model/queryIdps403Details.ts +12 -0
- package/src/generated/model/queryIdps404.ts +20 -0
- package/src/generated/model/queryIdps404Details.ts +12 -0
- package/src/generated/model/queryIdpsBody.ts +30 -0
- package/src/generated/model/queryIdpsBodyFilterItem.ts +34 -0
- package/src/generated/model/queryIdpsBodyFilterItemField.ts +21 -0
- package/src/generated/model/queryIdpsBodyFilterItemOperation.ts +29 -0
- package/src/generated/model/queryIdpsBodySorting.ts +23 -0
- package/src/generated/model/queryIdpsBodySortingDirection.ts +15 -0
- package/src/generated/model/queryIdpsBodySortingField.ts +21 -0
- package/src/generated/model/queryIdpsDefault.ts +69 -0
- package/src/generated/model/queryIdpsParams.ts +15 -0
- package/src/generated/model/queryProjects200.ts +5 -4
- package/src/generated/model/queryProjects200ProjectsItem.ts +8 -3
- package/src/generated/model/queryProjects200ProjectsItemPasswordHash.ts +42 -0
- package/src/generated/model/queryProjects200ProjectsItemPasswordHashAlgorithm.ts +24 -0
- package/src/generated/model/queryProjects200ProjectsItemPasswordHashParams.ts +47 -0
- package/src/generated/model/queryProjects200ProjectsItemPasswordHashParamsHash.ts +24 -0
- package/src/generated/model/queryProjects400.ts +1 -1
- package/src/generated/model/queryProjects400Details.ts +1 -1
- package/src/generated/model/queryProjects401.ts +1 -1
- package/src/generated/model/queryProjects401Details.ts +1 -1
- package/src/generated/model/queryProjects403.ts +1 -1
- package/src/generated/model/queryProjects403Details.ts +1 -1
- package/src/generated/model/queryProjects429.ts +1 -1
- package/src/generated/model/queryProjects429Details.ts +1 -1
- package/src/generated/model/queryProjectsBody.ts +5 -4
- package/src/generated/model/queryProjectsBodyFilterItem.ts +12 -10
- package/src/generated/model/queryProjectsBodyFilterItemField.ts +1 -1
- package/src/generated/model/queryProjectsBodyFilterItemOperation.ts +6 -7
- package/src/generated/model/queryProjectsBodySorting.ts +1 -1
- package/src/generated/model/queryProjectsBodySortingDirection.ts +1 -1
- package/src/generated/model/queryProjectsBodySortingField.ts +1 -1
- package/src/generated/model/queryProjectsDefault.ts +1 -1
- package/src/generated/model/querySessions200.ts +4 -3
- package/src/generated/model/querySessions200SessionsItem.ts +34 -29
- package/src/generated/model/querySessions200SessionsItemFactorsItem.ts +7 -7
- package/src/generated/model/querySessions200SessionsItemFactorsItemMethod.ts +1 -1
- package/src/generated/model/querySessions200SessionsItemFactorsItemPayload.ts +12 -6
- package/src/generated/model/querySessions200SessionsItemMetadata.ts +1 -1
- package/src/generated/model/querySessions200SessionsItemState.ts +4 -5
- package/src/generated/model/querySessions200SessionsItemUser.ts +20 -18
- package/src/generated/model/querySessions200SessionsItemUserAgent.ts +1 -1
- package/src/generated/model/querySessions400.ts +1 -1
- package/src/generated/model/querySessions400Details.ts +1 -1
- package/src/generated/model/querySessions401.ts +1 -1
- package/src/generated/model/querySessions401Details.ts +1 -1
- package/src/generated/model/querySessions403.ts +1 -1
- package/src/generated/model/querySessions403Details.ts +1 -1
- package/src/generated/model/querySessionsBody.ts +1 -1
- package/src/generated/model/querySessionsBodyFilterItem.ts +26 -23
- package/src/generated/model/querySessionsBodyFilterItemField.ts +13 -14
- package/src/generated/model/querySessionsBodyFilterItemOperation.ts +6 -7
- package/src/generated/model/querySessionsBodySorting.ts +5 -4
- package/src/generated/model/querySessionsBodySortingDirection.ts +1 -1
- package/src/generated/model/querySessionsBodySortingField.ts +3 -4
- package/src/generated/model/querySessionsDefault.ts +1 -1
- package/src/generated/model/querySessionsParams.ts +1 -1
- package/src/generated/model/queryTeams200.ts +5 -4
- package/src/generated/model/queryTeams200TeamsItem.ts +6 -5
- package/src/generated/model/queryTeams200TeamsItemStatus.ts +4 -5
- package/src/generated/model/queryTeams400.ts +1 -1
- package/src/generated/model/queryTeams400Details.ts +1 -1
- package/src/generated/model/queryTeams401.ts +1 -1
- package/src/generated/model/queryTeams401Details.ts +1 -1
- package/src/generated/model/queryTeams403.ts +1 -1
- package/src/generated/model/queryTeams403Details.ts +1 -1
- package/src/generated/model/queryTeams404.ts +1 -1
- package/src/generated/model/queryTeams404Details.ts +1 -1
- package/src/generated/model/queryTeams429.ts +1 -1
- package/src/generated/model/queryTeams429Details.ts +1 -1
- package/src/generated/model/queryTeamsBody.ts +5 -4
- package/src/generated/model/queryTeamsBodyFilterItem.ts +17 -14
- package/src/generated/model/queryTeamsBodyFilterItemField.ts +4 -5
- package/src/generated/model/queryTeamsBodyFilterItemOperation.ts +6 -7
- package/src/generated/model/queryTeamsBodySorting.ts +6 -5
- package/src/generated/model/queryTeamsBodySortingDirection.ts +1 -1
- package/src/generated/model/queryTeamsBodySortingField.ts +4 -5
- package/src/generated/model/queryTeamsDefault.ts +1 -1
- package/src/generated/model/queryTeamsDefaultDetails.ts +1 -1
- package/src/generated/model/queryTeamsParams.ts +1 -1
- package/src/generated/model/queryUsers200.ts +4 -3
- package/src/generated/model/queryUsers200UsersItem.ts +45 -39
- package/src/generated/model/queryUsers200UsersItemAttributes.ts +2 -3
- package/src/generated/model/queryUsers200UsersItemMetadata.ts +24 -22
- package/src/generated/model/queryUsers200UsersItemMetadataLifecycleOwnerTeam.ts +23 -22
- package/src/generated/model/queryUsers200UsersItemMetadataLifecycleOwnerTeamStatus.ts +21 -0
- package/src/generated/model/queryUsers200UsersItemMetadataStatus.ts +1 -1
- package/src/generated/model/queryUsers200UsersItemTeamsItem.ts +10 -10
- package/src/generated/model/queryUsers200UsersItemTeamsItemMembershipStatus.ts +2 -3
- package/src/generated/model/queryUsers400.ts +1 -1
- package/src/generated/model/queryUsers400Details.ts +1 -1
- package/src/generated/model/queryUsers401.ts +1 -1
- package/src/generated/model/queryUsers401Details.ts +1 -1
- package/src/generated/model/queryUsers403.ts +1 -1
- package/src/generated/model/queryUsers403Details.ts +1 -1
- package/src/generated/model/queryUsersBody.ts +8 -6
- package/src/generated/model/queryUsersBodyExpandItem.ts +29 -26
- package/src/generated/model/queryUsersBodyFilterItem.ts +41 -36
- package/src/generated/model/queryUsersBodyFilterItemField.ts +28 -27
- package/src/generated/model/queryUsersBodyFilterItemOperation.ts +6 -7
- package/src/generated/model/queryUsersBodySorting.ts +8 -7
- package/src/generated/model/queryUsersBodySortingDirection.ts +1 -1
- package/src/generated/model/queryUsersBodySortingField.ts +6 -7
- package/src/generated/model/queryUsersDefault.ts +1 -1
- package/src/generated/model/queryUsersParams.ts +16 -0
- package/src/generated/model/revokeMySession401.ts +3 -4
- package/src/generated/model/revokeMySessionDefault.ts +1 -1
- package/src/generated/model/revokeSession401.ts +1 -1
- package/src/generated/model/revokeSession401Details.ts +1 -1
- package/src/generated/model/revokeSession403.ts +1 -1
- package/src/generated/model/revokeSession403Details.ts +1 -1
- package/src/generated/model/revokeSessionDefault.ts +1 -1
- package/src/generated/model/setUserPassword400.ts +1 -1
- package/src/generated/model/setUserPassword400Details.ts +1 -1
- package/src/generated/model/setUserPassword404.ts +1 -1
- package/src/generated/model/setUserPassword404Details.ts +1 -1
- package/src/generated/model/setUserPassword500.ts +1 -1
- package/src/generated/model/setUserPassword500Details.ts +1 -1
- package/src/generated/model/setUserPasswordBody.ts +4 -3
- package/src/generated/model/setUserPasswordDefault.ts +1 -1
- package/src/generated/model/submitFlowStep200.ts +27 -21
- package/src/generated/model/submitFlowStep200Branding.ts +59 -30
- package/src/generated/model/submitFlowStep200BrandingLayout.ts +10 -6
- package/src/generated/model/submitFlowStep200BrandingShape.ts +30 -0
- package/src/generated/model/submitFlowStep200BrandingShapeDensity.ts +19 -0
- package/src/generated/model/submitFlowStep200BrandingTheme.ts +43 -0
- package/src/generated/model/submitFlowStep200BrandingThemeDark.ts +34 -0
- package/src/generated/model/submitFlowStep200BrandingThemeDarkPalette.ts +209 -0
- package/src/generated/model/submitFlowStep200BrandingThemeLight.ts +34 -0
- package/src/generated/model/submitFlowStep200BrandingThemeLightPalette.ts +209 -0
- package/src/generated/model/submitFlowStep200BrandingThemeMode.ts +19 -0
- package/src/generated/model/submitFlowStep200BrandingTypography.ts +47 -0
- package/src/generated/model/submitFlowStep200Step.ts +42 -36
- package/src/generated/model/submitFlowStep200StepActionsItem.ts +22 -23
- package/src/generated/model/submitFlowStep200StepActionsItemKind.ts +8 -12
- package/src/generated/model/submitFlowStep200StepChallenge.ts +15 -14
- package/src/generated/model/submitFlowStep200StepChallengeMethod.ts +1 -1
- package/src/generated/model/submitFlowStep200StepChallengeOptions.ts +4 -5
- package/src/generated/model/submitFlowStep200StepComplete.ts +3 -4
- package/src/generated/model/submitFlowStep200StepFieldsItem.ts +23 -20
- package/src/generated/model/submitFlowStep200StepFieldsItemType.ts +5 -6
- package/src/generated/model/submitFlowStep200StepFieldsItemValidation.ts +19 -18
- package/src/generated/model/submitFlowStep200StepFieldsItemValidationFormat.ts +5 -6
- package/src/generated/model/submitFlowStep200StepGates.ts +17 -15
- package/src/generated/model/submitFlowStep200StepGatesConfig.ts +2 -3
- package/src/generated/model/submitFlowStep200StepGatesKind.ts +3 -4
- package/src/generated/model/submitFlowStep200StepSsoProvidersItem.ts +1 -1
- package/src/generated/model/submitFlowStep200StepTexts.ts +2 -3
- package/src/generated/model/submitFlowStep400.ts +27 -21
- package/src/generated/model/submitFlowStep400Branding.ts +59 -30
- package/src/generated/model/submitFlowStep400BrandingLayout.ts +10 -6
- package/src/generated/model/submitFlowStep400BrandingShape.ts +30 -0
- package/src/generated/model/submitFlowStep400BrandingShapeDensity.ts +19 -0
- package/src/generated/model/submitFlowStep400BrandingTheme.ts +43 -0
- package/src/generated/model/submitFlowStep400BrandingThemeDark.ts +34 -0
- package/src/generated/model/submitFlowStep400BrandingThemeDarkPalette.ts +209 -0
- package/src/generated/model/submitFlowStep400BrandingThemeLight.ts +34 -0
- package/src/generated/model/submitFlowStep400BrandingThemeLightPalette.ts +209 -0
- package/src/generated/model/submitFlowStep400BrandingThemeMode.ts +19 -0
- package/src/generated/model/submitFlowStep400BrandingTypography.ts +47 -0
- package/src/generated/model/submitFlowStep400Step.ts +42 -36
- package/src/generated/model/submitFlowStep400StepActionsItem.ts +22 -23
- package/src/generated/model/submitFlowStep400StepActionsItemKind.ts +8 -12
- package/src/generated/model/submitFlowStep400StepChallenge.ts +15 -14
- package/src/generated/model/submitFlowStep400StepChallengeMethod.ts +1 -1
- package/src/generated/model/submitFlowStep400StepChallengeOptions.ts +4 -5
- package/src/generated/model/submitFlowStep400StepComplete.ts +3 -4
- package/src/generated/model/submitFlowStep400StepFieldsItem.ts +23 -20
- package/src/generated/model/submitFlowStep400StepFieldsItemType.ts +5 -6
- package/src/generated/model/submitFlowStep400StepFieldsItemValidation.ts +19 -18
- package/src/generated/model/submitFlowStep400StepFieldsItemValidationFormat.ts +5 -6
- package/src/generated/model/submitFlowStep400StepGates.ts +17 -15
- package/src/generated/model/submitFlowStep400StepGatesConfig.ts +2 -3
- package/src/generated/model/submitFlowStep400StepGatesKind.ts +3 -4
- package/src/generated/model/submitFlowStep400StepSsoProvidersItem.ts +1 -1
- package/src/generated/model/submitFlowStep400StepTexts.ts +2 -3
- package/src/generated/model/submitFlowStep409.ts +1 -1
- package/src/generated/model/submitFlowStep409Details.ts +1 -1
- package/src/generated/model/submitFlowStepBody.ts +16 -13
- package/src/generated/model/submitFlowStepBodyChallengeResponse.ts +9 -8
- package/src/generated/model/submitFlowStepBodyChallengeResponseProof.ts +2 -3
- package/src/generated/model/submitFlowStepBodyFields.ts +1 -2
- package/src/generated/model/submitFlowStepBodyGateProofs.ts +2 -3
- package/src/generated/model/submitFlowStepDefault.ts +1 -1
- package/src/generated/model/updateTeam200.ts +6 -5
- package/src/generated/model/updateTeam200Status.ts +4 -5
- package/src/generated/model/updateTeam400.ts +1 -1
- package/src/generated/model/updateTeam400Details.ts +1 -1
- package/src/generated/model/updateTeam401.ts +1 -1
- package/src/generated/model/updateTeam401Details.ts +1 -1
- package/src/generated/model/updateTeam403.ts +1 -1
- package/src/generated/model/updateTeam403Details.ts +1 -1
- package/src/generated/model/updateTeam404.ts +1 -1
- package/src/generated/model/updateTeam404Details.ts +1 -1
- package/src/generated/model/updateTeam409.ts +1 -1
- package/src/generated/model/updateTeam409Details.ts +1 -1
- package/src/generated/model/updateTeamBody.ts +1 -1
- package/src/generated/model/updateTeamDefault.ts +1 -1
- package/src/generated/model/updateTeamDefaultDetails.ts +1 -1
- package/src/generated/model/updateVariables200.ts +28 -0
- package/src/generated/model/updateVariablesBody.ts +61 -0
- package/src/generated/model/{updateFlowDefinitionDefault.ts → updateVariablesDefault.ts} +23 -13
- package/src/generated/model/updateVariablesParams.ts +25 -0
- package/src/generated/model/verifyChallengeProof200.ts +36 -31
- package/src/generated/model/verifyChallengeProof200ChallengesItem.ts +14 -13
- package/src/generated/model/verifyChallengeProof200ChallengesItemMethod.ts +1 -1
- package/src/generated/model/verifyChallengeProof200ChallengesItemPayload.ts +8 -8
- package/src/generated/model/verifyChallengeProof200ChallengesItemState.ts +4 -5
- package/src/generated/model/verifyChallengeProof200CompletedFactorsItem.ts +7 -7
- package/src/generated/model/verifyChallengeProof200CompletedFactorsItemMethod.ts +1 -1
- package/src/generated/model/verifyChallengeProof200CompletedFactorsItemPayload.ts +12 -6
- package/src/generated/model/verifyChallengeProof200RequiredFactorsItem.ts +1 -1
- package/src/generated/model/verifyChallengeProof200State.ts +5 -6
- package/src/generated/model/verifyChallengeProofBody.ts +5 -6
- package/src/generated/model/verifyChallengeProofDefault.ts +11 -1
- package/src/runtime/base-url.spec.ts +33 -2
- package/dist/index-DtExHu2p.d.mts +0 -22272
- package/dist/index-DtExHu2p.d.mts.map +0 -1
- package/dist/runtime/fetch.d.mts.map +0 -1
- package/dist/zitadelNextGen-C79YSuEo.d.mts +0 -709
- package/dist/zitadelNextGen-C79YSuEo.d.mts.map +0 -1
- package/src/generated/model/createFlowDefinition201FlowDefinitionStepsItemSsoProvidersItem.ts +0 -19
- package/src/generated/model/createFlowDefinitionBodyFlowDefinitionStepsItemSsoProvidersItem.ts +0 -19
- package/src/generated/model/createGrant201Principal.ts +0 -147
- package/src/generated/model/createGrant201PrincipalType.ts +0 -18
- package/src/generated/model/createGrantBodyPrincipalType.ts +0 -18
- package/src/generated/model/deleteFlowDefinition409.ts +0 -20
- package/src/generated/model/deleteFlowDefinition409Details.ts +0 -12
- package/src/generated/model/getFlowDefinition200FlowDefinitionStepsItemSsoProvidersItem.ts +0 -19
- package/src/generated/model/getGrant200Principal.ts +0 -147
- package/src/generated/model/getGrant200PrincipalType.ts +0 -18
- package/src/generated/model/getSchemaByIdDefaultDetails.ts +0 -12
- package/src/generated/model/listFlowDefinitions200FlowDefinitionsItemFlowDefinitionStepsItemSsoProvidersItem.ts +0 -19
- package/src/generated/model/listSchemasDefaultDetails.ts +0 -12
- package/src/generated/model/queryGrants200GrantsItemPrincipal.ts +0 -147
- package/src/generated/model/queryGrants200GrantsItemPrincipalType.ts +0 -18
- package/src/generated/model/updateFlowDefinition200.ts +0 -34
- package/src/generated/model/updateFlowDefinition200FlowDefinition.ts +0 -73
- package/src/generated/model/updateFlowDefinition200FlowDefinitionAudience.ts +0 -21
- package/src/generated/model/updateFlowDefinition200FlowDefinitionStatus.ts +0 -26
- package/src/generated/model/updateFlowDefinition200FlowDefinitionStepsItem.ts +0 -71
- package/src/generated/model/updateFlowDefinition200FlowDefinitionStepsItemActionsItem.ts +0 -42
- package/src/generated/model/updateFlowDefinition200FlowDefinitionStepsItemActionsItemKind.ts +0 -31
- package/src/generated/model/updateFlowDefinition200FlowDefinitionStepsItemComplete.ts +0 -21
- package/src/generated/model/updateFlowDefinition200FlowDefinitionStepsItemGates.ts +0 -35
- package/src/generated/model/updateFlowDefinition200FlowDefinitionStepsItemGatesConfig.ts +0 -14
- package/src/generated/model/updateFlowDefinition200FlowDefinitionStepsItemGatesKind.ts +0 -20
- package/src/generated/model/updateFlowDefinition200FlowDefinitionStepsItemOnSuccess.ts +0 -21
- package/src/generated/model/updateFlowDefinition200FlowDefinitionStepsItemSsoProvidersItem.ts +0 -19
- package/src/generated/model/updateFlowDefinition200FlowDefinitionStepsItemTransitions.ts +0 -46
- package/src/generated/model/updateFlowDefinition200UserSchema.ts +0 -103
- package/src/generated/model/updateFlowDefinition400.ts +0 -20
- package/src/generated/model/updateFlowDefinition400Details.ts +0 -12
- package/src/generated/model/updateFlowDefinition404.ts +0 -20
- package/src/generated/model/updateFlowDefinition404Details.ts +0 -12
- package/src/generated/model/updateFlowDefinitionBody.ts +0 -30
- package/src/generated/model/updateFlowDefinitionBodyFlowDefinition.ts +0 -73
- package/src/generated/model/updateFlowDefinitionBodyFlowDefinitionAudience.ts +0 -21
- package/src/generated/model/updateFlowDefinitionBodyFlowDefinitionStatus.ts +0 -26
- package/src/generated/model/updateFlowDefinitionBodyFlowDefinitionStepsItem.ts +0 -71
- package/src/generated/model/updateFlowDefinitionBodyFlowDefinitionStepsItemActionsItem.ts +0 -42
- package/src/generated/model/updateFlowDefinitionBodyFlowDefinitionStepsItemActionsItemKind.ts +0 -31
- package/src/generated/model/updateFlowDefinitionBodyFlowDefinitionStepsItemComplete.ts +0 -21
- package/src/generated/model/updateFlowDefinitionBodyFlowDefinitionStepsItemGates.ts +0 -35
- package/src/generated/model/updateFlowDefinitionBodyFlowDefinitionStepsItemGatesConfig.ts +0 -14
- package/src/generated/model/updateFlowDefinitionBodyFlowDefinitionStepsItemGatesKind.ts +0 -20
- package/src/generated/model/updateFlowDefinitionBodyFlowDefinitionStepsItemOnSuccess.ts +0 -21
- package/src/generated/model/updateFlowDefinitionBodyFlowDefinitionStepsItemSsoProvidersItem.ts +0 -19
- package/src/generated/model/updateFlowDefinitionBodyFlowDefinitionStepsItemTransitions.ts +0 -46
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Generated by orval
|
|
2
|
+
* Generated by orval 🍺
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* Zitadel NextGen
|
|
5
5
|
* This is the next generation of the Zitadel identity platform.
|
|
@@ -17,6 +17,10 @@ import type {
|
|
|
17
17
|
CreateBranding201,
|
|
18
18
|
CreateBrandingBody,
|
|
19
19
|
CreateBrandingParams,
|
|
20
|
+
CreateDeployment200,
|
|
21
|
+
CreateDeployment201,
|
|
22
|
+
CreateDeploymentBody,
|
|
23
|
+
CreateDeploymentParams,
|
|
20
24
|
CreateFlow201,
|
|
21
25
|
CreateFlowBody,
|
|
22
26
|
CreateFlowDefinition201,
|
|
@@ -25,6 +29,10 @@ import type {
|
|
|
25
29
|
CreateGrantBody,
|
|
26
30
|
CreateGrantParams,
|
|
27
31
|
CreateHandoff200,
|
|
32
|
+
CreateIdp200,
|
|
33
|
+
CreateIdp201,
|
|
34
|
+
CreateIdpBody,
|
|
35
|
+
CreateIdpParams,
|
|
28
36
|
CreateProject201,
|
|
29
37
|
CreateProjectBody,
|
|
30
38
|
CreateRelease200,
|
|
@@ -43,6 +51,7 @@ import type {
|
|
|
43
51
|
CreateUserBody,
|
|
44
52
|
CreateUserParams,
|
|
45
53
|
DeleteGrantParams,
|
|
54
|
+
DeleteVariableParams,
|
|
46
55
|
ExchangeHandoff200,
|
|
47
56
|
ExchangeHandoffBody,
|
|
48
57
|
ExchangeHandoffParams,
|
|
@@ -54,6 +63,8 @@ import type {
|
|
|
54
63
|
GetClaimStatusParams,
|
|
55
64
|
GetClaimWindow200,
|
|
56
65
|
GetClaimWindowParams,
|
|
66
|
+
GetDeploymentById200,
|
|
67
|
+
GetDeploymentByIdParams,
|
|
57
68
|
GetEnvironmentByName200,
|
|
58
69
|
GetEnvironmentByNameParams,
|
|
59
70
|
GetEvent200,
|
|
@@ -63,6 +74,10 @@ import type {
|
|
|
63
74
|
GetGrant200,
|
|
64
75
|
GetGrantParams,
|
|
65
76
|
GetHealthDefault,
|
|
77
|
+
GetIdpById200,
|
|
78
|
+
GetIdpByIdParams,
|
|
79
|
+
GetIdpRevisionById200,
|
|
80
|
+
GetIdpRevisionByIdParams,
|
|
66
81
|
GetLiveDefault,
|
|
67
82
|
GetMySession200,
|
|
68
83
|
GetMyUser200,
|
|
@@ -76,17 +91,27 @@ import type {
|
|
|
76
91
|
GetTeam200,
|
|
77
92
|
GetUserByID200,
|
|
78
93
|
GetUserByIDParams,
|
|
94
|
+
GetVariable200,
|
|
95
|
+
GetVariableParams,
|
|
96
|
+
GetVariables200,
|
|
97
|
+
GetVariablesParams,
|
|
79
98
|
InitClaim201,
|
|
80
99
|
IssueChallenge201,
|
|
81
100
|
IssueChallengeBody,
|
|
82
101
|
ListBranding200Item,
|
|
83
102
|
ListBrandingParams,
|
|
103
|
+
ListDeployments200,
|
|
104
|
+
ListDeploymentsParams,
|
|
84
105
|
ListEnvironments200,
|
|
85
106
|
ListEnvironmentsParams,
|
|
86
107
|
ListEvents200,
|
|
87
108
|
ListEventsParams,
|
|
88
109
|
ListFlowDefinitions200,
|
|
89
110
|
ListFlowDefinitionsParams,
|
|
111
|
+
ListIdpRevisions200,
|
|
112
|
+
ListIdpRevisionsParams,
|
|
113
|
+
ListMyProjects200,
|
|
114
|
+
ListMyProjectsParams,
|
|
90
115
|
ListReleases200,
|
|
91
116
|
ListReleasesParams,
|
|
92
117
|
ListSchemas200,
|
|
@@ -95,11 +120,18 @@ import type {
|
|
|
95
120
|
ListUserPasskeysParams,
|
|
96
121
|
ListUserTeams200,
|
|
97
122
|
ListUserTeamsParams,
|
|
123
|
+
PatchMyUser200,
|
|
124
|
+
PatchMyUserBody,
|
|
98
125
|
PatchProject200,
|
|
99
126
|
PatchProjectBody,
|
|
127
|
+
PatchUserByID200,
|
|
128
|
+
PatchUserByIDBody,
|
|
100
129
|
QueryGrants200,
|
|
101
130
|
QueryGrantsBody,
|
|
102
131
|
QueryGrantsParams,
|
|
132
|
+
QueryIdps200,
|
|
133
|
+
QueryIdpsBody,
|
|
134
|
+
QueryIdpsParams,
|
|
103
135
|
QueryProjects200,
|
|
104
136
|
QueryProjectsBody,
|
|
105
137
|
QuerySessions200,
|
|
@@ -110,13 +142,15 @@ import type {
|
|
|
110
142
|
QueryTeamsParams,
|
|
111
143
|
QueryUsers200,
|
|
112
144
|
QueryUsersBody,
|
|
145
|
+
QueryUsersParams,
|
|
113
146
|
SetUserPasswordBody,
|
|
114
147
|
SubmitFlowStep200,
|
|
115
148
|
SubmitFlowStepBody,
|
|
116
|
-
UpdateFlowDefinition200,
|
|
117
|
-
UpdateFlowDefinitionBody,
|
|
118
149
|
UpdateTeam200,
|
|
119
150
|
UpdateTeamBody,
|
|
151
|
+
UpdateVariables200,
|
|
152
|
+
UpdateVariablesBody,
|
|
153
|
+
UpdateVariablesParams,
|
|
120
154
|
VerifyChallengeProof200,
|
|
121
155
|
VerifyChallengeProofBody,
|
|
122
156
|
} from "../model";
|
|
@@ -129,7 +163,9 @@ export const getGetHealthUrl = () => {
|
|
|
129
163
|
* Check whether the server is healthy
|
|
130
164
|
* @summary Check server health
|
|
131
165
|
*/
|
|
132
|
-
export const getHealth = async (
|
|
166
|
+
export const getHealth = async (
|
|
167
|
+
options?: Parameters<typeof customFetch>[1],
|
|
168
|
+
): Promise<GetHealthDefault> => {
|
|
133
169
|
return customFetch<GetHealthDefault>(getGetHealthUrl(), {
|
|
134
170
|
...options,
|
|
135
171
|
method: "GET",
|
|
@@ -144,7 +180,9 @@ export const getGetLiveUrl = () => {
|
|
|
144
180
|
* Check whether the server is started
|
|
145
181
|
* @summary Check server liveness
|
|
146
182
|
*/
|
|
147
|
-
export const getLive = async (
|
|
183
|
+
export const getLive = async (
|
|
184
|
+
options?: Parameters<typeof customFetch>[1],
|
|
185
|
+
): Promise<GetLiveDefault> => {
|
|
148
186
|
return customFetch<GetLiveDefault>(getGetLiveUrl(), {
|
|
149
187
|
...options,
|
|
150
188
|
method: "GET",
|
|
@@ -159,7 +197,9 @@ export const getGetReadyUrl = () => {
|
|
|
159
197
|
* Check whether the server is ready to accept requests
|
|
160
198
|
* @summary Check server readiness
|
|
161
199
|
*/
|
|
162
|
-
export const getReady = async (
|
|
200
|
+
export const getReady = async (
|
|
201
|
+
options?: Parameters<typeof customFetch>[1],
|
|
202
|
+
): Promise<GetReadyDefault> => {
|
|
163
203
|
return customFetch<GetReadyDefault>(getGetReadyUrl(), {
|
|
164
204
|
...options,
|
|
165
205
|
method: "GET",
|
|
@@ -171,7 +211,7 @@ export const getCreateUserUrl = (params: CreateUserParams) => {
|
|
|
171
211
|
|
|
172
212
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
173
213
|
if (value !== undefined) {
|
|
174
|
-
normalizedParams.append(key, value === null ? "null" : value
|
|
214
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
175
215
|
}
|
|
176
216
|
});
|
|
177
217
|
|
|
@@ -188,37 +228,90 @@ export const getCreateUserUrl = (params: CreateUserParams) => {
|
|
|
188
228
|
export const createUser = async (
|
|
189
229
|
createUserBody: CreateUserBody,
|
|
190
230
|
params: CreateUserParams,
|
|
191
|
-
options?:
|
|
231
|
+
options?: Parameters<typeof customFetch>[1],
|
|
192
232
|
): Promise<CreateUser201> => {
|
|
233
|
+
const getHeaders = (
|
|
234
|
+
h?: NonNullable<RequestInit["headers"]>,
|
|
235
|
+
): Record<string, string | readonly string[]> => {
|
|
236
|
+
if (!h) return {};
|
|
237
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
238
|
+
if (Symbol.iterator in h) {
|
|
239
|
+
return Object.fromEntries(
|
|
240
|
+
Array.from(
|
|
241
|
+
h as Iterable<Iterable<string>>,
|
|
242
|
+
(entry) => Array.from(entry) as [string, string],
|
|
243
|
+
),
|
|
244
|
+
);
|
|
245
|
+
}
|
|
246
|
+
const headers: Record<string, string | readonly string[]> = {};
|
|
247
|
+
for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
|
|
248
|
+
if (value !== undefined) headers[name] = value;
|
|
249
|
+
}
|
|
250
|
+
return headers;
|
|
251
|
+
};
|
|
193
252
|
return customFetch<CreateUser201>(getCreateUserUrl(params), {
|
|
194
253
|
...options,
|
|
195
254
|
method: "POST",
|
|
196
|
-
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
255
|
+
headers: { "Content-Type": "application/json", ...getHeaders(options?.headers) },
|
|
197
256
|
body: JSON.stringify(createUserBody),
|
|
198
257
|
});
|
|
199
258
|
};
|
|
200
259
|
|
|
201
|
-
export const getQueryUsersUrl = () => {
|
|
202
|
-
|
|
260
|
+
export const getQueryUsersUrl = (params?: QueryUsersParams) => {
|
|
261
|
+
const normalizedParams = new URLSearchParams();
|
|
262
|
+
|
|
263
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
264
|
+
if (value !== undefined) {
|
|
265
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
266
|
+
}
|
|
267
|
+
});
|
|
268
|
+
|
|
269
|
+
const stringifiedParams = normalizedParams.toString();
|
|
270
|
+
|
|
271
|
+
return stringifiedParams.length > 0
|
|
272
|
+
? `${getProxyPath()}/users/query?${stringifiedParams}`
|
|
273
|
+
: `${getProxyPath()}/users/query`;
|
|
203
274
|
};
|
|
204
275
|
|
|
205
276
|
/**
|
|
206
277
|
* Returns the users of a project, paginated with a cursor.
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
278
|
+
*
|
|
279
|
+
* `project_id` names the project to list; without it, the credential's own
|
|
280
|
+
* project is listed.
|
|
281
|
+
*
|
|
282
|
+
* Accepts either a project secret (`oauth2`) or a user-bound Console
|
|
283
|
+
* session cookie (`nextgenSession`). CSRF/Origin for cookie mutations
|
|
284
|
+
* is a follow-up (#1140).
|
|
212
285
|
* @summary Query users
|
|
213
286
|
*/
|
|
214
287
|
export const queryUsers = async (
|
|
215
288
|
queryUsersBody: QueryUsersBody,
|
|
216
|
-
|
|
289
|
+
params?: QueryUsersParams,
|
|
290
|
+
options?: Parameters<typeof customFetch>[1],
|
|
217
291
|
): Promise<QueryUsers200> => {
|
|
218
|
-
|
|
292
|
+
const getHeaders = (
|
|
293
|
+
h?: NonNullable<RequestInit["headers"]>,
|
|
294
|
+
): Record<string, string | readonly string[]> => {
|
|
295
|
+
if (!h) return {};
|
|
296
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
297
|
+
if (Symbol.iterator in h) {
|
|
298
|
+
return Object.fromEntries(
|
|
299
|
+
Array.from(
|
|
300
|
+
h as Iterable<Iterable<string>>,
|
|
301
|
+
(entry) => Array.from(entry) as [string, string],
|
|
302
|
+
),
|
|
303
|
+
);
|
|
304
|
+
}
|
|
305
|
+
const headers: Record<string, string | readonly string[]> = {};
|
|
306
|
+
for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
|
|
307
|
+
if (value !== undefined) headers[name] = value;
|
|
308
|
+
}
|
|
309
|
+
return headers;
|
|
310
|
+
};
|
|
311
|
+
return customFetch<QueryUsers200>(getQueryUsersUrl(params), {
|
|
219
312
|
...options,
|
|
220
313
|
method: "POST",
|
|
221
|
-
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
314
|
+
headers: { "Content-Type": "application/json", ...getHeaders(options?.headers) },
|
|
222
315
|
body: JSON.stringify(queryUsersBody),
|
|
223
316
|
});
|
|
224
317
|
};
|
|
@@ -228,15 +321,15 @@ export const getGetUserByIDUrl = (userId: string, params?: GetUserByIDParams) =>
|
|
|
228
321
|
|
|
229
322
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
230
323
|
if (value !== undefined) {
|
|
231
|
-
normalizedParams.append(key, value === null ? "null" : value
|
|
324
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
232
325
|
}
|
|
233
326
|
});
|
|
234
327
|
|
|
235
328
|
const stringifiedParams = normalizedParams.toString();
|
|
236
329
|
|
|
237
330
|
return stringifiedParams.length > 0
|
|
238
|
-
? `${getProxyPath()}/users/${userId}?${stringifiedParams}`
|
|
239
|
-
: `${getProxyPath()}/users/${userId}`;
|
|
331
|
+
? `${getProxyPath()}/users/${encodeURIComponent(String(userId))}?${stringifiedParams}`
|
|
332
|
+
: `${getProxyPath()}/users/${encodeURIComponent(String(userId))}`;
|
|
240
333
|
};
|
|
241
334
|
|
|
242
335
|
/**
|
|
@@ -245,7 +338,7 @@ export const getGetUserByIDUrl = (userId: string, params?: GetUserByIDParams) =>
|
|
|
245
338
|
export const getUserByID = async (
|
|
246
339
|
userId: string,
|
|
247
340
|
params?: GetUserByIDParams,
|
|
248
|
-
options?:
|
|
341
|
+
options?: Parameters<typeof customFetch>[1],
|
|
249
342
|
): Promise<GetUserByID200> => {
|
|
250
343
|
return customFetch<GetUserByID200>(getGetUserByIDUrl(userId, params), {
|
|
251
344
|
...options,
|
|
@@ -253,14 +346,60 @@ export const getUserByID = async (
|
|
|
253
346
|
});
|
|
254
347
|
};
|
|
255
348
|
|
|
349
|
+
export const getPatchUserByIDUrl = (userId: string) => {
|
|
350
|
+
return `${getProxyPath()}/users/${encodeURIComponent(String(userId))}`;
|
|
351
|
+
};
|
|
352
|
+
|
|
353
|
+
/**
|
|
354
|
+
* Partially updates a user's schema-defined attributes, and optionally
|
|
355
|
+
* moves the user to another registered schema. The merged result is
|
|
356
|
+
* validated against the schema before commit. Concurrent writes are
|
|
357
|
+
* last-write-wins.
|
|
358
|
+
* @summary Update user by ID
|
|
359
|
+
*/
|
|
360
|
+
export const patchUserByID = async (
|
|
361
|
+
userId: string,
|
|
362
|
+
patchUserByIDBody: PatchUserByIDBody,
|
|
363
|
+
options?: Parameters<typeof customFetch>[1],
|
|
364
|
+
): Promise<PatchUserByID200> => {
|
|
365
|
+
const getHeaders = (
|
|
366
|
+
h?: NonNullable<RequestInit["headers"]>,
|
|
367
|
+
): Record<string, string | readonly string[]> => {
|
|
368
|
+
if (!h) return {};
|
|
369
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
370
|
+
if (Symbol.iterator in h) {
|
|
371
|
+
return Object.fromEntries(
|
|
372
|
+
Array.from(
|
|
373
|
+
h as Iterable<Iterable<string>>,
|
|
374
|
+
(entry) => Array.from(entry) as [string, string],
|
|
375
|
+
),
|
|
376
|
+
);
|
|
377
|
+
}
|
|
378
|
+
const headers: Record<string, string | readonly string[]> = {};
|
|
379
|
+
for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
|
|
380
|
+
if (value !== undefined) headers[name] = value;
|
|
381
|
+
}
|
|
382
|
+
return headers;
|
|
383
|
+
};
|
|
384
|
+
return customFetch<PatchUserByID200>(getPatchUserByIDUrl(userId), {
|
|
385
|
+
...options,
|
|
386
|
+
method: "PATCH",
|
|
387
|
+
headers: { "Content-Type": "application/json", ...getHeaders(options?.headers) },
|
|
388
|
+
body: JSON.stringify(patchUserByIDBody),
|
|
389
|
+
});
|
|
390
|
+
};
|
|
391
|
+
|
|
256
392
|
export const getDeleteUserByIDUrl = (userId: string) => {
|
|
257
|
-
return `${getProxyPath()}/users/${userId}`;
|
|
393
|
+
return `${getProxyPath()}/users/${encodeURIComponent(String(userId))}`;
|
|
258
394
|
};
|
|
259
395
|
|
|
260
396
|
/**
|
|
261
397
|
* @summary Delete user by ID
|
|
262
398
|
*/
|
|
263
|
-
export const deleteUserByID = async (
|
|
399
|
+
export const deleteUserByID = async (
|
|
400
|
+
userId: string,
|
|
401
|
+
options?: Parameters<typeof customFetch>[1],
|
|
402
|
+
): Promise<void> => {
|
|
264
403
|
return customFetch<void>(getDeleteUserByIDUrl(userId), {
|
|
265
404
|
...options,
|
|
266
405
|
method: "DELETE",
|
|
@@ -272,15 +411,15 @@ export const getListUserPasskeysUrl = (userId: string, params?: ListUserPasskeys
|
|
|
272
411
|
|
|
273
412
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
274
413
|
if (value !== undefined) {
|
|
275
|
-
normalizedParams.append(key, value === null ? "null" : value
|
|
414
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
276
415
|
}
|
|
277
416
|
});
|
|
278
417
|
|
|
279
418
|
const stringifiedParams = normalizedParams.toString();
|
|
280
419
|
|
|
281
420
|
return stringifiedParams.length > 0
|
|
282
|
-
? `${getProxyPath()}/users/${userId}/passkeys?${stringifiedParams}`
|
|
283
|
-
: `${getProxyPath()}/users/${userId}/passkeys`;
|
|
421
|
+
? `${getProxyPath()}/users/${encodeURIComponent(String(userId))}/passkeys?${stringifiedParams}`
|
|
422
|
+
: `${getProxyPath()}/users/${encodeURIComponent(String(userId))}/passkeys`;
|
|
284
423
|
};
|
|
285
424
|
|
|
286
425
|
/**
|
|
@@ -289,7 +428,7 @@ export const getListUserPasskeysUrl = (userId: string, params?: ListUserPasskeys
|
|
|
289
428
|
export const listUserPasskeys = async (
|
|
290
429
|
userId: string,
|
|
291
430
|
params?: ListUserPasskeysParams,
|
|
292
|
-
options?:
|
|
431
|
+
options?: Parameters<typeof customFetch>[1],
|
|
293
432
|
): Promise<ListUserPasskeys200> => {
|
|
294
433
|
return customFetch<ListUserPasskeys200>(getListUserPasskeysUrl(userId, params), {
|
|
295
434
|
...options,
|
|
@@ -298,64 +437,100 @@ export const listUserPasskeys = async (
|
|
|
298
437
|
};
|
|
299
438
|
|
|
300
439
|
export const getBeginUserPasskeyRegistrationUrl = (userId: string) => {
|
|
301
|
-
return `${getProxyPath()}/users/${userId}/passkeys/registrations`;
|
|
440
|
+
return `${getProxyPath()}/users/${encodeURIComponent(String(userId))}/passkeys/registrations`;
|
|
302
441
|
};
|
|
303
442
|
|
|
304
443
|
/**
|
|
305
444
|
* Starts a WebAuthn registration ceremony for the user and returns the
|
|
306
|
-
creation options for `navigator.credentials.create()`. Complete the
|
|
307
|
-
ceremony with `POST /users/{user_id}/passkeys/registrations/{registration_id}` within
|
|
308
|
-
five minutes. Credentials already registered for the user are excluded
|
|
309
|
-
automatically.
|
|
310
|
-
|
|
445
|
+
* creation options for `navigator.credentials.create()`. Complete the
|
|
446
|
+
* ceremony with `POST /users/{user_id}/passkeys/registrations/{registration_id}` within
|
|
447
|
+
* five minutes. Credentials already registered for the user are excluded
|
|
448
|
+
* automatically.
|
|
311
449
|
* @summary Begin passkey registration
|
|
312
450
|
*/
|
|
313
451
|
export const beginUserPasskeyRegistration = async (
|
|
314
452
|
userId: string,
|
|
315
453
|
beginUserPasskeyRegistrationBody: BeginUserPasskeyRegistrationBody,
|
|
316
|
-
options?:
|
|
454
|
+
options?: Parameters<typeof customFetch>[1],
|
|
317
455
|
): Promise<BeginUserPasskeyRegistration201> => {
|
|
456
|
+
const getHeaders = (
|
|
457
|
+
h?: NonNullable<RequestInit["headers"]>,
|
|
458
|
+
): Record<string, string | readonly string[]> => {
|
|
459
|
+
if (!h) return {};
|
|
460
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
461
|
+
if (Symbol.iterator in h) {
|
|
462
|
+
return Object.fromEntries(
|
|
463
|
+
Array.from(
|
|
464
|
+
h as Iterable<Iterable<string>>,
|
|
465
|
+
(entry) => Array.from(entry) as [string, string],
|
|
466
|
+
),
|
|
467
|
+
);
|
|
468
|
+
}
|
|
469
|
+
const headers: Record<string, string | readonly string[]> = {};
|
|
470
|
+
for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
|
|
471
|
+
if (value !== undefined) headers[name] = value;
|
|
472
|
+
}
|
|
473
|
+
return headers;
|
|
474
|
+
};
|
|
318
475
|
return customFetch<BeginUserPasskeyRegistration201>(getBeginUserPasskeyRegistrationUrl(userId), {
|
|
319
476
|
...options,
|
|
320
477
|
method: "POST",
|
|
321
|
-
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
478
|
+
headers: { "Content-Type": "application/json", ...getHeaders(options?.headers) },
|
|
322
479
|
body: JSON.stringify(beginUserPasskeyRegistrationBody),
|
|
323
480
|
});
|
|
324
481
|
};
|
|
325
482
|
|
|
326
483
|
export const getFinishUserPasskeyRegistrationUrl = (userId: string, registrationId: string) => {
|
|
327
|
-
return `${getProxyPath()}/users/${userId}/passkeys/registrations/${registrationId}`;
|
|
484
|
+
return `${getProxyPath()}/users/${encodeURIComponent(String(userId))}/passkeys/registrations/${encodeURIComponent(String(registrationId))}`;
|
|
328
485
|
};
|
|
329
486
|
|
|
330
487
|
/**
|
|
331
488
|
* Verifies the attestation against the ceremony started by
|
|
332
|
-
`POST /users/{user_id}/passkeys/registrations` and persists the new credential. A
|
|
333
|
-
rejected attestation counts against the ceremony's failure budget and the
|
|
334
|
-
ceremony stays open for a retry. An expired ceremony surfaces as
|
|
335
|
-
`att.stale_challenge`; an unknown or already-consumed registration id
|
|
336
|
-
surfaces as `att.not_found`.
|
|
337
|
-
|
|
489
|
+
* `POST /users/{user_id}/passkeys/registrations` and persists the new credential. A
|
|
490
|
+
* rejected attestation counts against the ceremony's failure budget and the
|
|
491
|
+
* ceremony stays open for a retry. An expired ceremony surfaces as
|
|
492
|
+
* `att.stale_challenge`; an unknown or already-consumed registration id
|
|
493
|
+
* surfaces as `att.not_found`.
|
|
338
494
|
* @summary Finish passkey registration
|
|
339
495
|
*/
|
|
340
496
|
export const finishUserPasskeyRegistration = async (
|
|
341
497
|
userId: string,
|
|
342
498
|
registrationId: string,
|
|
343
499
|
finishUserPasskeyRegistrationBody: FinishUserPasskeyRegistrationBody,
|
|
344
|
-
options?:
|
|
500
|
+
options?: Parameters<typeof customFetch>[1],
|
|
345
501
|
): Promise<FinishUserPasskeyRegistration201> => {
|
|
502
|
+
const getHeaders = (
|
|
503
|
+
h?: NonNullable<RequestInit["headers"]>,
|
|
504
|
+
): Record<string, string | readonly string[]> => {
|
|
505
|
+
if (!h) return {};
|
|
506
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
507
|
+
if (Symbol.iterator in h) {
|
|
508
|
+
return Object.fromEntries(
|
|
509
|
+
Array.from(
|
|
510
|
+
h as Iterable<Iterable<string>>,
|
|
511
|
+
(entry) => Array.from(entry) as [string, string],
|
|
512
|
+
),
|
|
513
|
+
);
|
|
514
|
+
}
|
|
515
|
+
const headers: Record<string, string | readonly string[]> = {};
|
|
516
|
+
for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
|
|
517
|
+
if (value !== undefined) headers[name] = value;
|
|
518
|
+
}
|
|
519
|
+
return headers;
|
|
520
|
+
};
|
|
346
521
|
return customFetch<FinishUserPasskeyRegistration201>(
|
|
347
522
|
getFinishUserPasskeyRegistrationUrl(userId, registrationId),
|
|
348
523
|
{
|
|
349
524
|
...options,
|
|
350
525
|
method: "POST",
|
|
351
|
-
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
526
|
+
headers: { "Content-Type": "application/json", ...getHeaders(options?.headers) },
|
|
352
527
|
body: JSON.stringify(finishUserPasskeyRegistrationBody),
|
|
353
528
|
},
|
|
354
529
|
);
|
|
355
530
|
};
|
|
356
531
|
|
|
357
532
|
export const getSetUserPasswordUrl = (userId: string) => {
|
|
358
|
-
return `${getProxyPath()}/users/${userId}/password`;
|
|
533
|
+
return `${getProxyPath()}/users/${encodeURIComponent(String(userId))}/password`;
|
|
359
534
|
};
|
|
360
535
|
|
|
361
536
|
/**
|
|
@@ -364,12 +539,31 @@ export const getSetUserPasswordUrl = (userId: string) => {
|
|
|
364
539
|
export const setUserPassword = async (
|
|
365
540
|
userId: string,
|
|
366
541
|
setUserPasswordBody: SetUserPasswordBody,
|
|
367
|
-
options?:
|
|
542
|
+
options?: Parameters<typeof customFetch>[1],
|
|
368
543
|
): Promise<void> => {
|
|
544
|
+
const getHeaders = (
|
|
545
|
+
h?: NonNullable<RequestInit["headers"]>,
|
|
546
|
+
): Record<string, string | readonly string[]> => {
|
|
547
|
+
if (!h) return {};
|
|
548
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
549
|
+
if (Symbol.iterator in h) {
|
|
550
|
+
return Object.fromEntries(
|
|
551
|
+
Array.from(
|
|
552
|
+
h as Iterable<Iterable<string>>,
|
|
553
|
+
(entry) => Array.from(entry) as [string, string],
|
|
554
|
+
),
|
|
555
|
+
);
|
|
556
|
+
}
|
|
557
|
+
const headers: Record<string, string | readonly string[]> = {};
|
|
558
|
+
for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
|
|
559
|
+
if (value !== undefined) headers[name] = value;
|
|
560
|
+
}
|
|
561
|
+
return headers;
|
|
562
|
+
};
|
|
369
563
|
return customFetch<void>(getSetUserPasswordUrl(userId), {
|
|
370
564
|
...options,
|
|
371
565
|
method: "PUT",
|
|
372
|
-
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
566
|
+
headers: { "Content-Type": "application/json", ...getHeaders(options?.headers) },
|
|
373
567
|
body: JSON.stringify(setUserPasswordBody),
|
|
374
568
|
});
|
|
375
569
|
};
|
|
@@ -379,32 +573,31 @@ export const getListUserTeamsUrl = (userId: string, params?: ListUserTeamsParams
|
|
|
379
573
|
|
|
380
574
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
381
575
|
if (value !== undefined) {
|
|
382
|
-
normalizedParams.append(key, value === null ? "null" : value
|
|
576
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
383
577
|
}
|
|
384
578
|
});
|
|
385
579
|
|
|
386
580
|
const stringifiedParams = normalizedParams.toString();
|
|
387
581
|
|
|
388
582
|
return stringifiedParams.length > 0
|
|
389
|
-
? `${getProxyPath()}/users/${userId}/teams?${stringifiedParams}`
|
|
390
|
-
: `${getProxyPath()}/users/${userId}/teams`;
|
|
583
|
+
? `${getProxyPath()}/users/${encodeURIComponent(String(userId))}/teams?${stringifiedParams}`
|
|
584
|
+
: `${getProxyPath()}/users/${encodeURIComponent(String(userId))}/teams`;
|
|
391
585
|
};
|
|
392
586
|
|
|
393
587
|
/**
|
|
394
588
|
* The user's team roster, ordered by team name. Each entry carries the
|
|
395
|
-
team's name, so a client renders a page without resolving ids one by one.
|
|
396
|
-
|
|
397
|
-
This is the N:N roster and it is not lifecycle ownership: the single team
|
|
398
|
-
that owns the user's lifecycle is reported as `metadata.lifecycle_owner_team_id`
|
|
399
|
-
on the user read endpoints. Memberships the user was removed from are not
|
|
400
|
-
returned.
|
|
401
|
-
|
|
589
|
+
* team's name, so a client renders a page without resolving ids one by one.
|
|
590
|
+
*
|
|
591
|
+
* This is the N:N roster and it is not lifecycle ownership: the single team
|
|
592
|
+
* that owns the user's lifecycle is reported as `metadata.lifecycle_owner_team_id`
|
|
593
|
+
* on the user read endpoints. Memberships the user was removed from are not
|
|
594
|
+
* returned.
|
|
402
595
|
* @summary List the teams a user belongs to
|
|
403
596
|
*/
|
|
404
597
|
export const listUserTeams = async (
|
|
405
598
|
userId: string,
|
|
406
599
|
params?: ListUserTeamsParams,
|
|
407
|
-
options?:
|
|
600
|
+
options?: Parameters<typeof customFetch>[1],
|
|
408
601
|
): Promise<ListUserTeams200> => {
|
|
409
602
|
return customFetch<ListUserTeams200>(getListUserTeamsUrl(userId, params), {
|
|
410
603
|
...options,
|
|
@@ -419,55 +612,154 @@ export const getGetMyUserUrl = () => {
|
|
|
419
612
|
/**
|
|
420
613
|
* @summary Get my user information
|
|
421
614
|
*/
|
|
422
|
-
export const getMyUser = async (
|
|
615
|
+
export const getMyUser = async (
|
|
616
|
+
options?: Parameters<typeof customFetch>[1],
|
|
617
|
+
): Promise<GetMyUser200> => {
|
|
423
618
|
return customFetch<GetMyUser200>(getGetMyUserUrl(), {
|
|
424
619
|
...options,
|
|
425
620
|
method: "GET",
|
|
426
621
|
});
|
|
427
622
|
};
|
|
428
623
|
|
|
429
|
-
export const
|
|
430
|
-
return `${getProxyPath()}/
|
|
624
|
+
export const getPatchMyUserUrl = () => {
|
|
625
|
+
return `${getProxyPath()}/users/me`;
|
|
431
626
|
};
|
|
432
627
|
|
|
433
628
|
/**
|
|
434
|
-
*
|
|
435
|
-
|
|
436
|
-
|
|
629
|
+
* Partially updates the caller's own schema-defined attributes. The merged
|
|
630
|
+
* result is validated against the user's schema before commit. Concurrent
|
|
631
|
+
* writes are last-write-wins.
|
|
632
|
+
* @summary Update my user information
|
|
633
|
+
*/
|
|
634
|
+
export const patchMyUser = async (
|
|
635
|
+
patchMyUserBody: PatchMyUserBody,
|
|
636
|
+
options?: Parameters<typeof customFetch>[1],
|
|
637
|
+
): Promise<PatchMyUser200> => {
|
|
638
|
+
const getHeaders = (
|
|
639
|
+
h?: NonNullable<RequestInit["headers"]>,
|
|
640
|
+
): Record<string, string | readonly string[]> => {
|
|
641
|
+
if (!h) return {};
|
|
642
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
643
|
+
if (Symbol.iterator in h) {
|
|
644
|
+
return Object.fromEntries(
|
|
645
|
+
Array.from(
|
|
646
|
+
h as Iterable<Iterable<string>>,
|
|
647
|
+
(entry) => Array.from(entry) as [string, string],
|
|
648
|
+
),
|
|
649
|
+
);
|
|
650
|
+
}
|
|
651
|
+
const headers: Record<string, string | readonly string[]> = {};
|
|
652
|
+
for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
|
|
653
|
+
if (value !== undefined) headers[name] = value;
|
|
654
|
+
}
|
|
655
|
+
return headers;
|
|
656
|
+
};
|
|
657
|
+
return customFetch<PatchMyUser200>(getPatchMyUserUrl(), {
|
|
658
|
+
...options,
|
|
659
|
+
method: "PATCH",
|
|
660
|
+
headers: { "Content-Type": "application/json", ...getHeaders(options?.headers) },
|
|
661
|
+
body: JSON.stringify(patchMyUserBody),
|
|
662
|
+
});
|
|
663
|
+
};
|
|
664
|
+
|
|
665
|
+
export const getListMyProjectsUrl = (params?: ListMyProjectsParams) => {
|
|
666
|
+
const normalizedParams = new URLSearchParams();
|
|
667
|
+
|
|
668
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
669
|
+
if (value !== undefined) {
|
|
670
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
671
|
+
}
|
|
672
|
+
});
|
|
673
|
+
|
|
674
|
+
const stringifiedParams = normalizedParams.toString();
|
|
437
675
|
|
|
438
|
-
|
|
439
|
-
|
|
676
|
+
return stringifiedParams.length > 0
|
|
677
|
+
? `${getProxyPath()}/users/me/projects?${stringifiedParams}`
|
|
678
|
+
: `${getProxyPath()}/users/me/projects`;
|
|
679
|
+
};
|
|
440
680
|
|
|
441
|
-
|
|
442
|
-
the
|
|
443
|
-
|
|
444
|
-
|
|
681
|
+
/**
|
|
682
|
+
* The projects the signed-in user holds an active grant on, either directly or
|
|
683
|
+
* through a team they are a member of. Ordered by project id and paged with an
|
|
684
|
+
* opaque cursor.
|
|
685
|
+
*
|
|
686
|
+
* This is not the same question as `queryProjects`, which answers with the one
|
|
687
|
+
* project the calling credential is bound to. Here the session is the caller
|
|
688
|
+
* and the grants are the answer, so the list spans projects.
|
|
689
|
+
* @summary List the projects I can act on
|
|
690
|
+
*/
|
|
691
|
+
export const listMyProjects = async (
|
|
692
|
+
params?: ListMyProjectsParams,
|
|
693
|
+
options?: Parameters<typeof customFetch>[1],
|
|
694
|
+
): Promise<ListMyProjects200> => {
|
|
695
|
+
return customFetch<ListMyProjects200>(getListMyProjectsUrl(params), {
|
|
696
|
+
...options,
|
|
697
|
+
method: "GET",
|
|
698
|
+
});
|
|
699
|
+
};
|
|
445
700
|
|
|
701
|
+
export const getCreateFlowUrl = () => {
|
|
702
|
+
return `${getProxyPath()}/flow`;
|
|
703
|
+
};
|
|
704
|
+
|
|
705
|
+
/**
|
|
706
|
+
* Resolves a flow definition based on purpose + audience context and returns
|
|
707
|
+
* the first capability step. Creates a new session implicitly unless
|
|
708
|
+
* `session_id` is provided (for step-up / reauth on an existing session).
|
|
709
|
+
*
|
|
710
|
+
* The response contains an `id` field — the flow handle. Use it as the path
|
|
711
|
+
* parameter for all subsequent `/flow/{id}/submit` calls.
|
|
712
|
+
*
|
|
713
|
+
* The response also sets an encrypted `HttpOnly` cookie (`_zflow`) containing
|
|
714
|
+
* the flow's orchestration state (current step, collected data, history).
|
|
715
|
+
* The server is stateless between requests — all flow state lives in this
|
|
716
|
+
* cookie. The browser sends it automatically on subsequent requests.
|
|
446
717
|
* @summary Start a new flow
|
|
447
718
|
*/
|
|
448
719
|
export const createFlow = async (
|
|
449
720
|
createFlowBody: CreateFlowBody,
|
|
450
|
-
options?:
|
|
721
|
+
options?: Parameters<typeof customFetch>[1],
|
|
451
722
|
): Promise<CreateFlow201> => {
|
|
723
|
+
const getHeaders = (
|
|
724
|
+
h?: NonNullable<RequestInit["headers"]>,
|
|
725
|
+
): Record<string, string | readonly string[]> => {
|
|
726
|
+
if (!h) return {};
|
|
727
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
728
|
+
if (Symbol.iterator in h) {
|
|
729
|
+
return Object.fromEntries(
|
|
730
|
+
Array.from(
|
|
731
|
+
h as Iterable<Iterable<string>>,
|
|
732
|
+
(entry) => Array.from(entry) as [string, string],
|
|
733
|
+
),
|
|
734
|
+
);
|
|
735
|
+
}
|
|
736
|
+
const headers: Record<string, string | readonly string[]> = {};
|
|
737
|
+
for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
|
|
738
|
+
if (value !== undefined) headers[name] = value;
|
|
739
|
+
}
|
|
740
|
+
return headers;
|
|
741
|
+
};
|
|
452
742
|
return customFetch<CreateFlow201>(getCreateFlowUrl(), {
|
|
453
743
|
...options,
|
|
454
744
|
method: "POST",
|
|
455
|
-
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
745
|
+
headers: { "Content-Type": "application/json", ...getHeaders(options?.headers) },
|
|
456
746
|
body: JSON.stringify(createFlowBody),
|
|
457
747
|
});
|
|
458
748
|
};
|
|
459
749
|
|
|
460
750
|
export const getGetFlowStepUrl = (id: string) => {
|
|
461
|
-
return `${getProxyPath()}/flow/${id}`;
|
|
751
|
+
return `${getProxyPath()}/flow/${encodeURIComponent(String(id))}`;
|
|
462
752
|
};
|
|
463
753
|
|
|
464
754
|
/**
|
|
465
755
|
* Returns the current capability step without advancing the state machine.
|
|
466
|
-
Useful for page reloads or re-rendering after a network error.
|
|
467
|
-
|
|
756
|
+
* Useful for page reloads or re-rendering after a network error.
|
|
468
757
|
* @summary Get current step (re-render)
|
|
469
758
|
*/
|
|
470
|
-
export const getFlowStep = async (
|
|
759
|
+
export const getFlowStep = async (
|
|
760
|
+
id: string,
|
|
761
|
+
options?: Parameters<typeof customFetch>[1],
|
|
762
|
+
): Promise<GetFlowStep200> => {
|
|
471
763
|
return customFetch<GetFlowStep200>(getGetFlowStepUrl(id), {
|
|
472
764
|
...options,
|
|
473
765
|
method: "GET",
|
|
@@ -475,49 +767,67 @@ export const getFlowStep = async (id: string, options?: RequestInit): Promise<Ge
|
|
|
475
767
|
};
|
|
476
768
|
|
|
477
769
|
export const getSubmitFlowStepUrl = (id: string) => {
|
|
478
|
-
return `${getProxyPath()}/flow/${id}/submit`;
|
|
770
|
+
return `${getProxyPath()}/flow/${encodeURIComponent(String(id))}/submit`;
|
|
479
771
|
};
|
|
480
772
|
|
|
481
773
|
/**
|
|
482
774
|
* Submits user input for the current step. The server validates,
|
|
483
|
-
processes (e.g., verifies a credential), advances the state machine
|
|
484
|
-
through any invisible steps, and returns the next visible step.
|
|
485
|
-
|
|
486
|
-
The response sets an updated encrypted `HttpOnly` cookie (`_zflow`)
|
|
487
|
-
with the new flow state. The server is stateless — all orchestration
|
|
488
|
-
state is carried in this cookie between requests.
|
|
489
|
-
|
|
490
|
-
**Important:** The `id` in the response may differ from the `id` used in
|
|
491
|
-
the request. This happens when a flow pivots (pushes a new flow onto the
|
|
492
|
-
stack) or when a stacked flow completes (auto-pops to the parent flow).
|
|
493
|
-
Always use the `id` from the latest response for the next request.
|
|
494
|
-
|
|
495
|
-
## Flow completion
|
|
496
|
-
|
|
497
|
-
When `step.type` is `complete`, the flow is terminal. The `step.behavior`
|
|
498
|
-
field tells the frontend what to do:
|
|
499
|
-
|
|
500
|
-
| `behavior` | Action |
|
|
501
|
-
|------------- |------------------------------------------------------------|
|
|
502
|
-
| `redirect` | Navigate to `redirect_uri` (OIDC/SAML auth request done). |
|
|
503
|
-
| `show` | Render the step as a success screen (e.g., registration). |
|
|
504
|
-
|
|
505
|
-
A `complete` step is only returned when the **entire flow stack** is done.
|
|
506
|
-
If a stacked flow (e.g., recovery pivoted from login) finishes, the server
|
|
507
|
-
auto-pops to the parent flow and returns the parent's next step — the
|
|
508
|
-
frontend never sees a `complete` for intermediate flows.
|
|
509
|
-
|
|
775
|
+
* processes (e.g., verifies a credential), advances the state machine
|
|
776
|
+
* through any invisible steps, and returns the next visible step.
|
|
777
|
+
*
|
|
778
|
+
* The response sets an updated encrypted `HttpOnly` cookie (`_zflow`)
|
|
779
|
+
* with the new flow state. The server is stateless — all orchestration
|
|
780
|
+
* state is carried in this cookie between requests.
|
|
781
|
+
*
|
|
782
|
+
* **Important:** The `id` in the response may differ from the `id` used in
|
|
783
|
+
* the request. This happens when a flow pivots (pushes a new flow onto the
|
|
784
|
+
* stack) or when a stacked flow completes (auto-pops to the parent flow).
|
|
785
|
+
* Always use the `id` from the latest response for the next request.
|
|
786
|
+
*
|
|
787
|
+
* ## Flow completion
|
|
788
|
+
*
|
|
789
|
+
* When `step.type` is `complete`, the flow is terminal. The `step.behavior`
|
|
790
|
+
* field tells the frontend what to do:
|
|
791
|
+
*
|
|
792
|
+
* | `behavior` | Action |
|
|
793
|
+
* |------------- |------------------------------------------------------------|
|
|
794
|
+
* | `redirect` | Navigate to `redirect_uri` (OIDC/SAML auth request done). |
|
|
795
|
+
* | `show` | Render the step as a success screen (e.g., registration). |
|
|
796
|
+
*
|
|
797
|
+
* A `complete` step is only returned when the **entire flow stack** is done.
|
|
798
|
+
* If a stacked flow (e.g., recovery pivoted from login) finishes, the server
|
|
799
|
+
* auto-pops to the parent flow and returns the parent's next step — the
|
|
800
|
+
* frontend never sees a `complete` for intermediate flows.
|
|
510
801
|
* @summary Submit step data and advance
|
|
511
802
|
*/
|
|
512
803
|
export const submitFlowStep = async (
|
|
513
804
|
id: string,
|
|
514
805
|
submitFlowStepBody: SubmitFlowStepBody,
|
|
515
|
-
options?:
|
|
806
|
+
options?: Parameters<typeof customFetch>[1],
|
|
516
807
|
): Promise<SubmitFlowStep200> => {
|
|
808
|
+
const getHeaders = (
|
|
809
|
+
h?: NonNullable<RequestInit["headers"]>,
|
|
810
|
+
): Record<string, string | readonly string[]> => {
|
|
811
|
+
if (!h) return {};
|
|
812
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
813
|
+
if (Symbol.iterator in h) {
|
|
814
|
+
return Object.fromEntries(
|
|
815
|
+
Array.from(
|
|
816
|
+
h as Iterable<Iterable<string>>,
|
|
817
|
+
(entry) => Array.from(entry) as [string, string],
|
|
818
|
+
),
|
|
819
|
+
);
|
|
820
|
+
}
|
|
821
|
+
const headers: Record<string, string | readonly string[]> = {};
|
|
822
|
+
for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
|
|
823
|
+
if (value !== undefined) headers[name] = value;
|
|
824
|
+
}
|
|
825
|
+
return headers;
|
|
826
|
+
};
|
|
517
827
|
return customFetch<SubmitFlowStep200>(getSubmitFlowStepUrl(id), {
|
|
518
828
|
...options,
|
|
519
829
|
method: "POST",
|
|
520
|
-
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
830
|
+
headers: { "Content-Type": "application/json", ...getHeaders(options?.headers) },
|
|
521
831
|
body: JSON.stringify(submitFlowStepBody),
|
|
522
832
|
});
|
|
523
833
|
};
|
|
@@ -528,45 +838,62 @@ export const getCreateAuthAttemptUrl = () => {
|
|
|
528
838
|
|
|
529
839
|
/**
|
|
530
840
|
* Starts a new authentication attempt. This is the entry point for the auth_attempts state machine.
|
|
531
|
-
|
|
532
|
-
An attempt is an ephemeral (15-minute TTL) state machine that drives a single authentication round.
|
|
533
|
-
It accepts factor challenges, verifies proofs, and completes into a session or handoff token.
|
|
534
|
-
|
|
535
|
-
Accepts a project_id and challenge_nonce (from POST /bootstrap/challenge). For step-up re-auth,
|
|
536
|
-
also include session_id to add factors to an existing session.
|
|
537
|
-
|
|
841
|
+
*
|
|
842
|
+
* An attempt is an ephemeral (15-minute TTL) state machine that drives a single authentication round.
|
|
843
|
+
* It accepts factor challenges, verifies proofs, and completes into a session or handoff token.
|
|
844
|
+
*
|
|
845
|
+
* Accepts a project_id and challenge_nonce (from POST /bootstrap/challenge). For step-up re-auth,
|
|
846
|
+
* also include session_id to add factors to an existing session.
|
|
538
847
|
* @summary Create a new authentication attempt
|
|
539
848
|
*/
|
|
540
849
|
export const createAuthAttempt = async (
|
|
541
850
|
createAuthAttemptBody: CreateAuthAttemptBody,
|
|
542
|
-
options?:
|
|
851
|
+
options?: Parameters<typeof customFetch>[1],
|
|
543
852
|
): Promise<CreateAuthAttempt201> => {
|
|
853
|
+
const getHeaders = (
|
|
854
|
+
h?: NonNullable<RequestInit["headers"]>,
|
|
855
|
+
): Record<string, string | readonly string[]> => {
|
|
856
|
+
if (!h) return {};
|
|
857
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
858
|
+
if (Symbol.iterator in h) {
|
|
859
|
+
return Object.fromEntries(
|
|
860
|
+
Array.from(
|
|
861
|
+
h as Iterable<Iterable<string>>,
|
|
862
|
+
(entry) => Array.from(entry) as [string, string],
|
|
863
|
+
),
|
|
864
|
+
);
|
|
865
|
+
}
|
|
866
|
+
const headers: Record<string, string | readonly string[]> = {};
|
|
867
|
+
for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
|
|
868
|
+
if (value !== undefined) headers[name] = value;
|
|
869
|
+
}
|
|
870
|
+
return headers;
|
|
871
|
+
};
|
|
544
872
|
return customFetch<CreateAuthAttempt201>(getCreateAuthAttemptUrl(), {
|
|
545
873
|
...options,
|
|
546
874
|
method: "POST",
|
|
547
|
-
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
875
|
+
headers: { "Content-Type": "application/json", ...getHeaders(options?.headers) },
|
|
548
876
|
body: JSON.stringify(createAuthAttemptBody),
|
|
549
877
|
});
|
|
550
878
|
};
|
|
551
879
|
|
|
552
880
|
export const getGetAuthAttemptUrl = (attemptId: string) => {
|
|
553
|
-
return `${getProxyPath()}/auth_attempts/${attemptId}`;
|
|
881
|
+
return `${getProxyPath()}/auth_attempts/${encodeURIComponent(String(attemptId))}`;
|
|
554
882
|
};
|
|
555
883
|
|
|
556
884
|
/**
|
|
557
885
|
* Polls the current state of an authentication attempt.
|
|
558
|
-
|
|
559
|
-
Returns the attempt's state, available factors for the next challenge,
|
|
560
|
-
challenges issued so far, and any errors preventing progress.
|
|
561
|
-
|
|
562
|
-
Use this for polling during long-running factor verifications (e.g., waiting for
|
|
563
|
-
a federated IdP callback or a device flow).
|
|
564
|
-
|
|
886
|
+
*
|
|
887
|
+
* Returns the attempt's state, available factors for the next challenge,
|
|
888
|
+
* challenges issued so far, and any errors preventing progress.
|
|
889
|
+
*
|
|
890
|
+
* Use this for polling during long-running factor verifications (e.g., waiting for
|
|
891
|
+
* a federated IdP callback or a device flow).
|
|
565
892
|
* @summary Get authentication attempt state
|
|
566
893
|
*/
|
|
567
894
|
export const getAuthAttempt = async (
|
|
568
895
|
attemptId: string,
|
|
569
|
-
options?:
|
|
896
|
+
options?: Parameters<typeof customFetch>[1],
|
|
570
897
|
): Promise<GetAuthAttempt200> => {
|
|
571
898
|
return customFetch<GetAuthAttempt200>(getGetAuthAttemptUrl(attemptId), {
|
|
572
899
|
...options,
|
|
@@ -575,85 +902,120 @@ export const getAuthAttempt = async (
|
|
|
575
902
|
};
|
|
576
903
|
|
|
577
904
|
export const getIssueChallengeUrl = (attemptId: string) => {
|
|
578
|
-
return `${getProxyPath()}/auth_attempts/${attemptId}/challenges`;
|
|
905
|
+
return `${getProxyPath()}/auth_attempts/${encodeURIComponent(String(attemptId))}/challenges`;
|
|
579
906
|
};
|
|
580
907
|
|
|
581
908
|
/**
|
|
582
909
|
* Issues a single-factor verification challenge within an auth attempt.
|
|
583
|
-
|
|
584
|
-
This advances the authentication state machine by requesting a specific factor method
|
|
585
|
-
(password, passkey, TOTP, OTP via SMS, etc.). The server responds with challenge details
|
|
586
|
-
including method, metadata, and any UI hints. The client then verifies the proof
|
|
587
|
-
by calling POST /auth_attempts/{attempt_id}/challenges/{challenge_id}/verify.
|
|
588
|
-
|
|
910
|
+
*
|
|
911
|
+
* This advances the authentication state machine by requesting a specific factor method
|
|
912
|
+
* (password, passkey, TOTP, OTP via SMS, etc.). The server responds with challenge details
|
|
913
|
+
* including method, metadata, and any UI hints. The client then verifies the proof
|
|
914
|
+
* by calling POST /auth_attempts/{attempt_id}/challenges/{challenge_id}/verify.
|
|
589
915
|
* @summary Issue a factor challenge
|
|
590
916
|
*/
|
|
591
917
|
export const issueChallenge = async (
|
|
592
918
|
attemptId: string,
|
|
593
919
|
issueChallengeBody: IssueChallengeBody,
|
|
594
|
-
options?:
|
|
920
|
+
options?: Parameters<typeof customFetch>[1],
|
|
595
921
|
): Promise<IssueChallenge201> => {
|
|
922
|
+
const getHeaders = (
|
|
923
|
+
h?: NonNullable<RequestInit["headers"]>,
|
|
924
|
+
): Record<string, string | readonly string[]> => {
|
|
925
|
+
if (!h) return {};
|
|
926
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
927
|
+
if (Symbol.iterator in h) {
|
|
928
|
+
return Object.fromEntries(
|
|
929
|
+
Array.from(
|
|
930
|
+
h as Iterable<Iterable<string>>,
|
|
931
|
+
(entry) => Array.from(entry) as [string, string],
|
|
932
|
+
),
|
|
933
|
+
);
|
|
934
|
+
}
|
|
935
|
+
const headers: Record<string, string | readonly string[]> = {};
|
|
936
|
+
for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
|
|
937
|
+
if (value !== undefined) headers[name] = value;
|
|
938
|
+
}
|
|
939
|
+
return headers;
|
|
940
|
+
};
|
|
596
941
|
return customFetch<IssueChallenge201>(getIssueChallengeUrl(attemptId), {
|
|
597
942
|
...options,
|
|
598
943
|
method: "POST",
|
|
599
|
-
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
944
|
+
headers: { "Content-Type": "application/json", ...getHeaders(options?.headers) },
|
|
600
945
|
body: JSON.stringify(issueChallengeBody),
|
|
601
946
|
});
|
|
602
947
|
};
|
|
603
948
|
|
|
604
949
|
export const getVerifyChallengeProofUrl = (attemptId: string, challengeId: string) => {
|
|
605
|
-
return `${getProxyPath()}/auth_attempts/${attemptId}/challenges/${challengeId}/verify`;
|
|
950
|
+
return `${getProxyPath()}/auth_attempts/${encodeURIComponent(String(attemptId))}/challenges/${encodeURIComponent(String(challengeId))}/verify`;
|
|
606
951
|
};
|
|
607
952
|
|
|
608
953
|
/**
|
|
609
954
|
* Submits a proof (credential, code, assertion) to verify a factor challenge.
|
|
610
|
-
|
|
611
|
-
The proof format depends on the challenge method. For example:
|
|
612
|
-
- `password` method: { password: "…" }
|
|
613
|
-
- `totp` method: { totp: { code: "123456" } }
|
|
614
|
-
- `passkey` method: { passkey: { assertion: "…" } }
|
|
615
|
-
- `recovery_code` method: { recovery_code: "…" }
|
|
616
|
-
|
|
617
|
-
On successful verification, the factor is written to the auth attempt.
|
|
618
|
-
The attempt moves to the next pending challenge or completes if all required factors are verified.
|
|
619
|
-
|
|
955
|
+
*
|
|
956
|
+
* The proof format depends on the challenge method. For example:
|
|
957
|
+
* - `password` method: { password: "…" }
|
|
958
|
+
* - `totp` method: { totp: { code: "123456" } }
|
|
959
|
+
* - `passkey` method: { passkey: { assertion: "…" } }
|
|
960
|
+
* - `recovery_code` method: { recovery_code: "…" }
|
|
961
|
+
*
|
|
962
|
+
* On successful verification, the factor is written to the auth attempt.
|
|
963
|
+
* The attempt moves to the next pending challenge or completes if all required factors are verified.
|
|
620
964
|
* @summary Verify a factor proof
|
|
621
965
|
*/
|
|
622
966
|
export const verifyChallengeProof = async (
|
|
623
967
|
attemptId: string,
|
|
624
968
|
challengeId: string,
|
|
625
969
|
verifyChallengeProofBody: VerifyChallengeProofBody,
|
|
626
|
-
options?:
|
|
970
|
+
options?: Parameters<typeof customFetch>[1],
|
|
627
971
|
): Promise<VerifyChallengeProof200> => {
|
|
972
|
+
const getHeaders = (
|
|
973
|
+
h?: NonNullable<RequestInit["headers"]>,
|
|
974
|
+
): Record<string, string | readonly string[]> => {
|
|
975
|
+
if (!h) return {};
|
|
976
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
977
|
+
if (Symbol.iterator in h) {
|
|
978
|
+
return Object.fromEntries(
|
|
979
|
+
Array.from(
|
|
980
|
+
h as Iterable<Iterable<string>>,
|
|
981
|
+
(entry) => Array.from(entry) as [string, string],
|
|
982
|
+
),
|
|
983
|
+
);
|
|
984
|
+
}
|
|
985
|
+
const headers: Record<string, string | readonly string[]> = {};
|
|
986
|
+
for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
|
|
987
|
+
if (value !== undefined) headers[name] = value;
|
|
988
|
+
}
|
|
989
|
+
return headers;
|
|
990
|
+
};
|
|
628
991
|
return customFetch<VerifyChallengeProof200>(getVerifyChallengeProofUrl(attemptId, challengeId), {
|
|
629
992
|
...options,
|
|
630
993
|
method: "POST",
|
|
631
|
-
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
994
|
+
headers: { "Content-Type": "application/json", ...getHeaders(options?.headers) },
|
|
632
995
|
body: JSON.stringify(verifyChallengeProofBody),
|
|
633
996
|
});
|
|
634
997
|
};
|
|
635
998
|
|
|
636
999
|
export const getCreateHandoffUrl = (attemptId: string) => {
|
|
637
|
-
return `${getProxyPath()}/auth_attempts/${attemptId}/handoff`;
|
|
1000
|
+
return `${getProxyPath()}/auth_attempts/${encodeURIComponent(String(attemptId))}/handoff`;
|
|
638
1001
|
};
|
|
639
1002
|
|
|
640
1003
|
/**
|
|
641
1004
|
* Completes the authentication attempt and mints a `handoff_token`.
|
|
642
|
-
|
|
643
|
-
Call this after all required factors have been verified and the attempt is in `completed` state.
|
|
644
|
-
The handoff token is short-lived (≤60 seconds) and must be exchanged at
|
|
645
|
-
POST /sessions/exchange to receive the final session and session_token.
|
|
646
|
-
|
|
647
|
-
The handoff token is:
|
|
648
|
-
- Single-use (atomic exchange, no retry)
|
|
649
|
-
- Audience-bound (requires matching project key for exchange)
|
|
650
|
-
- Idempotency-safe within a 5-minute window (see conventions)
|
|
651
|
-
|
|
1005
|
+
*
|
|
1006
|
+
* Call this after all required factors have been verified and the attempt is in `completed` state.
|
|
1007
|
+
* The handoff token is short-lived (≤60 seconds) and must be exchanged at
|
|
1008
|
+
* POST /sessions/exchange to receive the final session and session_token.
|
|
1009
|
+
*
|
|
1010
|
+
* The handoff token is:
|
|
1011
|
+
* - Single-use (atomic exchange, no retry)
|
|
1012
|
+
* - Audience-bound (requires matching project key for exchange)
|
|
1013
|
+
* - Idempotency-safe within a 5-minute window (see conventions)
|
|
652
1014
|
* @summary Complete authentication and create handoff token
|
|
653
1015
|
*/
|
|
654
1016
|
export const createHandoff = async (
|
|
655
1017
|
attemptId: string,
|
|
656
|
-
options?:
|
|
1018
|
+
options?: Parameters<typeof customFetch>[1],
|
|
657
1019
|
): Promise<CreateHandoff200> => {
|
|
658
1020
|
return customFetch<CreateHandoff200>(getCreateHandoffUrl(attemptId), {
|
|
659
1021
|
...options,
|
|
@@ -670,12 +1032,31 @@ export const getCreateProjectUrl = () => {
|
|
|
670
1032
|
*/
|
|
671
1033
|
export const createProject = async (
|
|
672
1034
|
createProjectBody: CreateProjectBody,
|
|
673
|
-
options?:
|
|
1035
|
+
options?: Parameters<typeof customFetch>[1],
|
|
674
1036
|
): Promise<CreateProject201> => {
|
|
1037
|
+
const getHeaders = (
|
|
1038
|
+
h?: NonNullable<RequestInit["headers"]>,
|
|
1039
|
+
): Record<string, string | readonly string[]> => {
|
|
1040
|
+
if (!h) return {};
|
|
1041
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
1042
|
+
if (Symbol.iterator in h) {
|
|
1043
|
+
return Object.fromEntries(
|
|
1044
|
+
Array.from(
|
|
1045
|
+
h as Iterable<Iterable<string>>,
|
|
1046
|
+
(entry) => Array.from(entry) as [string, string],
|
|
1047
|
+
),
|
|
1048
|
+
);
|
|
1049
|
+
}
|
|
1050
|
+
const headers: Record<string, string | readonly string[]> = {};
|
|
1051
|
+
for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
|
|
1052
|
+
if (value !== undefined) headers[name] = value;
|
|
1053
|
+
}
|
|
1054
|
+
return headers;
|
|
1055
|
+
};
|
|
675
1056
|
return customFetch<CreateProject201>(getCreateProjectUrl(), {
|
|
676
1057
|
...options,
|
|
677
1058
|
method: "POST",
|
|
678
|
-
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
1059
|
+
headers: { "Content-Type": "application/json", ...getHeaders(options?.headers) },
|
|
679
1060
|
body: JSON.stringify(createProjectBody),
|
|
680
1061
|
});
|
|
681
1062
|
};
|
|
@@ -689,28 +1070,46 @@ export const getQueryProjectsUrl = () => {
|
|
|
689
1070
|
*/
|
|
690
1071
|
export const queryProjects = async (
|
|
691
1072
|
queryProjectsBody: QueryProjectsBody,
|
|
692
|
-
options?:
|
|
1073
|
+
options?: Parameters<typeof customFetch>[1],
|
|
693
1074
|
): Promise<QueryProjects200> => {
|
|
1075
|
+
const getHeaders = (
|
|
1076
|
+
h?: NonNullable<RequestInit["headers"]>,
|
|
1077
|
+
): Record<string, string | readonly string[]> => {
|
|
1078
|
+
if (!h) return {};
|
|
1079
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
1080
|
+
if (Symbol.iterator in h) {
|
|
1081
|
+
return Object.fromEntries(
|
|
1082
|
+
Array.from(
|
|
1083
|
+
h as Iterable<Iterable<string>>,
|
|
1084
|
+
(entry) => Array.from(entry) as [string, string],
|
|
1085
|
+
),
|
|
1086
|
+
);
|
|
1087
|
+
}
|
|
1088
|
+
const headers: Record<string, string | readonly string[]> = {};
|
|
1089
|
+
for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
|
|
1090
|
+
if (value !== undefined) headers[name] = value;
|
|
1091
|
+
}
|
|
1092
|
+
return headers;
|
|
1093
|
+
};
|
|
694
1094
|
return customFetch<QueryProjects200>(getQueryProjectsUrl(), {
|
|
695
1095
|
...options,
|
|
696
1096
|
method: "POST",
|
|
697
|
-
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
1097
|
+
headers: { "Content-Type": "application/json", ...getHeaders(options?.headers) },
|
|
698
1098
|
body: JSON.stringify(queryProjectsBody),
|
|
699
1099
|
});
|
|
700
1100
|
};
|
|
701
1101
|
|
|
702
1102
|
export const getGetProjectUrl = (projectId: string) => {
|
|
703
|
-
return `${getProxyPath()}/projects/${projectId}`;
|
|
1103
|
+
return `${getProxyPath()}/projects/${encodeURIComponent(String(projectId))}`;
|
|
704
1104
|
};
|
|
705
1105
|
|
|
706
1106
|
/**
|
|
707
1107
|
* Returns the current state of a project.
|
|
708
|
-
|
|
709
1108
|
* @summary Get project
|
|
710
1109
|
*/
|
|
711
1110
|
export const getProject = async (
|
|
712
1111
|
projectId: string,
|
|
713
|
-
options?:
|
|
1112
|
+
options?: Parameters<typeof customFetch>[1],
|
|
714
1113
|
): Promise<GetProject200> => {
|
|
715
1114
|
return customFetch<GetProject200>(getGetProjectUrl(projectId), {
|
|
716
1115
|
...options,
|
|
@@ -719,43 +1118,60 @@ export const getProject = async (
|
|
|
719
1118
|
};
|
|
720
1119
|
|
|
721
1120
|
export const getPatchProjectUrl = (projectId: string) => {
|
|
722
|
-
return `${getProxyPath()}/projects/${projectId}`;
|
|
1121
|
+
return `${getProxyPath()}/projects/${encodeURIComponent(String(projectId))}`;
|
|
723
1122
|
};
|
|
724
1123
|
|
|
725
1124
|
/**
|
|
726
1125
|
* Updates the state of a project.
|
|
727
|
-
|
|
728
1126
|
* @summary Update project
|
|
729
1127
|
*/
|
|
730
1128
|
export const patchProject = async (
|
|
731
1129
|
projectId: string,
|
|
732
1130
|
patchProjectBody: PatchProjectBody,
|
|
733
|
-
options?:
|
|
1131
|
+
options?: Parameters<typeof customFetch>[1],
|
|
734
1132
|
): Promise<PatchProject200> => {
|
|
1133
|
+
const getHeaders = (
|
|
1134
|
+
h?: NonNullable<RequestInit["headers"]>,
|
|
1135
|
+
): Record<string, string | readonly string[]> => {
|
|
1136
|
+
if (!h) return {};
|
|
1137
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
1138
|
+
if (Symbol.iterator in h) {
|
|
1139
|
+
return Object.fromEntries(
|
|
1140
|
+
Array.from(
|
|
1141
|
+
h as Iterable<Iterable<string>>,
|
|
1142
|
+
(entry) => Array.from(entry) as [string, string],
|
|
1143
|
+
),
|
|
1144
|
+
);
|
|
1145
|
+
}
|
|
1146
|
+
const headers: Record<string, string | readonly string[]> = {};
|
|
1147
|
+
for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
|
|
1148
|
+
if (value !== undefined) headers[name] = value;
|
|
1149
|
+
}
|
|
1150
|
+
return headers;
|
|
1151
|
+
};
|
|
735
1152
|
return customFetch<PatchProject200>(getPatchProjectUrl(projectId), {
|
|
736
1153
|
...options,
|
|
737
1154
|
method: "PATCH",
|
|
738
|
-
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
1155
|
+
headers: { "Content-Type": "application/json", ...getHeaders(options?.headers) },
|
|
739
1156
|
body: JSON.stringify(patchProjectBody),
|
|
740
1157
|
});
|
|
741
1158
|
};
|
|
742
1159
|
|
|
743
1160
|
export const getInitClaimUrl = (projectId: string) => {
|
|
744
|
-
return `${getProxyPath()}/projects/${projectId}/claim/init`;
|
|
1161
|
+
return `${getProxyPath()}/projects/${encodeURIComponent(String(projectId))}/claim/init`;
|
|
745
1162
|
};
|
|
746
1163
|
|
|
747
1164
|
/**
|
|
748
1165
|
* Starts a claim challenge for an unclaimed project. Authenticated by the
|
|
749
|
-
project secret, this mints a single-use, short-lived challenge and returns
|
|
750
|
-
the `claim_url` the developer opens in a browser to complete the claim,
|
|
751
|
-
together with the `challenge_id` the CLI polls with. The exact expiry is
|
|
752
|
-
carried by `expires_at` on the response.
|
|
753
|
-
|
|
1166
|
+
* project secret, this mints a single-use, short-lived challenge and returns
|
|
1167
|
+
* the `claim_url` the developer opens in a browser to complete the claim,
|
|
1168
|
+
* together with the `challenge_id` the CLI polls with. The exact expiry is
|
|
1169
|
+
* carried by `expires_at` on the response.
|
|
754
1170
|
* @summary Initialize a project claim
|
|
755
1171
|
*/
|
|
756
1172
|
export const initClaim = async (
|
|
757
1173
|
projectId: string,
|
|
758
|
-
options?:
|
|
1174
|
+
options?: Parameters<typeof customFetch>[1],
|
|
759
1175
|
): Promise<InitClaim201> => {
|
|
760
1176
|
return customFetch<InitClaim201>(getInitClaimUrl(projectId), {
|
|
761
1177
|
...options,
|
|
@@ -768,33 +1184,32 @@ export const getGetClaimStatusUrl = (projectId: string, params: GetClaimStatusPa
|
|
|
768
1184
|
|
|
769
1185
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
770
1186
|
if (value !== undefined) {
|
|
771
|
-
normalizedParams.append(key, value === null ? "null" : value
|
|
1187
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
772
1188
|
}
|
|
773
1189
|
});
|
|
774
1190
|
|
|
775
1191
|
const stringifiedParams = normalizedParams.toString();
|
|
776
1192
|
|
|
777
1193
|
return stringifiedParams.length > 0
|
|
778
|
-
? `${getProxyPath()}/projects/${projectId}/claim/status?${stringifiedParams}`
|
|
779
|
-
: `${getProxyPath()}/projects/${projectId}/claim/status`;
|
|
1194
|
+
? `${getProxyPath()}/projects/${encodeURIComponent(String(projectId))}/claim/status?${stringifiedParams}`
|
|
1195
|
+
: `${getProxyPath()}/projects/${encodeURIComponent(String(projectId))}/claim/status`;
|
|
780
1196
|
};
|
|
781
1197
|
|
|
782
1198
|
/**
|
|
783
1199
|
* Polled by the CLI while a browser completes the claim. Authorized by the
|
|
784
|
-
project secret that initiated the challenge. Returns `pending`, or
|
|
785
|
-
`completed` with the owning team, the claim timestamp, and the dashboard
|
|
786
|
-
URL once the project is claimed. The claim grant, not the polled
|
|
787
|
-
challenge, is the source of truth: a project claimed through another
|
|
788
|
-
concurrent challenge also reports `completed`, and a completed claim
|
|
789
|
-
keeps reporting `completed` past this challenge's expiry and past the
|
|
790
|
-
project's claim window.
|
|
791
|
-
|
|
1200
|
+
* project secret that initiated the challenge. Returns `pending`, or
|
|
1201
|
+
* `completed` with the owning team, the claim timestamp, and the dashboard
|
|
1202
|
+
* URL once the project is claimed. The claim grant, not the polled
|
|
1203
|
+
* challenge, is the source of truth: a project claimed through another
|
|
1204
|
+
* concurrent challenge also reports `completed`, and a completed claim
|
|
1205
|
+
* keeps reporting `completed` past this challenge's expiry and past the
|
|
1206
|
+
* project's claim window.
|
|
792
1207
|
* @summary Get claim status
|
|
793
1208
|
*/
|
|
794
1209
|
export const getClaimStatus = async (
|
|
795
1210
|
projectId: string,
|
|
796
1211
|
params: GetClaimStatusParams,
|
|
797
|
-
options?:
|
|
1212
|
+
options?: Parameters<typeof customFetch>[1],
|
|
798
1213
|
): Promise<GetClaimStatus200> => {
|
|
799
1214
|
return customFetch<GetClaimStatus200>(getGetClaimStatusUrl(projectId, params), {
|
|
800
1215
|
...options,
|
|
@@ -803,26 +1218,44 @@ export const getClaimStatus = async (
|
|
|
803
1218
|
};
|
|
804
1219
|
|
|
805
1220
|
export const getCompleteClaimUrl = (projectId: string) => {
|
|
806
|
-
return `${getProxyPath()}/projects/${projectId}/claim/complete`;
|
|
1221
|
+
return `${getProxyPath()}/projects/${encodeURIComponent(String(projectId))}/claim/complete`;
|
|
807
1222
|
};
|
|
808
1223
|
|
|
809
1224
|
/**
|
|
810
1225
|
* Called by the browser after the developer authenticates on the claim page.
|
|
811
|
-
Authenticated by the `__nextgen_session` cookie, it attaches the project to
|
|
812
|
-
the developer's personal team using the `challenge_id` from the claim URL as
|
|
813
|
-
its single-use, browser-safe authorization.
|
|
814
|
-
|
|
1226
|
+
* Authenticated by the `__nextgen_session` cookie, it attaches the project to
|
|
1227
|
+
* the developer's personal team using the `challenge_id` from the claim URL as
|
|
1228
|
+
* its single-use, browser-safe authorization.
|
|
815
1229
|
* @summary Complete a project claim
|
|
816
1230
|
*/
|
|
817
1231
|
export const completeClaim = async (
|
|
818
1232
|
projectId: string,
|
|
819
1233
|
completeClaimBody: CompleteClaimBody,
|
|
820
|
-
options?:
|
|
1234
|
+
options?: Parameters<typeof customFetch>[1],
|
|
821
1235
|
): Promise<CompleteClaim200> => {
|
|
1236
|
+
const getHeaders = (
|
|
1237
|
+
h?: NonNullable<RequestInit["headers"]>,
|
|
1238
|
+
): Record<string, string | readonly string[]> => {
|
|
1239
|
+
if (!h) return {};
|
|
1240
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
1241
|
+
if (Symbol.iterator in h) {
|
|
1242
|
+
return Object.fromEntries(
|
|
1243
|
+
Array.from(
|
|
1244
|
+
h as Iterable<Iterable<string>>,
|
|
1245
|
+
(entry) => Array.from(entry) as [string, string],
|
|
1246
|
+
),
|
|
1247
|
+
);
|
|
1248
|
+
}
|
|
1249
|
+
const headers: Record<string, string | readonly string[]> = {};
|
|
1250
|
+
for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
|
|
1251
|
+
if (value !== undefined) headers[name] = value;
|
|
1252
|
+
}
|
|
1253
|
+
return headers;
|
|
1254
|
+
};
|
|
822
1255
|
return customFetch<CompleteClaim200>(getCompleteClaimUrl(projectId), {
|
|
823
1256
|
...options,
|
|
824
1257
|
method: "POST",
|
|
825
|
-
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
1258
|
+
headers: { "Content-Type": "application/json", ...getHeaders(options?.headers) },
|
|
826
1259
|
body: JSON.stringify(completeClaimBody),
|
|
827
1260
|
});
|
|
828
1261
|
};
|
|
@@ -832,31 +1265,30 @@ export const getGetClaimWindowUrl = (projectId: string, params: GetClaimWindowPa
|
|
|
832
1265
|
|
|
833
1266
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
834
1267
|
if (value !== undefined) {
|
|
835
|
-
normalizedParams.append(key, value === null ? "null" : value
|
|
1268
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
836
1269
|
}
|
|
837
1270
|
});
|
|
838
1271
|
|
|
839
1272
|
const stringifiedParams = normalizedParams.toString();
|
|
840
1273
|
|
|
841
1274
|
return stringifiedParams.length > 0
|
|
842
|
-
? `${getProxyPath()}/projects/${projectId}/claim/window?${stringifiedParams}`
|
|
843
|
-
: `${getProxyPath()}/projects/${projectId}/claim/window`;
|
|
1275
|
+
? `${getProxyPath()}/projects/${encodeURIComponent(String(projectId))}/claim/window?${stringifiedParams}`
|
|
1276
|
+
: `${getProxyPath()}/projects/${encodeURIComponent(String(projectId))}/claim/window`;
|
|
844
1277
|
};
|
|
845
1278
|
|
|
846
1279
|
/**
|
|
847
1280
|
* Read by the claim page in the browser to show how long is left to claim the
|
|
848
|
-
project. Unauthenticated by design: the claim page runs this before the
|
|
849
|
-
developer has signed in, and holding the `challenge_id` from the claim URL
|
|
850
|
-
is the authorization — the same capability `claim/complete` accepts. It
|
|
851
|
-
reveals only the window, never the project itself, and unlike
|
|
852
|
-
`claim/complete` it spends nothing, so a reload is free.
|
|
853
|
-
|
|
1281
|
+
* project. Unauthenticated by design: the claim page runs this before the
|
|
1282
|
+
* developer has signed in, and holding the `challenge_id` from the claim URL
|
|
1283
|
+
* is the authorization — the same capability `claim/complete` accepts. It
|
|
1284
|
+
* reveals only the window, never the project itself, and unlike
|
|
1285
|
+
* `claim/complete` it spends nothing, so a reload is free.
|
|
854
1286
|
* @summary Get the claim window for a project
|
|
855
1287
|
*/
|
|
856
1288
|
export const getClaimWindow = async (
|
|
857
1289
|
projectId: string,
|
|
858
1290
|
params: GetClaimWindowParams,
|
|
859
|
-
options?:
|
|
1291
|
+
options?: Parameters<typeof customFetch>[1],
|
|
860
1292
|
): Promise<GetClaimWindow200> => {
|
|
861
1293
|
return customFetch<GetClaimWindow200>(getGetClaimWindowUrl(projectId, params), {
|
|
862
1294
|
...options,
|
|
@@ -870,37 +1302,55 @@ export const getCreateSessionUrl = () => {
|
|
|
870
1302
|
|
|
871
1303
|
/**
|
|
872
1304
|
* Creates an anonymous session shell with no user and no factors (`state: building`).
|
|
873
|
-
|
|
874
|
-
This is optional — an `auth_attempt` will create a session implicitly if none is provided.
|
|
875
|
-
Use this explicitly when you want to:
|
|
876
|
-
- Pre-allocate a `session_id` before the user is known, so device/telemetry signals
|
|
877
|
-
|
|
878
|
-
- Track anonymous state (bot detection, device fingerprint) that survives until authentication.
|
|
879
|
-
|
|
880
|
-
Creating a session is an app-plane operation on the project credential
|
|
881
|
-
(`session.write`). The returned `session_token` is a session credential for the
|
|
882
|
-
end-user client, not a management scope: it is delivered as the
|
|
883
|
-
`__nextgen_session` cookie and authorises the self-service operations
|
|
884
|
-
`GET /sessions/me` and `DELETE /sessions/me` (`nextgenSession` scheme). The
|
|
885
|
-
by-id operations `GET /sessions/{session_id}` and `DELETE /sessions/{session_id}`
|
|
886
|
-
are operator endpoints and require `session.read` / `session.delete` instead.
|
|
887
|
-
|
|
888
|
-
The `session_token` is superseded when a handoff exchange completes — clients must
|
|
889
|
-
replace it at that point.
|
|
890
|
-
|
|
891
|
-
Anonymous sessions expire aggressively (10-minute TTL). The TTL resets to the configured
|
|
892
|
-
full session TTL when the first authentication factor is written via a completing `auth_attempt`.
|
|
893
|
-
|
|
1305
|
+
*
|
|
1306
|
+
* This is optional — an `auth_attempt` will create a session implicitly if none is provided.
|
|
1307
|
+
* Use this explicitly when you want to:
|
|
1308
|
+
* - Pre-allocate a `session_id` before the user is known, so device/telemetry signals
|
|
1309
|
+
* can be correlated with the eventual authenticated session from the start.
|
|
1310
|
+
* - Track anonymous state (bot detection, device fingerprint) that survives until authentication.
|
|
1311
|
+
*
|
|
1312
|
+
* Creating a session is an app-plane operation on the project credential
|
|
1313
|
+
* (`session.write`). The returned `session_token` is a session credential for the
|
|
1314
|
+
* end-user client, not a management scope: it is delivered as the
|
|
1315
|
+
* `__nextgen_session` cookie and authorises the self-service operations
|
|
1316
|
+
* `GET /sessions/me` and `DELETE /sessions/me` (`nextgenSession` scheme). The
|
|
1317
|
+
* by-id operations `GET /sessions/{session_id}` and `DELETE /sessions/{session_id}`
|
|
1318
|
+
* are operator endpoints and require `session.read` / `session.delete` instead.
|
|
1319
|
+
*
|
|
1320
|
+
* The `session_token` is superseded when a handoff exchange completes — clients must
|
|
1321
|
+
* replace it at that point.
|
|
1322
|
+
*
|
|
1323
|
+
* Anonymous sessions expire aggressively (10-minute TTL). The TTL resets to the configured
|
|
1324
|
+
* full session TTL when the first authentication factor is written via a completing `auth_attempt`.
|
|
894
1325
|
* @summary Create an anonymous session shell
|
|
895
1326
|
*/
|
|
896
1327
|
export const createSession = async (
|
|
897
1328
|
createSessionBody: CreateSessionBody,
|
|
898
|
-
options?:
|
|
1329
|
+
options?: Parameters<typeof customFetch>[1],
|
|
899
1330
|
): Promise<CreateSession201> => {
|
|
1331
|
+
const getHeaders = (
|
|
1332
|
+
h?: NonNullable<RequestInit["headers"]>,
|
|
1333
|
+
): Record<string, string | readonly string[]> => {
|
|
1334
|
+
if (!h) return {};
|
|
1335
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
1336
|
+
if (Symbol.iterator in h) {
|
|
1337
|
+
return Object.fromEntries(
|
|
1338
|
+
Array.from(
|
|
1339
|
+
h as Iterable<Iterable<string>>,
|
|
1340
|
+
(entry) => Array.from(entry) as [string, string],
|
|
1341
|
+
),
|
|
1342
|
+
);
|
|
1343
|
+
}
|
|
1344
|
+
const headers: Record<string, string | readonly string[]> = {};
|
|
1345
|
+
for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
|
|
1346
|
+
if (value !== undefined) headers[name] = value;
|
|
1347
|
+
}
|
|
1348
|
+
return headers;
|
|
1349
|
+
};
|
|
900
1350
|
return customFetch<CreateSession201>(getCreateSessionUrl(), {
|
|
901
1351
|
...options,
|
|
902
1352
|
method: "POST",
|
|
903
|
-
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
1353
|
+
headers: { "Content-Type": "application/json", ...getHeaders(options?.headers) },
|
|
904
1354
|
body: JSON.stringify(createSessionBody),
|
|
905
1355
|
});
|
|
906
1356
|
};
|
|
@@ -910,7 +1360,7 @@ export const getQuerySessionsUrl = (params: QuerySessionsParams) => {
|
|
|
910
1360
|
|
|
911
1361
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
912
1362
|
if (value !== undefined) {
|
|
913
|
-
normalizedParams.append(key, value === null ? "null" : value
|
|
1363
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
914
1364
|
}
|
|
915
1365
|
});
|
|
916
1366
|
|
|
@@ -923,20 +1373,38 @@ export const getQuerySessionsUrl = (params: QuerySessionsParams) => {
|
|
|
923
1373
|
|
|
924
1374
|
/**
|
|
925
1375
|
* Returns the sessions of a project, paginated with a cursor.
|
|
926
|
-
Sessions of every lifecycle state are returned; each carries its `state`.
|
|
927
|
-
Requires `session.read` permission.
|
|
928
|
-
|
|
1376
|
+
* Sessions of every lifecycle state are returned; each carries its `state`.
|
|
1377
|
+
* Requires `session.read` permission.
|
|
929
1378
|
* @summary Query sessions
|
|
930
1379
|
*/
|
|
931
1380
|
export const querySessions = async (
|
|
932
1381
|
querySessionsBody: QuerySessionsBody,
|
|
933
1382
|
params: QuerySessionsParams,
|
|
934
|
-
options?:
|
|
1383
|
+
options?: Parameters<typeof customFetch>[1],
|
|
935
1384
|
): Promise<QuerySessions200> => {
|
|
1385
|
+
const getHeaders = (
|
|
1386
|
+
h?: NonNullable<RequestInit["headers"]>,
|
|
1387
|
+
): Record<string, string | readonly string[]> => {
|
|
1388
|
+
if (!h) return {};
|
|
1389
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
1390
|
+
if (Symbol.iterator in h) {
|
|
1391
|
+
return Object.fromEntries(
|
|
1392
|
+
Array.from(
|
|
1393
|
+
h as Iterable<Iterable<string>>,
|
|
1394
|
+
(entry) => Array.from(entry) as [string, string],
|
|
1395
|
+
),
|
|
1396
|
+
);
|
|
1397
|
+
}
|
|
1398
|
+
const headers: Record<string, string | readonly string[]> = {};
|
|
1399
|
+
for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
|
|
1400
|
+
if (value !== undefined) headers[name] = value;
|
|
1401
|
+
}
|
|
1402
|
+
return headers;
|
|
1403
|
+
};
|
|
936
1404
|
return customFetch<QuerySessions200>(getQuerySessionsUrl(params), {
|
|
937
1405
|
...options,
|
|
938
1406
|
method: "POST",
|
|
939
|
-
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
1407
|
+
headers: { "Content-Type": "application/json", ...getHeaders(options?.headers) },
|
|
940
1408
|
body: JSON.stringify(querySessionsBody),
|
|
941
1409
|
});
|
|
942
1410
|
};
|
|
@@ -946,7 +1414,7 @@ export const getExchangeHandoffUrl = (params: ExchangeHandoffParams) => {
|
|
|
946
1414
|
|
|
947
1415
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
948
1416
|
if (value !== undefined) {
|
|
949
|
-
normalizedParams.append(key, value === null ? "null" : value
|
|
1417
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
950
1418
|
}
|
|
951
1419
|
});
|
|
952
1420
|
|
|
@@ -959,55 +1427,72 @@ export const getExchangeHandoffUrl = (params: ExchangeHandoffParams) => {
|
|
|
959
1427
|
|
|
960
1428
|
/**
|
|
961
1429
|
* Consumes a one-time `handoff_token` minted by `POST /auth_attempts/{id}/handoff`
|
|
962
|
-
and returns the resulting session and a `session_token`.
|
|
963
|
-
|
|
964
|
-
The server resolves the originating `auth_attempt` from the token and then:
|
|
965
|
-
|
|
966
|
-
| Originating auth_attempt | Outcome |
|
|
967
|
-
|---|---|
|
|
968
|
-
| No `session_id` | A new authenticated session is **created**. |
|
|
969
|
-
| `session_id` points to an anonymous shell | Existing session is **upgraded** — user and factors written in, TTL reset to full session TTL. |
|
|
970
|
-
| `session_id` points to an active session (step-up) | Existing session is **upgraded** — new factors merged, `assurance_levels[]` expanded. |
|
|
971
|
-
|
|
972
|
-
The response shape is identical in all three cases.
|
|
973
|
-
|
|
974
|
-
The `session_token` supersedes any previously issued `session_token` for the same session.
|
|
975
|
-
Clients must replace their stored token at this point.
|
|
976
|
-
|
|
977
|
-
Requires a project service key (OAuth2 client credentials).
|
|
978
|
-
|
|
1430
|
+
* and returns the resulting session and a `session_token`.
|
|
1431
|
+
*
|
|
1432
|
+
* The server resolves the originating `auth_attempt` from the token and then:
|
|
1433
|
+
*
|
|
1434
|
+
* | Originating auth_attempt | Outcome |
|
|
1435
|
+
* |---|---|
|
|
1436
|
+
* | No `session_id` | A new authenticated session is **created**. |
|
|
1437
|
+
* | `session_id` points to an anonymous shell | Existing session is **upgraded** — user and factors written in, TTL reset to full session TTL. |
|
|
1438
|
+
* | `session_id` points to an active session (step-up) | Existing session is **upgraded** — new factors merged, `assurance_levels[]` expanded. |
|
|
1439
|
+
*
|
|
1440
|
+
* The response shape is identical in all three cases.
|
|
1441
|
+
*
|
|
1442
|
+
* The `session_token` supersedes any previously issued `session_token` for the same session.
|
|
1443
|
+
* Clients must replace their stored token at this point.
|
|
1444
|
+
*
|
|
1445
|
+
* Requires a project service key (OAuth2 client credentials).
|
|
979
1446
|
* @summary Exchange handoff token for a session
|
|
980
1447
|
*/
|
|
981
1448
|
export const exchangeHandoff = async (
|
|
982
1449
|
exchangeHandoffBody: ExchangeHandoffBody,
|
|
983
1450
|
params: ExchangeHandoffParams,
|
|
984
|
-
options?:
|
|
1451
|
+
options?: Parameters<typeof customFetch>[1],
|
|
985
1452
|
): Promise<ExchangeHandoff200> => {
|
|
1453
|
+
const getHeaders = (
|
|
1454
|
+
h?: NonNullable<RequestInit["headers"]>,
|
|
1455
|
+
): Record<string, string | readonly string[]> => {
|
|
1456
|
+
if (!h) return {};
|
|
1457
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
1458
|
+
if (Symbol.iterator in h) {
|
|
1459
|
+
return Object.fromEntries(
|
|
1460
|
+
Array.from(
|
|
1461
|
+
h as Iterable<Iterable<string>>,
|
|
1462
|
+
(entry) => Array.from(entry) as [string, string],
|
|
1463
|
+
),
|
|
1464
|
+
);
|
|
1465
|
+
}
|
|
1466
|
+
const headers: Record<string, string | readonly string[]> = {};
|
|
1467
|
+
for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
|
|
1468
|
+
if (value !== undefined) headers[name] = value;
|
|
1469
|
+
}
|
|
1470
|
+
return headers;
|
|
1471
|
+
};
|
|
986
1472
|
return customFetch<ExchangeHandoff200>(getExchangeHandoffUrl(params), {
|
|
987
1473
|
...options,
|
|
988
1474
|
method: "POST",
|
|
989
|
-
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
1475
|
+
headers: { "Content-Type": "application/json", ...getHeaders(options?.headers) },
|
|
990
1476
|
body: JSON.stringify(exchangeHandoffBody),
|
|
991
1477
|
});
|
|
992
1478
|
};
|
|
993
1479
|
|
|
994
1480
|
export const getGetSessionUrl = (sessionId: string) => {
|
|
995
|
-
return `${getProxyPath()}/sessions/${sessionId}`;
|
|
1481
|
+
return `${getProxyPath()}/sessions/${encodeURIComponent(String(sessionId))}`;
|
|
996
1482
|
};
|
|
997
1483
|
|
|
998
1484
|
/**
|
|
999
1485
|
* Returns the current state of a session including its factors and all currently
|
|
1000
|
-
satisfied assurance levels.
|
|
1001
|
-
|
|
1002
|
-
`assurance_levels[]` may shrink over time as factor freshness windows expire,
|
|
1003
|
-
without the session itself expiring. Use step-up authentication (a new `auth_attempt`
|
|
1004
|
-
against the same `session_id`) to restore a dropped assurance level.
|
|
1005
|
-
|
|
1486
|
+
* satisfied assurance levels.
|
|
1487
|
+
*
|
|
1488
|
+
* `assurance_levels[]` may shrink over time as factor freshness windows expire,
|
|
1489
|
+
* without the session itself expiring. Use step-up authentication (a new `auth_attempt`
|
|
1490
|
+
* against the same `session_id`) to restore a dropped assurance level.
|
|
1006
1491
|
* @summary Get session state
|
|
1007
1492
|
*/
|
|
1008
1493
|
export const getSession = async (
|
|
1009
1494
|
sessionId: string,
|
|
1010
|
-
options?:
|
|
1495
|
+
options?: Parameters<typeof customFetch>[1],
|
|
1011
1496
|
): Promise<GetSession200> => {
|
|
1012
1497
|
return customFetch<GetSession200>(getGetSessionUrl(sessionId), {
|
|
1013
1498
|
...options,
|
|
@@ -1016,23 +1501,25 @@ export const getSession = async (
|
|
|
1016
1501
|
};
|
|
1017
1502
|
|
|
1018
1503
|
export const getRevokeSessionUrl = (sessionId: string) => {
|
|
1019
|
-
return `${getProxyPath()}/sessions/${sessionId}`;
|
|
1504
|
+
return `${getProxyPath()}/sessions/${encodeURIComponent(String(sessionId))}`;
|
|
1020
1505
|
};
|
|
1021
1506
|
|
|
1022
1507
|
/**
|
|
1023
1508
|
* Permanently deletes the session, terminating it immediately.
|
|
1024
|
-
|
|
1025
|
-
This is the operator revoke path and requires the `session.delete` scope on a
|
|
1026
|
-
project-bound credential. End-user logout with the `__nextgen_session` cookie is
|
|
1027
|
-
`DELETE /sessions/me` (`nextgenSession` scheme).
|
|
1028
|
-
|
|
1029
|
-
Idempotent: deleting a session that does not exist (or was already deleted)
|
|
1030
|
-
still returns 204. After deletion, any tokens derived from the session are
|
|
1031
|
-
invalidated.
|
|
1032
|
-
|
|
1509
|
+
*
|
|
1510
|
+
* This is the operator revoke path and requires the `session.delete` scope on a
|
|
1511
|
+
* project-bound credential. End-user logout with the `__nextgen_session` cookie is
|
|
1512
|
+
* `DELETE /sessions/me` (`nextgenSession` scheme).
|
|
1513
|
+
*
|
|
1514
|
+
* Idempotent: deleting a session that does not exist (or was already deleted)
|
|
1515
|
+
* still returns 204. After deletion, any tokens derived from the session are
|
|
1516
|
+
* invalidated.
|
|
1033
1517
|
* @summary Revoke session
|
|
1034
1518
|
*/
|
|
1035
|
-
export const revokeSession = async (
|
|
1519
|
+
export const revokeSession = async (
|
|
1520
|
+
sessionId: string,
|
|
1521
|
+
options?: Parameters<typeof customFetch>[1],
|
|
1522
|
+
): Promise<void> => {
|
|
1036
1523
|
return customFetch<void>(getRevokeSessionUrl(sessionId), {
|
|
1037
1524
|
...options,
|
|
1038
1525
|
method: "DELETE",
|
|
@@ -1045,15 +1532,16 @@ export const getGetMySessionUrl = () => {
|
|
|
1045
1532
|
|
|
1046
1533
|
/**
|
|
1047
1534
|
* Returns the current state of the current session including its factors and all currently
|
|
1048
|
-
satisfied assurance levels.
|
|
1049
|
-
|
|
1050
|
-
`assurance_levels[]` may shrink over time as factor freshness windows expire,
|
|
1051
|
-
without the session itself expiring. Use step-up authentication (a new `auth_attempt`
|
|
1052
|
-
against the same `session_id`) to restore a dropped assurance level.
|
|
1053
|
-
|
|
1535
|
+
* satisfied assurance levels.
|
|
1536
|
+
*
|
|
1537
|
+
* `assurance_levels[]` may shrink over time as factor freshness windows expire,
|
|
1538
|
+
* without the session itself expiring. Use step-up authentication (a new `auth_attempt`
|
|
1539
|
+
* against the same `session_id`) to restore a dropped assurance level.
|
|
1054
1540
|
* @summary Get my session state
|
|
1055
1541
|
*/
|
|
1056
|
-
export const getMySession = async (
|
|
1542
|
+
export const getMySession = async (
|
|
1543
|
+
options?: Parameters<typeof customFetch>[1],
|
|
1544
|
+
): Promise<GetMySession200> => {
|
|
1057
1545
|
return customFetch<GetMySession200>(getGetMySessionUrl(), {
|
|
1058
1546
|
...options,
|
|
1059
1547
|
method: "GET",
|
|
@@ -1066,15 +1554,16 @@ export const getRevokeMySessionUrl = () => {
|
|
|
1066
1554
|
|
|
1067
1555
|
/**
|
|
1068
1556
|
* Logs out by permanently deleting the session.
|
|
1069
|
-
|
|
1070
|
-
The `__nextgen_session` cookie issued at creation (or superseded by a handoff
|
|
1071
|
-
exchange) is required. Idempotent: if the session is already gone this still
|
|
1072
|
-
returns 204. Any tokens derived from the session are invalidated, and the
|
|
1073
|
-
cookie itself is cleared in the response.
|
|
1074
|
-
|
|
1557
|
+
*
|
|
1558
|
+
* The `__nextgen_session` cookie issued at creation (or superseded by a handoff
|
|
1559
|
+
* exchange) is required. Idempotent: if the session is already gone this still
|
|
1560
|
+
* returns 204. Any tokens derived from the session are invalidated, and the
|
|
1561
|
+
* cookie itself is cleared in the response.
|
|
1075
1562
|
* @summary Revoke my session
|
|
1076
1563
|
*/
|
|
1077
|
-
export const revokeMySession = async (
|
|
1564
|
+
export const revokeMySession = async (
|
|
1565
|
+
options?: Parameters<typeof customFetch>[1],
|
|
1566
|
+
): Promise<void> => {
|
|
1078
1567
|
return customFetch<void>(getRevokeMySessionUrl(), {
|
|
1079
1568
|
...options,
|
|
1080
1569
|
method: "DELETE",
|
|
@@ -1086,7 +1575,7 @@ export const getCreateSchemaUrl = (params: CreateSchemaParams) => {
|
|
|
1086
1575
|
|
|
1087
1576
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1088
1577
|
if (value !== undefined) {
|
|
1089
|
-
normalizedParams.append(key, value === null ? "null" : value
|
|
1578
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1090
1579
|
}
|
|
1091
1580
|
});
|
|
1092
1581
|
|
|
@@ -1099,26 +1588,44 @@ export const getCreateSchemaUrl = (params: CreateSchemaParams) => {
|
|
|
1099
1588
|
|
|
1100
1589
|
/**
|
|
1101
1590
|
* Create a new schema. The optional `$id` field is the JSON Schema document
|
|
1102
|
-
URI used to identify the schema in future requests (GitOps-stable identity,
|
|
1103
|
-
not a free-form resource primary key). When `$id` is omitted, the server
|
|
1104
|
-
generates a `sch_*` URL. When provided, `$id` must be unique within the
|
|
1105
|
-
project and should ideally be a valid URI pointing at where the schema can
|
|
1106
|
-
be accessed.
|
|
1107
|
-
|
|
1108
|
-
The schema can either be a concrete schema, e.g. a user schema, or a
|
|
1109
|
-
schema-url which will be resolved by the server.
|
|
1110
|
-
|
|
1591
|
+
* URI used to identify the schema in future requests (GitOps-stable identity,
|
|
1592
|
+
* not a free-form resource primary key). When `$id` is omitted, the server
|
|
1593
|
+
* generates a `sch_*` URL. When provided, `$id` must be unique within the
|
|
1594
|
+
* project and should ideally be a valid URI pointing at where the schema can
|
|
1595
|
+
* be accessed.
|
|
1596
|
+
*
|
|
1597
|
+
* The schema can either be a concrete schema, e.g. a user schema, or a
|
|
1598
|
+
* schema-url which will be resolved by the server.
|
|
1111
1599
|
* @summary Create new schema
|
|
1112
1600
|
*/
|
|
1113
1601
|
export const createSchema = async (
|
|
1114
1602
|
createSchemaBody: CreateSchemaBody,
|
|
1115
1603
|
params: CreateSchemaParams,
|
|
1116
|
-
options?:
|
|
1604
|
+
options?: Parameters<typeof customFetch>[1],
|
|
1117
1605
|
): Promise<CreateSchema201> => {
|
|
1606
|
+
const getHeaders = (
|
|
1607
|
+
h?: NonNullable<RequestInit["headers"]>,
|
|
1608
|
+
): Record<string, string | readonly string[]> => {
|
|
1609
|
+
if (!h) return {};
|
|
1610
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
1611
|
+
if (Symbol.iterator in h) {
|
|
1612
|
+
return Object.fromEntries(
|
|
1613
|
+
Array.from(
|
|
1614
|
+
h as Iterable<Iterable<string>>,
|
|
1615
|
+
(entry) => Array.from(entry) as [string, string],
|
|
1616
|
+
),
|
|
1617
|
+
);
|
|
1618
|
+
}
|
|
1619
|
+
const headers: Record<string, string | readonly string[]> = {};
|
|
1620
|
+
for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
|
|
1621
|
+
if (value !== undefined) headers[name] = value;
|
|
1622
|
+
}
|
|
1623
|
+
return headers;
|
|
1624
|
+
};
|
|
1118
1625
|
return customFetch<CreateSchema201>(getCreateSchemaUrl(params), {
|
|
1119
1626
|
...options,
|
|
1120
1627
|
method: "POST",
|
|
1121
|
-
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
1628
|
+
headers: { "Content-Type": "application/json", ...getHeaders(options?.headers) },
|
|
1122
1629
|
body: JSON.stringify(createSchemaBody),
|
|
1123
1630
|
});
|
|
1124
1631
|
};
|
|
@@ -1128,7 +1635,7 @@ export const getListSchemasUrl = (params: ListSchemasParams) => {
|
|
|
1128
1635
|
|
|
1129
1636
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1130
1637
|
if (value !== undefined) {
|
|
1131
|
-
normalizedParams.append(key, value === null ? "null" : value
|
|
1638
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1132
1639
|
}
|
|
1133
1640
|
});
|
|
1134
1641
|
|
|
@@ -1141,13 +1648,12 @@ export const getListSchemasUrl = (params: ListSchemasParams) => {
|
|
|
1141
1648
|
|
|
1142
1649
|
/**
|
|
1143
1650
|
* Retrieve a list of all schemas available in the system. This endpoint
|
|
1144
|
-
supports pagination and filtering based on schema attributes.
|
|
1145
|
-
|
|
1651
|
+
* supports pagination and filtering based on schema attributes.
|
|
1146
1652
|
* @summary List all schemas
|
|
1147
1653
|
*/
|
|
1148
1654
|
export const listSchemas = async (
|
|
1149
1655
|
params: ListSchemasParams,
|
|
1150
|
-
options?:
|
|
1656
|
+
options?: Parameters<typeof customFetch>[1],
|
|
1151
1657
|
): Promise<ListSchemas200> => {
|
|
1152
1658
|
return customFetch<ListSchemas200>(getListSchemasUrl(params), {
|
|
1153
1659
|
...options,
|
|
@@ -1160,28 +1666,34 @@ export const getGetSchemaByIdUrl = (id: string, params?: GetSchemaByIdParams) =>
|
|
|
1160
1666
|
|
|
1161
1667
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1162
1668
|
if (value !== undefined) {
|
|
1163
|
-
normalizedParams.append(key, value === null ? "null" : value
|
|
1669
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1164
1670
|
}
|
|
1165
1671
|
});
|
|
1166
1672
|
|
|
1167
1673
|
const stringifiedParams = normalizedParams.toString();
|
|
1168
1674
|
|
|
1169
1675
|
return stringifiedParams.length > 0
|
|
1170
|
-
? `${getProxyPath()}/schemas/${id}?${stringifiedParams}`
|
|
1171
|
-
: `${getProxyPath()}/schemas/${id}`;
|
|
1676
|
+
? `${getProxyPath()}/schemas/${encodeURIComponent(String(id))}?${stringifiedParams}`
|
|
1677
|
+
: `${getProxyPath()}/schemas/${encodeURIComponent(String(id))}`;
|
|
1172
1678
|
};
|
|
1173
1679
|
|
|
1174
1680
|
/**
|
|
1175
1681
|
* Get a schema by its ID. A schema ID identifies one immutable revision, so
|
|
1176
|
-
this returns exactly that revision. To find the current revision of an
|
|
1177
|
-
object type, list with `revisions=latest`.
|
|
1178
|
-
|
|
1682
|
+
* this returns exactly that revision. To find the current revision of an
|
|
1683
|
+
* object type, list with `revisions=latest`.
|
|
1684
|
+
*
|
|
1685
|
+
* Schema IDs are unique within a project, not across projects (the seeded
|
|
1686
|
+
* default schema carries the same `$id` in every project). A Console
|
|
1687
|
+
* session that manages more than one project names the project with
|
|
1688
|
+
* `project_id`; without it, the ID is resolved in the credential's own
|
|
1689
|
+
* project when it is ambiguous. A project secret always resolves in its
|
|
1690
|
+
* own project and ignores `project_id`.
|
|
1179
1691
|
* @summary Get schema by ID
|
|
1180
1692
|
*/
|
|
1181
1693
|
export const getSchemaById = async (
|
|
1182
1694
|
id: string,
|
|
1183
1695
|
params?: GetSchemaByIdParams,
|
|
1184
|
-
options?:
|
|
1696
|
+
options?: Parameters<typeof customFetch>[1],
|
|
1185
1697
|
): Promise<GetSchemaById200> => {
|
|
1186
1698
|
return customFetch<GetSchemaById200>(getGetSchemaByIdUrl(id, params), {
|
|
1187
1699
|
...options,
|
|
@@ -1195,26 +1707,44 @@ export const getCreateFlowDefinitionUrl = () => {
|
|
|
1195
1707
|
|
|
1196
1708
|
/**
|
|
1197
1709
|
* Publishes a new flow definition revision.
|
|
1198
|
-
Flow definitions are templates that define the sequence of steps (capabilities)
|
|
1199
|
-
for a particular user journey (e.g., registration, login, password reset).
|
|
1200
|
-
|
|
1201
|
-
Flow definitions are created based on the flow definition schema, which includes the flow's purpose, audience, and the steps involved.
|
|
1202
|
-
|
|
1203
|
-
Every call allocates a new opaque id. Revisions of one flow share its
|
|
1204
|
-
`name`; posting a definition under an existing `name` publishes a new
|
|
1205
|
-
revision of that flow, it is not a conflict. List with `name` to see a
|
|
1206
|
-
flow's revisions, newest by creation time first.
|
|
1207
|
-
|
|
1710
|
+
* Flow definitions are templates that define the sequence of steps (capabilities)
|
|
1711
|
+
* for a particular user journey (e.g., registration, login, password reset).
|
|
1712
|
+
*
|
|
1713
|
+
* Flow definitions are created based on the flow definition schema, which includes the flow's purpose, audience, and the steps involved.
|
|
1714
|
+
*
|
|
1715
|
+
* Every call allocates a new opaque id. Revisions of one flow share its
|
|
1716
|
+
* `name`; posting a definition under an existing `name` publishes a new
|
|
1717
|
+
* revision of that flow, it is not a conflict. List with `name` to see a
|
|
1718
|
+
* flow's revisions, newest by creation time first.
|
|
1208
1719
|
* @summary Create a new flow definition
|
|
1209
1720
|
*/
|
|
1210
1721
|
export const createFlowDefinition = async (
|
|
1211
1722
|
createFlowDefinitionBody: CreateFlowDefinitionBody,
|
|
1212
|
-
options?:
|
|
1723
|
+
options?: Parameters<typeof customFetch>[1],
|
|
1213
1724
|
): Promise<CreateFlowDefinition201> => {
|
|
1725
|
+
const getHeaders = (
|
|
1726
|
+
h?: NonNullable<RequestInit["headers"]>,
|
|
1727
|
+
): Record<string, string | readonly string[]> => {
|
|
1728
|
+
if (!h) return {};
|
|
1729
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
1730
|
+
if (Symbol.iterator in h) {
|
|
1731
|
+
return Object.fromEntries(
|
|
1732
|
+
Array.from(
|
|
1733
|
+
h as Iterable<Iterable<string>>,
|
|
1734
|
+
(entry) => Array.from(entry) as [string, string],
|
|
1735
|
+
),
|
|
1736
|
+
);
|
|
1737
|
+
}
|
|
1738
|
+
const headers: Record<string, string | readonly string[]> = {};
|
|
1739
|
+
for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
|
|
1740
|
+
if (value !== undefined) headers[name] = value;
|
|
1741
|
+
}
|
|
1742
|
+
return headers;
|
|
1743
|
+
};
|
|
1214
1744
|
return customFetch<CreateFlowDefinition201>(getCreateFlowDefinitionUrl(), {
|
|
1215
1745
|
...options,
|
|
1216
1746
|
method: "POST",
|
|
1217
|
-
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
1747
|
+
headers: { "Content-Type": "application/json", ...getHeaders(options?.headers) },
|
|
1218
1748
|
body: JSON.stringify(createFlowDefinitionBody),
|
|
1219
1749
|
});
|
|
1220
1750
|
};
|
|
@@ -1223,8 +1753,17 @@ export const getListFlowDefinitionsUrl = (params: ListFlowDefinitionsParams) =>
|
|
|
1223
1753
|
const normalizedParams = new URLSearchParams();
|
|
1224
1754
|
|
|
1225
1755
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1756
|
+
const explodeParameters = ["expand"];
|
|
1757
|
+
|
|
1758
|
+
if (Array.isArray(value) && explodeParameters.includes(key)) {
|
|
1759
|
+
value.forEach((v) => {
|
|
1760
|
+
normalizedParams.append(key, v === null ? "null" : String(v));
|
|
1761
|
+
});
|
|
1762
|
+
return;
|
|
1763
|
+
}
|
|
1764
|
+
|
|
1226
1765
|
if (value !== undefined) {
|
|
1227
|
-
normalizedParams.append(key, value === null ? "null" : value
|
|
1766
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1228
1767
|
}
|
|
1229
1768
|
});
|
|
1230
1769
|
|
|
@@ -1237,14 +1776,13 @@ export const getListFlowDefinitionsUrl = (params: ListFlowDefinitionsParams) =>
|
|
|
1237
1776
|
|
|
1238
1777
|
/**
|
|
1239
1778
|
* Retrieves a list of all flow definitions, newest by creation time first.
|
|
1240
|
-
This endpoint can be used to view existing flow definitions and their configurations.
|
|
1241
|
-
Filter by `name` to list the revisions of one flow.
|
|
1242
|
-
|
|
1779
|
+
* This endpoint can be used to view existing flow definitions and their configurations.
|
|
1780
|
+
* Filter by `name` to list the revisions of one flow.
|
|
1243
1781
|
* @summary List flow definitions
|
|
1244
1782
|
*/
|
|
1245
1783
|
export const listFlowDefinitions = async (
|
|
1246
1784
|
params: ListFlowDefinitionsParams,
|
|
1247
|
-
options?:
|
|
1785
|
+
options?: Parameters<typeof customFetch>[1],
|
|
1248
1786
|
): Promise<ListFlowDefinitions200> => {
|
|
1249
1787
|
return customFetch<ListFlowDefinitions200>(getListFlowDefinitionsUrl(params), {
|
|
1250
1788
|
...options,
|
|
@@ -1253,7 +1791,7 @@ export const listFlowDefinitions = async (
|
|
|
1253
1791
|
};
|
|
1254
1792
|
|
|
1255
1793
|
export const getGetFlowDefinitionUrl = (id: string) => {
|
|
1256
|
-
return `${getProxyPath()}/flow_definitions/${id}`;
|
|
1794
|
+
return `${getProxyPath()}/flow_definitions/${encodeURIComponent(String(id))}`;
|
|
1257
1795
|
};
|
|
1258
1796
|
|
|
1259
1797
|
/**
|
|
@@ -1262,7 +1800,7 @@ export const getGetFlowDefinitionUrl = (id: string) => {
|
|
|
1262
1800
|
*/
|
|
1263
1801
|
export const getFlowDefinition = async (
|
|
1264
1802
|
id: string,
|
|
1265
|
-
options?:
|
|
1803
|
+
options?: Parameters<typeof customFetch>[1],
|
|
1266
1804
|
): Promise<GetFlowDefinition200> => {
|
|
1267
1805
|
return customFetch<GetFlowDefinition200>(getGetFlowDefinitionUrl(id), {
|
|
1268
1806
|
...options,
|
|
@@ -1270,53 +1808,12 @@ export const getFlowDefinition = async (
|
|
|
1270
1808
|
});
|
|
1271
1809
|
};
|
|
1272
1810
|
|
|
1273
|
-
export const getUpdateFlowDefinitionUrl = (id: string) => {
|
|
1274
|
-
return `${getProxyPath()}/flow_definitions/${id}`;
|
|
1275
|
-
};
|
|
1276
|
-
|
|
1277
|
-
/**
|
|
1278
|
-
* Update a flow definition by id. This endpoint replaces the existing flow definition.
|
|
1279
|
-
If `flow_definition.status` is omitted, the current status is preserved
|
|
1280
|
-
|
|
1281
|
-
* @summary Update a flow definition by id
|
|
1282
|
-
*/
|
|
1283
|
-
export const updateFlowDefinition = async (
|
|
1284
|
-
id: string,
|
|
1285
|
-
updateFlowDefinitionBody: UpdateFlowDefinitionBody,
|
|
1286
|
-
options?: RequestInit,
|
|
1287
|
-
): Promise<UpdateFlowDefinition200> => {
|
|
1288
|
-
return customFetch<UpdateFlowDefinition200>(getUpdateFlowDefinitionUrl(id), {
|
|
1289
|
-
...options,
|
|
1290
|
-
method: "PUT",
|
|
1291
|
-
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
1292
|
-
body: JSON.stringify(updateFlowDefinitionBody),
|
|
1293
|
-
});
|
|
1294
|
-
};
|
|
1295
|
-
|
|
1296
|
-
export const getDeleteFlowDefinitionUrl = (id: string) => {
|
|
1297
|
-
return `${getProxyPath()}/flow_definitions/${id}`;
|
|
1298
|
-
};
|
|
1299
|
-
|
|
1300
|
-
/**
|
|
1301
|
-
* Delete a flow definition by id.
|
|
1302
|
-
If the flow definition is currently being used by a flow, the deletion will fail.
|
|
1303
|
-
If the flow definition is the last active flow definition for a given purpose, the deletion will fail to prevent disruption of new flows being started for that purpose.
|
|
1304
|
-
|
|
1305
|
-
* @summary Delete a flow definition by id
|
|
1306
|
-
*/
|
|
1307
|
-
export const deleteFlowDefinition = async (id: string, options?: RequestInit): Promise<void> => {
|
|
1308
|
-
return customFetch<void>(getDeleteFlowDefinitionUrl(id), {
|
|
1309
|
-
...options,
|
|
1310
|
-
method: "DELETE",
|
|
1311
|
-
});
|
|
1312
|
-
};
|
|
1313
|
-
|
|
1314
1811
|
export const getCreateTeamUrl = (params: CreateTeamParams) => {
|
|
1315
1812
|
const normalizedParams = new URLSearchParams();
|
|
1316
1813
|
|
|
1317
1814
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1318
1815
|
if (value !== undefined) {
|
|
1319
|
-
normalizedParams.append(key, value === null ? "null" : value
|
|
1816
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1320
1817
|
}
|
|
1321
1818
|
});
|
|
1322
1819
|
|
|
@@ -1333,12 +1830,31 @@ export const getCreateTeamUrl = (params: CreateTeamParams) => {
|
|
|
1333
1830
|
export const createTeam = async (
|
|
1334
1831
|
createTeamBody: CreateTeamBody,
|
|
1335
1832
|
params: CreateTeamParams,
|
|
1336
|
-
options?:
|
|
1833
|
+
options?: Parameters<typeof customFetch>[1],
|
|
1337
1834
|
): Promise<CreateTeam201> => {
|
|
1835
|
+
const getHeaders = (
|
|
1836
|
+
h?: NonNullable<RequestInit["headers"]>,
|
|
1837
|
+
): Record<string, string | readonly string[]> => {
|
|
1838
|
+
if (!h) return {};
|
|
1839
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
1840
|
+
if (Symbol.iterator in h) {
|
|
1841
|
+
return Object.fromEntries(
|
|
1842
|
+
Array.from(
|
|
1843
|
+
h as Iterable<Iterable<string>>,
|
|
1844
|
+
(entry) => Array.from(entry) as [string, string],
|
|
1845
|
+
),
|
|
1846
|
+
);
|
|
1847
|
+
}
|
|
1848
|
+
const headers: Record<string, string | readonly string[]> = {};
|
|
1849
|
+
for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
|
|
1850
|
+
if (value !== undefined) headers[name] = value;
|
|
1851
|
+
}
|
|
1852
|
+
return headers;
|
|
1853
|
+
};
|
|
1338
1854
|
return customFetch<CreateTeam201>(getCreateTeamUrl(params), {
|
|
1339
1855
|
...options,
|
|
1340
1856
|
method: "POST",
|
|
1341
|
-
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
1857
|
+
headers: { "Content-Type": "application/json", ...getHeaders(options?.headers) },
|
|
1342
1858
|
body: JSON.stringify(createTeamBody),
|
|
1343
1859
|
});
|
|
1344
1860
|
};
|
|
@@ -1348,7 +1864,7 @@ export const getQueryTeamsUrl = (params: QueryTeamsParams) => {
|
|
|
1348
1864
|
|
|
1349
1865
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1350
1866
|
if (value !== undefined) {
|
|
1351
|
-
normalizedParams.append(key, value === null ? "null" : value
|
|
1867
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1352
1868
|
}
|
|
1353
1869
|
});
|
|
1354
1870
|
|
|
@@ -1361,32 +1877,52 @@ export const getQueryTeamsUrl = (params: QueryTeamsParams) => {
|
|
|
1361
1877
|
|
|
1362
1878
|
/**
|
|
1363
1879
|
* Returns the teams of a project, paginated with a cursor.
|
|
1364
|
-
|
|
1365
1880
|
* @summary Query teams
|
|
1366
1881
|
*/
|
|
1367
1882
|
export const queryTeams = async (
|
|
1368
1883
|
queryTeamsBody: QueryTeamsBody,
|
|
1369
1884
|
params: QueryTeamsParams,
|
|
1370
|
-
options?:
|
|
1885
|
+
options?: Parameters<typeof customFetch>[1],
|
|
1371
1886
|
): Promise<QueryTeams200> => {
|
|
1887
|
+
const getHeaders = (
|
|
1888
|
+
h?: NonNullable<RequestInit["headers"]>,
|
|
1889
|
+
): Record<string, string | readonly string[]> => {
|
|
1890
|
+
if (!h) return {};
|
|
1891
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
1892
|
+
if (Symbol.iterator in h) {
|
|
1893
|
+
return Object.fromEntries(
|
|
1894
|
+
Array.from(
|
|
1895
|
+
h as Iterable<Iterable<string>>,
|
|
1896
|
+
(entry) => Array.from(entry) as [string, string],
|
|
1897
|
+
),
|
|
1898
|
+
);
|
|
1899
|
+
}
|
|
1900
|
+
const headers: Record<string, string | readonly string[]> = {};
|
|
1901
|
+
for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
|
|
1902
|
+
if (value !== undefined) headers[name] = value;
|
|
1903
|
+
}
|
|
1904
|
+
return headers;
|
|
1905
|
+
};
|
|
1372
1906
|
return customFetch<QueryTeams200>(getQueryTeamsUrl(params), {
|
|
1373
1907
|
...options,
|
|
1374
1908
|
method: "POST",
|
|
1375
|
-
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
1909
|
+
headers: { "Content-Type": "application/json", ...getHeaders(options?.headers) },
|
|
1376
1910
|
body: JSON.stringify(queryTeamsBody),
|
|
1377
1911
|
});
|
|
1378
1912
|
};
|
|
1379
1913
|
|
|
1380
1914
|
export const getGetTeamUrl = (teamId: string) => {
|
|
1381
|
-
return `${getProxyPath()}/teams/${teamId}`;
|
|
1915
|
+
return `${getProxyPath()}/teams/${encodeURIComponent(String(teamId))}`;
|
|
1382
1916
|
};
|
|
1383
1917
|
|
|
1384
1918
|
/**
|
|
1385
1919
|
* Returns a Team by its id.
|
|
1386
|
-
|
|
1387
1920
|
* @summary Get team
|
|
1388
1921
|
*/
|
|
1389
|
-
export const getTeam = async (
|
|
1922
|
+
export const getTeam = async (
|
|
1923
|
+
teamId: string,
|
|
1924
|
+
options?: Parameters<typeof customFetch>[1],
|
|
1925
|
+
): Promise<GetTeam200> => {
|
|
1390
1926
|
return customFetch<GetTeam200>(getGetTeamUrl(teamId), {
|
|
1391
1927
|
...options,
|
|
1392
1928
|
method: "GET",
|
|
@@ -1394,22 +1930,29 @@ export const getTeam = async (teamId: string, options?: RequestInit): Promise<Ge
|
|
|
1394
1930
|
};
|
|
1395
1931
|
|
|
1396
1932
|
export const getDeleteTeamUrl = (teamId: string) => {
|
|
1397
|
-
return `${getProxyPath()}/teams/${teamId}`;
|
|
1933
|
+
return `${getProxyPath()}/teams/${encodeURIComponent(String(teamId))}`;
|
|
1398
1934
|
};
|
|
1399
1935
|
|
|
1400
1936
|
/**
|
|
1401
1937
|
* Deactivates the team.
|
|
1402
|
-
|
|
1403
|
-
The team is tombstoned rather than erased: it stays readable through
|
|
1404
|
-
getTeam with status `deactivated`. Its memberships are removed and the
|
|
1405
|
-
users whose lifecycle it owns are deactivated with it.
|
|
1406
|
-
|
|
1407
|
-
The request is idempotent. Deleting a team that is already deactivated
|
|
1408
|
-
or doesn't exist succeeds without changing anything.
|
|
1409
|
-
|
|
1938
|
+
*
|
|
1939
|
+
* The team is tombstoned rather than erased: it stays readable through
|
|
1940
|
+
* getTeam with status `deactivated`. Its memberships are removed and the
|
|
1941
|
+
* users whose lifecycle it owns are deactivated with it.
|
|
1942
|
+
*
|
|
1943
|
+
* The request is idempotent. Deleting a team that is already deactivated
|
|
1944
|
+
* or doesn't exist succeeds without changing anything.
|
|
1945
|
+
*
|
|
1946
|
+
* A team that still owns a project is refused with `409
|
|
1947
|
+
* team.owns_project`: deactivating it would leave the project owned by a
|
|
1948
|
+
* dead team and so unmanageable. No endpoint releases that ownership yet,
|
|
1949
|
+
* so such a team cannot currently be deactivated through the API.
|
|
1410
1950
|
* @summary Delete team
|
|
1411
1951
|
*/
|
|
1412
|
-
export const deleteTeam = async (
|
|
1952
|
+
export const deleteTeam = async (
|
|
1953
|
+
teamId: string,
|
|
1954
|
+
options?: Parameters<typeof customFetch>[1],
|
|
1955
|
+
): Promise<void> => {
|
|
1413
1956
|
return customFetch<void>(getDeleteTeamUrl(teamId), {
|
|
1414
1957
|
...options,
|
|
1415
1958
|
method: "DELETE",
|
|
@@ -1417,23 +1960,41 @@ export const deleteTeam = async (teamId: string, options?: RequestInit): Promise
|
|
|
1417
1960
|
};
|
|
1418
1961
|
|
|
1419
1962
|
export const getUpdateTeamUrl = (teamId: string) => {
|
|
1420
|
-
return `${getProxyPath()}/teams/${teamId}`;
|
|
1963
|
+
return `${getProxyPath()}/teams/${encodeURIComponent(String(teamId))}`;
|
|
1421
1964
|
};
|
|
1422
1965
|
|
|
1423
1966
|
/**
|
|
1424
1967
|
* Update team. Only active teams can be updated.
|
|
1425
|
-
|
|
1426
1968
|
* @summary Update team
|
|
1427
1969
|
*/
|
|
1428
1970
|
export const updateTeam = async (
|
|
1429
1971
|
teamId: string,
|
|
1430
1972
|
updateTeamBody: UpdateTeamBody,
|
|
1431
|
-
options?:
|
|
1973
|
+
options?: Parameters<typeof customFetch>[1],
|
|
1432
1974
|
): Promise<UpdateTeam200> => {
|
|
1975
|
+
const getHeaders = (
|
|
1976
|
+
h?: NonNullable<RequestInit["headers"]>,
|
|
1977
|
+
): Record<string, string | readonly string[]> => {
|
|
1978
|
+
if (!h) return {};
|
|
1979
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
1980
|
+
if (Symbol.iterator in h) {
|
|
1981
|
+
return Object.fromEntries(
|
|
1982
|
+
Array.from(
|
|
1983
|
+
h as Iterable<Iterable<string>>,
|
|
1984
|
+
(entry) => Array.from(entry) as [string, string],
|
|
1985
|
+
),
|
|
1986
|
+
);
|
|
1987
|
+
}
|
|
1988
|
+
const headers: Record<string, string | readonly string[]> = {};
|
|
1989
|
+
for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
|
|
1990
|
+
if (value !== undefined) headers[name] = value;
|
|
1991
|
+
}
|
|
1992
|
+
return headers;
|
|
1993
|
+
};
|
|
1433
1994
|
return customFetch<UpdateTeam200>(getUpdateTeamUrl(teamId), {
|
|
1434
1995
|
...options,
|
|
1435
1996
|
method: "PATCH",
|
|
1436
|
-
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
1997
|
+
headers: { "Content-Type": "application/json", ...getHeaders(options?.headers) },
|
|
1437
1998
|
body: JSON.stringify(updateTeamBody),
|
|
1438
1999
|
});
|
|
1439
2000
|
};
|
|
@@ -1443,7 +2004,7 @@ export const getListEnvironmentsUrl = (params: ListEnvironmentsParams) => {
|
|
|
1443
2004
|
|
|
1444
2005
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1445
2006
|
if (value !== undefined) {
|
|
1446
|
-
normalizedParams.append(key, value === null ? "null" : value
|
|
2007
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1447
2008
|
}
|
|
1448
2009
|
});
|
|
1449
2010
|
|
|
@@ -1456,12 +2017,11 @@ export const getListEnvironmentsUrl = (params: ListEnvironmentsParams) => {
|
|
|
1456
2017
|
|
|
1457
2018
|
/**
|
|
1458
2019
|
* Lists the project's environments ordered by name.
|
|
1459
|
-
|
|
1460
2020
|
* @summary List environments
|
|
1461
2021
|
*/
|
|
1462
2022
|
export const listEnvironments = async (
|
|
1463
2023
|
params: ListEnvironmentsParams,
|
|
1464
|
-
options?:
|
|
2024
|
+
options?: Parameters<typeof customFetch>[1],
|
|
1465
2025
|
): Promise<ListEnvironments200> => {
|
|
1466
2026
|
return customFetch<ListEnvironments200>(getListEnvironmentsUrl(params), {
|
|
1467
2027
|
...options,
|
|
@@ -1474,29 +2034,28 @@ export const getGetEnvironmentByNameUrl = (name: string, params: GetEnvironmentB
|
|
|
1474
2034
|
|
|
1475
2035
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1476
2036
|
if (value !== undefined) {
|
|
1477
|
-
normalizedParams.append(key, value === null ? "null" : value
|
|
2037
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1478
2038
|
}
|
|
1479
2039
|
});
|
|
1480
2040
|
|
|
1481
2041
|
const stringifiedParams = normalizedParams.toString();
|
|
1482
2042
|
|
|
1483
2043
|
return stringifiedParams.length > 0
|
|
1484
|
-
? `${getProxyPath()}/environments/${name}?${stringifiedParams}`
|
|
1485
|
-
: `${getProxyPath()}/environments/${name}`;
|
|
2044
|
+
? `${getProxyPath()}/environments/${encodeURIComponent(String(name))}?${stringifiedParams}`
|
|
2045
|
+
: `${getProxyPath()}/environments/${encodeURIComponent(String(name))}`;
|
|
1486
2046
|
};
|
|
1487
2047
|
|
|
1488
2048
|
/**
|
|
1489
2049
|
* Reads one environment of the project by its name.
|
|
1490
|
-
|
|
1491
|
-
The lookup is scoped to the project in `project_id`: a name that exists in
|
|
1492
|
-
another project answers `env.not_found` exactly as an unused name does.
|
|
1493
|
-
|
|
2050
|
+
*
|
|
2051
|
+
* The lookup is scoped to the project in `project_id`: a name that exists in
|
|
2052
|
+
* another project answers `env.not_found` exactly as an unused name does.
|
|
1494
2053
|
* @summary Get an environment by name
|
|
1495
2054
|
*/
|
|
1496
2055
|
export const getEnvironmentByName = async (
|
|
1497
2056
|
name: string,
|
|
1498
2057
|
params: GetEnvironmentByNameParams,
|
|
1499
|
-
options?:
|
|
2058
|
+
options?: Parameters<typeof customFetch>[1],
|
|
1500
2059
|
): Promise<GetEnvironmentByName200> => {
|
|
1501
2060
|
return customFetch<GetEnvironmentByName200>(getGetEnvironmentByNameUrl(name, params), {
|
|
1502
2061
|
...options,
|
|
@@ -1509,7 +2068,7 @@ export const getCreateBrandingUrl = (params: CreateBrandingParams) => {
|
|
|
1509
2068
|
|
|
1510
2069
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1511
2070
|
if (value !== undefined) {
|
|
1512
|
-
normalizedParams.append(key, value === null ? "null" : value
|
|
2071
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1513
2072
|
}
|
|
1514
2073
|
});
|
|
1515
2074
|
|
|
@@ -1522,26 +2081,43 @@ export const getCreateBrandingUrl = (params: CreateBrandingParams) => {
|
|
|
1522
2081
|
|
|
1523
2082
|
/**
|
|
1524
2083
|
* Publishes a new immutable branding revision for the project. Branding
|
|
1525
|
-
revisions cannot be updated or deleted; every edit publishes a new
|
|
1526
|
-
revision, and flow responses resolve the latest revision per project
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
time via `zitadel plan` / `zitadel apply`.
|
|
1533
|
-
|
|
2084
|
+
* revisions cannot be updated or deleted; every edit publishes a new
|
|
2085
|
+
* revision, and flow responses resolve the latest revision per project.
|
|
2086
|
+
*
|
|
2087
|
+
* The `liquid_template` is validated lexically on save (size, encoding,
|
|
2088
|
+
* banned patterns such as `<script>` tags, inline event handlers, and the
|
|
2089
|
+
* `| raw` filter). Authoritative LiquidJS validation runs at authoring
|
|
2090
|
+
* time via `zitadel plan` / `zitadel apply`.
|
|
1534
2091
|
* @summary Publish a new branding revision
|
|
1535
2092
|
*/
|
|
1536
2093
|
export const createBranding = async (
|
|
1537
2094
|
createBrandingBody: CreateBrandingBody,
|
|
1538
2095
|
params: CreateBrandingParams,
|
|
1539
|
-
options?:
|
|
2096
|
+
options?: Parameters<typeof customFetch>[1],
|
|
1540
2097
|
): Promise<CreateBranding201> => {
|
|
2098
|
+
const getHeaders = (
|
|
2099
|
+
h?: NonNullable<RequestInit["headers"]>,
|
|
2100
|
+
): Record<string, string | readonly string[]> => {
|
|
2101
|
+
if (!h) return {};
|
|
2102
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
2103
|
+
if (Symbol.iterator in h) {
|
|
2104
|
+
return Object.fromEntries(
|
|
2105
|
+
Array.from(
|
|
2106
|
+
h as Iterable<Iterable<string>>,
|
|
2107
|
+
(entry) => Array.from(entry) as [string, string],
|
|
2108
|
+
),
|
|
2109
|
+
);
|
|
2110
|
+
}
|
|
2111
|
+
const headers: Record<string, string | readonly string[]> = {};
|
|
2112
|
+
for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
|
|
2113
|
+
if (value !== undefined) headers[name] = value;
|
|
2114
|
+
}
|
|
2115
|
+
return headers;
|
|
2116
|
+
};
|
|
1541
2117
|
return customFetch<CreateBranding201>(getCreateBrandingUrl(params), {
|
|
1542
2118
|
...options,
|
|
1543
2119
|
method: "POST",
|
|
1544
|
-
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
2120
|
+
headers: { "Content-Type": "application/json", ...getHeaders(options?.headers) },
|
|
1545
2121
|
body: JSON.stringify(createBrandingBody),
|
|
1546
2122
|
});
|
|
1547
2123
|
};
|
|
@@ -1551,7 +2127,7 @@ export const getListBrandingUrl = (params: ListBrandingParams) => {
|
|
|
1551
2127
|
|
|
1552
2128
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1553
2129
|
if (value !== undefined) {
|
|
1554
|
-
normalizedParams.append(key, value === null ? "null" : value
|
|
2130
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1555
2131
|
}
|
|
1556
2132
|
});
|
|
1557
2133
|
|
|
@@ -1564,16 +2140,15 @@ export const getListBrandingUrl = (params: ListBrandingParams) => {
|
|
|
1564
2140
|
|
|
1565
2141
|
/**
|
|
1566
2142
|
* Lists branding revisions for the project, newest first, capped at the
|
|
1567
|
-
100 most recent. The first entry is the revision flow responses
|
|
1568
|
-
currently resolve. Deliberately unpaginated in v1 — list endpoints
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
2143
|
+
* 100 most recent. The first entry is the revision flow responses
|
|
2144
|
+
* currently resolve. Deliberately unpaginated in v1 — list endpoints gain a
|
|
2145
|
+
* real query mechanism together; advertising pagination parameters the
|
|
2146
|
+
* server ignores would be worse than none.
|
|
1572
2147
|
* @summary List branding revisions
|
|
1573
2148
|
*/
|
|
1574
2149
|
export const listBranding = async (
|
|
1575
2150
|
params: ListBrandingParams,
|
|
1576
|
-
options?:
|
|
2151
|
+
options?: Parameters<typeof customFetch>[1],
|
|
1577
2152
|
): Promise<ListBranding200Item[]> => {
|
|
1578
2153
|
return customFetch<ListBranding200Item[]>(getListBrandingUrl(params), {
|
|
1579
2154
|
...options,
|
|
@@ -1582,7 +2157,7 @@ export const listBranding = async (
|
|
|
1582
2157
|
};
|
|
1583
2158
|
|
|
1584
2159
|
export const getGetBrandingByIdUrl = (id: string) => {
|
|
1585
|
-
return `${getProxyPath()}/branding/${id}`;
|
|
2160
|
+
return `${getProxyPath()}/branding/${encodeURIComponent(String(id))}`;
|
|
1586
2161
|
};
|
|
1587
2162
|
|
|
1588
2163
|
/**
|
|
@@ -1591,7 +2166,7 @@ export const getGetBrandingByIdUrl = (id: string) => {
|
|
|
1591
2166
|
*/
|
|
1592
2167
|
export const getBrandingById = async (
|
|
1593
2168
|
id: string,
|
|
1594
|
-
options?:
|
|
2169
|
+
options?: Parameters<typeof customFetch>[1],
|
|
1595
2170
|
): Promise<GetBrandingById200> => {
|
|
1596
2171
|
return customFetch<GetBrandingById200>(getGetBrandingByIdUrl(id), {
|
|
1597
2172
|
...options,
|
|
@@ -1599,50 +2174,296 @@ export const getBrandingById = async (
|
|
|
1599
2174
|
});
|
|
1600
2175
|
};
|
|
1601
2176
|
|
|
1602
|
-
export const
|
|
2177
|
+
export const getCreateIdpUrl = (params: CreateIdpParams) => {
|
|
1603
2178
|
const normalizedParams = new URLSearchParams();
|
|
1604
2179
|
|
|
1605
2180
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1606
2181
|
if (value !== undefined) {
|
|
1607
|
-
normalizedParams.append(key, value === null ? "null" : value
|
|
2182
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1608
2183
|
}
|
|
1609
2184
|
});
|
|
1610
2185
|
|
|
1611
2186
|
const stringifiedParams = normalizedParams.toString();
|
|
1612
2187
|
|
|
1613
2188
|
return stringifiedParams.length > 0
|
|
1614
|
-
? `${getProxyPath()}/
|
|
1615
|
-
: `${getProxyPath()}/
|
|
2189
|
+
? `${getProxyPath()}/idps?${stringifiedParams}`
|
|
2190
|
+
: `${getProxyPath()}/idps`;
|
|
2191
|
+
};
|
|
2192
|
+
|
|
2193
|
+
/**
|
|
2194
|
+
* Creates or revises a connection document. If the slug does not already
|
|
2195
|
+
* exist, a new connection is created. If a connection with that slug already
|
|
2196
|
+
* exists, a revision is created.
|
|
2197
|
+
*
|
|
2198
|
+
* A revision gets a new `revision_id` and does not modify the connection
|
|
2199
|
+
* `id`, so identity links that reference the connection keep resolving while
|
|
2200
|
+
* releases and auth attempts stay pinned to the revision they captured.
|
|
2201
|
+
*
|
|
2202
|
+
* Identity fields are fixed for the life of the connection and a revision
|
|
2203
|
+
* that changes one is rejected: `protocol`, `subject_claim`, and the
|
|
2204
|
+
* endpoints that name the authority (`issuer` for OIDC, `token_endpoint`
|
|
2205
|
+
* and `userinfo_endpoint` for OAuth 2.0). Their values decide which provider
|
|
2206
|
+
* account a stored subject belongs to, so changing one would silently
|
|
2207
|
+
* repoint existing identities at a different provider.
|
|
2208
|
+
*
|
|
2209
|
+
* `subject_claim` is optional for OIDC and required for OAuth 2.0. For an
|
|
2210
|
+
* OIDC connection, `sub` is used as the default value. If a revision updates
|
|
2211
|
+
* `subject_claim` to a different value than the one set during creation, the
|
|
2212
|
+
* request is rejected.
|
|
2213
|
+
*
|
|
2214
|
+
* The document is validated against the `idp-connection.json` schema before
|
|
2215
|
+
* anything is stored.
|
|
2216
|
+
* @summary Create or revise an identity provider connection
|
|
2217
|
+
*/
|
|
2218
|
+
export const createIdp = async (
|
|
2219
|
+
createIdpBody: CreateIdpBody,
|
|
2220
|
+
params: CreateIdpParams,
|
|
2221
|
+
options?: Parameters<typeof customFetch>[1],
|
|
2222
|
+
): Promise<CreateIdp200 | CreateIdp201> => {
|
|
2223
|
+
const getHeaders = (
|
|
2224
|
+
h?: NonNullable<RequestInit["headers"]>,
|
|
2225
|
+
): Record<string, string | readonly string[]> => {
|
|
2226
|
+
if (!h) return {};
|
|
2227
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
2228
|
+
if (Symbol.iterator in h) {
|
|
2229
|
+
return Object.fromEntries(
|
|
2230
|
+
Array.from(
|
|
2231
|
+
h as Iterable<Iterable<string>>,
|
|
2232
|
+
(entry) => Array.from(entry) as [string, string],
|
|
2233
|
+
),
|
|
2234
|
+
);
|
|
2235
|
+
}
|
|
2236
|
+
const headers: Record<string, string | readonly string[]> = {};
|
|
2237
|
+
for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
|
|
2238
|
+
if (value !== undefined) headers[name] = value;
|
|
2239
|
+
}
|
|
2240
|
+
return headers;
|
|
2241
|
+
};
|
|
2242
|
+
return customFetch<CreateIdp200 | CreateIdp201>(getCreateIdpUrl(params), {
|
|
2243
|
+
...options,
|
|
2244
|
+
method: "POST",
|
|
2245
|
+
headers: { "Content-Type": "application/json", ...getHeaders(options?.headers) },
|
|
2246
|
+
body: JSON.stringify(createIdpBody),
|
|
2247
|
+
});
|
|
2248
|
+
};
|
|
2249
|
+
|
|
2250
|
+
export const getQueryIdpsUrl = (params: QueryIdpsParams) => {
|
|
2251
|
+
const normalizedParams = new URLSearchParams();
|
|
2252
|
+
|
|
2253
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
2254
|
+
if (value !== undefined) {
|
|
2255
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2256
|
+
}
|
|
2257
|
+
});
|
|
2258
|
+
|
|
2259
|
+
const stringifiedParams = normalizedParams.toString();
|
|
2260
|
+
|
|
2261
|
+
return stringifiedParams.length > 0
|
|
2262
|
+
? `${getProxyPath()}/idps/query?${stringifiedParams}`
|
|
2263
|
+
: `${getProxyPath()}/idps/query`;
|
|
2264
|
+
};
|
|
2265
|
+
|
|
2266
|
+
/**
|
|
2267
|
+
* Returns the identity provider connections of a project, paginated with a
|
|
2268
|
+
* cursor. One row per connection, carrying its newest revision.
|
|
2269
|
+
* @summary Query identity provider connections
|
|
2270
|
+
*/
|
|
2271
|
+
export const queryIdps = async (
|
|
2272
|
+
queryIdpsBody: QueryIdpsBody,
|
|
2273
|
+
params: QueryIdpsParams,
|
|
2274
|
+
options?: Parameters<typeof customFetch>[1],
|
|
2275
|
+
): Promise<QueryIdps200> => {
|
|
2276
|
+
const getHeaders = (
|
|
2277
|
+
h?: NonNullable<RequestInit["headers"]>,
|
|
2278
|
+
): Record<string, string | readonly string[]> => {
|
|
2279
|
+
if (!h) return {};
|
|
2280
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
2281
|
+
if (Symbol.iterator in h) {
|
|
2282
|
+
return Object.fromEntries(
|
|
2283
|
+
Array.from(
|
|
2284
|
+
h as Iterable<Iterable<string>>,
|
|
2285
|
+
(entry) => Array.from(entry) as [string, string],
|
|
2286
|
+
),
|
|
2287
|
+
);
|
|
2288
|
+
}
|
|
2289
|
+
const headers: Record<string, string | readonly string[]> = {};
|
|
2290
|
+
for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
|
|
2291
|
+
if (value !== undefined) headers[name] = value;
|
|
2292
|
+
}
|
|
2293
|
+
return headers;
|
|
2294
|
+
};
|
|
2295
|
+
return customFetch<QueryIdps200>(getQueryIdpsUrl(params), {
|
|
2296
|
+
...options,
|
|
2297
|
+
method: "POST",
|
|
2298
|
+
headers: { "Content-Type": "application/json", ...getHeaders(options?.headers) },
|
|
2299
|
+
body: JSON.stringify(queryIdpsBody),
|
|
2300
|
+
});
|
|
2301
|
+
};
|
|
2302
|
+
|
|
2303
|
+
export const getGetIdpByIdUrl = (id: string, params: GetIdpByIdParams) => {
|
|
2304
|
+
const normalizedParams = new URLSearchParams();
|
|
2305
|
+
|
|
2306
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
2307
|
+
if (value !== undefined) {
|
|
2308
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2309
|
+
}
|
|
2310
|
+
});
|
|
2311
|
+
|
|
2312
|
+
const stringifiedParams = normalizedParams.toString();
|
|
2313
|
+
|
|
2314
|
+
return stringifiedParams.length > 0
|
|
2315
|
+
? `${getProxyPath()}/idps/${encodeURIComponent(String(id))}?${stringifiedParams}`
|
|
2316
|
+
: `${getProxyPath()}/idps/${encodeURIComponent(String(id))}`;
|
|
1616
2317
|
};
|
|
1617
2318
|
|
|
1618
2319
|
/**
|
|
1619
|
-
*
|
|
1620
|
-
|
|
1621
|
-
|
|
2320
|
+
* Reads a connection by its id, at its newest revision.
|
|
2321
|
+
* `GET /idps/{id}/revisions` lists every revision of the connection.
|
|
2322
|
+
*
|
|
2323
|
+
* The lookup is scoped to the project in `project_id`.
|
|
2324
|
+
* @summary Get an identity provider connection by id
|
|
2325
|
+
*/
|
|
2326
|
+
export const getIdpById = async (
|
|
2327
|
+
id: string,
|
|
2328
|
+
params: GetIdpByIdParams,
|
|
2329
|
+
options?: Parameters<typeof customFetch>[1],
|
|
2330
|
+
): Promise<GetIdpById200> => {
|
|
2331
|
+
return customFetch<GetIdpById200>(getGetIdpByIdUrl(id, params), {
|
|
2332
|
+
...options,
|
|
2333
|
+
method: "GET",
|
|
2334
|
+
});
|
|
2335
|
+
};
|
|
2336
|
+
|
|
2337
|
+
export const getListIdpRevisionsUrl = (id: string, params: ListIdpRevisionsParams) => {
|
|
2338
|
+
const normalizedParams = new URLSearchParams();
|
|
2339
|
+
|
|
2340
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
2341
|
+
if (value !== undefined) {
|
|
2342
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2343
|
+
}
|
|
2344
|
+
});
|
|
2345
|
+
|
|
2346
|
+
const stringifiedParams = normalizedParams.toString();
|
|
2347
|
+
|
|
2348
|
+
return stringifiedParams.length > 0
|
|
2349
|
+
? `${getProxyPath()}/idps/${encodeURIComponent(String(id))}/revisions?${stringifiedParams}`
|
|
2350
|
+
: `${getProxyPath()}/idps/${encodeURIComponent(String(id))}/revisions`;
|
|
2351
|
+
};
|
|
2352
|
+
|
|
2353
|
+
/**
|
|
2354
|
+
* Returns every revision of one connection, newest first, paginated with a
|
|
2355
|
+
* cursor. The order is fixed, so there is no `sorting`.
|
|
2356
|
+
*
|
|
2357
|
+
* The lookup is scoped to the project in `project_id`.
|
|
2358
|
+
* @summary List the revisions of an identity provider connection
|
|
2359
|
+
*/
|
|
2360
|
+
export const listIdpRevisions = async (
|
|
2361
|
+
id: string,
|
|
2362
|
+
params: ListIdpRevisionsParams,
|
|
2363
|
+
options?: Parameters<typeof customFetch>[1],
|
|
2364
|
+
): Promise<ListIdpRevisions200> => {
|
|
2365
|
+
return customFetch<ListIdpRevisions200>(getListIdpRevisionsUrl(id, params), {
|
|
2366
|
+
...options,
|
|
2367
|
+
method: "GET",
|
|
2368
|
+
});
|
|
2369
|
+
};
|
|
2370
|
+
|
|
2371
|
+
export const getGetIdpRevisionByIdUrl = (revisionId: string, params: GetIdpRevisionByIdParams) => {
|
|
2372
|
+
const normalizedParams = new URLSearchParams();
|
|
2373
|
+
|
|
2374
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
2375
|
+
if (value !== undefined) {
|
|
2376
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2377
|
+
}
|
|
2378
|
+
});
|
|
2379
|
+
|
|
2380
|
+
const stringifiedParams = normalizedParams.toString();
|
|
2381
|
+
|
|
2382
|
+
return stringifiedParams.length > 0
|
|
2383
|
+
? `${getProxyPath()}/idps/revisions/${encodeURIComponent(String(revisionId))}?${stringifiedParams}`
|
|
2384
|
+
: `${getProxyPath()}/idps/revisions/${encodeURIComponent(String(revisionId))}`;
|
|
2385
|
+
};
|
|
1622
2386
|
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
2387
|
+
/**
|
|
2388
|
+
* Reads one revision of a connection by its `revision_id`, the value an auth
|
|
2389
|
+
* attempt or a release pins.
|
|
2390
|
+
*
|
|
2391
|
+
* The lookup is scoped to the project in `project_id`.
|
|
2392
|
+
* @summary Get one revision of an identity provider connection
|
|
2393
|
+
*/
|
|
2394
|
+
export const getIdpRevisionById = async (
|
|
2395
|
+
revisionId: string,
|
|
2396
|
+
params: GetIdpRevisionByIdParams,
|
|
2397
|
+
options?: Parameters<typeof customFetch>[1],
|
|
2398
|
+
): Promise<GetIdpRevisionById200> => {
|
|
2399
|
+
return customFetch<GetIdpRevisionById200>(getGetIdpRevisionByIdUrl(revisionId, params), {
|
|
2400
|
+
...options,
|
|
2401
|
+
method: "GET",
|
|
2402
|
+
});
|
|
2403
|
+
};
|
|
1626
2404
|
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
unchanged.
|
|
2405
|
+
export const getCreateReleaseUrl = (params: CreateReleaseParams) => {
|
|
2406
|
+
const normalizedParams = new URLSearchParams();
|
|
1630
2407
|
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
2408
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
2409
|
+
if (value !== undefined) {
|
|
2410
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2411
|
+
}
|
|
2412
|
+
});
|
|
1634
2413
|
|
|
2414
|
+
const stringifiedParams = normalizedParams.toString();
|
|
2415
|
+
|
|
2416
|
+
return stringifiedParams.length > 0
|
|
2417
|
+
? `${getProxyPath()}/releases?${stringifiedParams}`
|
|
2418
|
+
: `${getProxyPath()}/releases`;
|
|
2419
|
+
};
|
|
2420
|
+
|
|
2421
|
+
/**
|
|
2422
|
+
* Bundles a release from revisions that already exist, supplied as
|
|
2423
|
+
* `(kind, revision_id)` pairs. No new revisions are allocated — use the
|
|
2424
|
+
* per-kind create endpoints for that, then pin the ids here.
|
|
2425
|
+
*
|
|
2426
|
+
* Every referenced `revision_id` must exist in the project. Each one's handle
|
|
2427
|
+
* is read from the revision itself and recorded on the release, so a resource
|
|
2428
|
+
* is always pinned under the identity it declares.
|
|
2429
|
+
*
|
|
2430
|
+
* Creating a release does not deploy it. A release is environment-agnostic
|
|
2431
|
+
* and the same release can later be deployed to any number of environments
|
|
2432
|
+
* unchanged.
|
|
2433
|
+
*
|
|
2434
|
+
* Idempotent on the pinned set: metadata is excluded from the comparison, so
|
|
2435
|
+
* re-submitting the same revisions with a different `message` returns the
|
|
2436
|
+
* release that already pins them rather than creating a second one.
|
|
1635
2437
|
* @summary Create a release
|
|
1636
2438
|
*/
|
|
1637
2439
|
export const createRelease = async (
|
|
1638
2440
|
createReleaseBody: CreateReleaseBody,
|
|
1639
2441
|
params: CreateReleaseParams,
|
|
1640
|
-
options?:
|
|
2442
|
+
options?: Parameters<typeof customFetch>[1],
|
|
1641
2443
|
): Promise<CreateRelease200 | CreateRelease201> => {
|
|
2444
|
+
const getHeaders = (
|
|
2445
|
+
h?: NonNullable<RequestInit["headers"]>,
|
|
2446
|
+
): Record<string, string | readonly string[]> => {
|
|
2447
|
+
if (!h) return {};
|
|
2448
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
2449
|
+
if (Symbol.iterator in h) {
|
|
2450
|
+
return Object.fromEntries(
|
|
2451
|
+
Array.from(
|
|
2452
|
+
h as Iterable<Iterable<string>>,
|
|
2453
|
+
(entry) => Array.from(entry) as [string, string],
|
|
2454
|
+
),
|
|
2455
|
+
);
|
|
2456
|
+
}
|
|
2457
|
+
const headers: Record<string, string | readonly string[]> = {};
|
|
2458
|
+
for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
|
|
2459
|
+
if (value !== undefined) headers[name] = value;
|
|
2460
|
+
}
|
|
2461
|
+
return headers;
|
|
2462
|
+
};
|
|
1642
2463
|
return customFetch<CreateRelease200 | CreateRelease201>(getCreateReleaseUrl(params), {
|
|
1643
2464
|
...options,
|
|
1644
2465
|
method: "POST",
|
|
1645
|
-
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
2466
|
+
headers: { "Content-Type": "application/json", ...getHeaders(options?.headers) },
|
|
1646
2467
|
body: JSON.stringify(createReleaseBody),
|
|
1647
2468
|
});
|
|
1648
2469
|
};
|
|
@@ -1652,7 +2473,7 @@ export const getListReleasesUrl = (params: ListReleasesParams) => {
|
|
|
1652
2473
|
|
|
1653
2474
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1654
2475
|
if (value !== undefined) {
|
|
1655
|
-
normalizedParams.append(key, value === null ? "null" : value
|
|
2476
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1656
2477
|
}
|
|
1657
2478
|
});
|
|
1658
2479
|
|
|
@@ -1665,15 +2486,14 @@ export const getListReleasesUrl = (params: ListReleasesParams) => {
|
|
|
1665
2486
|
|
|
1666
2487
|
/**
|
|
1667
2488
|
* Lists the project's releases, newest first.
|
|
1668
|
-
|
|
1669
|
-
Entries carry metadata only — the pinned set is omitted. Read one release
|
|
1670
|
-
with `GET /releases/{release_id}` to get its pointers.
|
|
1671
|
-
|
|
2489
|
+
*
|
|
2490
|
+
* Entries carry metadata only — the pinned set is omitted. Read one release
|
|
2491
|
+
* with `GET /releases/{release_id}` to get its pointers.
|
|
1672
2492
|
* @summary List releases
|
|
1673
2493
|
*/
|
|
1674
2494
|
export const listReleases = async (
|
|
1675
2495
|
params: ListReleasesParams,
|
|
1676
|
-
options?:
|
|
2496
|
+
options?: Parameters<typeof customFetch>[1],
|
|
1677
2497
|
): Promise<ListReleases200> => {
|
|
1678
2498
|
return customFetch<ListReleases200>(getListReleasesUrl(params), {
|
|
1679
2499
|
...options,
|
|
@@ -1686,35 +2506,34 @@ export const getGetReleaseByIdUrl = (releaseId: string, params: GetReleaseByIdPa
|
|
|
1686
2506
|
|
|
1687
2507
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1688
2508
|
if (value !== undefined) {
|
|
1689
|
-
normalizedParams.append(key, value === null ? "null" : value
|
|
2509
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1690
2510
|
}
|
|
1691
2511
|
});
|
|
1692
2512
|
|
|
1693
2513
|
const stringifiedParams = normalizedParams.toString();
|
|
1694
2514
|
|
|
1695
2515
|
return stringifiedParams.length > 0
|
|
1696
|
-
? `${getProxyPath()}/releases/${releaseId}?${stringifiedParams}`
|
|
1697
|
-
: `${getProxyPath()}/releases/${releaseId}`;
|
|
2516
|
+
? `${getProxyPath()}/releases/${encodeURIComponent(String(releaseId))}?${stringifiedParams}`
|
|
2517
|
+
: `${getProxyPath()}/releases/${encodeURIComponent(String(releaseId))}`;
|
|
1698
2518
|
};
|
|
1699
2519
|
|
|
1700
2520
|
/**
|
|
1701
2521
|
* Reads one release: its metadata and the `(kind, handle, revision_id)`
|
|
1702
|
-
tuples it pins.
|
|
1703
|
-
|
|
1704
|
-
Does not embed resource content. Resolve each `revision_id` through the
|
|
1705
|
-
per-kind read endpoints when the bytes are needed.
|
|
1706
|
-
|
|
1707
|
-
The lookup is scoped to the project in `project_id`: a release id belonging
|
|
1708
|
-
to another project answers not found exactly as an unknown id does, so the
|
|
1709
|
-
endpoint cannot be used to probe for releases in projects the caller cannot
|
|
1710
|
-
read.
|
|
1711
|
-
|
|
2522
|
+
* tuples it pins.
|
|
2523
|
+
*
|
|
2524
|
+
* Does not embed resource content. Resolve each `revision_id` through the
|
|
2525
|
+
* per-kind read endpoints when the bytes are needed.
|
|
2526
|
+
*
|
|
2527
|
+
* The lookup is scoped to the project in `project_id`: a release id belonging
|
|
2528
|
+
* to another project answers not found exactly as an unknown id does, so the
|
|
2529
|
+
* endpoint cannot be used to probe for releases in projects the caller cannot
|
|
2530
|
+
* read.
|
|
1712
2531
|
* @summary Get a release by id
|
|
1713
2532
|
*/
|
|
1714
2533
|
export const getReleaseById = async (
|
|
1715
2534
|
releaseId: string,
|
|
1716
2535
|
params: GetReleaseByIdParams,
|
|
1717
|
-
options?:
|
|
2536
|
+
options?: Parameters<typeof customFetch>[1],
|
|
1718
2537
|
): Promise<GetReleaseById200> => {
|
|
1719
2538
|
return customFetch<GetReleaseById200>(getGetReleaseByIdUrl(releaseId, params), {
|
|
1720
2539
|
...options,
|
|
@@ -1727,7 +2546,7 @@ export const getCreateGrantUrl = (params: CreateGrantParams) => {
|
|
|
1727
2546
|
|
|
1728
2547
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1729
2548
|
if (value !== undefined) {
|
|
1730
|
-
normalizedParams.append(key, value === null ? "null" : value
|
|
2549
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1731
2550
|
}
|
|
1732
2551
|
});
|
|
1733
2552
|
|
|
@@ -1740,23 +2559,54 @@ export const getCreateGrantUrl = (params: CreateGrantParams) => {
|
|
|
1740
2559
|
|
|
1741
2560
|
/**
|
|
1742
2561
|
* Bind a user or team to `project.viewer`, `project.editor`, or
|
|
1743
|
-
`project.admin` on the project identified by the `project-id` header.
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
2562
|
+
* `project.admin` on the project identified by the `project-id` header.
|
|
2563
|
+
* Name the principal with `user` (`user_id` or `identifier`) or `team`
|
|
2564
|
+
* (`team_id` or `name`). IDs are `asgn_<opaque>`. Owning-team
|
|
2565
|
+
* (`project.team`) grants are not created here — claim owns that path. An
|
|
2566
|
+
* unrevoked grant with the same principal and relation occupies the unique
|
|
2567
|
+
* key even after `expires_at`; DELETE it before re-creating.
|
|
2568
|
+
* Create does not accept `expand`. The `user_id` and team locators
|
|
2569
|
+
* return 201, whose `user` / `team` carry only `user_id` / `team_id`,
|
|
2570
|
+
* and still 404 / 409 when the principal is missing or the tuple
|
|
2571
|
+
* already exists. Creating by `user.identifier` answers 202 with no
|
|
2572
|
+
* body on every outcome. Granting the session caller's own user is
|
|
2573
|
+
* `grant.invalid` on either user locator. Read the grant back for
|
|
2574
|
+
* identifier and display.
|
|
2575
|
+
*
|
|
2576
|
+
* Accepts either a project secret (`oauth2`) or a user-bound Console
|
|
2577
|
+
* session cookie (`nextgenSession`). Session callers are authorized as
|
|
2578
|
+
* the human against the target project (home may differ). CSRF/Origin
|
|
2579
|
+
* for cookie mutations is a follow-up (#1140).
|
|
1749
2580
|
* @summary Create grant
|
|
1750
2581
|
*/
|
|
1751
2582
|
export const createGrant = async (
|
|
1752
2583
|
createGrantBody: CreateGrantBody,
|
|
1753
2584
|
params: CreateGrantParams,
|
|
1754
|
-
options?:
|
|
1755
|
-
): Promise<CreateGrant201> => {
|
|
1756
|
-
|
|
2585
|
+
options?: Parameters<typeof customFetch>[1],
|
|
2586
|
+
): Promise<CreateGrant201 | void> => {
|
|
2587
|
+
const getHeaders = (
|
|
2588
|
+
h?: NonNullable<RequestInit["headers"]>,
|
|
2589
|
+
): Record<string, string | readonly string[]> => {
|
|
2590
|
+
if (!h) return {};
|
|
2591
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
2592
|
+
if (Symbol.iterator in h) {
|
|
2593
|
+
return Object.fromEntries(
|
|
2594
|
+
Array.from(
|
|
2595
|
+
h as Iterable<Iterable<string>>,
|
|
2596
|
+
(entry) => Array.from(entry) as [string, string],
|
|
2597
|
+
),
|
|
2598
|
+
);
|
|
2599
|
+
}
|
|
2600
|
+
const headers: Record<string, string | readonly string[]> = {};
|
|
2601
|
+
for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
|
|
2602
|
+
if (value !== undefined) headers[name] = value;
|
|
2603
|
+
}
|
|
2604
|
+
return headers;
|
|
2605
|
+
};
|
|
2606
|
+
return customFetch<CreateGrant201 | void>(getCreateGrantUrl(params), {
|
|
1757
2607
|
...options,
|
|
1758
2608
|
method: "POST",
|
|
1759
|
-
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
2609
|
+
headers: { "Content-Type": "application/json", ...getHeaders(options?.headers) },
|
|
1760
2610
|
body: JSON.stringify(createGrantBody),
|
|
1761
2611
|
});
|
|
1762
2612
|
};
|
|
@@ -1766,7 +2616,7 @@ export const getQueryGrantsUrl = (params: QueryGrantsParams) => {
|
|
|
1766
2616
|
|
|
1767
2617
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1768
2618
|
if (value !== undefined) {
|
|
1769
|
-
normalizedParams.append(key, value === null ? "null" : value
|
|
2619
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1770
2620
|
}
|
|
1771
2621
|
});
|
|
1772
2622
|
|
|
@@ -1779,27 +2629,51 @@ export const getQueryGrantsUrl = (params: QueryGrantsParams) => {
|
|
|
1779
2629
|
|
|
1780
2630
|
/**
|
|
1781
2631
|
* Returns the collaboration grants of a project, paginated with a cursor.
|
|
1782
|
-
Only unrevoked grants this API manages are listed (user or team bound to
|
|
1783
|
-
viewer, editor, or admin), including expired grants so a client can
|
|
1784
|
-
DELETE before re-granting. Project-secret setup (`sk_proj`) and
|
|
1785
|
-
owning-team (`relation=team`) rows are not returned. Grants are not in
|
|
1786
|
-
`resource_scope_index`; project scope is required on the query (same as
|
|
1787
|
-
get). Requires `project.read`. `expand: ["principal"]`
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
2632
|
+
* Only unrevoked grants this API manages are listed (user or team bound to
|
|
2633
|
+
* viewer, editor, or admin), including expired grants so a client can
|
|
2634
|
+
* DELETE before re-granting. Project-secret setup (`sk_proj`) and
|
|
2635
|
+
* owning-team (`relation=team`) rows are not returned. Grants are not in
|
|
2636
|
+
* `resource_scope_index`; project scope is required on the query (same as
|
|
2637
|
+
* get). Requires `project.read`. `expand: ["principal"]` adds envelope
|
|
2638
|
+
* fields on `user` / `team` and additionally requires `user.read` and
|
|
2639
|
+
* `team.read` for project secrets (documented on the expand enum; those
|
|
2640
|
+
* scopes cannot be ANDed onto this security block because they are
|
|
2641
|
+
* body-conditional). A user-bound Console session that already passed
|
|
2642
|
+
* the project Check may expand without those scopes.
|
|
2643
|
+
*
|
|
2644
|
+
* Accepts either a project secret (`oauth2`) or a user-bound Console
|
|
2645
|
+
* session cookie (`nextgenSession`). CSRF/Origin for cookie mutations
|
|
2646
|
+
* is a follow-up (#1140).
|
|
1792
2647
|
* @summary Query grants
|
|
1793
2648
|
*/
|
|
1794
2649
|
export const queryGrants = async (
|
|
1795
2650
|
queryGrantsBody: QueryGrantsBody,
|
|
1796
2651
|
params: QueryGrantsParams,
|
|
1797
|
-
options?:
|
|
2652
|
+
options?: Parameters<typeof customFetch>[1],
|
|
1798
2653
|
): Promise<QueryGrants200> => {
|
|
2654
|
+
const getHeaders = (
|
|
2655
|
+
h?: NonNullable<RequestInit["headers"]>,
|
|
2656
|
+
): Record<string, string | readonly string[]> => {
|
|
2657
|
+
if (!h) return {};
|
|
2658
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
2659
|
+
if (Symbol.iterator in h) {
|
|
2660
|
+
return Object.fromEntries(
|
|
2661
|
+
Array.from(
|
|
2662
|
+
h as Iterable<Iterable<string>>,
|
|
2663
|
+
(entry) => Array.from(entry) as [string, string],
|
|
2664
|
+
),
|
|
2665
|
+
);
|
|
2666
|
+
}
|
|
2667
|
+
const headers: Record<string, string | readonly string[]> = {};
|
|
2668
|
+
for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
|
|
2669
|
+
if (value !== undefined) headers[name] = value;
|
|
2670
|
+
}
|
|
2671
|
+
return headers;
|
|
2672
|
+
};
|
|
1799
2673
|
return customFetch<QueryGrants200>(getQueryGrantsUrl(params), {
|
|
1800
2674
|
...options,
|
|
1801
2675
|
method: "POST",
|
|
1802
|
-
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
2676
|
+
headers: { "Content-Type": "application/json", ...getHeaders(options?.headers) },
|
|
1803
2677
|
body: JSON.stringify(queryGrantsBody),
|
|
1804
2678
|
});
|
|
1805
2679
|
};
|
|
@@ -1808,34 +2682,50 @@ export const getGetGrantUrl = (id: string, params: GetGrantParams) => {
|
|
|
1808
2682
|
const normalizedParams = new URLSearchParams();
|
|
1809
2683
|
|
|
1810
2684
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
2685
|
+
const explodeParameters = ["expand"];
|
|
2686
|
+
|
|
2687
|
+
if (Array.isArray(value) && explodeParameters.includes(key)) {
|
|
2688
|
+
value.forEach((v) => {
|
|
2689
|
+
normalizedParams.append(key, v === null ? "null" : String(v));
|
|
2690
|
+
});
|
|
2691
|
+
return;
|
|
2692
|
+
}
|
|
2693
|
+
|
|
1811
2694
|
if (value !== undefined) {
|
|
1812
|
-
normalizedParams.append(key, value === null ? "null" : value
|
|
2695
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1813
2696
|
}
|
|
1814
2697
|
});
|
|
1815
2698
|
|
|
1816
2699
|
const stringifiedParams = normalizedParams.toString();
|
|
1817
2700
|
|
|
1818
2701
|
return stringifiedParams.length > 0
|
|
1819
|
-
? `${getProxyPath()}/grants/${id}?${stringifiedParams}`
|
|
1820
|
-
: `${getProxyPath()}/grants/${id}`;
|
|
2702
|
+
? `${getProxyPath()}/grants/${encodeURIComponent(String(id))}?${stringifiedParams}`
|
|
2703
|
+
: `${getProxyPath()}/grants/${encodeURIComponent(String(id))}`;
|
|
1821
2704
|
};
|
|
1822
2705
|
|
|
1823
2706
|
/**
|
|
1824
2707
|
* Loads a grant by `(project_id, id)` that this API manages (user or team
|
|
1825
|
-
bound to viewer, editor, or admin) and that has not been revoked.
|
|
1826
|
-
"Active" here means not revoked: expired grants stay visible so the
|
|
1827
|
-
client can DELETE before re-granting the same binding. Authorization
|
|
1828
|
-
still ignores expired grants. Grants are not registered in
|
|
1829
|
-
`resource_scope_index`; project scope is required on the query (same as
|
|
1830
|
-
events). Misses, revoked rows, project-secret setup (`sk_proj`),
|
|
1831
|
-
owning-team (`relation=team`) rows, and cross-project ids return 404.
|
|
1832
|
-
|
|
2708
|
+
* bound to viewer, editor, or admin) and that has not been revoked.
|
|
2709
|
+
* "Active" here means not revoked: expired grants stay visible so the
|
|
2710
|
+
* client can DELETE before re-granting the same binding. Authorization
|
|
2711
|
+
* still ignores expired grants. Grants are not registered in
|
|
2712
|
+
* `resource_scope_index`; project scope is required on the query (same as
|
|
2713
|
+
* events). Misses, revoked rows, project-secret setup (`sk_proj`),
|
|
2714
|
+
* owning-team (`relation=team`) rows, and cross-project ids return 404.
|
|
2715
|
+
* `expand=principal` adds envelope fields on `user` or `team` and requires
|
|
2716
|
+
* `user.read` and `team.read` in addition to `project.read` for project
|
|
2717
|
+
* secrets. A user-bound Console session that already passed the project
|
|
2718
|
+
* Check may expand without those scopes.
|
|
2719
|
+
*
|
|
2720
|
+
* Accepts either a project secret (`oauth2`) or a user-bound Console
|
|
2721
|
+
* session cookie (`nextgenSession`). CSRF/Origin for cookie mutations
|
|
2722
|
+
* is a follow-up (#1140).
|
|
1833
2723
|
* @summary Get grant
|
|
1834
2724
|
*/
|
|
1835
2725
|
export const getGrant = async (
|
|
1836
2726
|
id: string,
|
|
1837
2727
|
params: GetGrantParams,
|
|
1838
|
-
options?:
|
|
2728
|
+
options?: Parameters<typeof customFetch>[1],
|
|
1839
2729
|
): Promise<GetGrant200> => {
|
|
1840
2730
|
return customFetch<GetGrant200>(getGetGrantUrl(id, params), {
|
|
1841
2731
|
...options,
|
|
@@ -1848,29 +2738,32 @@ export const getDeleteGrantUrl = (id: string, params: DeleteGrantParams) => {
|
|
|
1848
2738
|
|
|
1849
2739
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1850
2740
|
if (value !== undefined) {
|
|
1851
|
-
normalizedParams.append(key, value === null ? "null" : value
|
|
2741
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1852
2742
|
}
|
|
1853
2743
|
});
|
|
1854
2744
|
|
|
1855
2745
|
const stringifiedParams = normalizedParams.toString();
|
|
1856
2746
|
|
|
1857
2747
|
return stringifiedParams.length > 0
|
|
1858
|
-
? `${getProxyPath()}/grants/${id}?${stringifiedParams}`
|
|
1859
|
-
: `${getProxyPath()}/grants/${id}`;
|
|
2748
|
+
? `${getProxyPath()}/grants/${encodeURIComponent(String(id))}?${stringifiedParams}`
|
|
2749
|
+
: `${getProxyPath()}/grants/${encodeURIComponent(String(id))}`;
|
|
1860
2750
|
};
|
|
1861
2751
|
|
|
1862
2752
|
/**
|
|
1863
2753
|
* Soft-revokes a grant this API manages and emits `authz.revoked`.
|
|
1864
|
-
Already-revoked, missing, project-secret setup, and owning-team grants
|
|
1865
|
-
return 404. The row is not un-revoked. Expired grants can still be
|
|
1866
|
-
revoked so the unique binding can be reused.
|
|
1867
|
-
|
|
2754
|
+
* Already-revoked, missing, project-secret setup, and owning-team grants
|
|
2755
|
+
* return 404. The row is not un-revoked. Expired grants can still be
|
|
2756
|
+
* revoked so the unique binding can be reused.
|
|
2757
|
+
*
|
|
2758
|
+
* Accepts either a project secret (`oauth2`) or a user-bound Console
|
|
2759
|
+
* session cookie (`nextgenSession`). CSRF/Origin for cookie mutations
|
|
2760
|
+
* is a follow-up (#1140).
|
|
1868
2761
|
* @summary Revoke grant
|
|
1869
2762
|
*/
|
|
1870
2763
|
export const deleteGrant = async (
|
|
1871
2764
|
id: string,
|
|
1872
2765
|
params: DeleteGrantParams,
|
|
1873
|
-
options?:
|
|
2766
|
+
options?: Parameters<typeof customFetch>[1],
|
|
1874
2767
|
): Promise<void> => {
|
|
1875
2768
|
return customFetch<void>(getDeleteGrantUrl(id, params), {
|
|
1876
2769
|
...options,
|
|
@@ -1886,13 +2779,13 @@ export const getListEventsUrl = (params: ListEventsParams) => {
|
|
|
1886
2779
|
|
|
1887
2780
|
if (Array.isArray(value) && explodeParameters.includes(key)) {
|
|
1888
2781
|
value.forEach((v) => {
|
|
1889
|
-
normalizedParams.append(key, v === null ? "null" : v
|
|
2782
|
+
normalizedParams.append(key, v === null ? "null" : String(v));
|
|
1890
2783
|
});
|
|
1891
2784
|
return;
|
|
1892
2785
|
}
|
|
1893
2786
|
|
|
1894
2787
|
if (value !== undefined) {
|
|
1895
|
-
normalizedParams.append(key, value === null ? "null" : value
|
|
2788
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1896
2789
|
}
|
|
1897
2790
|
});
|
|
1898
2791
|
|
|
@@ -1905,22 +2798,21 @@ export const getListEventsUrl = (params: ListEventsParams) => {
|
|
|
1905
2798
|
|
|
1906
2799
|
/**
|
|
1907
2800
|
* Returns project-scoped audit events, newest-first by keyset on
|
|
1908
|
-
`(created_at, id)` (ADR 027 / ADR 049). Pass `order=asc` for oldest-first.
|
|
1909
|
-
Requires `events.read`.
|
|
1910
|
-
|
|
1911
|
-
Pre-claim projects return an empty list (events are stored but not
|
|
1912
|
-
visible until claim succeeds). Team-scoped credentials see only events
|
|
1913
|
-
whose emit-time `team_id` matches the credential team (enforced when
|
|
1914
|
-
team-scoped tokens exist).
|
|
1915
|
-
|
|
1916
|
-
Clients discriminate each item via `event_type` (OpenAPI Event oneOf) —
|
|
1917
|
-
see docs/design/api/events-catalog.md.
|
|
1918
|
-
|
|
2801
|
+
* `(created_at, id)` (ADR 027 / ADR 049). Pass `order=asc` for oldest-first.
|
|
2802
|
+
* Requires `events.read`.
|
|
2803
|
+
*
|
|
2804
|
+
* Pre-claim projects return an empty list (events are stored but not
|
|
2805
|
+
* visible until claim succeeds). Team-scoped credentials see only events
|
|
2806
|
+
* whose emit-time `team_id` matches the credential team (enforced when
|
|
2807
|
+
* team-scoped tokens exist).
|
|
2808
|
+
*
|
|
2809
|
+
* Clients discriminate each item via `event_type` (OpenAPI Event oneOf) —
|
|
2810
|
+
* see docs/design/api/events-catalog.md.
|
|
1919
2811
|
* @summary List events
|
|
1920
2812
|
*/
|
|
1921
2813
|
export const listEvents = async (
|
|
1922
2814
|
params: ListEventsParams,
|
|
1923
|
-
options?:
|
|
2815
|
+
options?: Parameters<typeof customFetch>[1],
|
|
1924
2816
|
): Promise<ListEvents200> => {
|
|
1925
2817
|
return customFetch<ListEvents200>(getListEventsUrl(params), {
|
|
1926
2818
|
...options,
|
|
@@ -1933,33 +2825,369 @@ export const getGetEventUrl = (id: string, params: GetEventParams) => {
|
|
|
1933
2825
|
|
|
1934
2826
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1935
2827
|
if (value !== undefined) {
|
|
1936
|
-
normalizedParams.append(key, value === null ? "null" : value
|
|
2828
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1937
2829
|
}
|
|
1938
2830
|
});
|
|
1939
2831
|
|
|
1940
2832
|
const stringifiedParams = normalizedParams.toString();
|
|
1941
2833
|
|
|
1942
2834
|
return stringifiedParams.length > 0
|
|
1943
|
-
? `${getProxyPath()}/events/${id}?${stringifiedParams}`
|
|
1944
|
-
: `${getProxyPath()}/events/${id}`;
|
|
2835
|
+
? `${getProxyPath()}/events/${encodeURIComponent(String(id))}?${stringifiedParams}`
|
|
2836
|
+
: `${getProxyPath()}/events/${encodeURIComponent(String(id))}`;
|
|
1945
2837
|
};
|
|
1946
2838
|
|
|
1947
2839
|
/**
|
|
1948
2840
|
* Loads a single event by `(project_id, id)`. Requires `events.read`.
|
|
1949
|
-
Events are not registered in `resource_scope_index`; project scope is
|
|
1950
|
-
required on the query (ADR 049). Misses and cross-project ids return 404.
|
|
1951
|
-
|
|
1952
|
-
Pre-claim projects return 404 (stored events stay invisible until claim).
|
|
1953
|
-
|
|
2841
|
+
* Events are not registered in `resource_scope_index`; project scope is
|
|
2842
|
+
* required on the query (ADR 049). Misses and cross-project ids return 404.
|
|
2843
|
+
*
|
|
2844
|
+
* Pre-claim projects return 404 (stored events stay invisible until claim).
|
|
1954
2845
|
* @summary Get event by ID
|
|
1955
2846
|
*/
|
|
1956
2847
|
export const getEvent = async (
|
|
1957
2848
|
id: string,
|
|
1958
2849
|
params: GetEventParams,
|
|
1959
|
-
options?:
|
|
2850
|
+
options?: Parameters<typeof customFetch>[1],
|
|
1960
2851
|
): Promise<GetEvent200> => {
|
|
1961
2852
|
return customFetch<GetEvent200>(getGetEventUrl(id, params), {
|
|
1962
2853
|
...options,
|
|
1963
2854
|
method: "GET",
|
|
1964
2855
|
});
|
|
1965
2856
|
};
|
|
2857
|
+
|
|
2858
|
+
export const getGetVariablesUrl = (params: GetVariablesParams) => {
|
|
2859
|
+
const normalizedParams = new URLSearchParams();
|
|
2860
|
+
|
|
2861
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
2862
|
+
if (value !== undefined) {
|
|
2863
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2864
|
+
}
|
|
2865
|
+
});
|
|
2866
|
+
|
|
2867
|
+
const stringifiedParams = normalizedParams.toString();
|
|
2868
|
+
|
|
2869
|
+
return stringifiedParams.length > 0
|
|
2870
|
+
? `${getProxyPath()}/variables?${stringifiedParams}`
|
|
2871
|
+
: `${getProxyPath()}/variables`;
|
|
2872
|
+
};
|
|
2873
|
+
|
|
2874
|
+
/**
|
|
2875
|
+
* Returns the variables entered at the owner this request addresses, keyed by
|
|
2876
|
+
* name — one environment of the project with `environment_name`, the project
|
|
2877
|
+
* level itself without it.
|
|
2878
|
+
*
|
|
2879
|
+
* Owners are separate, not a ladder: an environment does not inherit the
|
|
2880
|
+
* project's variables and the project does not see its environments'. Reading
|
|
2881
|
+
* everything a project holds therefore means reading each owner in turn.
|
|
2882
|
+
*
|
|
2883
|
+
* Secret values are not returned. A secret appears as `{"secret": true}`,
|
|
2884
|
+
* which says a value is held without disclosing it.
|
|
2885
|
+
* @summary Get variables
|
|
2886
|
+
*/
|
|
2887
|
+
export const getVariables = async (
|
|
2888
|
+
params: GetVariablesParams,
|
|
2889
|
+
options?: Parameters<typeof customFetch>[1],
|
|
2890
|
+
): Promise<GetVariables200> => {
|
|
2891
|
+
return customFetch<GetVariables200>(getGetVariablesUrl(params), {
|
|
2892
|
+
...options,
|
|
2893
|
+
method: "GET",
|
|
2894
|
+
});
|
|
2895
|
+
};
|
|
2896
|
+
|
|
2897
|
+
export const getUpdateVariablesUrl = (params: UpdateVariablesParams) => {
|
|
2898
|
+
const normalizedParams = new URLSearchParams();
|
|
2899
|
+
|
|
2900
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
2901
|
+
if (value !== undefined) {
|
|
2902
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2903
|
+
}
|
|
2904
|
+
});
|
|
2905
|
+
|
|
2906
|
+
const stringifiedParams = normalizedParams.toString();
|
|
2907
|
+
|
|
2908
|
+
return stringifiedParams.length > 0
|
|
2909
|
+
? `${getProxyPath()}/variables?${stringifiedParams}`
|
|
2910
|
+
: `${getProxyPath()}/variables`;
|
|
2911
|
+
};
|
|
2912
|
+
|
|
2913
|
+
/**
|
|
2914
|
+
* Enters, replaces and removes variables at the owner this request
|
|
2915
|
+
* addresses.
|
|
2916
|
+
*
|
|
2917
|
+
* Every name in the body is applied at exactly that owner — the project, or
|
|
2918
|
+
* the environment named by `environment_name` — and reaches no other. Names
|
|
2919
|
+
* not in the body are untouched.
|
|
2920
|
+
*
|
|
2921
|
+
* A bare scalar enters a non-secret value. `{"value": …, "secret": true}`
|
|
2922
|
+
* stores the value encrypted under the project's active `secret` key, after
|
|
2923
|
+
* which it can be referenced but not read back. `null` removes the name from
|
|
2924
|
+
* this owner (RFC 7386), which is how several variables are removed in one
|
|
2925
|
+
* request; removing a name this owner does not hold is a no-op rather than an
|
|
2926
|
+
* error.
|
|
2927
|
+
*
|
|
2928
|
+
* The body is applied whole or not at all, so a rejected request leaves the
|
|
2929
|
+
* owner exactly as it was. Writing the same name and owner twice replaces the
|
|
2930
|
+
* value rather than duplicating it, which makes a retry safe.
|
|
2931
|
+
* @summary Update variables
|
|
2932
|
+
*/
|
|
2933
|
+
export const updateVariables = async (
|
|
2934
|
+
updateVariablesBody: UpdateVariablesBody,
|
|
2935
|
+
params: UpdateVariablesParams,
|
|
2936
|
+
options?: Parameters<typeof customFetch>[1],
|
|
2937
|
+
): Promise<UpdateVariables200> => {
|
|
2938
|
+
const getHeaders = (
|
|
2939
|
+
h?: NonNullable<RequestInit["headers"]>,
|
|
2940
|
+
): Record<string, string | readonly string[]> => {
|
|
2941
|
+
if (!h) return {};
|
|
2942
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
2943
|
+
if (Symbol.iterator in h) {
|
|
2944
|
+
return Object.fromEntries(
|
|
2945
|
+
Array.from(
|
|
2946
|
+
h as Iterable<Iterable<string>>,
|
|
2947
|
+
(entry) => Array.from(entry) as [string, string],
|
|
2948
|
+
),
|
|
2949
|
+
);
|
|
2950
|
+
}
|
|
2951
|
+
const headers: Record<string, string | readonly string[]> = {};
|
|
2952
|
+
for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
|
|
2953
|
+
if (value !== undefined) headers[name] = value;
|
|
2954
|
+
}
|
|
2955
|
+
return headers;
|
|
2956
|
+
};
|
|
2957
|
+
return customFetch<UpdateVariables200>(getUpdateVariablesUrl(params), {
|
|
2958
|
+
...options,
|
|
2959
|
+
method: "PATCH",
|
|
2960
|
+
headers: { "Content-Type": "application/json", ...getHeaders(options?.headers) },
|
|
2961
|
+
body: JSON.stringify(updateVariablesBody),
|
|
2962
|
+
});
|
|
2963
|
+
};
|
|
2964
|
+
|
|
2965
|
+
export const getGetVariableUrl = (variableName: string, params: GetVariableParams) => {
|
|
2966
|
+
const normalizedParams = new URLSearchParams();
|
|
2967
|
+
|
|
2968
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
2969
|
+
if (value !== undefined) {
|
|
2970
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2971
|
+
}
|
|
2972
|
+
});
|
|
2973
|
+
|
|
2974
|
+
const stringifiedParams = normalizedParams.toString();
|
|
2975
|
+
|
|
2976
|
+
return stringifiedParams.length > 0
|
|
2977
|
+
? `${getProxyPath()}/variables/${encodeURIComponent(String(variableName))}?${stringifiedParams}`
|
|
2978
|
+
: `${getProxyPath()}/variables/${encodeURIComponent(String(variableName))}`;
|
|
2979
|
+
};
|
|
2980
|
+
|
|
2981
|
+
/**
|
|
2982
|
+
* Reads one variable by name from the owner this request addresses — one
|
|
2983
|
+
* environment of the project with `environment_name`, the project level
|
|
2984
|
+
* itself without it.
|
|
2985
|
+
*
|
|
2986
|
+
* A name that owner has not entered answers `var.not_found`, even when
|
|
2987
|
+
* another owner of the same project holds it: nothing is inherited. A secret
|
|
2988
|
+
* is found but not disclosed: the response is `{"secret": true}`.
|
|
2989
|
+
* @summary Get a variable
|
|
2990
|
+
*/
|
|
2991
|
+
export const getVariable = async (
|
|
2992
|
+
variableName: string,
|
|
2993
|
+
params: GetVariableParams,
|
|
2994
|
+
options?: Parameters<typeof customFetch>[1],
|
|
2995
|
+
): Promise<GetVariable200> => {
|
|
2996
|
+
return customFetch<GetVariable200>(getGetVariableUrl(variableName, params), {
|
|
2997
|
+
...options,
|
|
2998
|
+
method: "GET",
|
|
2999
|
+
});
|
|
3000
|
+
};
|
|
3001
|
+
|
|
3002
|
+
export const getDeleteVariableUrl = (variableName: string, params: DeleteVariableParams) => {
|
|
3003
|
+
const normalizedParams = new URLSearchParams();
|
|
3004
|
+
|
|
3005
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
3006
|
+
if (value !== undefined) {
|
|
3007
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
3008
|
+
}
|
|
3009
|
+
});
|
|
3010
|
+
|
|
3011
|
+
const stringifiedParams = normalizedParams.toString();
|
|
3012
|
+
|
|
3013
|
+
return stringifiedParams.length > 0
|
|
3014
|
+
? `${getProxyPath()}/variables/${encodeURIComponent(String(variableName))}?${stringifiedParams}`
|
|
3015
|
+
: `${getProxyPath()}/variables/${encodeURIComponent(String(variableName))}`;
|
|
3016
|
+
};
|
|
3017
|
+
|
|
3018
|
+
/**
|
|
3019
|
+
* Removes the variable this owner entered under this name.
|
|
3020
|
+
*
|
|
3021
|
+
* A variable is deletable only by the owner that entered it. Deleting a name
|
|
3022
|
+
* another owner of the same project holds answers `var.not_found` and leaves
|
|
3023
|
+
* that owner's value standing.
|
|
3024
|
+
* @summary Delete a variable
|
|
3025
|
+
*/
|
|
3026
|
+
export const deleteVariable = async (
|
|
3027
|
+
variableName: string,
|
|
3028
|
+
params: DeleteVariableParams,
|
|
3029
|
+
options?: Parameters<typeof customFetch>[1],
|
|
3030
|
+
): Promise<void> => {
|
|
3031
|
+
return customFetch<void>(getDeleteVariableUrl(variableName, params), {
|
|
3032
|
+
...options,
|
|
3033
|
+
method: "DELETE",
|
|
3034
|
+
});
|
|
3035
|
+
};
|
|
3036
|
+
|
|
3037
|
+
export const getCreateDeploymentUrl = (params: CreateDeploymentParams) => {
|
|
3038
|
+
const normalizedParams = new URLSearchParams();
|
|
3039
|
+
|
|
3040
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
3041
|
+
if (value !== undefined) {
|
|
3042
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
3043
|
+
}
|
|
3044
|
+
});
|
|
3045
|
+
|
|
3046
|
+
const stringifiedParams = normalizedParams.toString();
|
|
3047
|
+
|
|
3048
|
+
return stringifiedParams.length > 0
|
|
3049
|
+
? `${getProxyPath()}/deployments?${stringifiedParams}`
|
|
3050
|
+
: `${getProxyPath()}/deployments`;
|
|
3051
|
+
};
|
|
3052
|
+
|
|
3053
|
+
/**
|
|
3054
|
+
* Makes a release live on an environment by recording a deployment. The two
|
|
3055
|
+
* happen atomically: when the call returns, the environment runs the named
|
|
3056
|
+
* release and the record exists; on any failure the environment keeps
|
|
3057
|
+
* running what it ran and no record is written.
|
|
3058
|
+
*
|
|
3059
|
+
* Deploying, promoting and rolling back are all this call — `reason` says
|
|
3060
|
+
* which. None of them assembles a release: the release must already exist,
|
|
3061
|
+
* and rolling back means deploying a release the environment ran earlier,
|
|
3062
|
+
* chosen from its deployment history.
|
|
3063
|
+
*
|
|
3064
|
+
* Idempotent on the running release: deploying the release the environment
|
|
3065
|
+
* already runs changes nothing and answers `200` with the deployment that
|
|
3066
|
+
* made it live, so a re-run of `zitadel deploy` on unchanged content is a
|
|
3067
|
+
* no-op end to end — matching `POST /releases`, which resolves the same
|
|
3068
|
+
* content to the same release first. Anything else writes a new record,
|
|
3069
|
+
* including the same release returning after something else ran in between:
|
|
3070
|
+
* the log is append-only, and each row is one act of making a release live.
|
|
3071
|
+
*
|
|
3072
|
+
* `expected_current_deployment_id` guards against racing another deploy:
|
|
3073
|
+
* when present, the swap only happens if the environment's current
|
|
3074
|
+
* deployment still is the one named, and a mismatch answers `409` with the
|
|
3075
|
+
* actual `current_deployment_id` and `current_release_id` in the details.
|
|
3076
|
+
* @summary Create a deployment
|
|
3077
|
+
*/
|
|
3078
|
+
export const createDeployment = async (
|
|
3079
|
+
createDeploymentBody: CreateDeploymentBody,
|
|
3080
|
+
params: CreateDeploymentParams,
|
|
3081
|
+
options?: Parameters<typeof customFetch>[1],
|
|
3082
|
+
): Promise<CreateDeployment200 | CreateDeployment201> => {
|
|
3083
|
+
const getHeaders = (
|
|
3084
|
+
h?: NonNullable<RequestInit["headers"]>,
|
|
3085
|
+
): Record<string, string | readonly string[]> => {
|
|
3086
|
+
if (!h) return {};
|
|
3087
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
3088
|
+
if (Symbol.iterator in h) {
|
|
3089
|
+
return Object.fromEntries(
|
|
3090
|
+
Array.from(
|
|
3091
|
+
h as Iterable<Iterable<string>>,
|
|
3092
|
+
(entry) => Array.from(entry) as [string, string],
|
|
3093
|
+
),
|
|
3094
|
+
);
|
|
3095
|
+
}
|
|
3096
|
+
const headers: Record<string, string | readonly string[]> = {};
|
|
3097
|
+
for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
|
|
3098
|
+
if (value !== undefined) headers[name] = value;
|
|
3099
|
+
}
|
|
3100
|
+
return headers;
|
|
3101
|
+
};
|
|
3102
|
+
return customFetch<CreateDeployment200 | CreateDeployment201>(getCreateDeploymentUrl(params), {
|
|
3103
|
+
...options,
|
|
3104
|
+
method: "POST",
|
|
3105
|
+
headers: { "Content-Type": "application/json", ...getHeaders(options?.headers) },
|
|
3106
|
+
body: JSON.stringify(createDeploymentBody),
|
|
3107
|
+
});
|
|
3108
|
+
};
|
|
3109
|
+
|
|
3110
|
+
export const getListDeploymentsUrl = (params: ListDeploymentsParams) => {
|
|
3111
|
+
const normalizedParams = new URLSearchParams();
|
|
3112
|
+
|
|
3113
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
3114
|
+
const explodeParameters = ["expand"];
|
|
3115
|
+
|
|
3116
|
+
if (Array.isArray(value) && explodeParameters.includes(key)) {
|
|
3117
|
+
value.forEach((v) => {
|
|
3118
|
+
normalizedParams.append(key, v === null ? "null" : String(v));
|
|
3119
|
+
});
|
|
3120
|
+
return;
|
|
3121
|
+
}
|
|
3122
|
+
|
|
3123
|
+
if (value !== undefined) {
|
|
3124
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
3125
|
+
}
|
|
3126
|
+
});
|
|
3127
|
+
|
|
3128
|
+
const stringifiedParams = normalizedParams.toString();
|
|
3129
|
+
|
|
3130
|
+
return stringifiedParams.length > 0
|
|
3131
|
+
? `${getProxyPath()}/deployments?${stringifiedParams}`
|
|
3132
|
+
: `${getProxyPath()}/deployments`;
|
|
3133
|
+
};
|
|
3134
|
+
|
|
3135
|
+
/**
|
|
3136
|
+
* Lists deployments newest first: what ran where, and when.
|
|
3137
|
+
*
|
|
3138
|
+
* With `environment_name`, the list is that environment's history and its
|
|
3139
|
+
* first row is the environment's current deployment. Without it, the list
|
|
3140
|
+
* interleaves every environment of the project — a project-wide audit view
|
|
3141
|
+
* in which the first row is only the most recent deployment anywhere.
|
|
3142
|
+
*
|
|
3143
|
+
* `expand: ["release"]` embeds the release each deployment made live, so a
|
|
3144
|
+
* history renders with each entry's content without resolving `release_id`
|
|
3145
|
+
* one by one. Expanding requires `release.read` and does not affect the
|
|
3146
|
+
* ordering or the page tokens.
|
|
3147
|
+
* @summary List deployments
|
|
3148
|
+
*/
|
|
3149
|
+
export const listDeployments = async (
|
|
3150
|
+
params: ListDeploymentsParams,
|
|
3151
|
+
options?: Parameters<typeof customFetch>[1],
|
|
3152
|
+
): Promise<ListDeployments200> => {
|
|
3153
|
+
return customFetch<ListDeployments200>(getListDeploymentsUrl(params), {
|
|
3154
|
+
...options,
|
|
3155
|
+
method: "GET",
|
|
3156
|
+
});
|
|
3157
|
+
};
|
|
3158
|
+
|
|
3159
|
+
export const getGetDeploymentByIdUrl = (deploymentId: string, params: GetDeploymentByIdParams) => {
|
|
3160
|
+
const normalizedParams = new URLSearchParams();
|
|
3161
|
+
|
|
3162
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
3163
|
+
if (value !== undefined) {
|
|
3164
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
3165
|
+
}
|
|
3166
|
+
});
|
|
3167
|
+
|
|
3168
|
+
const stringifiedParams = normalizedParams.toString();
|
|
3169
|
+
|
|
3170
|
+
return stringifiedParams.length > 0
|
|
3171
|
+
? `${getProxyPath()}/deployments/${encodeURIComponent(String(deploymentId))}?${stringifiedParams}`
|
|
3172
|
+
: `${getProxyPath()}/deployments/${encodeURIComponent(String(deploymentId))}`;
|
|
3173
|
+
};
|
|
3174
|
+
|
|
3175
|
+
/**
|
|
3176
|
+
* Reads one deployment record.
|
|
3177
|
+
*
|
|
3178
|
+
* The lookup is scoped to the project in `project_id`: a deployment id
|
|
3179
|
+
* belonging to another project answers not found exactly as an unknown id
|
|
3180
|
+
* does, so the endpoint cannot be used to probe for deployments in projects
|
|
3181
|
+
* the caller cannot read.
|
|
3182
|
+
* @summary Get a deployment by id
|
|
3183
|
+
*/
|
|
3184
|
+
export const getDeploymentById = async (
|
|
3185
|
+
deploymentId: string,
|
|
3186
|
+
params: GetDeploymentByIdParams,
|
|
3187
|
+
options?: Parameters<typeof customFetch>[1],
|
|
3188
|
+
): Promise<GetDeploymentById200> => {
|
|
3189
|
+
return customFetch<GetDeploymentById200>(getGetDeploymentByIdUrl(deploymentId, params), {
|
|
3190
|
+
...options,
|
|
3191
|
+
method: "GET",
|
|
3192
|
+
});
|
|
3193
|
+
};
|